Bug 104940 - alternatives doesn't update link when installing
Summary: alternatives doesn't update link when installing
Alias: None
Product: Fedora
Classification: Fedora
Component: chkconfig
Version: 10
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Ben Levenson
Whiteboard: bzcl34nup
: 67387 107132 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2003-09-23 18:46 UTC by Gustavo Niemeyer
Modified: 2014-03-17 02:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-09-29 20:44:21 UTC
Type: ---

Attachments (Terms of Use)

Description Gustavo Niemeyer 2003-09-23 18:46:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.4) Gecko/20030901

Description of problem:
When alternatives is installing some version, if the "target" link
is already in place (e.g. /usr/bin/vim), pointing to a different location (e.g.
not /etc/alternatives/vim), the alternatives software won't update it to point
to /etc/alternatives/*, so one is forced to, for example, rm -f /usr/bin/vim
when installing, so that alternatives is able rebuild the right link.

How reproducible:

Comment 1 Leonard den Ottolander 2004-03-10 18:11:50 UTC
Could this be the same issue as bug 67387 and bug 107132?

Comment 2 Bill Nottingham 2004-03-10 18:24:25 UTC
Possibly, but in those the implication is that the link doesn't exist
at all previously.

Comment 3 Leonard den Ottolander 2004-03-11 15:28:52 UTC
The other examples are both upgrades. This means that in both cases
the /usr/sbin/sendmail is the binary (which was the case in 7.2). The
old package gets only erased after the new files are installed.

This means the old /usr/sbin/sendmail is in the way when the new
package tries to create the symlink. So, sendmail is not handling the
upgrade correctly.

Contacting Thomas Woerner on this issue.

Comment 4 Leonard den Ottolander 2004-03-11 15:53:40 UTC
Otoh one could argue that /usr/sbin/alternatives indeed should remove
an existing symlink. Not sure if it is a good idea that it would
remove binaries though, like with RHL 7.2's /usr/sbin/sendmail.

Comment 5 Leonard den Ottolander 2004-03-11 15:56:49 UTC
*** Bug 67387 has been marked as a duplicate of this bug. ***

Comment 6 Leonard den Ottolander 2004-03-11 15:57:49 UTC
*** Bug 107132 has been marked as a duplicate of this bug. ***

Comment 7 Leonard den Ottolander 2004-03-11 16:31:20 UTC
A rm -f <binary> of course is a bit harsh, but a mv <binary>
<binary>.rpmsave seems like a clean solution. Only problem is that you
might also have <binary>.rpmsaves as a result of an invocation of
/usr/sbin/alternatives from the command line.

Comment 8 Bug Zapper 2008-04-03 15:29:52 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 9 Ville Skyttä 2008-04-03 18:31:31 UTC
Still happens with Fedora 8, chkconfig-1.3.36-1.x86_64.


# rpm -e genisoimage
# ln -s /foo/bar /usr/bin/mkisofs
# rpm -i genisoimage-1.1.6-6.fc8.x86_64.rpm
# ls -l /usr/bin/mkisofs
lrwxrwxrwx 1 root root 8 2008-04-03 21:28 /usr/bin/mkisofs -> /foo/bar

Expected result:

# ls -l /usr/bin/mkisofs
lrwxrwxrwx 1 root root 25 2008-04-03 21:29 /usr/bin/mkisofs ->

# rpm -q --scripts genisoimage
postinstall scriptlet (using /bin/sh):
link=`readlink /usr/bin/mkisofs`
if [ "$link" == "genisoimage" ]; then
        rm -f /usr/bin/mkisofs

/usr/sbin/alternatives --install /usr/bin/mkisofs mkisofs \
                /usr/bin/genisoimage 50 \
        --slave /usr/share/man/man1/mkisofs.1.gz mkisofs-mkisofsman \
                /usr/share/man/man1/genisoimage.1.gz \
        --slave /usr/bin/mkhybrid mkisofs-mkhybrid /usr/bin/genisoimage
preuninstall scriptlet (using /bin/sh):
if [ $1 = 0 ]; then
        /usr/sbin/alternatives --remove mkisofs /usr/bin/genisoimage

Comment 10 Bug Zapper 2008-11-26 06:47:08 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Note You need to log in before you can comment on or make changes to this bug.