Ver código fonte

cmdline/apt-get.cc: remove srcpkg

Michael Vogt 15 anos atrás
pai
commit
88573174ba
1 arquivos alterados com 4 adições e 5 exclusões
  1. 4 5
      cmdline/apt-get.cc

+ 4 - 5
cmdline/apt-get.cc

@@ -2802,7 +2802,6 @@ bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
  * GuessThirdPartyChangelogUri for details how)
  */
 {
-   string srcpkg;
    string path;
    string descr;
    string server;
@@ -2816,9 +2815,9 @@ bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
                           "http://packages.debian.org/changelogs");
    path = GetChangelogPath(CacheFile, Pkg, Ver);
    strprintf(changelog_uri, "%s/%s/changelog", server.c_str(), path.c_str());
-   strprintf(descr, _("Changelog for %s (%s)"), srcpkg.c_str(), changelog_uri.c_str());
+   strprintf(descr, _("Changelog for %s (%s)"), Pkg.Name(), changelog_uri.c_str());
    // queue it
-   new pkgAcqFile(&Fetcher, changelog_uri, "", 0, descr, srcpkg, "ignored", targetfile);
+   new pkgAcqFile(&Fetcher, changelog_uri, "", 0, descr, Pkg.Name(), "ignored", targetfile);
 
    // try downloading it, if that fails, they third-party-changelogs location
    // FIXME: res is "Continue" even if I get a 404?!?
@@ -2828,8 +2827,8 @@ bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
       string third_party_uri;
       if (GuessThirdPartyChangelogUri(CacheFile, Pkg, Ver, third_party_uri))
       {
-         strprintf(descr, _("Changelog for %s (%s)"), srcpkg.c_str(), third_party_uri.c_str());
-         new pkgAcqFile(&Fetcher, third_party_uri, "", 0, descr, srcpkg, "ignored", targetfile);
+         strprintf(descr, _("Changelog for %s (%s)"), Pkg.Name(), third_party_uri.c_str());
+         new pkgAcqFile(&Fetcher, third_party_uri, "", 0, descr, Pkg.Name(), "ignored", targetfile);
          res = Fetcher.Run();
       }
    }