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

Bug#705648: marked as done (if-modfied-since undhandled case causes apt lists corruption)



Your message dated Wed, 05 Jun 2013 23:17:05 +0000
with message-id <E1UkMwz-0004mO-P8@franck.debian.org>
and subject line Bug#705648: fixed in apt 0.9.7.9
has caused the Debian Bug report #705648,
regarding if-modfied-since undhandled case causes apt lists corruption
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
705648: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705648
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt-transport-https
Version: 0.8.16~exp12
Tags: patch

When using an https repository, apt will use libcurl to download
files, setting the If-Modified-Since herder in the http request.

If the server replies with a 200 OK but a Last-Modified header with a
date that is not newer that the requested If-Modified-Since, libcurl
drop the file, reporting an errorcode 200, but the actual downloaded
file will be empty.

Causing messages like
W: Size of file
/var/lib/apt/lists/partial/repo.server.com_dists_precise_main_binary-amd64_Packages
is not what the server reported 0 25118

See the attached patch that fixes the issue.

Apt needs to check the CURLINFO_CONDITION_UNMET to know if libcurl
discarded the payload.
Also TotalSize will get updated to the actual size of the file as
progress_callback will be called with the download size even in the
case libcurl decides to discard the payload. This will cause the check
for the size to fail. In my patch I just disable the check if the
actual size of the file is 0. Probably a better way would be adding a
new header is the message from the worker stating that the file was
discarded.

The cases why the http server would give this kind of response are, e.g.
1) if-modified-since used like a etag header
http://trac.nginx.org/nginx/ticket/93

(under this light, it might makes sense to avoid using the
CURLOPT_TIMECONDITION feature and handle If-Modified-SInce as an Etag)

2) a bug in apt-cacher-ng which sometimes returns 200 OK with a
Last-Modified equal to Last-Modified (about to be reported)

This bug is present at least as far back as version 0.8.16~exp12 and
still affects the latest in experimental (0.9.7.9~exp3). The attached
patch is for 0.9.7.9~exp3.

Cheers,
Ludovico

Attachment: check-time-condition.patch
Description: Binary data


--- End Message ---
--- Begin Message ---
Source: apt
Source-Version: 0.9.7.9

We believe that the bug you reported is fixed in the latest version of
apt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 705648@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Vogt <mvo@debian.org> (supplier of updated apt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 04 Jun 2013 11:24:15 +0200
Source: apt
Binary: apt libapt-pkg4.12 libapt-inst1.5 apt-doc libapt-pkg-dev libapt-pkg-doc apt-utils apt-transport-https
Architecture: source all amd64
Version: 0.9.7.9
Distribution: stable
Urgency: low
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Michael Vogt <mvo@debian.org>
Description: 
 apt        - commandline package manager
 apt-doc    - documentation for APT
 apt-transport-https - https download transport for APT
 apt-utils  - package managment related utility programs
 libapt-inst1.5 - deb package format runtime library
 libapt-pkg-dev - development files for APT's libapt-pkg and libapt-inst
 libapt-pkg-doc - documentation for APT development
 libapt-pkg4.12 - package managment runtime library
Closes: 699759 705648
Changes: 
 apt (0.9.7.9) stable; urgency=low
 .
   [ Ludovico Cavedon ]
   * properly handle if-modfied-since with libcurl/https
     (closes: #705648)
 .
   [ Andreas Beckman ]
   * apt-pkg/algorithms.cc:
     - Do not propagate negative scores from rdepends. Propagating the absolute
       value of a negative score may boost obsolete packages and keep them
       installed instead of installing their successors.  (Closes: #699759)
Checksums-Sha1: 
 5ce1d659b835b45a0e1b6952124287a46420a8a2 1696 apt_0.9.7.9.dsc
 bcc38d7dd4e93f21f5e95bdc63b057f85b62cda1 3397270 apt_0.9.7.9.tar.gz
 f16195abfea61e088984af74a9216ff99825286c 262488 apt-doc_0.9.7.9_all.deb
 35230a59a197d2633d20ef42c09d99e102976608 960044 libapt-pkg-doc_0.9.7.9_all.deb
 6d9436914485986f7a8f21a66421ab07314fd91d 897002 libapt-pkg4.12_0.9.7.9_amd64.deb
 b8f44ae7c300d4d11895a0b0f14ff1c16c628965 166610 libapt-inst1.5_0.9.7.9_amd64.deb
 6a271487ceee6f6d7bc4c47a8a16f49c26e4ca04 1253524 apt_0.9.7.9_amd64.deb
 a25c18a083f23193ca069cb14974ed3b5b68fb09 186754 libapt-pkg-dev_0.9.7.9_amd64.deb
 57950f083a74849cb380bc6f1da4870a02702704 377312 apt-utils_0.9.7.9_amd64.deb
 b498a3e620f648b2d3b9901ee6a33565e2aeedb2 108550 apt-transport-https_0.9.7.9_amd64.deb
Checksums-Sha256: 
 f669d1e7a019446bda1aa370f667d0f23ada7c5f2b408d54d47d180426b235f1 1696 apt_0.9.7.9.dsc
 062084d8bde5e1ac7219e1de21342f1bc3c0a028e87ce0a4fa6efe845462e6b6 3397270 apt_0.9.7.9.tar.gz
 fffdf20273b98aa0c9f40bed8b1e560120d24be6289c4d36161b6f2800157b86 262488 apt-doc_0.9.7.9_all.deb
 36e8a1508cd74098cfeb7e41052bd1b3f46c7999ac965cec3d0893262941929a 960044 libapt-pkg-doc_0.9.7.9_all.deb
 32ac1e812247d716287b476513c475be7457d58ad85c77732c30ed001de48916 897002 libapt-pkg4.12_0.9.7.9_amd64.deb
 8f3bfa84d47fbb2983d5801b526102eb262742ca6a78c452c26e55025e605edc 166610 libapt-inst1.5_0.9.7.9_amd64.deb
 3bba3b15fb5ace96df052935d7069e0d21ff1f5b496510ec9d2dc939eefad104 1253524 apt_0.9.7.9_amd64.deb
 8eba032573f9a949e9e24715975af5839cadddcd11d872b07f4292114bf5e132 186754 libapt-pkg-dev_0.9.7.9_amd64.deb
 b7b12eb0e23c13da27a736718741d940d4e80c140e23c312e327d33c5561de5b 377312 apt-utils_0.9.7.9_amd64.deb
 b4de1480e324ce1dbbc695f8472882a1b4d9f86783ed3d619e6820e58a232fe6 108550 apt-transport-https_0.9.7.9_amd64.deb
Files: 
 ba017b6f709ef689efb8830ba8e3ae09 1696 admin important apt_0.9.7.9.dsc
 4b992b556ad179d51ab524befc09d182 3397270 admin important apt_0.9.7.9.tar.gz
 446954b76e7c45d9faddf9537a59accc 262488 doc optional apt-doc_0.9.7.9_all.deb
 c64cbd436eaf9194a68bc4621c9ceb6a 960044 doc optional libapt-pkg-doc_0.9.7.9_all.deb
 533c2811532dca6a643c061136096daf 897002 libs important libapt-pkg4.12_0.9.7.9_amd64.deb
 f33e9b2c342a376a973c763e8cd89075 166610 libs important libapt-inst1.5_0.9.7.9_amd64.deb
 00a128b2eb2b08f4ecee7fe0d7e3c1c4 1253524 admin important apt_0.9.7.9_amd64.deb
 e46ff3a3365ff751b7619046bf5718e9 186754 libdevel optional libapt-pkg-dev_0.9.7.9_amd64.deb
 dcdc35df8ee7b21564ca8bc30955cb01 377312 admin important apt-utils_0.9.7.9_amd64.deb
 d6fe788d79df8d147c61ef46db4c1ed9 108550 admin optional apt-transport-https_0.9.7.9_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEUEARECAAYFAlGtwOsACgkQliSD4VZixzTxWgCYsm4tGD/MWTJxRQ0CUJ5zBSqb
LQCeOeKz+05LKShfXJyk7gdpVUjpYBk=
=GTFG
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: