summaryrefslogtreecommitdiff
path: root/src/cmdline/cmdline_changelog.cc
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-06-28 17:33:01 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-06-28 17:33:01 +0800
commitfaedc8178b90b77e030344dfc368e3fa3d88f050 (patch)
treea0eb7cd923421fc40644fda6ed01892fefd8b594 /src/cmdline/cmdline_changelog.cc
parentfcda1a118830b468929ef27a25a95d9e72939a8e (diff)
downloadaptitude-faedc8178b90b77e030344dfc368e3fa3d88f050.tar.gz
Merge changelog URI construction from apt-get
* src/generic/apt/pkg_changelog.cc: - use up-to-date changelog uri construction from apt-get using APT::Changelogs::Server * src/apt_options.cc: - drop disused Aptitude::Changelog-URL-Template * src/cmdline/cmdline_changelog.cc: - remove extraneous guess-work with source packages, which happened to also download the wrong changelog sometimes (Closes: #631464) - changelog download works with no deb-src lines, so we don't need to instruct the user to add any (Closes: #587775, #537393)
Diffstat (limited to 'src/cmdline/cmdline_changelog.cc')
-rw-r--r--src/cmdline/cmdline_changelog.cc60
1 files changed, 1 insertions, 59 deletions
diff --git a/src/cmdline/cmdline_changelog.cc b/src/cmdline/cmdline_changelog.cc
index 5615cfd2..966b9273 100644
--- a/src/cmdline/cmdline_changelog.cc
+++ b/src/cmdline/cmdline_changelog.cc
@@ -331,39 +331,8 @@ void do_cmdline_changelog(const vector<string> &packages,
_error->Error(_("%s is not an official Debian package, cannot display its changelog."), input.c_str());
continue;
}
- }
-
- aptitude::cmdline::source_package p =
- aptitude::cmdline::find_source_package(package,
- source,
- sourcestr);
- // Use the source package if one was found; otherwise try to
- // use an explicit version.
- if(p.valid())
- {
- get_changelog_from_source(p.get_package(),
- p.get_version(),
- p.get_section(),
- pkg.Name(),
- filename,
- term_metrics);
- }
- else
- {
- // Fall back to string-based guessing if the version is
- // invalid.
- if(ver.end())
- {
- if(source == cmdline_version_version)
- filename = changelog_by_version(package, sourcestr, term_metrics);
- // If we don't even have a version string, leave
- // filename blank; we'll fail below.
- }
- else
- {
- get_changelog(ver, filename, term_metrics);
- }
+ get_changelog(ver, filename, term_metrics);
}
}
else
@@ -382,33 +351,6 @@ void do_cmdline_changelog(const vector<string> &packages,
filename,
term_metrics);
}
- else
- {
- // We couldn't find a real or source package with the
- // given name and version.
- //
- // If the user didn't specify a version or selected a
- // candidate and we couldn't find anything, we have no
- // recourse. But if they passed a version number, we
- // can fall back to just blindly guessing that the
- // version exists.
-
- switch(source)
- {
- case cmdline_version_cand:
- break;
-
- case cmdline_version_curr_or_cand:
- break;
-
- case cmdline_version_archive:
- break;
-
- case cmdline_version_version:
- filename = changelog_by_version(package, sourcestr, term_metrics);
- break;
- }
- }
}
if(!filename.valid())