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

Re: V?: aptitude reinstall from file contained package names?



On Fri, Jan 11, 2008 at 09:47:21PM +0100, Paul Csanyi wrote:
> 2008/1/9, Douglas A. Tutty <dtutty@porchlight.ca>:
> > On Wed, Jan 09, 2008 at 02:37:30PM +0100, Paul Csanyi wrote:
> 
> > > Now I want to reinstall all these packages listed in
> > > 'installed_packages' file, with aptitude.
> 
> > I've never tried that automatically with aptitude and checking the man
> > page suggests that its not possible.
> 
> I tried but have not success.
> 
> > If what you asked for really worked, then you would loose the main
> > benefit of aptitude: keeping track of shifting dependancies and cruft
> > controll.  Everything would appear to be automatically installed.
> 
> After all, I use aptitude to reinstall everything.
> 

You mean that you mark __every__ package as manually installed?  

If you take your list of packages and then use something like xargs,
then a new instance of aptitude is loaded, one after another, to install
each package.  What you need is to give aptitude a list all on the
command line.  However, if you're telling it to install everything
including all the otherwise-automatic libs, then I think you'll run out
of command-line length before you complete your package list.

Anyway, to turn your list of package names, one per line, into one line
with many names, just preface all newlines with a " \".
Sounds like a simple job for sed with a regular expression but I don't
do REs.  You'd then have to read the bash man page to see the maximum
lenght of command line and split that.

Doug.


Reply to: