Hi, Guillem, On Fri, May 11, 2007 at 05:00:02AM +0300, Guillem Jover wrote: > On Thu, 2007-05-10 at 14:18:06 +0200, Agustin Martin wrote: > > > dictionaries-common preinst has some code to remove old policy <= woody > > alternatives for ispell dictionaries and wordlists, something like > > If this code is to handle an upgrade from woody, you probably can > remove it now, anyway.
Yes, this is something to consider seriously, we are some years behind woody. > > > for i in $WORDS ; do > > /usr/sbin/update-alternatives --remove dictionary $i > > done > > /usr/sbin/update-alternatives --auto dictionary > > > The reason why last line is added is that update-alternatives leaves, after > > last alternative candidate is removed, the alternative still there, but > > empty and in manual mode. > > That's not a good reason for maintainer scripts messing with the --auto > command, that's supposed to be a sysadmin only command. In this case I think it was a fair use, ispell dicts used always the manual mode and trash was left behind. > Right, that's the intended behaviour. (BTW it was 1.14.0, I see you > wrote 1.4 as well on dictionaries-common's changelog, which might > confuse people in the future doing bug archeology :). No problem, will be changed in next upload, as well as s/bug\|new behavior/new behavior/ > > > I think one (or both things should be done) > > > > a) Really removing alternative when last alternative candidate is removed > > Well, strictly following the definition of the manual mode, no > alternative symlink should be touched, even when removing the last > alternative, so I'd say that's the intended behaviour. As a matter of fact when the alternative selected in manual mode is removed, current u-a already switches to auto mode. See below why it did not happen in my tests, I have no idea why happened for ispell dicts in the woody days. So, if no candidates are left and the alternative is in manual mode, I think it can safely be removed. > > I have tested current behavior with attached script, > > This script is bogus, it's using relative paths for the generic name > and the symlink alternative, that's wrong, and probably u-a should be > more strict and fail over this. That only means is a quick and dirty test. However, the real problem of the script is that it removes the files before running u-a --remove (yes, I know u-a --remove is for prerm), so manual mode was forced, leaving things behind, although mode was previously auto. May be u-a should warn in this case when setting mode to manual. > > As a workaround I am true'ing the update-alternatives --auto call, but > > update-alternatives should be fixed about this. > > I disagree, as reasoned above. But I could rename this bug report > about being more strict when installing bogus alternatives, though. No problem about this, and please set it as wishlist. But I still do not fully see the rationale behind not removing the alternative when still set to manual and no candidates are left. Cheers, -- Agustin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

