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

Re: Install from list of packages [Was: Re: etch netinst tasksel "standard system"]



On Fri, Mar 14, 2008 at 09:23:29PM +0200, Andrei Popescu wrote:
> On Fri, Mar 14, 2008 at 10:58:13AM -0800, Ken Irving wrote:
>  
> > > [1] Doug's method is good, but I want to automate it further. I just 
> > > have to write a sed script to make the output of 'aptitude search !~M~i' 
> > > suitable for 'dpkg --set-selections'
> > 
> > I'm not sure that's necessary; if the search pattern yields what you want
> > to install, then just replace the search subcommand with install.
> 
> Let me elaborate. Doug's (Douglas Tutty) idea of a backup/reinstall 
> means saving the output of 'aptitude search ~i!~M' to a file and then 
> using that to select packages on a clean base install.
> 
> I think it can be automated like this:
> 
> aptitude search ~i!~M > pkg.lst
> 
> sed -e 's/^i\ *//' -e 's/\ -\ .*$/install/' bak/pkg.list \
> | dpkg --set-selections
> 
> aptitude install -y [--without-recommends]

Not to be pedantic, but I'd recommend AWK for this sort of thing, e.g.,

  awk '{print $2, "install"}' bak/pkg.list | dpkg --set-selections

Ken

-- 
Ken Irving, fnkci+debianuser@uaf.edu


Reply to: