diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-18 14:10:50 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-11-18 14:10:50 +0100 |
commit | c5d6a22cc65d4f5d0405c0a2a392c659e2959e3f (patch) | |
tree | 5c2fc623f499d7172e4585a56bd151cacadc3b42 /cmdline/apt-get.cc | |
parent | b05b220ba3f5dd15b942572572d2d86b89904fea (diff) |
cmdline/apt-get.cc: use source version instead of binary version
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r-- | cmdline/apt-get.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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; } /*}}}*/ |