Help with package managers
Derek Broughton
news at pointerstop.ca
Tue Apr 10 16:59:13 UTC 2007
Sean Maguire wrote:
> Hi all,
>
> Is it possible to use any of the package managers to find out which
> packages have been added since the initial installation?
Yes.
> For instance,
> I have Ubuntu install on machine A and I want to do a second install
> on machine B. I like the package set install on machine A and want the
> same on machine B; can I generate a list so that I can "apt-get
> install <list>" and have all the packages from machine A installed on
> machine B?
I run this from cron weekly:
# aptitude search '~i !~M' | tr -s ' ' | cut -f 2 -d ' ' \
>/etc/apt/installed.txt
It creates a list of everyting that Aptitude has installed manually (I don't
need to know the dependencies). I can rebuild from that list.
If you're not using aptitude, and so don't have the concept
of "automatically installed" packages, then
# dpkg --get-selections >filelist
does just as good a job and
# dpkg --set-selections <filelist
# apt-get -f install
on the other machine will install everything.
>
> Even better would be a way to keep them synchronized, so I install a
> package on either machine and the other would detect this and prompt
> me to install said package. I guess if it is possible to generate the
> list I could get a perl script together to do this.
apt-move, apt-proxy, apt-cacher or approx would be useful here - then your
second and subsequent machines just get their downloads from the cache
created by the first machine. You'd still want something to watch for
changes. It's a while since I used apt-move, but I suspect it would work
well for you, as the client machines could be designated to have access
only to the local apt cache, and then apt-index-watcher could automatically
update them as it changed. The other three all seem to be variations on a
theme (in python, perl and OCaml, respectively). Your client downloads
anything in the general repositories, and it gets cached locally, where any
other client will find it before trying a net download - not so useful for
forcing clients to use a standard set of apps. I used to use apt-proxy but
it broke in a major python upgrade and it wasn't worth reinstalling or
replacing.
--
derek
More information about the ubuntu-users
mailing list