Bug#382826: Patch to use source version for binary-only NMU'd packages
On Tue, Aug 21, 2007 at 04:06:21AM +0200, Simon Richter wrote:
> In principle, every Package entry in Packages needs a Source field that
> points to the source package name and version number; the version number is
> optional if it is the same as the binary package version, the entire field
> is optional if the name and version matches.
>
> If no Source field is being generated, this would indicate a problem in the
> binNMU.
Thank you very much for the explanation. The attached patch makes
apt-get use the version from the Source field, if it's available. I
verified that it fixes my problem.
--
Matt
--- apt-0.7.6~/cmdline/apt-get.cc 2007-08-20 20:54:35.000000000 -0700
+++ apt-0.7.6/cmdline/apt-get.cc 2007-08-20 21:26:09.000000000 -0700
@@ -1242,7 +1242,10 @@
//std::cout << VF.File().Archive() << std::endl;
if(VF.File().Archive() && (VF.File().Archive() == DefRel))
{
- VerTag = Ver.VerStr();
+ pkgRecords::Parser &Parse = Recs.Lookup(VF);
+ VerTag = Parse.SourceVer();
+ if (VerTag.empty())
+ VerTag = Ver.VerStr();
break;
}
}
Reply to: