Package: libapt-pkg-perl Version: 0.1.34 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu eoan ubuntu-patch Control: user de...@lists.debian.org Control: usertag -1 apt-1.9.0
Ports libapt-pkg-perl to apt 1.9.0 (coming soon to experimental), this removes: - IsOk() method of a PkgFileIterator - GetMatch() method of a Policy - GetPriority(Package) of Policy adds: - GetPriority(Version) of Policy An alternative would be to do no-ops for IsOk(), GetMatch(), and GetPriority(Package), returning true, no version, and 0 (or priority of candidate) respectively; but we removed those variants in APT; so it's probably best to follow along. Thanks for considering the patch. -- System Information: Debian Release: buster/sid APT prefers eoan APT policy: (991, 'eoan'), (500, 'eoan'), (500, 'cosmic-security') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.0.0-15-generic (SMP w/8 CPU cores) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled -- debian developer - deb.li/jak | jak-linux.org - free software dev ubuntu core developer i speak de, en
diff -Nru libapt-pkg-perl-0.1.34build2/AptPkg.xs libapt-pkg-perl-0.1.34ubuntu1/AptPkg.xs --- libapt-pkg-perl-0.1.34build2/AptPkg.xs 2017-08-18 14:35:27.000000000 +0200 +++ libapt-pkg-perl-0.1.34ubuntu1/AptPkg.xs 2019-06-17 18:42:06.000000000 +0200 @@ -8,6 +8,7 @@ #include <apt-pkg/error.h> #include <apt-pkg/configuration.h> #include <apt-pkg/cmndline.h> +#include <apt-pkg/indexfile.h> #include <apt-pkg/progress.h> #include <apt-pkg/pkgsystem.h> #include <apt-pkg/sourcelist.h> @@ -24,6 +25,9 @@ #include "utils.h" +using std::string; +using std::vector; + /* XS has grief with colons */ #define Configuration_Item Configuration::Item #define pkgSrcRecords_Parser pkgSrcRecords::Parser @@ -1142,13 +1146,6 @@ OUTPUT: RETVAL -bool -pkgCache_PkgFileIterator_p::IsOk() - CODE: - RETVAL = (char *) THIS->obj->IsOk(); - - OUTPUT: - RETVAL MODULE = AptPkg PACKAGE = AptPkg::Cache::_ver_file @@ -1282,20 +1279,20 @@ SV *arg CODE: pkgCache_PkgFileIterator_p *f = 0; - pkgCache_PkgIterator_p *p = 0; + pkgCache_VerIterator_p *v = 0; if (SvROK(arg)) { if (sv_derived_from(arg, "AptPkg::Cache::_pkg_file")) f = (pkgCache_PkgFileIterator_p *) SvIV((SV *) SvRV(arg)); - else if (sv_derived_from(arg, "AptPkg::Cache::_package")) - p = (pkgCache_PkgIterator_p *) SvIV((SV *) SvRV(arg)); + else if (sv_derived_from(arg, "AptPkg::Cache::_version")) + v = (pkgCache_VerIterator_p *) SvIV((SV *) SvRV(arg)); } if (f) RETVAL = THIS->obj->GetPriority(*f->obj); - else if (p) - RETVAL = THIS->obj->GetPriority(*p->obj); + else if (v) + RETVAL = THIS->obj->GetPriority(*v->obj); else croak("arg is not of type AptPkg::Cache::_pkg_file" " or AptPkg::Cache::_package"); @@ -1304,18 +1301,6 @@ RETVAL pkgCache_VerIterator_p * -pkgPolicy_p::GetMatch(pkgCache_PkgIterator_p *p) - CODE: - pkgCache::VerIterator v = THIS->obj->GetMatch(*p->obj); - if (v.end()) - XSRETURN_UNDEF; - - RETVAL = new pkgCache_VerIterator_p(THAT_sv, v); - - OUTPUT: - RETVAL - -pkgCache_VerIterator_p * pkgPolicy_p::GetCandidateVer(pkgCache_PkgIterator_p *p) CODE: pkgCache::VerIterator v = THIS->obj->GetCandidateVer(*p->obj); @@ -1460,11 +1445,11 @@ PUSHs(s); } - vector<pkgSrcRecords::File2> files; - if (parser->Files2(files)) + vector<pkgSrcRecords::File> files; + if (parser->Files(files)) { AV *av = newAV(); - for (vector<pkgSrcRecords::File2>::const_iterator f = files.begin(); + for (vector<pkgSrcRecords::File>::const_iterator f = files.begin(); f != files.end(); ++f) { HV *hv = newHV(); diff -Nru libapt-pkg-perl-0.1.34build2/debian/control libapt-pkg-perl-0.1.34ubuntu1/debian/control --- libapt-pkg-perl-0.1.34build2/debian/control 2019-06-17 13:09:25.000000000 +0200 +++ libapt-pkg-perl-0.1.34ubuntu1/debian/control 2019-06-17 18:42:22.000000000 +0200 @@ -1,8 +1,7 @@ Source: libapt-pkg-perl Section: perl Priority: optional -Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com> -XSBC-Original-Maintainer: Brendan O'Dea <b...@debian.org> +Maintainer: Brendan O'Dea <b...@debian.org> Build-Depends: perl (>= 5.8.0-6), debhelper (>= 10), libapt-pkg-dev (>= 0.6.40.1) Standards-Version: 4.1.4 Vcs-Browser: https://salsa.debian.org/bod/libapt-pkg-perl