Re: Question about get-selections
I'm convinced that the suggestion is worthwhile, but I'm having
difficulty following it. See below.
On 2009-03-27_16:33:11, Owen Townend wrote:
> 2009/3/27 Paul E Condon <pecondon@mesanetworks.net>:
> > On 2009-03-26_19:08:32, Douglas A. Tutty wrote:
> >>
> >> Many of those packages will have been installed automatically by your
> >> package manager. ??If you use aptitude, you only need to record the
> >> packages which you manually installed:
> >>
> >> aptitude search `~i!~M'
> >>
> >> You can then install them, then aptitude will automatically install what
> >> is needed by them.
> >>
> [snip]
> >
> > Well, I may sound like an orderly person, but writing down a record of
> > each time I install something is rather more orderly than I think I
> > can ever be. ??I'm looking to program the computer to keep track of me.
>
> I think you misunderstood his suggestion, it is a method of automating
> the process...
>
> >
> > Your suggestion does raise in interesting issue: given a set of
> > installed packages in a --get-selections file, and given that the
> > dependency information is available in the packages, what is the
> > minimum set of install commands to aptitude that will reconsturct the
> > installation from scratch? Does anyone know a way to solve this
> > problem? It might be a rather difficult search problem, but it might
> > be there is some neat trick. Does anyone here know?
> >
> > I guess I could somehow search the apt system for packages that are not
> > in the depends list of any other package, but I think there are cycles
> > in the dependency linkages. The way it is used, there is no reason to
> > demand that the linkage network be free of cycles, like is required of
> > the directory tree in a file system.
>
> If you follow Douglas' suggestion above it will help in this regard.
> `$ aptitude search '~i!M'` says 'return to me the list of packages
> that are installed but aren't just dependancies or suggestions (marked
> as automatically installed)'.
>
> When you then go to restore, re-install or clone your system you can let
> aptitude figure out the dependencies for itself.
> If you use --get-selections then _all_ of those packages will be marked
> as manually installed on the new system and will _never_ be
> automatically removed as 'just' dependancies.
>
> Example summary of Douglas' solution as I understood it:
> 1) Schedule `aptitude search '~i!M' > /usr/local/backup/package_list`
^^^^^^^^^^^^^^^^^^^^^^^
I ran this manually, and got a long list of packages. Most of the lines
began with "i A ". I tried running:
aptitude search '~i!A'
which seemed more reasonable from my limited intuition. That also gave
mostly lines beginning with "i A ". What am I missing? The documentation
seems very through, but I can't find mention of '!'. I guess it means
'not', wouldn't have known it was available from scanning the docs. Does
it mean 'not'?
I used aptitude to install the aptitude-doc-en package, but I haven't
found where aptitude put the documentation. Where does packaged
documentation go under the apt system? It should all be in one place,
shouldn't it?
What I know about aptitude search comes from googling, and what I find
there is no doubt incomplete and obsolete.
TIA
--
Paul E Condon
pecondon@mesanetworks.net
Reply to: