APT -- if I do this will I screw the pooch?



Got a question relating to APT. I typically use aptitude in command-line mode as a front-end to APT. I'm running Sarge kept up to date with security updates, on a single-processor Pentium 4-based desktop machine. My kernel is a self-built 2.6.15.4 built with make-kpkg from kernel.org source.

I'm planning shortly to add a second Debian machine, a notebook, to my home network. I intend to keep the versions of Debian on the two machines, my current desktop and the new notebook, basically in step but don't want to be forced to ie if considering a major upgrade, want to be able to do one first, play around with it, then do the other.

I don't have up to date install CDs and don't want to download them, so I was thinking of setting up the notebook by doing a basic install off my old woody CDs I originally set up my desktop off of, getting a working net connection in place, then immediately upgrading everything via the net to current stable before building out the system any further. Since I've already gone through the upgrade process, over the last 2 years, with my desktop machine I have all the packages downloaded in my /var/cache/apt/archives directory. I don't want the notebook to have to download them all again, especially since security.debian.org, which has a lot of the latest versions of stable packages, seems to get overloaded and be very slow to download at times.

After reading the man pages on apt, apt.conf, aptitude etc, and googling around, here's what I am thinking of doing. First of all, exposing my desktop's /var/cache/apt/archives as an NFS mount, configuring my gateway's firewall to prevent anyone mounting it from outside my LAN. Mounting this NFS mount on the laptop, let's say at /mnt/aptarchive. Then, setting APT config option Dir::Cache::archives on the notebook to point at /mnt/aptarchive, *without touching the other Dir::Cache options*. This is because although I want them both to use the same repository of downloaded package files, I want the two machines to independently track what's installed, so I don't have to keep installed packages identical on both machines.

Here's what *I think* the effect of this will be:

1. The notebook, when asked to dist-upgrade and later to install packages I didn't install from the woody CDs, will not have to download the package from outside my network because its archive already contains the package (always assuming that the package concerned is installed on the desktop, which 90% of what I want to install on the notebook will be).
2. The notebook and the desktop will have independent views of what's installed, and will each know nothing about what's installed on the other machine (which is fine).
3. If I want to install something on the notebook that's not installed on the desktop, the notebook will download it as normal and put it in the same archives location.
4. This means that if I then later decide to install that package on the desktop, it will find it already has the package and not download it (assuming a newer one hasn't become available in the meantime).
5. Installing a package on one machine will have no effect whatever on the other machine's notion of whether or not that package is installed.

Reading the APT documentation, it seems to encourage using squid to set up a local caching download proxy to achieve this goal, setting APT to use the proxy when downloading packages. I don't like this approach as it would mean having at least 2 copies of the downloaded packages (on the desktop and on the notebook, if I can persuade squid to use the desktop's /var/cache/apt/archives dir as its cache dir) or maybe even 3 (squid's repository, the desktop's /var/cache/apt/archives, and the notebook's /var/cache/apt/archives if I can't get squid and the desktop's APT to play nice). Since the point is to avoid extra downloads and also space wastage, I'd rather go with my approach.

What I'm looking for is input from more experienced hands with APT on whether I will screw anything if I do what I'm proposing, sharing the archives dir between 2 machines without sharing the package cache and source cache files. The documentation is somewhat ambiguous on whether or not what I'm proposing is possible.

I *could* just try it, but I don't want to utterly screw my desktop if I can avoid it...

Mark


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: FC5 - T3 - Had enough. Package Managers, Yumex is crap.
    ... I finished update with a broken X server, blew my system away using apt-get and answering yes to the extreme package removal in order to add one package and a host of other mishaps. ... FC5 test cycle was the easiest to install and deal with me in relation to other Development cycles. ... Usually there are still packages cached in /var/cache/yum/development/packages after pirut exits. ... earlier which started the download in the first place. ...
    (Fedora)
  • Re: WMP 11 Anyone get this?
    ... Download complete. ... Package install complete. ... Package 'User Mode Driver Framework'. ... Package 'Windows Media Format Runtime'. ...
    (microsoft.public.windowsmedia.player)
  • Re: LMMS help
    ... I want to download and install LMMS. ... what sort of package manager your system uses. ...
    (comp.os.linux.misc)
  • Re: Some more questions on FreeBsd usage
    ... If the package is on the ... then install cdrecord from the ports. ... existing medium anyway) just means you get to download it in one lump ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Synaptic deps on libapt-pkg-libc6.3-6-3.11 in sid
    ... apt-get install, the apt return the "SEGMENT FAULT". ... Now, I find that the apt-0.7 is not belong to the sid, the version of apt ... Reading package lists... ...
    (Debian-User)