On Wed, Sep 28, 2011 at 06:16:47AM +0200, Guillem Jover wrote: > On Tue, 2011-09-27 at 16:26:10 -0700, Steve Langasek wrote: > > I've recently spent time having to clean up after a package which earlier in > > its history called update-alternatives --set from a maintainer script to try > > to override a "wrong" alternative... instead of simply removing the wrong > > alternative from the system.
> > This is problematic, of course, because now it's impossible to distinguish > > between an alternative that's manually set because the user set it, vs. one > > that's manually set because the package set it. > > I don't think there's any justification for a package ever calling u-a --set > > from a maintainer script. Therefore I propose that this command abort if > > $DPKG_MAINTSCRIPT_PACKAGE is set. > Hmmm, so while I agree maintainer scripts for packages in Debian (or > I guess Ubuntu) should not be using u-a --set (or --set-selections or > --config for that matter), I don't think outright banning it from any > maintainer script is the right answer, because that seems to be a > packaging policy issue. I can see how setting a specific alternative > could be desirable in a local configuration package or another kind of > distribution. However, anyone who wanted to do that could simply unset $DPKG_MAINTSCRIPT_PACKAGE before calling update-alternatives from the maintainer script, so it wouldn't prevent others from enacting different policies - it would just provide a safeguard preventing someone from doing this casually. (What "other kind of distribution" is there where it makes sense for packages to clobber user alternative settings? The bad kind, I guess? :) -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ [email protected] [email protected]
signature.asc
Description: Digital signature

