Deciding what packages to put on an install CD

Matthew Palmer mjp16 at ieee.uow.edu.au
Sat Nov 23 03:12:56 CET 2002


On Thu, 21 Nov 2002, Bruce  Edge wrote:

> I want to grab all specified and dependant packages from the package lists in package_config/* to put on the install CD.
> This would allow one to install any of the same classes supported by the regular FAI install.
> How can I generate a list of all the dependant packages?
> ie: a list of all the packages that the specified packages in package_config/* depend on?

You want my script for that, called 'dlall':

#!/bin/sh

apt-get -c apt.conf update
apt-get -c apt.conf install `egrep -vh '(PACKAGES|#)' \
	<FAIpath>/package_config/*`
apt-get -c apt.conf autoclean

for file in dists/fai/client/binary-i386/*%*; do
	mv $file `echo $file | sed 's/_.*%3a/_/g'`
done

dpkg-scanpackages dists/fai/client/binary-i386 /dev/null \
	> dists/fai/client/binary-i386/Packages

rm -f dists/fai/client/binary-i386/Packages.gz
gzip dists/fai/client/binary-i386/Packages

The files needed for this to work are a local apt config file, called
apt.conf:

APT::Get::Download-Only "true";
Dir::Cache::archives "/foo/bar/baz/dists/fai/cbnsw/client/binary-i386";
Dir::State::status "/dev/null";
Dir::Etc::SourceList "/foo/bar/baz/sources.list";
Dir::State::Lists "/foo/bar/baz/lists";

You also need a directory called lists, and a sources.list which looks as
per usual.

Basically, we're using apt's internal dependency processing stuff instead of
hacking something with Perl, and getting it to do the complete download.  If
you work your sources.list properly, you can even get the packages off some
Debian CDs you have available, with additions from security.d.o or
something.

The /foo/bar/baz is whatever your path is to your package heirarchy you're
trying to build.  The funky for..sed lines are to rewrite package names
which contain epochs so they don't any more.  It confuses the blazes out of
apt later on if they're left in there.

Anything else I've forgotten to mention, just let me know and I'll try to
answer it.


-- 
-----------------------------------------------------------------------
#include <disclaimer.h>
Matthew Palmer, Geek In Residence
http://ieee.uow.edu.au/~mjp16




More information about the linux-fai mailing list