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

Bug#545699: marked as done (apt: please allow Packages.diff code to skip the last patch)



Your message dated Thu, 18 Feb 2010 21:32:55 +0000
with message-id <E1NiDzT-0006UP-Gn@ries.debian.org>
and subject line Bug#545699: fixed in apt 0.7.26~exp1
has caused the Debian Bug report #545699,
regarding apt: please allow Packages.diff code to skip the last patch
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.)


-- 
545699: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=545699
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 0.7.23.1
Severity: wishlist
Tags: patch

Merging the patches in Packages.diff gives significant improvements
both in data to be downloaded and in overhead by downloading less files.

While apt currently supports skipping patches in the middle of the
stack, it currently assumes the very last patch is applied
(and fails if that is not the case), if any patch is to be applied
at all.

As official Debian repositories do not merge patches, I've set
severity to wishlist.

Attached is a patch that fixes that problem for me.

Hochachtungsvoll,
	Bernhard R. Link
=== modified file 'apt-pkg/acquire-item.cc'
--- apt-pkg/acquire-item.cc	2009-08-28 19:07:55 +0000
+++ apt-pkg/acquire-item.cc	2009-09-08 12:50:05 +0000
@@ -274,7 +274,7 @@
 	 if(last_space != string::npos)
 	    Description.erase(last_space, Description.size()-last_space);
 	 new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
-			      ExpectedHash, available_patches);
+			      ExpectedHash, ServerSha1, available_patches);
 	 Complete = false;
 	 Status = StatDone;
 	 Dequeue();
@@ -342,9 +342,10 @@
 pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
 				   string URI,string URIDesc,string ShortDesc,
 				   HashString ExpectedHash, 
+				   string ServerSha1,
 				   vector<DiffInfo> diffs)
    : Item(Owner), RealURI(URI), ExpectedHash(ExpectedHash), 
-     available_patches(diffs)
+     available_patches(diffs), ServerSha1(ServerSha1)
 {
    
    DestFile = _config->FindDir("Dir::State::lists") + "partial/";
@@ -430,6 +431,13 @@
       std::clog << "QueueNextDiff: " 
 		<< FinalFile << " (" << local_sha1 << ")"<<std::endl;
 
+   // final file reached before all patches are applied
+   if(local_sha1 == ServerSha1)
+   {
+      Finish(true);
+      return true;
+   }
+
    // remove all patches until the next matching patch is found
    // this requires the Index file to be ordered
    for(vector<DiffInfo>::iterator I=available_patches.begin();
@@ -527,7 +535,7 @@
       // see if there is more to download
       if(available_patches.size() > 0) {
 	 new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
-			      ExpectedHash, available_patches);
+			      ExpectedHash, ServerSha1, available_patches);
 	 return Finish();
       } else 
 	 return Finish(true);

=== modified file 'apt-pkg/acquire-item.h'
--- apt-pkg/acquire-item.h	2009-08-11 22:52:26 +0000
+++ apt-pkg/acquire-item.h	2009-09-08 12:30:11 +0000
@@ -422,6 +422,10 @@
     *  off the front?
     */
    vector<DiffInfo> available_patches;
+
+   /** Stop applying patches when reaching that sha1 */
+   string ServerSha1;
+
    /** The current status of this patch. */
    enum DiffState
      {
@@ -475,6 +479,7 @@
     */
    pkgAcqIndexDiffs(pkgAcquire *Owner,string URI,string URIDesc,
 		    string ShortDesc, HashString ExpectedHash,
+		    string ServerSha1,
 		    vector<DiffInfo> diffs=vector<DiffInfo>());
 };
 									/*}}}*/


--- End Message ---
--- Begin Message ---
Source: apt
Source-Version: 0.7.26~exp1

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:

apt-doc_0.7.26~exp1_all.deb
  to main/a/apt/apt-doc_0.7.26~exp1_all.deb
apt-transport-https_0.7.26~exp1_i386.deb
  to main/a/apt/apt-transport-https_0.7.26~exp1_i386.deb
apt-utils_0.7.26~exp1_i386.deb
  to main/a/apt/apt-utils_0.7.26~exp1_i386.deb
apt_0.7.26~exp1.dsc
  to main/a/apt/apt_0.7.26~exp1.dsc
apt_0.7.26~exp1.tar.gz
  to main/a/apt/apt_0.7.26~exp1.tar.gz
apt_0.7.26~exp1_i386.deb
  to main/a/apt/apt_0.7.26~exp1_i386.deb
libapt-pkg-dev_0.7.26~exp1_i386.deb
  to main/a/apt/libapt-pkg-dev_0.7.26~exp1_i386.deb
libapt-pkg-doc_0.7.26~exp1_all.deb
  to main/a/apt/libapt-pkg-doc_0.7.26~exp1_all.deb



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 545699@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@debian.org)


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

Format: 1.8
Date: Thu, 18 Feb 2010 16:11:39 +0100
Source: apt
Binary: apt apt-doc libapt-pkg-dev libapt-pkg-doc apt-utils apt-transport-https
Architecture: source all i386
Version: 0.7.26~exp1
Distribution: experimental
Urgency: low
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Michael Vogt <mvo@debian.org>
Description: 
 apt        - Advanced front-end for dpkg
 apt-doc    - Documentation for APT
 apt-transport-https - APT https transport
 apt-utils  - APT utility programs
 libapt-pkg-dev - Development files for APT's libapt-pkg and libapt-inst
 libapt-pkg-doc - Documentation for APT development
Closes: 319710 329814 444222 448216 463260 538917 545699 550564 558103 564137 567669 568294 569488
Changes: 
 apt (0.7.26~exp1) experimental; urgency=low
 .
   [ David Kalnischkies ]
   * [BREAK] add possibility to download and use multiply
     Translation files, configurable with Acquire::Translation
     (Closes: #444222, #448216, #550564)
   * Ignore :qualifiers after package name in build dependencies
     for now as long we don't understand them (Closes: #558103)
   * apt-pkg/contrib/mmap.{cc,h}:
     - extend it to have a growable flag - unused now but maybe...
   * apt-pkg/pkgcache.h:
     - use long instead of short for {Ver,Desc}File size,
       patch from Víctor Manuel Jáquez Leal, thanks! (Closes: #538917)
   * apt-pkg/acquire-item.cc:
     - allow also to skip the last patch if target is reached,
       thanks Bernhard R. Link! (Closes: #545699)
   * ftparchive/writer.{cc,h}:
     - add --arch option for packages and contents commands
     - if an arch is given accept only *_all.deb and *_arch.deb instead
       of *.deb. Thanks Stephan Bosch for the patch! (Closes: #319710)
     - add APT::FTPArchive::AlwaysStat to disable the too aggressive
       caching if versions are build multiply times (not recommend)
       Patch by Christoph Goehre, thanks! (Closes: #463260)
   * apt-pkg/deb/dpkgpm.cc:
     - stdin redirected to /dev/null takes all CPU (Closes: #569488)
       Thanks to Aurelien Jarno for providing (again) a patch!
   * buildlib/apti18n.h.in, po/makefile:
     - add ngettext support with P_()
   * aptconfiguration.cc:
     - include all existing Translation files in the Cache (Closes: 564137)
   * debian/control:
     - update with no changes to debian policy 3.8.4
   * doc/apt_preferences.5.xml:
     - explicitly warn against careless use (Closes: #567669)
   * debian/rules:
     - remove creation of empty dir /usr/share/apt
   * doc/apt-cdrom.8.xml:
     - fix typo spotted by lintian: proc(c)eed
 .
   [ Ivan Masár ]
   * Slovak translation update. Closes: #568294
 .
   [ Michael Vogt ]
   * [BREAK] merged lp:~mvo/apt/history
     - this writes a /var/log/apt/history tagfile that contains details
       from the transaction (complements term.log)
   * methods/http.cc:
     - add cache-control headers even if no cache is given to allow
       adding options for intercepting proxies
     - add Acquire::http::ProxyAutoDetect configuration that
       can be used to call a external helper to figure out the
       proxy configuration and return it to apt via stdout
       (this is a step towards WPAD and zeroconf/avahi support)
   * abicheck/
     - add new abitest tester using the ABI Compliance Checker from
       http://ispras.linuxfoundation.org/index.php/ABI_compliance_checker
 .
   [ Robert Collins ]
   * Change the package index Info methods to allow apt-cache policy to be
     useful when using several different archives on the same host.
     (Closes: #329814, LP: #22354)
Checksums-Sha1: 
 1b333a9378e04e6f821c295eda3c6f6bd1b96e3a 1224 apt_0.7.26~exp1.dsc
 f86fb2494f8118ead7cbd8bd893df9e28d53feca 2718601 apt_0.7.26~exp1.tar.gz
 fbdf05f5272ec55c9eeb679dd03a97672241bd60 139632 apt-doc_0.7.26~exp1_all.deb
 e8263af7ac2237626f9dbbff5ee16bd6c3431922 134522 libapt-pkg-doc_0.7.26~exp1_all.deb
 cfb9e67056da35f16c6a40c1bd56c3363e48eae1 1762920 apt_0.7.26~exp1_i386.deb
 682c40ff086d06d1e4fcaf3865c28b24d4b331ce 124440 libapt-pkg-dev_0.7.26~exp1_i386.deb
 8a614b5abc0acbf97f309e07630c9cb719a719d4 225548 apt-utils_0.7.26~exp1_i386.deb
 97e4b90aa15baf280b235e3502400dbb2ad1d97d 70832 apt-transport-https_0.7.26~exp1_i386.deb
Checksums-Sha256: 
 93b08d431060d0632d40ce04b29c45999cb7957566d67e2a96e1cdb1d9b66321 1224 apt_0.7.26~exp1.dsc
 0b9e9ea65bf65312c5976e664a45d5404e7a3052b9e8105561baab261a94fd91 2718601 apt_0.7.26~exp1.tar.gz
 291cd8dd2a1a8e94eed4090fce02422b4d741248701133a7fbe5027a7cbc9405 139632 apt-doc_0.7.26~exp1_all.deb
 362b6921c439278c630b5bfbfcc3e9ac6879468b3ea35c00a6fb92eeb03ae80f 134522 libapt-pkg-doc_0.7.26~exp1_all.deb
 77b6959fc53fe9e8fa0e5eaf6211a63bcd2c7584090498a997f7673082869313 1762920 apt_0.7.26~exp1_i386.deb
 f128aaac25a605707272e45afd66aca694e32bdf73609d2a7569f8dc9c086bad 124440 libapt-pkg-dev_0.7.26~exp1_i386.deb
 50c8de5b602b5d55b0316fee1a86d8140ce5c697911cf00dd21957ec1759cfe7 225548 apt-utils_0.7.26~exp1_i386.deb
 d342d68a8bb00294292e65dcc64abbbc7bc0ac7b0d2af7df91473d8c07a87358 70832 apt-transport-https_0.7.26~exp1_i386.deb
Files: 
 fac13b1bc6701d21450e40e98d7e8244 1224 admin important apt_0.7.26~exp1.dsc
 84db59e8513b0b4231083879e873c515 2718601 admin important apt_0.7.26~exp1.tar.gz
 696e1a8acd5057028ce142963f962490 139632 doc optional apt-doc_0.7.26~exp1_all.deb
 6a20dd9826217a4a20d5aeeebb7218a0 134522 doc optional libapt-pkg-doc_0.7.26~exp1_all.deb
 a0d0954295d5be5bc5b8cb222490ef1e 1762920 admin important apt_0.7.26~exp1_i386.deb
 5ced505531758673bc33d8757f90fe9a 124440 libdevel optional libapt-pkg-dev_0.7.26~exp1_i386.deb
 25441686419cde721addf20dd97b35f7 225548 admin important apt-utils_0.7.26~exp1_i386.deb
 5c72c9514dabeff77d293c50d741578a 70832 admin optional apt-transport-https_0.7.26~exp1_i386.deb

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

iEYEARECAAYFAkt9pm8ACgkQliSD4VZixzTWVQCfQy4g5Att3XnbEpOJmtFKrgpP
+f4An1V8sAVgD2rgFtjPr1afSHjhdF+b
=sb1I
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: