From: Michael Vogt Date: Thu, 18 Nov 2010 13:10:50 +0000 (+0100) Subject: cmdline/apt-get.cc: use source version instead of binary version X-Git-Tag: 0.8.11~6^2~7^2~1 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/c5d6a22cc65d4f5d0405c0a2a392c659e2959e3f?ds=inline;hp=-c cmdline/apt-get.cc: use source version instead of binary version --- c5d6a22cc65d4f5d0405c0a2a392c659e2959e3f diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index a1987b977..db9424985 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2751,10 +2751,12 @@ string GetChangelogPath(CacheFile &Cache, pkgRecords Recs(Cache); pkgRecords::Parser &rec=Recs.Lookup(Ver.FileList()); string srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg(); - // FIXME: deal with cases like gcc-defaults (srcver != binver) - string srcver = StripEpoch(Ver.VerStr()); + string ver = Ver.VerStr(); + // if there is a source version it always wins + if (rec.SourceVer() != "") + ver = rec.SourceVer(); path = flNotFile(rec.FileName()); - path += srcpkg + "_" + srcver; + path += srcpkg + "_" + StripEpoch(ver); return path; } /*}}}*/