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

Re: Question about get-selections



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`
(see 'cron')
2) Alter your usual backup program to include the created list file and/or
    Schedule scp/rsync/ftp/... to copy the list to your backup location.

cheers,
Owen.


Reply to: