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

Re: apt-get/dselect - network *or* CDs



Rob Weir wrote:

On Sun, Jul 06, 2003 at 10:03:07AM -0400, Kenneth Jacker wrote:

I've tried to find an answer to this by reading and searching the
net, but no luck.

I created the "sources.list" file with network entries followed by CD
entries. Ideally, I'd like this setup to access one of the specified
network mirrors if I'm connected to the Internet. On the other hand,
if I'm not connected by either PPP or Ethernet, I'd like to use the
installation CDs.

Is this possible?

As a much less desirable "work around", I tried having two secondary
files -- one with the network entries and another with the CD ones --
one of which is symbolic linked to "sources.list". The problem with
that is when I use the network info, all the data from the seven CDs
"goes away" (requiring a rescan of all CDs next time I use *them*).

Thanks for any ideas!


There's no easy solution to this that I know of. If you have the
diskspace, you could just copy the contents of this CDs to your hard
disk, and then get packages from there, but that would require a few GB
of space.

Another solution might be to duplicate /var/lib/apt/ (and
/etc/apt/sources.list) to /var/lib/apt.cdrom/ and /var/lib/apt.net/ and
then symlink /var/lib/apt/ (and your sources.list) to which ever is
appropriate at the time. I've never tried this, so test it carefully
before you rely on it, and KEEP BACKUPS.

From the woody version of apt and later, if you put the cdrom entries _before_ the internet ones, then the CD's will be used in preference to the internet, as long as there is no newer version of the package on the net.

I think this might be the solution you are looking for. The only thing it _won't_ do, is if you wanted to say "use the CD's when I'm not connected to the internet, _even if_ there is a newer version of the package on the net". For that to work, I believe you would need to comment out the internet lines and do an "apt-get update" for the times when you were not connected, then uncomment them and "apt-get update" again next time you connected.

Any solution with multiple sources.list files would need to have the cdrom lines first in every file, otherwise you will need to rescan the CD's when you want those entries back in place. You can't manually add cdrom lines to sources list, for this you must use "apt-cdrom add".

--
Cheers,

  .~.
  /V\
 // \\
/(   )\
 ^`~´^
< hugge >





Reply to: