You are not logged in.

#1 2011-03-09 06:26:08

xiaq
Member
From: somewhere in China...
Registered: 2011-03-06
Posts: 89

A bug in /etc/rc.d/functions; and the release policy

This is a small issue, but how it relates to Arch's release policy is important.

I have CONSOLE="ter-120b" in my rc.conf, and I got following screen on startup. The message about console font is overwritten by the next message. Additionally, the right side is "[BUSY]".

bad.png

http://i795.photobucket.com/albums/yy24 … ot/bad.png

It turned out to be a bug in the set_consolefont, in /etc/rc.d/functions:

if (($? != 0)); then
    stat_fail
elif [[ $CONSOLEMAP ]]; then
    cat <<"EOF" >>/etc/profile.d/locale.sh
if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033(K"; fi
EOF
    stat_done
fi

stat_done is not called on the implicit "else" branch. The fix is easy:

if (($? != 0)); then
    stat_fail
else
    if [[ $CONSOLEMAP ]]; then
        cat <<"EOF" >>/etc/profile.d/locale.sh
if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033(K"; fi
EOF
    fi
    stat_done
fi

The effect is shown here.

good.png

http://i795.photobucket.com/albums/yy24 … t/good.png

However, that made me think about Arch's release policy. The latest release is 2010.5, 10 months ago. That usually doesn't matter that much, as Arch is a rolling release distro, and the CD image is really light. However, now and then we may spot bugs in scripts like /etc/rc.d/functions, which come with the CD and remain untouched by pacman. Will it be better if we follow Gentoo's approach, generating installation media every few days, putting latest software (and more importantly for Arch) and fixed scripts in it?

PS. I'd love to remove some black area in the screenshots, but I can't figure out how to do it with GIMP. Help on this is also appreciated.

Last edited by jasonwryan (2011-03-09 06:44:53)

Offline

#2 2011-03-09 06:35:13

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: A bug in /etc/rc.d/functions; and the release policy

Something like http://releng.archlinux.org/isos/ ?

Not that this matters too much given that you should update to newer software straight away.   Is that bug fixed in the current initscripts package?

Offline

#3 2011-03-09 06:46:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: A bug in /etc/rc.d/functions; and the release policy

1. Open GIMP
2. Select the area to the far right.
3. Cut and paste.
4. Move the pasted area to align with the left hand side.
5. Crop to size.
6. Profit!


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2011-03-09 06:49:00

xiaq
Member
From: somewhere in China...
Registered: 2011-03-06
Posts: 89

Re: A bug in /etc/rc.d/functions; and the release policy

Allan wrote:

Something like http://releng.archlinux.org/isos/ ?

Not that this matters too much given that you should update to newer software straight away.   Is that bug fixed in the current initscripts package?

Didn't understand the first sentence... (I'm not a native speaker.)  It's not fixed in current initscripts.

Offline

#5 2011-03-09 07:07:01

xiaq
Member
From: somewhere in China...
Registered: 2011-03-06
Posts: 89

Re: A bug in /etc/rc.d/functions; and the release policy

xiaq wrote:
Allan wrote:

Something like http://releng.archlinux.org/isos/ ?

Not that this matters too much given that you should update to newer software straight away.   Is that bug fixed in the current initscripts package?

Didn't understand the first sentence... (I'm not a native speaker.)  It's not fixed in current initscripts.

So... /etc/rc.d/functions does belong the a package (initscripts) and will be upgraded. I thought it doesn't belong to any package. But, are there such files?

Offline

#6 2011-03-09 07:21:49

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: A bug in /etc/rc.d/functions; and the release policy

xiaq wrote:

now and then we may spot bugs in scripts like /etc/rc.d/functions, which come with the CD and remain untouched by pacman.

You are mistaken. /etc/rc.d/functions is provided by the initscripts package, which has been updated four times since the 2010.05 release. The current version is 2011.02.1.

I suggest you submit the bug and your patch in the normal way, so that it is handled correctly.

Offline

#7 2011-03-09 11:44:15

xiaq
Member
From: somewhere in China...
Registered: 2011-03-06
Posts: 89

Re: A bug in /etc/rc.d/functions; and the release policy

tomk wrote:
xiaq wrote:

now and then we may spot bugs in scripts like /etc/rc.d/functions, which come with the CD and remain untouched by pacman.

You are mistaken. /etc/rc.d/functions is provided by the initscripts package, which has been updated four times since the 2010.05 release. The current version is 2011.02.1.

I suggest you submit the bug and your patch in the normal way, so that it is handled correctly.

All right, so I'm firing a bug report and send in my patch there. I have also found that /etc/rc.d/functions has some style problems. It uses a mix of space and tab for indentation, and the misleading modeline option "ts=2" (ts means "tabstop") makes the code look terrible. I have tried several values, and ts=8 turned out fine(most likely the author use this setting and don't use vim). The code is still inconsistent in style, though. So I'm going to clean up the style too. Is that okay as long as I don't break something?

Offline

#8 2011-03-09 11:51:31

xiaq
Member
From: somewhere in China...
Registered: 2011-03-06
Posts: 89

Re: A bug in /etc/rc.d/functions; and the release policy

I opened up a bug report and it's here.

Offline

#9 2011-03-09 13:23:35

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: A bug in /etc/rc.d/functions; and the release policy

xiaq wrote:

This is a small issue, but how it relates to Arch's release policy is important.

I have CONSOLE="ter-120b" in my rc.conf,

That is wrong, the font should be set with CONSOLEFONT not CONSOLE


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2011-03-09 13:27:23

xiaq
Member
From: somewhere in China...
Registered: 2011-03-06
Posts: 89

Re: A bug in /etc/rc.d/functions; and the release policy

Mr.Elendig wrote:
xiaq wrote:

This is a small issue, but how it relates to Arch's release policy is important.

I have CONSOLE="ter-120b" in my rc.conf,

That is wrong, the font should be set with CONSOLEFONT not CONSOLE

Thanks; it's a typo.

Offline

Board footer

Powered by FluxBB