Package: aptitude Severity: important User: debian-p...@lists.debian.org Usertags: libparse-debian-changelog-perl-removal Tags: patch
Hi! aptitude Recommends libparse-debianchangelog-perl, which has had no upstream maintainer since 2011. The Debian Perl group has decided today that theye do not want libparse-debianchangelog-perl to be included in the Bullseye release, unless someone steps up and volunteers to be its upstream maintainer: see https://bugs.debian.org/933128, where you can discuss the options. I'm attaching an old patch I had around, which I thought I had sent out, but apparently not (perhaps only on IRC), to switch to libdpkg-perl's parser which is the successor of this package. I'm not sure right now whether there was some problem with the patch, I'll try to retest it in the coming days in case no one beats me to it, but just wanted to put this out there to avoid any work duplication. Thanks, Guillem
From a1c7206ecdae8e3b33eef406be3ac9b44190b0d8 Mon Sep 17 00:00:00 2001 From: Guillem Jover <guil...@debian.org> Date: Tue, 18 Oct 2016 23:55:28 +0200 Subject: [PATCH] Switch from libparse-debianchangelog-perl to libdpkg-perl The former was merged into the latter some time ago, with the main difference being the lack of some of the output formats that are not being used by aptitude. This seems to have been attempted in the past, but was reverted due to performance problems. The performance from current libdpkg-perl should be comparable. We use the perl module directly to avoid pulling dpkg-dev and its dependencies. --- debian/control | 2 +- src/generic/apt/changelog_parse.cc | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/debian/control b/debian/control index c4a17d58..cd114861 100644 --- a/debian/control +++ b/debian/control @@ -41,7 +41,7 @@ Multi-Arch: foreign Depends: aptitude-common (= ${source:Version}), ${misc:Depends}, ${shlibs:Depends} -Recommends: libparse-debianchangelog-perl, +Recommends: libdpkg-perl, sensible-utils Suggests: aptitude-doc-en | aptitude-doc, apt-xapian-index, diff --git a/src/generic/apt/changelog_parse.cc b/src/generic/apt/changelog_parse.cc index 9cf1ab5b..165efe5c 100644 --- a/src/generic/apt/changelog_parse.cc +++ b/src/generic/apt/changelog_parse.cc @@ -18,7 +18,7 @@ // the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301, USA. // -// At the moment this code uses parsechangelog to convert changelogs +// At the moment this code uses Dpkg::Changelog::Parse to convert changelogs // into something easier to read. #include "changelog_parse.h" @@ -327,17 +327,18 @@ namespace aptitude std::string version_fragment; if(from.empty()) - version_fragment = "--all"; + version_fragment = "all => undef"; else { - version_fragment = "-f "; + version_fragment = "from => '"; // Note that escaping the version is *critical*, because // it is untrusted data. version_fragment += backslash_escape_nonalnum(from); + version_fragment += "'"; } std::string cmd = - cw::util::ssprintf("/usr/bin/parsechangelog --format rfc822 %s -l %s > %s 2> /dev/null", + cw::util::ssprintf("perl -MDpkg::Changelog::Parse -e \"print changelog_parse(format => 'rfc822', file => '%s', %s);\" > %s 2> /dev/null", version_fragment.c_str(), filename.c_str(), rval.get_name().c_str()); @@ -432,7 +433,7 @@ namespace aptitude * The purpose of the queue is to ensure that aptitude only * parses one changelog at a time and doesn't waste a ton of time * starting new changelog parse threads and spawning copies of - * parsechangelog. + * Dpkg::Changelog::Parse. * * This is a self-terminating singleton thread. */ -- 2.23.0.rc1.153.gdeed80330f