]> git.saurik.com Git - apt.git/commitdiff
cmdline/apt-get.cc: improve changelog description
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 16 Nov 2010 09:40:36 +0000 (10:40 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 16 Nov 2010 09:40:36 +0000 (10:40 +0100)
cmdline/apt-get.cc

index 35f37cc49e808482ba482d2008b30cd653a721f7..8cb43be6739f556c76cf59f0eb92cb716f5ec600 100644 (file)
@@ -2783,7 +2783,6 @@ bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher, pkgCache::VerI
 
    // build uri
    srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg();
 
    // build uri
    srcpkg = rec.SourcePkg().empty() ? Pkg.Name() : rec.SourcePkg();
-   strprintf(descr, _("Changelog for %s"), srcpkg.c_str());
    // FIXME: we actually need the source section here
    src_section= Pkg.Section();
    if(src_section.find('/')!=src_section.npos)
    // FIXME: we actually need the source section here
    src_section= Pkg.Section();
    if(src_section.find('/')!=src_section.npos)
@@ -2804,8 +2803,11 @@ bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher, pkgCache::VerI
                           "http://packages.debian.org/");
    // ... but not the format string to avoid all possible attacks
    strprintf(path, "/changelogs/pool/%s/%s/%s/%s_%s/changelog", src_section.c_str(), prefix.c_str(), srcpkg.c_str(), srcpkg.c_str(), verstr.c_str());
                           "http://packages.debian.org/");
    // ... but not the format string to avoid all possible attacks
    strprintf(path, "/changelogs/pool/%s/%s/%s/%s_%s/changelog", src_section.c_str(), prefix.c_str(), srcpkg.c_str(), srcpkg.c_str(), verstr.c_str());
-   // get it
-   new pkgAcqFile(&Fetcher, server+path, "", 0, descr, srcpkg, "ignored", targetfile);
+   // queue it
+   string changelog_uri = server+path;
+   strprintf(descr, _("Changelog for %s (%s)"), srcpkg.c_str(), changelog_uri.c_str());
+   new pkgAcqFile(&Fetcher, uri, "", 0, descr, srcpkg, "ignored", targetfile);
+
    // try downloading it, if that fails, they third-party-changelogs location
    // FIXME: res is "Continue" even if I get a 404?!?
    int res = Fetcher.Run();
    // try downloading it, if that fails, they third-party-changelogs location
    // FIXME: res is "Continue" even if I get a 404?!?
    int res = Fetcher.Run();
@@ -2814,6 +2816,7 @@ bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher, pkgCache::VerI
       string third_party_uri;
       if (GuessThirdPartyChangelogUri(CacheFile, Pkg, V, third_party_uri))
       {
       string third_party_uri;
       if (GuessThirdPartyChangelogUri(CacheFile, Pkg, V, 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);
          res = Fetcher.Run();
       }
          new pkgAcqFile(&Fetcher, third_party_uri, "", 0, descr, srcpkg, "ignored", targetfile);
          res = Fetcher.Run();
       }