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

Re: Install matching set of software while preserving aptitude auto/manual install info



On Wed, 2008.11.05, 310, Brian McKee wrote:
> On Wed, Nov 5, 2008 at 3:30 PM, green <greenfreedom10@gmail.com> wrote:
> > [save]
> > # Save a list of all installed packages
> > aptitude -F "%?p" --disable-columns search \~i >| installed-all
> > # Save a list of all installed packages with their versions
> > aptitude -F "%?p=%?V" --disable-columns search \~i >| installed-all-ver
> > # Save a list of all automatically installed packages
> > aptitude -F "%?p" --disable-columns search \~i\~M >| installed-auto
> >
> > [restore]
> > # Install all essential, important, required, or standard packages
> > aptitude -R --schedule-only install $( aptitude -F "%?p" search \!\~i?or(\~E,\~pimportant,\~prequired,\~pstandard) )
> > # Mark as manually installed all essential, important, required, or standard priority packages
> > aptitude -R --schedule-only unmarkauto $( aptitude -F "%?p" search \~i?or(\~E,\~pimportant,\~prequired,\~pstandard) )
> > # Mark as automatically installed all packages that are not essential, important, required, or standard priority
> > aptitude --schedule-only markauto $( aptitude -F "%?p" search \~i\!\~E\!\~pimportant\!\~prequired\!\~pstandard )
> > # Install all the packages in the installed package list (manual + automatic)
> > aptitude -R --schedule-only install $( cat installed-all )
> > # Mark as automatically installed all packages in that list
> > aptitude --schedule-only markauto $( cat installed-auto )
> 
> Thanks for that.  I'm not sure of the implications of marking
> 'essential, important, required, or standard priority packages' as
> manually installed and the rest as automatically installed.  I mean,
> how did I get to that spot - from the install disc I'm assuming.  Is
> that a manual or automatic install?.  If I look at initscripts say,
> it's required, but automatic right now.  If I follow your logic
> correctly, you'd be marking it manual.

Those first two [restore] commands are just to return the package selections to 
what they would be after an install.  I think it might not be safe to mark the 
initscripts package as automatically installed; aptitude may try to remove it 
(or rather throw up warnings about removing it).  The last command would mark 
the initscripts package as automatically installed if it is listed in the 
installed-auto file.

> I also wonder about too many arguments if I do
> > aptitude -R --schedule-only install $( cat installed-all )
> with a lot of packages on that list.

I'm not sure about this.  I think I did it once without problems but I am not 
sure.

Attachment: signature.asc
Description: Digital signature


Reply to: