On Tue, 1 Oct 2002, Panu Matilainen wrote:
> On Tue, 1 Oct 2002, Ed Wilts wrote:
>
> > On Tue, Oct 01, 2002 at 06:35:31PM +0100, Mr. Adam ALLEN wrote:
> > >
> > > I'll take apart the comps.xml file download the packages and go through
> > > installing them manually.
> >
> > You might be able to do some short-cutting here. Pick a higher-level package
> > with a whole slew of dependencies and use up2date. up2date will grab whatever
> > else it needs. This is one case where starting from the top and working
> > your way down is easier than starting from the bottom.
>
> Actually.. here's a poor man's metapackage downloader for you:
> Check out what's available with './comps-req.py -l' and the you could do
> up2date `./comps-req.py development-tools developments-libs` which should
> install the basic development tools for you.
..or to take it one bit further, with the attached script:
./up2date-task development-tools development-libs
(CC'd to psyche-list since this thread seems to be continuing there)
--
- Panu -
#!/usr/bin/python
import rhpl.comps, sys, string, os
comps = rhpl.comps.Comps('/usr/share/comps/i386/comps.xml')
if sys.argv[1] == '-l':
for group in comps.groups:
print comps.groups[group].id
sys.exit(0)
nick = {}
for name in comps.groups:
nick[comps.groups[name].id] = name
pkgs = []
for group in sys.argv[1:]:
for pkg in comps.groups[nick[group]].packages:
pkgs.append(pkg)
os.system('/usr/bin/up2date %s' % string.join(pkgs))