Mmm. I'm reading via the web site, as I am not subscribed to this list... makes replying a little harder. Maybe I ought to specifically ask CC:'s to me.
> >> getselections is supposed to be current. A package marked deinstall is > >> removed, but not purged. Or at least it is expected to be. > > > >On my machine, it definately doesn't work like that. I just tested it. > >Changed a selection in dselect, but didn't do an "Install", the > >selection change was evident in dpkg --get-selections. > > I don't think that's what Sean meant. If, in dselect, you use '-' to > mark a package for removal - or use 'apt-get remove' - then a package's > configuration files won't be removed, and some state about the package > will remain in the system. However, if you use '_' in dselect, or > 'apt-get --purge remove', then the package's configuration files will be > removed too, and /var/lib/dpkg/status will forget that it ever existed. Um, that's kind of not what I meant either. I wasn't replying to the remove/purge thing, rather just stating the fact that --get-selections does not coincide with the current state of the machine. Rather with the future desired state of the machine. > >> a) # dpkg --get-selections|sed -e 's/deinstall$/install/'|dpkg > >--set-selections > >> # apt-get dselect-upgrade > > > >Ah yes... sed. The problem with this is, it will also install the > >packages that are not installed (that are really currently > >"deinstalled"). > > No, completely uninstalled (purged or never installed) packages don't > show up in 'dpkg --get-selections' at all. I was here referring to packages that have been removed, but not purged. They show up in --get-selections, and will be installed by these commands. All I was aiming to do was get the selections to match with the current state of the machine. I think the best way to go about his is sed'ing through the status file. Thanks, Hugo van der Merwe