Debian Bug report logs - #433567
emacs: alternatives problem

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg (PTS, buildd, popcon).

Reported by: Dan Jacobson <jidanni@jidanni.org>

Date: Tue, 17 Jul 2007 23:24:04 UTC

Severity: normal

Merged with 76295, 246906, 451872

Found in versions 1.10.21, 1.6.15

Fixed in version dpkg/1.14.13

Done: Guillem Jover <guillem@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to Rob Browning <rlb@defaultvalue.org>:
Bug#433567; Package emacs. (full text, mbox, link).


Acknowledgement sent to Dan Jacobson <jidanni@jidanni.org>:
New Bug report received and forwarded. Copy sent to Rob Browning <rlb@defaultvalue.org>. (full text, mbox, link).


Message #5 received at maintonly@bugs.debian.org (full text, mbox, reply):

From: Dan Jacobson <jidanni@jidanni.org>
To: Debian Bug Tracking System <maintonly@bugs.debian.org>
Subject: emacs: alternatives problem
Date: Wed, 18 Jul 2007 07:17:02 +0800
Package: emacs
Version: 22.1+1-1
Severity: wishlist

Installing emacs and removing emacs-snapshot caused this alternative
to become auto mode, leaving no "emacs" shell command.

# update-alternatives --config emacs

There is only 1 program which provides emacs
(/usr/bin/emacs22-x). Nothing to configure.

# ls -L /etc/alternatives/*
ls: /etc/alternatives/desktop-background: No such file or directory
ls: /etc/alternatives/emacs: No such file or directory
ls: /etc/alternatives/emacs.1.gz: No such file or directory
ls: /etc/alternatives/pong-tool: No such file or directory
ls: /etc/alternatives/py2.2gtk.py: No such file or directory
ls: /etc/alternatives/python-gtk: No such file or directory



Tags added: moreinfo Request was from Sven Joachim <sven_joachim@web.de> to control@bugs.debian.org. (Wed, 18 Jul 2007 16:15:07 GMT) (full text, mbox, link).


Information forwarded to Rob Browning <rlb@defaultvalue.org>:
Bug#433567; Package emacs. (full text, mbox, link).


Acknowledgement sent to Sven Joachim <sven_joachim@web.de>:
Extra info received and forwarded to maintainer. Copy sent to Rob Browning <rlb@defaultvalue.org>. (full text, mbox, link).


Message #12 received at 433567-maintonly@bugs.debian.org (full text, mbox, reply):

From: Sven Joachim <sven_joachim@web.de>
To: Dan Jacobson <jidanni@jidanni.org>, 433567-maintonly@bugs.debian.org
Subject: Re: Bug#433567: emacs: alternatives problem
Date: Wed, 18 Jul 2007 18:15:17 +0200
tags 433567 moreinfo
thanks

Dan Jacobson writes:
> Installing emacs and removing emacs-snapshot caused this alternative
> to become auto mode,

This is normal behavior: If you remove your preferred alternative,
update-alternatives *has* to set the mode to auto, or you will be left
with a dangling symlink...

> leaving no "emacs" shell command.

...which just seems to be the case here, however.
 
> # update-alternatives --config emacs
> 
> There is only 1 program which provides emacs
> (/usr/bin/emacs22-x). Nothing to configure.

And what gives `update-alternatives --display emacs'?

> # ls -L /etc/alternatives/*
> ls: /etc/alternatives/desktop-background: No such file or directory
> ls: /etc/alternatives/emacs: No such file or directory
> ls: /etc/alternatives/emacs.1.gz: No such file or directory
> ls: /etc/alternatives/pong-tool: No such file or directory
> ls: /etc/alternatives/py2.2gtk.py: No such file or directory
> ls: /etc/alternatives/python-gtk: No such file or directory

Where does /etc/alternatives/emacs point to?

BTW, regarding the other dangling symlinks: If no alternative exists
for these, they are cruft and you should just remove them.

Regards,
	Sven



Information forwarded to Rob Browning <rlb@defaultvalue.org>:
Bug#433567; Package emacs. (full text, mbox, link).


Acknowledgement sent to jidanni@jidanni.org:
Extra info received and forwarded to maintainer. Copy sent to Rob Browning <rlb@defaultvalue.org>. (full text, mbox, link).


Message #17 received at 433567-maintonly@bugs.debian.org (full text, mbox, reply):

From: jidanni@jidanni.org
To: 433567-maintonly@bugs.debian.org
Subject: Re: Bug#433567: emacs: alternatives problem
Date: Sun, 22 Jul 2007 19:48:35 +0800
SJ> And what gives `update-alternatives --display emacs'?

On my good machine
emacs - status is manual.
 link currently points to /usr/bin/emacs22-x
/usr/bin/emacs22-x - priority 25
 slave emacs.1.gz: /usr/share/man/man1/emacs.1emacs22.gz
Current `best' version is /usr/bin/emacs22-x.

on my bad machine

emacs - status is manual.
 link currently points to /usr/bin/emacs-snapshot
/usr/bin/emacs22-x - priority 25
 slave emacs.1.gz: /usr/share/man/man1/emacs.1emacs22.gz
Current `best' version is /usr/bin/emacs22-x.

# update-alternatives --config emacs

There is only 1 program which provides emacs
(/usr/bin/emacs22-x). Nothing to configure.

SJ> Where does /etc/alternatives/emacs point to?
/usr/bin/emacs-snapshot on the bad machine.

# update-alternatives --auto emacs
# update-alternatives --display emacs
emacs - status is auto.
 link currently points to /usr/bin/emacs22-x
/usr/bin/emacs22-x - priority 25
 slave emacs.1.gz: /usr/share/man/man1/emacs.1emacs22.gz
Current `best' version is /usr/bin/emacs22-x.

OK, thus I fixed it by hand.

>> # ls -L /etc/alternatives/*
>> ls: /etc/alternatives/desktop-background: No such file or directory ...

SJ> BTW, regarding the other dangling symlinks: If no alternative exists
SJ> for these, they are cruft and you should just remove them.

I wish there was a command to do the right thing, cleaning them
automatically -- and reporting bugs to who is to blame for them... but OK:
# cd /etc/alternatives
# for i in *; do ls -L $i >/dev/null||rm $i; done

I might as well remove this too:
mandb: warning: /usr/share/man/man1/x-terminal-emulator.1.gz is a
dangling symlink

Done.

By the way, looking at startup messages,
Loading /etc/emacs/site-start.d/50css-mode.el (source)...done
Loading /etc/emacs/site-start.d/50debbugs-el.el (source)...
Package debbugs-el removed but not purged.  Skipping setup.
Loading /etc/emacs/site-start.d/50debbugs-el.el (source)...done
Loading /etc/emacs/site-start.d/50debian-el.el (source)...done

One notices they are mostly .el's not .elc's, but mainly

# dpkg -P debbugs-el
dpkg - warning: ignoring request to remove debbugs-el which isn't
installed.

So the "removed but not purged" is wrong.



Information forwarded to Rob Browning <rlb@defaultvalue.org>:
Bug#433567; Package emacs. (full text, mbox, link).


Acknowledgement sent to Sven Joachim <sven_joachim@web.de>:
Extra info received and forwarded to maintainer. Copy sent to Rob Browning <rlb@defaultvalue.org>. (full text, mbox, link).


Message #22 received at 433567-maintonly@bugs.debian.org (full text, mbox, reply):

From: Sven Joachim <sven_joachim@web.de>
To: jidanni@jidanni.org, 433567-maintonly@bugs.debian.org
Subject: Re: Bug#433567: emacs: alternatives problem
Date: Sun, 22 Jul 2007 16:58:27 +0200
Dan Jacobson writes:
> SJ> And what gives `update-alternatives --display emacs'?
> 
> on my bad machine
> 
> emacs - status is manual.
>  link currently points to /usr/bin/emacs-snapshot
> /usr/bin/emacs22-x - priority 25
>  slave emacs.1.gz: /usr/share/man/man1/emacs.1emacs22.gz
> Current `best' version is /usr/bin/emacs22-x.
> 
> # update-alternatives --config emacs
> 
> There is only 1 program which provides emacs
> (/usr/bin/emacs22-x). Nothing to configure.

Here you have been hit by a bug in update-alternatives, which does not
update the symlink to the last alternative.  That's bug #76295.
 
> SJ> BTW, regarding the other dangling symlinks: If no alternative exists
> SJ> for these, they are cruft and you should just remove them.
> 
> I wish there was a command to do the right thing, cleaning them
> automatically -- and reporting bugs to who is to blame for them... but OK:

It is useless to report bugs for packages that do no longer exist, as
I suspect is the case for most of your dangling symlinks.

> # cd /etc/alternatives
> # for i in *; do ls -L $i >/dev/null||rm $i; done

You may find the "symlinks" package useful, it can report and remove
dangling symlinks and do a few other things.

> I might as well remove this too:
> mandb: warning: /usr/share/man/man1/x-terminal-emulator.1.gz is a
> dangling symlink
> 
> Done.

That is probably bug #315195, I stumbled upon it myself[1].  I was
told[2] that this has to be fixed manually, so you have done the right
thing.
 
> By the way, looking at startup messages,
> Loading /etc/emacs/site-start.d/50css-mode.el (source)...done
> Loading /etc/emacs/site-start.d/50debbugs-el.el (source)...
> Package debbugs-el removed but not purged.  Skipping setup.
> Loading /etc/emacs/site-start.d/50debbugs-el.el (source)...done
> Loading /etc/emacs/site-start.d/50debian-el.el (source)...done
> 
> One notices they are mostly .el's not .elc's, but mainly
> 
> # dpkg -P debbugs-el
> dpkg - warning: ignoring request to remove debbugs-el which isn't
> installed.
> 
> So the "removed but not purged" is wrong.

Not from dpkg's point of view.  The package is in the "purged" status,
but there still is an old conffile dpkg had forgotten about.  This is
because older versions of debbugs-el had
/etc/emacs/site-start.d/50debbugs-el.el as conffile, but the (later)
version you purged had not.  That's a problem in dpkg, see #330256.

In summary, although Debian is much better in upgrading than most
other systems, it still accumulates a bit of cruft, especially if you
are running testing or unstable.  If you want to get rid of it, have a
look at the "cruft" package which may help you to find that useless
stuff.

Cheers,
	Sven

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=315195#66
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=70;bug=315195



Information forwarded to Rob Browning <rlb@defaultvalue.org>:
Bug#433567; Package emacs. (full text, mbox, link).


Acknowledgement sent to jidanni@jidanni.org:
Extra info received and forwarded to maintainer. Copy sent to Rob Browning <rlb@defaultvalue.org>. (full text, mbox, link).


Message #27 received at 433567-maintonly@bugs.debian.org (full text, mbox, reply):

From: jidanni@jidanni.org
To: 433567-maintonly@bugs.debian.org
Cc: 76295@bugs.debian.org
Subject: Re: Bug#433567: emacs: alternatives problem
Date: Mon, 23 Jul 2007 01:55:58 +0800
(I also found I had to dpkg-reconfigure a lot of emacs stuff to get
bbdb back working again, etc.)
SJ> Here you have been hit by a bug in update-alternatives, which does not
SJ> update the symlink to the last alternative.  That's bug #76295.
I see. I shall CC #76295.



Tags removed: moreinfo Request was from Sven Joachim <sven_joachim@web.de> to control@bugs.debian.org. (Tue, 24 Jul 2007 16:06:04 GMT) (full text, mbox, link).


Bug reassigned from package `emacs' to `dpkg'. Request was from Sven Joachim <sven_joachim@web.de> to control@bugs.debian.org. (Tue, 24 Jul 2007 16:06:05 GMT) (full text, mbox, link).


Merged 76295 246906 433567. Request was from Sven Joachim <sven_joachim@web.de> to control@bugs.debian.org. (Tue, 24 Jul 2007 16:06:06 GMT) (full text, mbox, link).


Information forwarded to Dpkg Developers <team@dpkg.org>:
Bug#433567; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Sven Joachim <sven_joachim@web.de>:
Extra info received and forwarded to maintainer. Copy sent to Dpkg Developers <team@dpkg.org>. (full text, mbox, link).


Message #38 received at 433567-maintonly@bugs.debian.org (full text, mbox, reply):

From: Sven Joachim <sven_joachim@web.de>
To: jidanni@jidanni.org, 433567-maintonly@bugs.debian.org
Subject: Re: Bug#433567: emacs: alternatives problem
Date: Tue, 24 Jul 2007 18:22:44 +0200
jidanni@jidanni.org writes:
> SJ> Here you have been hit by a bug in update-alternatives, which does not
> SJ> update the symlink to the last alternative.  That's bug #76295.
> I see. I shall CC #76295.

I have merged the two bugs now, since it seems there is nothing that
the emacs22 package can do about it.

Regards,
	Sven



Forcibly Merged 76295 246906 433567 451872. Request was from Sven Joachim <svenjoac@gmx.de> to control@bugs.debian.org. (Mon, 19 Nov 2007 07:21:04 GMT) (full text, mbox, link).


Severity set to `normal' from `wishlist' Request was from Sven Joachim <svenjoac@gmx.de> to control@bugs.debian.org. (Mon, 19 Nov 2007 20:30:06 GMT) (full text, mbox, link).


Tags added: pending Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Thu, 27 Dec 2007 07:18:02 GMT) (full text, mbox, link).


Tags added: pending Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Thu, 27 Dec 2007 07:18:05 GMT) (full text, mbox, link).


Tags added: pending Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Thu, 27 Dec 2007 07:18:08 GMT) (full text, mbox, link).


Tags added: pending Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Thu, 27 Dec 2007 07:18:12 GMT) (full text, mbox, link).


Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Dan Jacobson <jidanni@jidanni.org>:
Bug acknowledged by developer. (full text, mbox, link).


Message #55 received at 433567-close@bugs.debian.org (full text, mbox, reply):

From: Guillem Jover <guillem@debian.org>
To: 433567-close@bugs.debian.org
Subject: Bug#433567: fixed in dpkg 1.14.13
Date: Thu, 27 Dec 2007 07:47:02 +0000
Source: dpkg
Source-Version: 1.14.13

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive:

dpkg-dev_1.14.13_all.deb
  to pool/main/d/dpkg/dpkg-dev_1.14.13_all.deb
dpkg_1.14.13.dsc
  to pool/main/d/dpkg/dpkg_1.14.13.dsc
dpkg_1.14.13.tar.gz
  to pool/main/d/dpkg/dpkg_1.14.13.tar.gz
dpkg_1.14.13_i386.deb
  to pool/main/d/dpkg/dpkg_1.14.13_i386.deb
dselect_1.14.13_i386.deb
  to pool/main/d/dpkg/dselect_1.14.13_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 433567@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 27 Dec 2007 09:16:45 +0200
Source: dpkg
Binary: dpkg dselect dpkg-dev
Architecture: source i386 all
Version: 1.14.13
Distribution: unstable
Urgency: low
Maintainer: Dpkg Developers <team@dpkg.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description: 
 dpkg       - package maintenance system for Debian
 dpkg-dev   - package building tools for Debian
 dselect    - user tool to manage Debian packages
Closes: 76295 109794 200454 220044 229143 245562 246906 356299 373003 377400 392440 433567 441021 443241 451872 452730 453364 453885 454616 455260 455520 455841 456984 457673 457739 457784
Changes: 
 dpkg (1.14.13) unstable; urgency=low
 .
   [ Frank Lichtenheld ]
   * Add an own manpage for Dpkg's version format. Mostly stolen
     from policy. Closes: #373003
   * Fix control file parsing for field values starting with a colon.
     Apparently nobody ever needed this until Vcs-Cvs came along.
     Closes: #453364
   * Copy the usr/share/doc directory to dpkg-dev and dselect (Instead
     of using symlinks). The space requirements are minimal and adding
     the needed dependencies to comply with policy would be way more
     inconvenient. Pointed out by Rene Engelhard. Closes: #452730
   * Allow more than one arch and more than one type of a package
     in debian/files. Parts of the patch by Goswin von Brederlow
     and Bastian Blank. Closes: #356299, #377400, #229143
   * Allow building only architecture independent packages (-A).
     Closes: #109794, #200454
   * Bump Standards-Version to 3.7.3 (no changes)
 .
   [ Raphael Hertzog ]
   * When dpkg-shlibdeps finds a lib in a directory which is just a symlink to
     another directory that is also considered, remember the other directory
     name as the canonical one. Closes: #453885
   * dpkg-shlibdeps doesn't warn any more about libm.so.6 being unused if the
     binary is also linked against libstdc++ since g++ always add an implicit
     -lm. Closes: #454616
   * Included files in symbols files (via #include) do no more need to repeat
     the header line. Closes: #455260
   * Tweak the sort algorithm between dependencies so that intervals
     are displayed as "a (>= 1), a (<< 2)" instead of the opposite.
     Closes: #455520
   * Extend format of symbols files to support arbitrary fields of
     meta-information. First field is Build-Depends-Package used to extract the
     version requirement possibly encoded in the Build-Depends field and make
     sure that the generated dependency is at least as strict as this one.
   * Fix dpkg-gensymbols to not update version info of a deprecated symbol.
     Closes: #457739
   * Fix dpkg-source's behaviour with options -sk -sK -sp -sP. Closes: #457784
 .
   [ Guillem Jover ]
   * Ignore the man pages when building without NLS support. Closes: #457673
   * Fix perl warnings:
     - Check for undefined values when reading from the alternative db.
   * Properly handle symlinks for alternatives with inexistent slave links.
     Closes: #76295, #246906, #433567, #451872, #220044, #392440, #441021
     Closes: #443241
     Based on a patch by Daniel Leidert <daniel.leidert@wgdd.de>.
   * Fail when diverting to a non existent directory. Closes: #245562
     Thanks to Flavio Stanchina <flavio@stanchina.net>.
   * Refactor update-alternatives.
 .
   [ Updated dpkg translations ]
   * French (Christian Perrier, as this was trivial).
   * Spanish (Javier Fernández-Sanguino Peña). Closes: #456984
   * Swedish (Peter Karlsson).
 .
   [ Updated man pages translations ]
   * German (Helge Kreutzmann).
   * Swedish (Peter Karlsson).
 .
   [ Updated scripts translations ]
   * French (Frédéric Bothamy).
   * German (Helge Kreutzmann).
   * Japanese (Kenshi Muto). Closes: #455841
   * Swedish (Peter Karlsson).
Files: 
 4f342691b8ee5dd5f78e3acfee906e93 997 admin required dpkg_1.14.13.dsc
 f400ed1653921962564be1f7486a101d 6329144 admin required dpkg_1.14.13.tar.gz
 55e87cb463d850f822a4e03605361c75 2150570 admin required dpkg_1.14.13_i386.deb
 23dde75b8fac05bc56c87250f85bbbdb 725376 admin required dselect_1.14.13_i386.deb
 771cdeb984059da7b6e53dd42057481f 548008 utils optional dpkg-dev_1.14.13_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHc1MLuW9ciZ2SjJsRAuSnAKDJsjGVI2DZMWS6Y6qhIg+MZbQbaACeO/oh
oLl6KDo0p5I7+3TJD9+a+k4=
=/iIW
-----END PGP SIGNATURE-----





Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Jorgen Schaefer <forcer@debian.org>:
Bug acknowledged by developer. (full text, mbox, link).


Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Roland Illig <roland.illig@gmx.de>:
Bug acknowledged by developer. (full text, mbox, link).


Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Vincent Lefevre <vincent@vinc17.org>:
Bug acknowledged by developer. (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 25 Jan 2008 07:25:47 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Dec 23 08:32:11 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.