[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: package management



On Sat, Apr 13, 2002 at 05:28:49AM -0700, David Wright wrote:
> Okay, I have calmed down a bit since I sent my "kill, kill, kill" mail, 
> and now have some more rationally formulated questions about package 
> management.
> 
> 1) Is there any way to force dpkg to remove as much of a package as it 
> can and then liquidate the entry from its database, regardless of 
> whatever error codes any scripts return, thus allowing you to start over 
> from a pristine pre-install state? Something like
>    dpkg --force-do-it-or-else --remove PackageName

Stick 'exit 0' on the second line of the postrm script
(/var/lib/dpkg/info/packagename.postrm).

The various --force options are listed in 'dpkg --force-help'. I don't
think ignoring errors from postrm scripts is among them (perhaps it
should be, I don't know).

> 2) Is there any way to tell dpkg to mark a specific package with a hold 
> flag without going through the dselect menus? I always end up getting 
> lost and doing things I don't want to in dselect, and I really want to 
> be able to just type something like
>    dpkg --flag hold PackageName
> at the command line.

  echo packagename hold | dpkg --set-selections

> 3) Is there any way to export the entire package database from one 
> machine and then tell another machine to install exactly those packages 
> (i.e. not only install the missing ones but also remove the extra ones)? 
> Again, I would like to avoid the dselect interface like the plague.

  dpkg --get-selections \* > selections
  # move the selections file to the other machine
  dpkg --set-selections < selections
  dselect install remove
  # no, this doesn't put you into the dselect interface itself

Giving the \* argument to dpkg --get-selections causes it to list all
packages, including purged ones.

> 4) It seems that sometimes packages get into a "deselect ok installed" 
> state from which it is impossible to do anyting. Is these some way to 
> force-change the associated flags?

'deselect ok installed' means that it's installed but you want to remove
it. What problems are you having?

(It's possible to edit /var/lib/dpkg/status to change state flags, but
really don't do that unless you already know everything about what
you're doing.)

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: