Package: aptitude
Version: 0.8.12-1
Severity: serious
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu focal ubuntu-patch
Control: user de...@lists.debian.org
Control: usertag -1 apt-1.9.11

In Ubuntu, the attached patch was applied to achieve the following:

  * Update for apt 1.9.11

Thanks for considering the patch.

Note that if this gets uploaded before new apt lands in unstable,
the change from Index() to MapPointer() might need to be wrapped
inside an #if APT_PKG_ABI >= 600 so it can still build with apt in
unstable.

*** /tmp/tmp3dwel3so/aptitude_0.8.12-1ubuntu4.debdiff
diff -Nru aptitude-0.8.12/debian/control aptitude-0.8.12/debian/control
--- aptitude-0.8.12/debian/control      2020-02-19 13:51:33.000000000 +0100
+++ aptitude-0.8.12/debian/control      2020-02-27 09:14:00.000000000 +0100
@@ -1,15 +1,14 @@
 Source: aptitude
 Section: admin
 Priority: optional
-Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
-XSBC-Original-Maintainer: Aptitude Development Team 
<aptitude-de...@lists.alioth.debian.org>
+Maintainer: Aptitude Development Team <aptitude-de...@lists.alioth.debian.org>
 Uploaders: Manuel A. Fernandez Montecelo <m...@debian.org>,
            Axel Beckert <a...@debian.org>
 Build-Depends: debhelper (>= 11~),
                autoconf-archive,
                dpkg-dev (>= 1.16.1),
                gettext,
-               libapt-pkg-dev (>= 1.1),
+               libapt-pkg-dev (>= 1.9.11~),
                libboost-dev,
                libboost-iostreams-dev,
                libboost-system-dev,
diff -Nru aptitude-0.8.12/debian/patches/06_apt1.9.11 
aptitude-0.8.12/debian/patches/06_apt1.9.11
--- aptitude-0.8.12/debian/patches/06_apt1.9.11 1970-01-01 01:00:00.000000000 
+0100
+++ aptitude-0.8.12/debian/patches/06_apt1.9.11 2020-02-27 09:14:00.000000000 
+0100
@@ -0,0 +1,50 @@
+Description: Adjust for apt 1.9.11
+ pkgDPkgPM should not be used directly, use _system->CreatePM() instead;
+ also compare map_pointer in cache against new MapPointer() method instead
+ of Index().
+Author: Julian Andres Klode <juli...@ubuntu.com>
+Last-Update: 2020-02-27
+
+--- a/src/generic/apt/apt.cc
++++ b/src/generic/apt/apt.cc
+@@ -1724,8 +1724,8 @@ namespace aptitude
+         return;
+       }
+ 
+-      pkgDPkgPM pm(*apt_cache_file);
+-      pm.GetArchives(&fetcher, &l, apt_package_records);
++      std::unique_ptr<pkgPackageManager> 
pm(_system->CreatePM(*apt_cache_file));
++      pm->GetArchives(&fetcher, &l, apt_package_records);
+       if (_error->PendingError())
+       return;
+ 
+--- a/src/generic/apt/download_install_manager.cc
++++ b/src/generic/apt/download_install_manager.cc
+@@ -33,6 +33,7 @@
+ #include <apt-pkg/error.h>
+ #include <apt-pkg/install-progress.h>
+ #include <apt-pkg/sourcelist.h>
++#include <apt-pkg/pkgsystem.h>
+ 
+ #include <sigc++/bind.h>
+ 
+@@ -44,7 +45,7 @@ using namespace std;
+ 
+ download_install_manager::download_install_manager(bool _download_only,
+                                                  const 
run_dpkg_in_terminal_func &_run_dpkg_in_terminal)
+-  : log(NULL), download_only(_download_only), pm(new 
pkgDPkgPM(*apt_cache_file)),
++  : log(NULL), download_only(_download_only), 
pm(_system->CreatePM(*apt_cache_file)),
+     run_dpkg_in_terminal(_run_dpkg_in_terminal)
+ {
+ }
+--- a/src/generic/apt/aptitude_resolver.cc
++++ b/src/generic/apt/aptitude_resolver.cc
+@@ -1085,7 +1085,7 @@ void aptitude_resolver::add_default_reso
+   pkgCache::VerIterator instVer(*cache, NULL);
+ 
+   // See if we have a match that's not through a Provides.
+-  for( ; *curr != NULL && (*curr)->ParentPkg == p.Index(); ++curr)
++  for( ; *curr != NULL && (*curr)->ParentPkg == p.MapPointer(); ++curr)
+     {
+       pkgCache::PkgIterator currPkg(*cache, cache->GetCache().PkgP + 
(*curr)->ParentPkg);
+       if((*cache)[currPkg].CandidateVer != *curr)
diff -Nru aptitude-0.8.12/debian/patches/series 
aptitude-0.8.12/debian/patches/series
--- aptitude-0.8.12/debian/patches/series       2020-02-19 13:51:33.000000000 
+0100
+++ aptitude-0.8.12/debian/patches/series       2020-02-27 09:14:00.000000000 
+0100
@@ -1,3 +1,4 @@
 03_branding
 04_changelog
 05_error
+06_apt1.9.11


-- System Information:
Debian Release: bullseye/sid
  APT prefers focal
  APT policy: (991, 'focal'), (500, 'focal')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-17-generic (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_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

Reply via email to