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

Re: aptitude loses the lists after "update"ing while offline



On 10/27/15, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> If I do
>
>    aptitude update
>
> while my proxy is down (or when I'm offline), the previous package lists
> are apparently gone, so after that, any aptitude command will tell me
> things like:
>
>    # aptitude install foo
>    E: The value 'testing' is invalid for APT::Default-Release as such a
> release is not available in the sources
>    E: The value 'testing' is invalid for APT::Default-Release as such a
> release is not available in the sources
>    #
>
> Of course, the obvious answer would be "don't do that", but the "update"
> is also done automatically by unattended-updates, so I don't have complete
> control over it.
>
> Why does it do that?  How can I prevent it?


I can't answer your last question but my kneejerk reaction is that
people fall offline all the time for every reason possible. A package
that relies on online services to complete its task should abort with
an error message indicating it cannot reach its target destination. In
my ideal World, they retry a few times before "throwing in the towel"
(before giving up completely).

I went offline just now *just for You* to test apt-get. This is what I
see here, on a regular basis by the way, that's how I know, GRIN:

+++
Err http://ftp.us.debian.org sid InRelease

Err http://ftp.us.debian.org sid Release.gpg
  Could not resolve 'ftp.us.debian.org'
Reading package lists... Done
W: Failed to fetch http://ftp.us.debian.org/debian/dists/sid/InRelease

W: Failed to fetch
http://ftp.us.debian.org/debian/dists/sid/Release.gpg  Could not
resolve 'ftp.us.debian.org'

W: Some index files failed to download. They have been ignored, or old
ones used instead.
+++

And I quoteth: "or old ones used instead"......... aka apt-get's
previous files were not flushed down the potty PRE-commencing the
newest requested update.

I've talked about it before because of a problem someone else had many
weeks ago. Apt-get tosses partially completed download files into a
temporary directory where those files stay until they're ready to be
decompressed. The VERY LAST part of the process is that they then
overwrite and/or become interwoven into the previous similar/same list
files.

Just thinking out loud. :)

Cindy :)

-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *


Reply to: