Announcement

Collapse
No announcement yet.

(solved) using apt offline question

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    (solved) using apt offline question

    Not sure what section this goes in.

    I'm currently running kubuntu jaunty, but I have lucid installed on another partition. Keeping it up to date is kind of a hassle because my isp imposes bandwidth restrictions during regular hours. If I want to download anything very big I have to do it at night.

    What I've been doing is, boot into lucid, do an apt-get update and upgrade --print-uris to get a list of files to download later with cron. One problem with that, aside from two extra reboots every time, is there is always a time lag between the update and the downloads. Occasionally something gets updated in the repositories in the meantime, which means I don't get everything in sync.

    Yesterday I stumbled onto the Using APT Offline howto. The howto shows how to upgrade a machine that isn't on the net using apt to download the needed updates onto a thumb drive or other media. From reading the howto, it looks to me like in my case I could just adjust the config file to point to the existing /var/cache/apt directory structure on the other partition and basically update and upgrade --download-only in place.

    Before I try that I thought I would run it by the gang here and see if anyone has tried it and if they ran into any trouble doing it that way. Any thoughts?

    http://www.fifi.org/doc/apt/offline.html/ch2.html

    Edit: I successfully upgraded my lucid partition almost exactly as I described in this post and my followup below. I had to fiddle with the Dir section of the apt.conf a little bit. It works!
    linux since slack 2. kde since beta 1. kubuntu since hardy.

    #2
    Re: using apt offline question

    The problem is, the updates for Lucid are not the same as updates for Jaunty. You can't use the downloaded updates for Lucid with Jaunty.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: using apt offline question

      I guess I wasn't clear with my question. The howto describes how to use a custom apt.conf to update and download packages for another machine, possibly a different distro, to portable media. The most obvious case is to update a machine that doesn't have net access.

      In my case, the "portable media" is another partition on this machine. Since the /var/cache/apt directory structure already exists on the lucid partition, my idea was to use a custom apt.conf to point to that existing directory structure and let apt update the lucid installation using the existing lucid status file on that partition.

      Assuming the lucid partition is mounted at /lucid, it would look something like this:

      APT
      {
      /* This is not necessary if the two machines are the same arch, it tells
      the remote APT what architecture the Debian machine is */
      Architecture "i386";

      Get:ownload-Only "true";
      };

      Dir
      {
      /* Use the disc for state information and redirect the status file from
      the /var/lib/dpkg default */
      State "/lucid/var/lib/dpkg/";
      State::status "status";

      // Binary caches will be stored locally
      Cache::archives "/lucid/var/cache/apt/archives/";
      Cache "/lucid/tmp/";

      // Location of the source list.
      Etc "/lucid/etc/";
      };

      That may not be exactly right, but maybe you can see what I have in mind. Then I could run a version of the script a little further down the howto from cron to keep my lucid install current. Does that make sense?
      linux since slack 2. kde since beta 1. kubuntu since hardy.

      Comment


        #4
        Re: using apt offline question

        I think in principle the idea would work, but I'm not familiar enough with the underlying nuts-and-bolts of apt-get to know what pit-falls to look out for. Do your homework on this. If you are not 100% sure, then either, backup you system before doing it, or ask more questions.
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: using apt offline question


          Gotcha. That's why I brought it up here. ;}

          If anyone else has any thoughts on this, I'd love to hear them.

          linux since slack 2. kde since beta 1. kubuntu since hardy.

          Comment

          Working...
          X