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

Re: Can apt access a local cdrom?



On Fri, 9 Oct 1998, Dave Swegen wrote:

> On Fri, Oct 09, 1998 at 11:38 -0400, Jim Foltz wrote:
> > On Fri, Oct 09, 1998 at 03:46:58PM +0000, Anthony Campbell wrote:
> > > I have succeeded in getting apt to connect to a distant ftp site but I've
> > > been unable to get it to access my cdrom drive, which currently has the
> > > Cheapbytes version of debian. I've tried every combination of deb file:/cdrom
> > > I can think of but I keep getting "malformed line in sources.list".  
> > > 
> > > Is it possible to do this?  If so, how?
> > 
> > First, mount the cd
> > Then add the line:
> > deb file:/cdrom/debian stable main
> > (assuming you have the cd mounted under /cdrom and it is the stable/main cd)
> > 
> 
> As a follow-up question to this: Is it possible to make apt aware of
> multiple CDs? I bought one of the cheapbytes sets, and thus have 3 CDs
> with different parts on them (main, contrib and non-free). Setting up the
> main CD so apt is aware of it is no problem, but the other two? Seems daft
> to have to use an ftp mirror when I have exactly the same stuff locally...

easy.. make a small directory tree, (/usr/local/debian) with each
Packages.gz within. i.e.:

debian/dists/hamm/main/binary-i386/Packages.gz
debian/dists/hamm/non-free/binary-i386/Packages.gz
debian/dists/hamm/contrib/binary-i386/Packages.gz

then fill the respective binary-i386 directories with symlinks to the
equivalent files/directories on the CD's. Then point apt at it as such:

deb file:/usr/local/debian hamm main non-free contrib

and update. that way, when one CD is in, you can use its resources, but
when you did the update, ALL Packages.gz were present, thus all packages
are visible. It's only downside is that dependencies between area's die.
but, just insert the different CD, mount it, and run install again. It
should ignore the packages on the CD you've just removed, as it has copied
them to /var/cache/apt/archives.

HTH,

                       Michael Beattie (mickyb@es.co.nz)

               PGP Key available, reply with "pgpkey" as subject.
 -----------------------------------------------------------------------------
  If NT is the answer, you didn't understand the question. (NOTE: Stolen sig)
 -----------------------------------------------------------------------------
                Debian GNU/Linux....  Ooohh You are missing out!



Reply to: