Просмотр исходного кода

cmdline/apt-get.cc: use source version instead of binary version

Michael Vogt лет назад: 15
Родитель
Сommit
c5d6a22cc6
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      cmdline/apt-get.cc

+ 5 - 3
cmdline/apt-get.cc

@@ -2751,10 +2751,12 @@ string GetChangelogPath(CacheFile &Cache,
    pkgRecords Recs(Cache);
    pkgRecords Recs(Cache);
    pkgRecords::Parser &rec=Recs.Lookup(Ver.FileList());
    pkgRecords::Parser &rec=Recs.Lookup(Ver.FileList());
    string srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg();
    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 = flNotFile(rec.FileName());
-   path += srcpkg + "_" + srcver;
+   path += srcpkg + "_" + StripEpoch(ver);
    return path;
    return path;
 }
 }
 									/*}}}*/
 									/*}}}*/