a way to force a set of packages on a machine?
Timo Aaltonen
tjaalton at cc.hut.fi
Wed Aug 2 17:41:36 BST 2006
Hi!
I'm trying to set up a mechanism which would force a set of packages on
a machine, so that extra packages are removed if they are not on the list
and new ones get installed. The motivation for this is to force the users
(which might have local sudo-power) a fixed set of packages and to keep
them from installing extra packages which might break something or leave
cruft behind. The other use is to centrally manage package removals from a
single place, no need to dpkg -r remotely or anything.
One way to achieve this is to maintain a list in a "dpkg --get-selections"
kind of format, and after modification run "dpkg --set-selections" (and
apt-get dselect-upgrade). But that's awkward (been there..), because you'd
need to keep track of all the dependencies since they need to be on the
list, otherwise those that lack some deps are not installed.
Debian-installer takes the package list as aptitude-syntax list, so in
theory it would be possible to keep it similar, but aptitude doesn't seem
to support package removals (yes, you can tell it explicitly to remove a
package, but not to keep a list of packages and only those).
I have a simple script that converts a list of packages for preseeding the
installer, so I'd like to use the same list for both purposes. One way to
achieve this would be to parse the list and blurb out all dependencies
that the packages need, and I'd have a list that "dpkg --set-selections"
could use. I've done a quick test, and it took 1m30s to parse a list which
installs ~1800 packages, so it's not optimal.
Should I just use a custom-made metapackage? (since it should work with
package removals as well)
t
More information about the ubuntu-devel
mailing list