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

Re: Bad points for debian (was: resetting dpkg)

On Thu, Dec 23, 1999 at 02:11:31PM +0100, Egbert Bouwman wrote
> On Wed, Dec 22, 1999 at 10:43:05PM +0100, steve doerr wrote:
> > Is there a way to change dpkg package remove tags?  I ran dselect after
> > manually dpkg'ing postgresql and jdk and I somehow got almost everything
> > 
> You are one of many, myself included, who asked similar questions
> about resetting dselect or dpkg after they created chaos.
> We only want to start all over again with the selection process.
> I have never read a helpful reply. Does nobody know ?
> Or did we ask the wrong question ?

I've attached a three-line awk filter that should do what's required,
in the event it comes up again.

Run it as
# dpkg -l | reset-selections.awk | dpkg --set-selections

to set the dselect selection status to more or less reflect the
current installation status quo.  If you've already removed
packages, this can't undo that.

Personally, after installation any changes I make are minor and gradual
enough that I find apt-get and apt-cache much friendlier tools than 

John P.
"Oh - I - you know - my job is to fear everything." - Bill Gates in Denmark
#!/usr/bin/awk -f
# Filter.  Use:
#  dpkg -l | $0 | dpkg --set-selections
# For people who accidentally deselected all their
# packages in dselect and want to reset things to
# reflect the status quo.
/^.n/      { print $2, "purge" }
/^.[iufh]/ { print $2, "install" }
/^.c/      { print $2, "deinstall" }

Reply to: