[plug] Debian intricacies, was Re: mail ReplyTo

Nick Bannon nick at ucc.gu.uwa.edu.au
Tue Mar 14 11:38:27 WST 2000


On Fri, Mar 10, 2000 at 09:17:14AM +0000, Christian Payne wrote:
[...]
> in my case.  I wasn't aware of the "!package" so that's neat to combine
> the two operations into one but otherwise I don't think there is
> necessarily anything wrong with my approach.  Having said that, the use
> of --force is fortunately pretty rare in Debian. :-)

I think it might be package- (package name, then a hyphen) rather than
!package. "man apt-get" doesn't mention !, and - has worked for me.

Hence "apt-get install packagetoget packagetoremove-" or even
"apt-get remove packagetoget+ packagetoremove".

The advantage - though I'm not sure if it's actually required in this
particular example - is that other things might be depending on the
package that you're about to remove. That could leave you in a broken
state, _even if_ you're about the replace that with something else, and
apt won't let that happen.

eg cron depends on having _some_ sort of local mail system (otherwise
where is it going to send its output?). Hence removing exim might remove
cron, which you probably didn't want...

This was the sort of thing dselect was actually good for - change all your
selections in one step _then_ start the whole package installing/removing
process. I prefer doing it with apt, though. ::-)

I can't remember the last time I've had to use --force on a Debian package
- definitely not in stable, and even when I _am_ dealing with broken,
unstable packages, there's usually a way to make it work for you rather
than trampling over it.

eg: say dpkg is complaining than package foo's postrm script is failing
as it tries to remove or upgrade it. Chances are, it's the script's
fault, (either a straight bug or just insufficient error checking)
and if it's an upgrade dpkg will intelligently try the script from the
new version of the package instead.  If that failed, edit the script
( /var/lib/dpkg/info/foo.postrm ) to simply exit immediately, and try
again. If the script did something important, do it by hand.

Nick.

-- 
  Nick Bannon  | "I made this letter longer than usual because
nick at it.net.au | I lack the time to make it shorter." - Pascal



More information about the plug mailing list