On Sun, Jul 24, 2016 at 02:14:44PM +0530, Ritesh Raj Sarraf wrote:
> On Sat, 2016-07-23 at 21:39 +0530, Ritesh Raj Sarraf wrote:
> > > Even after quite a bit of code staring I don't see how that could have
> > > happened, so lets see if it becomes more obvious if we know how the file
> > > came to be – and as we do run afresh, lets add a few debug options to
> > > have the most "fun" with it (beware, lots of output):
> > > -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
> > 
> > Ah!! I kept wondering what switches were to be used with the newer apt,
> > because
> > it has no option for --debug or --verbose.

It has no as 'apt-get' does a million different things and 'apt' is
actually worse, so instead of using a --debug option which just enables
all debug options in which you would drown in, we have a bunch of
options targeted at specifics. The README.md file in the source tree
mentions the most common with some additional hints on how to use them
for debugging/testing btw.


> > I'll enable them now and hopefully share more results as I reproduce the
> > problem.
> 
> Please find attached the debug logs.

mhhhhhh. At leat in this run the
/var/lib/apt/lists/httpredir.debian.org_debian_dists_testing_main_binary-amd64_Packages
file is already broken before the 'apt update' call. The 404 errors make
the update fail (at least for this source), so the "old" data is kept
and parsed.

That it is broken can also be seen by the rred call end with incorrect
hashes, which apt detects, records as 'Ign' (ignored error) and proceeds
with downloading the entire file a new, which it does and even with the
right hashes this time – but the file remains in partial to be picked up
by the next update call as its siblings failed and they can transition
from partial/ to their final storage place in the parent lists/ if all
were successful.

So, what we 'need' is a call in which apt produces breakage – aka: all
files in /var/lib/apt/lists are nice and valid while after (a
successful) apt call a broken file has slipped in creating errors.

The attached log shows apt behaving as intended – well, perhaps apt
should be clever enough to remove broken files from its lists/ directory
but thats a wishlist as it shouldn't end up in a situation in which it
has broken files there in the first place…


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature

Reply via email to