[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Merging a set of CD's to a local depository



On Sun, Mar 05, 2000 at 11:57:34AM +0000, Christian Rishøj wrote
> 
> DEAR DEBIAN USERS,
> 
> I have multicd set containing an unofficial release of Debian Potato
> made a few days ago following the instructions and tools suplied with
> Debian.
> Now I would like to make a local depository on my hardrive using the
> packages on the CDs. I am thinking about just copying each of the CDs to
> directories on the HD and adding these to /etc/apt/sources.list, but I
> am sure there are better ways to do this. 
> Anyone?
> 

Firstly, you should be able to use the CDs directly with apt by using
apt-cdrom to create entries for them in /etc/apt/sources.list;
just run
# apt-cdrom add
once for each CD.

If you want to store the packages on your hard disk rather than using
the CDs (e.g., to allow you to make them available to other machines
via http or ftp, or to allow "hands-off" package installation with
apt across a network connection) then you can start by just using
cp -a to copy the /debian directories to wherever you want; you must
then generate a valid Packages file containing details of all the
packages on all CDs, as the Packages files on each CD only contain 
the packages found on that CD.

You have two main options:

 Copy the various "Packages.cd.gz" files from the last CD in your 
 set to the corresponding locations in your disk repository and
 then rename them to "Packages.gz", and delete any existing
 "Packages" files;

or

 Use dpkg-scanpackages to generate a Packages file for you; typical
 commands might look like
  $ cd /ftp/linux/debian/dists
  $ dpkg-scanpackages potato/main/binary-i386 /dev/null dists/  > \
     potato/main/binary-i386/Packages  
 Note that the presence or absence of trailing slashes in the parameters
 to dpkg-scanpackages is significant, as some are appended to form
 pathnames.  /dev/null is here used as the location of the maintainer
 override file; if it exists, ../indices/override.potato.gz would be
 a more appropriate value.

Be careful to delete or replace any existing Packages{,.gz} files
when you do this, to ensure that apt finds the correct ones.

HTH,


John P.
-- 
huiac@camtech.net.au
john@huiac.apana.org.au
"Oh - I - you know - my job is to fear everything." - Bill Gates in Denmark


Reply to: