Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package aptitude (pre-approve) The last serious change required for aptitude + multi-arch is to improve the command line handling. I refer you to [1] and [2] for the complete details. At the moment most commands do not support a very useful syntax for multi-arch and are variously inconsistent with their documented behaviour, each other, and the apt-utils. [1] http://bugs.debian.org/685731 [2] http://bugs.debian.org/687474 The fixes for this have been in experimental since July. The minor update presented here contains some of those needed to support the rest in the next release. I fully expect that next release to be the last one required to have an aptitude with acceptable multi-arch support in Wheezy. Changelog: * [all]: Support for matching architectures using specification strings and wildcards (for example, "linux-any"). See Debian Policy section 11.1 "Architecture specification strings" for more details. The support for this is available in libapt-pkg. The apt-utils support this syntax. This update is limited to ?architecture search terms, and command line support (“pkg:linux-*”) next release. Backported from experimental. * [cmdline]: Fix typo which prevented installing tasks using the apt-get compatible syntax ("aptitude install gnome-desktop^"). Minor fix. Makes command line syntax (of install at least) more compatible with apt-utils. From experimental. * [cmdline]: Do not assume that APT::Default-Release always provides the candidate version of a package, instead use the policy defined by apt_preferences(5). (Closes: #587775, #631464, #686316) This is the behaviour documented in aptitude(8), broken at some point in the past. This is a non-invasive change that greatly improves the consistency of the commands with each other and apt-utils. Also from experimental. * aptitude-doc-en: - Update for default value of APT::AutoRemove::SuggestsImportant which is "true" since apt 0.8.15.3. (Closes: #685310) - Correctly reference APT::AutoRemove::RecommendsImportant and SuggestsImportant which do not contain any hyphens. (Closes: #579071) Trivial fixes to the documentation. * Translation updates: - Czech (Closes: #681693) - French (Closes: #680040, #685084) - Polish (Closes: #678153) - Russian (Closes: #686016) - Spanish (Closes: #686752) * Depend on newer version of libapt-pkg-dev for architecture specification string support. * Use xz compression for all binaries. (Closes: #687294) Sundry. That concludes the changes covered in the attached debdiff. You will note that the debdiff contains: --- aptitude-0.6.8.1/po/POTFILES.in 2012-08-28 11:09:24.000000000 +0800 +++ aptitude-0.6.8.2/po/POTFILES.in 2012-09-13 16:15:12.000000000 +0800 @@ -111,8 +111,6 @@ src/generic/apt/aptitude_resolver_universe.h src/generic/apt/apt_undo_group.cc src/generic/apt/apt_undo_group.h -src/generic/apt/cacheset.cc -src/generic/apt/cacheset.h src/generic/apt/changelog_parse.cc src/generic/apt/changelog_parse.h src/generic/apt/config_signal.cc The two cacheset files never were released. They made their way in to POTFILES while developing during the last cycle. I have also attached another patch which is entirely optional, but of notable value to end users and relatively non-invasive. It brings in support for APT::Changelogs::Server which apt-cache and others have been using for some time. Previously we hardcoded the default value of that. Please also consider this patch and give it an ACK for inclusion if this is ok. Thanking you in advance for your time and consideration. unblock aptitude/0.6.8.2-1
diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/debian/control aptitude-0.6.8.2/debian/control --- aptitude-0.6.8.1/debian/control 2012-08-28 11:23:55.000000000 +0800 +++ aptitude-0.6.8.2/debian/control 2012-09-13 16:29:41.000000000 +0800 @@ -4,7 +4,7 @@ Maintainer: Aptitude Development Team <aptitude-de...@lists.alioth.debian.org> Uploaders: Daniel Burrows <dburr...@debian.org>, Daniel Hartwig <mand...@gmail.com> DM-Upload-Allowed: yes -Build-Depends: libapt-pkg-dev (>= 0.9.3), debhelper (>= 9), +Build-Depends: libapt-pkg-dev (>= 0.9.7), debhelper (>= 9), libsigc++-2.0-dev, libcppunit-dev, libcwidget-dev (>= 0.5.6.1-2), libncursesw5-dev, gettext, g++ (>= 4:3.2.2-0), docbook-xsl, docbook-xml, xsltproc, elinks, po4a, libept-dev (>= 0.5), diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/debian/rules aptitude-0.6.8.2/debian/rules --- aptitude-0.6.8.1/debian/rules 2012-08-28 11:23:55.000000000 +0800 +++ aptitude-0.6.8.2/debian/rules 2012-09-13 16:31:51.000000000 +0800 @@ -69,3 +69,6 @@ fi; \ done dh_installman --remaining-packages + +override_dh_builddeb: + dh_builddeb -- -Zxz diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/doc/po4a/add_fr/addendum.1.fr aptitude-0.6.8.2/doc/po4a/add_fr/addendum.1.fr --- aptitude-0.6.8.1/doc/po4a/add_fr/addendum.1.fr 2012-08-04 17:33:15.000000000 +0800 +++ aptitude-0.6.8.2/doc/po4a/add_fr/addendum.1.fr 2012-09-12 13:53:02.000000000 +0800 @@ -20,3 +20,10 @@ <email>n...@freesurf.fr</email> <contrib>Traduction</contrib> </othercredit> +<othercredit> + <personname> + <firstname>Cédric</firstname> <surname>Boutillier</surname> + </personname> + <email>cedric.boutill...@gmail.com</email> + <contrib>Traduction</contrib> +</othercredit> diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/po/POTFILES.in aptitude-0.6.8.2/po/POTFILES.in --- aptitude-0.6.8.1/po/POTFILES.in 2012-08-28 11:09:24.000000000 +0800 +++ aptitude-0.6.8.2/po/POTFILES.in 2012-09-13 16:15:12.000000000 +0800 @@ -111,8 +111,6 @@ src/generic/apt/aptitude_resolver_universe.h src/generic/apt/apt_undo_group.cc src/generic/apt/apt_undo_group.h -src/generic/apt/cacheset.cc -src/generic/apt/cacheset.h src/generic/apt/changelog_parse.cc src/generic/apt/changelog_parse.h src/generic/apt/config_signal.cc diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/src/cmdline/cmdline_changelog.cc aptitude-0.6.8.2/src/cmdline/cmdline_changelog.cc --- aptitude-0.6.8.1/src/cmdline/cmdline_changelog.cc 2012-08-25 20:39:57.000000000 +0800 +++ aptitude-0.6.8.2/src/cmdline/cmdline_changelog.cc 2012-09-13 16:05:32.000000000 +0800 @@ -288,8 +288,6 @@ pager="more"; } - string default_release = aptcfg->Find("APT::Default-Release"); - for(vector<string>::const_iterator i=packages.begin(); i!=packages.end(); ++i) { // We need to do this because some code (see above) checks @@ -306,12 +304,6 @@ if(!cmdline_parse_source(input, source, package, sourcestr)) continue; - if(source == cmdline_version_cand && !default_release.empty()) - { - source = cmdline_version_archive; - sourcestr = default_release; - } - pkgCache::PkgIterator pkg=(*apt_cache_file)->FindPkg(package); temp::name filename; @@ -341,8 +333,13 @@ _error->Error(_("%s is not an official Debian package, cannot display its changelog."), input.c_str()); continue; } + + get_changelog(ver, filename, term_metrics); } + } + if(!filename.valid()) + { aptitude::cmdline::source_package p = aptitude::cmdline::find_source_package(package, source, @@ -361,39 +358,6 @@ } 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); - } - } - } - else - { - aptitude::cmdline::source_package p = - aptitude::cmdline::find_source_package(package, - source, - sourcestr); - - if(p.valid()) - { - get_changelog_from_source(p.get_package(), - p.get_version(), - p.get_section(), - p.get_package(), - filename, - term_metrics); - } - else - { // We couldn't find a real or source package with the // given name and version. // @@ -403,6 +367,11 @@ // can fall back to just blindly guessing that the // version exists. + // TODO: We can try using the path "current" rather than + // "SOURCE_VERSION" in the default case, because this is + // supported on http://packages.debian.org/changelogs to + // fetch details for the latest version. + switch(source) { case cmdline_version_cand: diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/src/cmdline/cmdline_download.cc aptitude-0.6.8.2/src/cmdline/cmdline_download.cc --- aptitude-0.6.8.1/src/cmdline/cmdline_download.cc 2012-08-25 20:39:57.000000000 +0800 +++ aptitude-0.6.8.2/src/cmdline/cmdline_download.cc 2012-09-13 16:05:32.000000000 +0800 @@ -72,7 +72,6 @@ pkgAcquire fetcher; fetcher.Setup(progress_display.first); string filenames[(*apt_cache_file)->Head().PackageCount]; - string default_release = aptcfg->Find("APT::Default-Release"); for(int i=1; i<argc; ++i) { @@ -81,12 +80,6 @@ if(!cmdline_parse_source(argv[i], source, name, sourcestr)) continue; - if(source == cmdline_version_cand && !default_release.empty()) - { - source = cmdline_version_archive; - sourcestr = default_release; - } - std::vector<pkgCache::PkgIterator> packages; if(!aptitude::matching::is_pattern(name)) diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/src/cmdline/cmdline_show.cc aptitude-0.6.8.2/src/cmdline/cmdline_show.cc --- aptitude-0.6.8.1/src/cmdline/cmdline_show.cc 2012-08-28 10:24:29.000000000 +0800 +++ aptitude-0.6.8.2/src/cmdline/cmdline_show.cc 2012-09-13 16:05:32.000000000 +0800 @@ -556,7 +556,6 @@ { cmdline_version_source source; string name, sourcestr; - string default_release = aptcfg->Find("APT::Default-Release"); bool has_explicit_source = false; if(!cmdline_parse_source(s, source, name, sourcestr)) @@ -564,12 +563,6 @@ has_explicit_source = (source != cmdline_version_cand); - if(source == cmdline_version_cand && !default_release.empty()) - { - source = cmdline_version_archive; - sourcestr = default_release; - } - bool is_pattern = aptitude::matching::is_pattern(name); pkgCache::PkgIterator pkg; diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/src/generic/apt/matching/compare_patterns.cc aptitude-0.6.8.2/src/generic/apt/matching/compare_patterns.cc --- aptitude-0.6.8.1/src/generic/apt/matching/compare_patterns.cc 2012-08-25 20:39:57.000000000 +0800 +++ aptitude-0.6.8.2/src/generic/apt/matching/compare_patterns.cc 2012-09-13 16:05:35.000000000 +0800 @@ -99,7 +99,8 @@ p2->get_any_version_pattern()); case pattern::architecture: - return p1->get_architecture_architecture().compare(p2->get_architecture_architecture()); + return p1->get_architecture_arch_specification()->get_specification() + .compare(p2->get_architecture_arch_specification()->get_specification()); case pattern::automatic: return 0; diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/src/generic/apt/matching/match.cc aptitude-0.6.8.2/src/generic/apt/matching/match.cc --- aptitude-0.6.8.1/src/generic/apt/matching/match.cc 2012-08-25 20:39:57.000000000 +0800 +++ aptitude-0.6.8.2/src/generic/apt/matching/match.cc 2012-09-13 16:05:35.000000000 +0800 @@ -31,6 +31,7 @@ #include <apt-pkg/pkgrecords.h> #include <apt-pkg/pkgsystem.h> #include <apt-pkg/version.h> +#include <apt-pkg/cachefilter.h> #include <cwidget/generic/util/transcode.h> @@ -907,8 +908,9 @@ { pkgCache::VerIterator ver(target.get_version_iterator(cache)); - if(p->get_architecture_architecture().empty() == true || - p->get_architecture_architecture() == ver.Arch()) + const ref_ptr<arch_specification> spec(p->get_architecture_arch_specification()); + + if(spec->matches(ver.Arch()) == true) return match::make_atomic(p, ver.Arch()); else return NULL; diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/src/generic/apt/matching/pattern.cc aptitude-0.6.8.2/src/generic/apt/matching/pattern.cc --- aptitude-0.6.8.1/src/generic/apt/matching/pattern.cc 2012-08-25 20:39:57.000000000 +0800 +++ aptitude-0.6.8.2/src/generic/apt/matching/pattern.cc 2012-09-13 16:05:35.000000000 +0800 @@ -71,6 +71,17 @@ return 0 == regexec(&r, s, num_matches, matches, eflags); } + arch_specification::arch_specification(const std::string &_spec) + : pams(_spec), + spec(_spec) + { + } + + bool arch_specification::matches(const char * const &arch) + { + return pams(arch); + } + cwidget::util::ref_ptr<pattern> pattern::make_action(const action_type act) { diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/src/generic/apt/matching/pattern.h aptitude-0.6.8.2/src/generic/apt/matching/pattern.h --- aptitude-0.6.8.1/src/generic/apt/matching/pattern.h 2012-08-25 20:39:57.000000000 +0800 +++ aptitude-0.6.8.2/src/generic/apt/matching/pattern.h 2012-09-13 16:05:35.000000000 +0800 @@ -33,6 +33,8 @@ #include <sys/types.h> #include <apt-pkg/pkgcache.h> +#include <apt-pkg/cachefilter.h> + namespace aptitude { @@ -55,6 +57,28 @@ std::string errmsg() const; }; + /** \brief Ref-counted wrapper for PackageArchitectureMatchesSpecification. + */ + class arch_specification : public util::refcounted_base_threadsafe + { + APT::CacheFilter::PackageArchitectureMatchesSpecification pams; + const std::string spec; + + public: + arch_specification(const std::string &_spec); + + bool matches(const char * const &arch); + inline bool matches(const pkgCache::VerIterator &ver) + { + return matches(ver.Arch()); + } + + inline const std::string &get_specification() const + { + return spec; + } + }; + /** \brief C++ wrapper for regular expression objects. * * This class turns compilation errors into exceptions and @@ -238,11 +262,12 @@ * Fields: pattern. */ any_version, - /** \brief ?architecture(PATTERN) + /** \brief ?architecture(SPECIFICATION) * - * Matches packages by their architecture. + * Matches packages whose architecture meets the given + * SPECIFICATION string (see Debian Policy section 11.1). * - * Fields: regex_info. + * Fields: arch_specification. */ architecture, /** \brief ?automatic @@ -669,6 +694,8 @@ // to the action match information. std::string string_info; + cwidget::util::ref_ptr<arch_specification> arch_spec; + // Groups several POD values that aren't used simultaneously. union { @@ -804,6 +831,14 @@ info.multiarch = multiarch_type; } + // Allocate a pattern that has an architecture specification. + pattern(type _tp, + const cwidget::util::ref_ptr<arch_specification> &spec) + : tp(_tp), + arch_spec(spec) + { + } + public: /** \name archive term constructor and accessors. */ @@ -907,19 +942,21 @@ /** \brief Create an ?architecture term. * - * \param arch The architecture to match. + * \param spec The architecture specification string to match. */ static cwidget::util::ref_ptr<pattern> - make_architecture(const std::string &arch) + make_architecture(const std::string &spec) { - return new pattern(architecture, arch); + return new pattern(architecture, + new arch_specification(spec)); } - const std::string &get_architecture_architecture() const + const cwidget::util::ref_ptr<arch_specification> & + get_architecture_arch_specification() const { eassert(tp == architecture); - return string_info; + return arch_spec; } // @} diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/src/generic/apt/matching/serialize.cc aptitude-0.6.8.2/src/generic/apt/matching/serialize.cc --- aptitude-0.6.8.1/src/generic/apt/matching/serialize.cc 2012-08-25 20:39:57.000000000 +0800 +++ aptitude-0.6.8.2/src/generic/apt/matching/serialize.cc 2012-09-13 16:05:35.000000000 +0800 @@ -254,7 +254,7 @@ case pattern::architecture: out << "?architecture("; - serialize_string(p->get_architecture_architecture(), out); + serialize_string(p->get_architecture_arch_specification()->get_specification(), out); out.put(')'); break; diff -Nru --exclude changelog --exclude 'configure*' --exclude NEWS --exclude '*.xml' --exclude '*.gmo' --exclude '*.po' --exclude '*.pot' --exclude 'aptitude-defaults.*' --exclude 'help*.txt' aptitude-0.6.8.1/src/generic/apt/tasks.cc aptitude-0.6.8.2/src/generic/apt/tasks.cc --- aptitude-0.6.8.1/src/generic/apt/tasks.cc 2012-08-25 20:39:57.000000000 +0800 +++ aptitude-0.6.8.2/src/generic/apt/tasks.cc 2012-09-12 13:53:02.000000000 +0800 @@ -80,7 +80,7 @@ ++it) { pkgCache::PkgIterator pkg = (*apt_cache_file)->FindPkg(*it, arch); - if(pkg.end() != false) + if(pkg.end() == false) pkgset->insert(pkg); }
>From 6e332939d14dd3e873d23bf04a99c9235b4ea24d Mon Sep 17 00:00:00 2001 From: Daniel Hartwig <mand...@gmail.com> Date: Tue, 11 Sep 2012 12:40:46 +0800 Subject: [PATCH] Download changelogs from APT::Changelogs::Server * src/generic/apt/pkg_changelog.cc: - download changelogs from APT::Changelogs::Server instead of a fixed location; * src/apt_options.cc: - replace Aptitude::Changelog-URL-Template which was only used in ancient history Closes: #687239 --- NEWS | 5 +++++ src/apt_options.cc | 8 ++++---- src/generic/apt/pkg_changelog.cc | 9 ++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 7ff7dca..ede17d3 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,11 @@ Version 0.6.8.2 "Say 'what' again" policy defined by apt_preferences(5). (Closes: #587775, #631464, #686316) + * [all]: Download changelogs from APT::Changelogs::Server instead + of a fixed location, and replace very ancient and disused + option for Aptitude::Changelog-URL-Template. + (Closes: #687239) + - Documentation: - Translation updates: diff --git a/src/apt_options.cc b/src/apt_options.cc index bfeeda5..912aa09 100644 --- a/src/apt_options.cc +++ b/src/apt_options.cc @@ -291,12 +291,12 @@ option_item misc_options[]={ "downloaded from any archive in sources.list."), PACKAGE "::AutoClean-After-Update", false), option_item(N_("URL to use to download changelogs"), - N_("This option controls the template that's used to " - "download changelogs from the Debian Web site. You " + N_("This option controls the server used to " + "download changelogs. You " "should only need to change this if the changelogs move " "to a different URL."), - PACKAGE "::Changelog-URL-Template", - "http://cgi.debian.org/cgi-bin/get-changelog?package=%s"), + "APT::Changelogs::Server", + "http://packages.debian.org/changelogs"), option_item(N_("Display a preview of what will be done before doing it"), N_("If this option is enabled, then when you ask " "aptitude to perform an install run, it will " diff --git a/src/generic/apt/pkg_changelog.cc b/src/generic/apt/pkg_changelog.cc index 9b1caf3..6e67251 100644 --- a/src/generic/apt/pkg_changelog.cc +++ b/src/generic/apt/pkg_changelog.cc @@ -20,6 +20,7 @@ #include "pkg_changelog.h" #include "apt.h" +#include "config_signal.h" #include "download_queue.h" #include <generic/util/job_queue_thread.h> @@ -542,12 +543,18 @@ namespace aptitude else realver = source_version; - string uri = cw::util::ssprintf("http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog", + // WATCH: apt/cmdline/apt-get.cc(DownloadChangelog) + string server = aptcfg->Find("APT::Changelogs::Server", + "http://packages.debian.org/changelogs"); + string path = cw::util::ssprintf("pool/%s/%s/%s/%s_%s", realsection.c_str(), prefix.c_str(), source_package.c_str(), source_package.c_str(), realver.c_str()); + string uri = cw::util::ssprintf("%s/%s/changelog", + server.c_str(), + path.c_str()); LOG_TRACE(logger, "Adding " << uri << " as a URI for the changelog of " << source_package << " " << source_version); -- 1.7.9