wmaker has a critical problem while updating alternatives
Hi,
Like I stated in a previous message of mine, I'm having trouble with
diversions.
This seems to be the situation:
> lagrange:~# md5sum /usr/X11R6/bin/asclock* /usr/X11R6/man/man1/asclock*
> b706384a5d65706fab204e10b2da0558 /usr/X11R6/bin/asclock
> b706384a5d65706fab204e10b2da0558 /usr/X11R6/bin/asclock-24bpp
> ec3561f2b9591af4480f523acf4ee8d9 /usr/X11R6/bin/asclock-4bpp
> b706384a5d65706fab204e10b2da0558 /usr/X11R6/bin/asclock-8bpp
This is fine.
> 7199cc70b459792fe8a2a9cb7a262208 /usr/X11R6/man/man1/asclock-24bpp.1x.gz
> 7199cc70b459792fe8a2a9cb7a262208 /usr/X11R6/man/man1/asclock-4bpp.1x.gz
> 7199cc70b459792fe8a2a9cb7a262208 /usr/X11R6/man/man1/asclock-8bpp.1x.gz
> 7199cc70b459792fe8a2a9cb7a262208 /usr/X11R6/man/man1/asclock.1x.gz
> 099fc4c8db6d7c8a198eca57a88e30a7 /usr/X11R6/man/man1/asclock.afterstep.1x.gz
This is not. The files with 71... md5sum are provided by the asclock
package; the other file, asclock.afterstep.1x.gz is a diversion
installed by an old version of wmaker that wasn't handled correctly
by later versions and it's giving me a lot of trouble now.
In wmaker's preinst I have:
asclock_man_diversion=\
$(dpkg-divert --list | grep 'asclock\.afterstep\.1x.*by wmaker')
if [ "$asclock_man_diversion" ] ; then
echo "Removing diversion of asclock.1x to asclock.afterstep.1x..."
dpkg-divert --quiet --package wmaker \
--divert $asclock_man_divert_to --remove $asclock_man
fi
there's no --rename there. What happens to the
/usr/X11R6/man/man1/asclock.afterstep.1x.gz file after the diversion
is removed? If I use --rename, dpkg-divert will fail.
I was thinking something along the lines of
[ -e /usr/X11R6/bin/asclock ] && \
mv /usr/X11R6/bin/asclock /usr/X11R6/bin/asclock.wmaker-tmp
dpkg-divert --quiet --rename --package wmaker --divert blah --remove blah
[ -e /usr/X11R6/bin/asclock.wmaker-tmp ] && \
mv /usr/X11R6/bin/asclock.wmaker-tmp /usr/X11R6/bin/asclock
Does this seem ok? Any better way to do this?
Marcelo
Reply to: