Your message dated Thu, 23 Jun 2016 08:23:01 +0200 with message-id <20160623062301.GA30698@crossbow> and subject line Re: Bug#827915: initial version number and colon in apt-get download and apt-get autoclean has caused the Debian Bug report #827915, regarding initial version number and colon in apt-get download and apt-get autoclean 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.) -- 827915: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827915 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: initial version number and colon in apt-get download and apt-get autoclean
- From: Jordi Pujol Palomer <jordipujolp@gmail.com>
- Date: Wed, 22 Jun 2016 16:46:23 +0200
- Message-id: <[🔎] 20160622164623.0013c21d@localdomain>
Package: apt Version: 1.2.13 Severity: normal Tags: patch Hello, When downloading a package which version contains an initial number and colon, the saved file name must not include that part of the version string. apt-get autoclean removes files which version contains an initial number and colon, but must not do it. The attached code is my point of view to solve it, Regards, Jordi Pujol i PalomerFrom: Jordi Pujol Palomer <jordipujolp@gmail.com> Subject: apt-get autoclean, strip initial version number and colon Date: 2016-04-28 16:03:29.613722454 +0200 --- apt-1.2.11-a/apt-pkg/clean.cc +++ apt-1.2.11-b/apt-pkg/clean.cc 2016-04-28 16:03:29.613722454 +0200 @@ -119,8 +119,14 @@ bool pkgArchiveCleaner::Go(std::string D } // See if this version matches the file - if (IsFetchable == true && Ver == V.VerStr()) - break; + if (IsFetchable == true) { + if (Start = strchr((const char *)V.VerStr(), ':')) + Start++; + else + Start = V.VerStr(); + if (strcmp(Ver.c_str(), Start) == 0) + break; + } } // We found a match, keep the fileFrom: Jordi Pujol Palomer <jordipujolp@gmail.com> Subject: apt-get download, strip initial version number and colon Date: 2016-05-02 08:03:13.887017907 +0200 --- apt-1.2.11-a/apt-pkg/acquire-item.cc +++ apt-1.2.11-b/apt-pkg/acquire-item.cc 2016-05-02 08:03:13.887017907 +0200 @@ -2896,8 +2896,13 @@ pkgAcqArchive::pkgAcqArchive(pkgAcquire return; // Generate the final file name as: package_version_arch.foo + const char *V; + if (V = strchr((const char *)Version.VerStr(), ':')) + V++; + else + V = Version.VerStr(); StoreFilename = QuoteString(Version.ParentPkg().Name(),"_:") + '_' + - QuoteString(Version.VerStr(),"_:") + '_' + + QuoteString(V,"_:") + '_' + QuoteString(Version.Arch(),"_:.") + "." + flExtension(Parse.FileName()); }
--- End Message ---
--- Begin Message ---
- To: Jordi Pujol Palomer <jordipujolp@gmail.com>, 827915-done@bugs.debian.org
- Subject: Re: Bug#827915: initial version number and colon in apt-get download and apt-get autoclean
- From: David Kalnischkies <david@kalnischkies.de>
- Date: Thu, 23 Jun 2016 08:23:01 +0200
- Message-id: <20160623062301.GA30698@crossbow>
- In-reply-to: <[🔎] 20160622164623.0013c21d@localdomain>
- References: <[🔎] 20160622164623.0013c21d@localdomain>
Hi, On Wed, Jun 22, 2016 at 04:46:23PM +0200, Jordi Pujol Palomer wrote: > When downloading a package which version contains an initial number > and colon, the saved file name must not include that part of the > version string. Were does this "MUST NOT" requirement come from? Is that just your opinion or are you quoting any RFC/policy/… document? The number in front of the first colon is canonically named "epoch". If it isn't there, it defaults to zero. So, version "1-1" and "0:1-1" are the same, but "1:1-1" is not and applying your patches would mean any epoch would suddently be equal to no epoch. It is perhaps unlikely (but relatively common if two different repositories are involved which ship the same stack, but with different buildoptions), but nothing prevents (in fact, its kinda the point of epochs to allow it) that a package is installed (and the downloaded deb for this still residing in archives/) as version "1-1" and an upgrade available as "1:1-1". APT (and users) would believe with your patch that it has already downloaded "1:1-1" as a file with the version "1-1" already exists. That would be very very wrong… Don't get me wrong: Epochs are bad as they make everything more complicated, they look ugly, the colon needs to be encoded for some filesystems to store it (hello vfat) and all that, but they are an integral part of the version number of a package and can't simple be skipped over because we don't like them. I am therefore closing this report as not-a-bug as these patches would need an a lot stronger backup than an out of the blue "MUST NOT" to be allowed to break existing setups and I don't see where that backup would be coming from. Best regards David KalnischkiesAttachment: signature.asc
Description: PGP signature
--- End Message ---