Bug#238020: Dangling symlink x-session-manager.1.gz: Should point to Undocumented.gz?
Hello Adeodato, hello *,
Am Samstag, 1. Januar 2005 19:26 schrieben Sie:
> * Malte Cornils [Sat, 01 Jan 2005 18:28:43 +0100]:
> > Either gnome-session should remove the slave-link (but how?
> > update-alternatives does not have any hooks for it), ksmserver should
> > ship a man page for startkde and register it as a slave link, or a slave
> > link to the undocumented man page should be created.
>
> programs with missing manpages no longer have a dummy one pointing to
> undocumented.7; that changed in policy a while ago.
>
> so, until startkde gets its manpage, the slave-link should really be
> removed by update-alternatives. in fact, and though I'm not that
> familiar with the intrinsics of update-alternatives, I would say it
> does remove slave links... have to check, but it sounds strange that
> it doesn't for you.
Whoops. My bug report was not specific enough; I did not mean
the /etc/alternatives/x-session-manager.1.gz symlink (this one is removed by
code in dpkg's update-alternatives), but the
symlink /usr/share/man/man1/x-session-manager.1.gz. gnome-session.postinst
(and xfce4-session.postinst etc) create this symlink:
f [ "$1" = configure ]; then
update-alternatives --install /usr/bin/x-session-manager \
x-session-manager /usr/bin/gnome-session 50 \
--slave /usr/share/man/man1/x-session-manager.1.gz \
x-session-manager.1.gz /usr/share/man/man1/gnome-session.1.gz
fi
Once there, it is never removed unless gnome-session is uninstalled. However,
our systems usually have both gnome and kde installed.
I assume update-alternatives should not only remove the slave symlink
in /etc/alternatives when changing stuff with --config, but also remove the
one in /usr/share/man/man1/x-session-manager.1.gz.
The relevant code is (lines 538 ff., dpkg 1.10.25,
file /usr/sbin/update-alternatives):
sub config_alternatives {
[...]
# Link slaves...
for( my $slnum = 0; $slnum < @slavenames; $slnum++ ) {
my $slave = $slavenames[$slnum];
if ($slavepath{$preferred,$slnum} ne '') {
checked_symlink($slavepath{$preferred,$slnum},
"$altdir/$slave.dpkg-tmp");
checked_mv("$altdir/$slave.dpkg-tmp", "$altdir/$slave");
} else {
&pr("Removing $slave ($slavelinks[$slnum]), not appropriate
with $versions[$preferred].")
if $verbosemode > 0;
unlink("$altdir/$slave") || $! == &ENOENT ||
&quit("unable to remove $altdir/$slave: $!");
}
}
}
}
So, it removes the symlink in $altdir (/etc/alternatives), but not the one in
the man hierarchy. I could not find any other place in update-alternatives
that does this, so maybe this is a bug in update-alternatives/dpkg. Feel free
to reassign to that package.
Also, a relevant bug on the dpkg package might be #220044,
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=220044
How should I proceed?
-Malte
Reply to: