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

Re: apt-get (retry on failure)



on Thu, Nov 29, 2001 at 02:40:15PM +0700, Oki DZ (okidz@pindad.com) wrote:
> Hi,
> 
> Does apt-get have an option for "continue until finished"? 

Yeah, it's called the shell.

    while ! echo y | apt-get dist-upgrade -d
    do
        sleep 60
	apt-get update
    done

...which will attempt to complete the current upgrade (in download-only
mode), sleep 60 seconds after a failure, then update the package list
(in the event it's changed).  I find this usually works.

To finish the install:

    $ apt-get dist-upgrade -s | less	# See what's going to happen
    $ apt-get dist-upgrade

> I think that would be great; so that you can leave your computers
> working while upgrading the systems via a slow link (which has a high
> latency, has many hops to http.us.debian.org, and you have cats too).

You've got me nailed.

I run the above do loop periodically.  Usually just an "apt-get
dist-upgrade -d" in a cron job, but those are failing more and more
often.

Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>       http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?             Home of the brave
  http://gestalt-system.sourceforge.net/                   Land of the free
   Free Dmitry! Boycott Adobe! Repeal the DMCA! http://www.freesklyarov.org
Geek for Hire                     http://kmself.home.netcom.com/resume.html

Attachment: pgpUVLM7Iydg8.pgp
Description: PGP signature


Reply to: