Debian net-based upgrades, was Re: [wplug] script help needed

D. Joe Anderson wplug at etrumeus.com
Mon Apr 16 10:26:31 EDT 2007


On Fri, Apr 13, 2007 at 06:50:58PM -0400, Zach wrote:

> I am in the middle of a dist-upgrade (Debian) which needs to
> get about 400MB so at 4KB/s this will take a while :) Anyways
> I would like to be able to leave my machine unattended while
> this upgrade job runs but it keeps disconnecting.

For situations like this (big upgrade sets, or flaky
connections), I like to decouple the download of Debian upgrades
from the installation of those same upgrades.  I use the "-d"
option for apt-get or aptitude.  One can do as many passes as
you need with that switch, which will download the upgrades
only.  That part is often the most time-consuming and that which
can most safely be automated and most cleanly interrupted or
restarted.

Then, once the .deb files are all successfully downloaded to
/var/cache/apt/archives, (that is, once the download step
reports it has downloaded everything) do the

  [apt-get|aptitude] [install|upgrade|dist-upgrade] 

part without the -d to actually install the packages in
question.

Bottom line for me is that if I leave it running and come back
to it only find it has died, I *know* that it has died during
the download, and not mid-way through installation of some
upgraded package.  I also can conserve my attention for the
questions posed later by the interactive install or upgrade
scripts when they are installed.

For scripting this, you might want to toss the -y in there, too.

-- 
Joe



More information about the wplug mailing list