why does this command not work?
C M Reinehr
cmr
Fri Jan 12 07:03:46 PST 2007
On Friday 12 January 2007 05:18, Matthew Carpenter wrote:
> On Wednesday 10 January 2007 10:13, Roger Oberholtzer wrote:
> > On Wed, 2007-01-10 at 04:15 -0700, Myles Green wrote:
> > > sudo dpkg --get-selections | grep '[[:space:]]install$='| awk '{print
> > > $1}'
> >
> > run
> >
> > echo "sudo dpkg --get-selections | grep '[[:space:]]install$='| awk
> > '{print $1}'"
> >
> > which is basically your command put in double quotes and echo'd.
> >
> > Note a difference in what is printed by echo and what your original
> > command was?
> >
> > It's those pesky '\' escapes. Might be more. But that is what I see.
>
> Drop the "=" at the end and all should be well...
>
> The equals sign is there because the author is only interested in the
> installed packages... but the dpkg --get-selections will also return
> packages in other states (like 'deselected', etc...), because a machine is
> a living organism, both installing packages and uninstalling packages over
> time.
>
> I would personally drop the "awk" statement, since in order to
> use "--set-selections" you'll need the "install" part of the line as well.
>
> Now what *I* would like to know from you experts is this: Once I've
> restored using "dpkg --set-selections", what is the most reliable/robust
> method of actually getting the packages to install? I've been able to do
> it, with the right combination of "apt-get -f install" and such, but I've
> found that "dselect" -> install seems to work more reliably... why?
>
> Thanks,
> MAtt
Matt,
David clearly is the Debian expert on this list and he prefers dselect. For my
part, I use aptitude for the most part and when I last did this (just last
week) I first ran dpkg --set-selections. Then, started up aptitude and
entered 'g' for go. I was presented with a list of all of the packages &
dependencies which had been marked for installation. Entering a second 'g'
for go started the installation. Can't get much easier than that.
Cheers!
cmr
--
Debian 'Etch' - Registered Linux User #241964
--------
"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC
More information about the Linux-users
mailing list