[openbox] Slackware package

Andrei Paskevich andrei at capet.iut-fbleau.fr
Wed Aug 8 18:08:27 EDT 2007


On Wed, 08 Aug 2007 at 22:14:09 (+0200), Jacques Bon wrote:
> Hi,
> 
> Thanks for Openbox, I really like this WM that I use for three weeks
> now (used WindowMaker before).
> 
> It seems there is a bug in the Slackware package, in the doinst.sh file.
> When I make an "upgradepkg openbox*tgz", the install seems to be done
> correctly, but the prompt does'nt come back. I've tested it on three
> machines with the same result.
> 
> I'm not an expert in shell programming, looked at the file but could'nt
> see the error.

As far as I can tell, the problem lies in the install script
of the openbox slackware package. This scripts checks whether
the openbox configuration files are already in /etc/xdg/openbox/
and, if they are, asks the user (using echo + read) what to do 
with them. Since native slackware package tools do not support 
interactive install scripts, upgradepkg will just stall while
the script waits for the input which never comes.

I would suggest to rewrite doinst.sh to follow the slackware 
conventions, and just leave the .new files to the user.
Something like this:

=================================
config()
{
    NEW="$1"
    OLD="$(dirname $NEW)/$(basename $NEW .new)"
    if [ ! -e "$OLD" ]; then
        mv "$NEW" "$OLD"
    elif [ "$(cat $NEW | md5sum)" = "$(cat $OLD | md5sum)" ]; then
        rm "$NEW"
    fi
}

config etc/xdg/openbox/menu.xml.new
config etc/xdg/openbox/rc.xml.new
=================================

Andrei



More information about the openbox mailing list