[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#685195: marked as done (unblock: aptitude/0.6.8.1-1)



Your message dated Tue, 28 Aug 2012 19:50:52 +0100
with message-id <1346179852.22131.3.camel@jacala.jungle.funky-badger.org>
and subject line Re: Bug#685195: unblock: aptitude/0.6.8.1-1 (pre-approval)
has caused the Debian Bug report #685195,
regarding unblock: aptitude/0.6.8.1-1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
685195: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685195
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package aptitude

Includes non-intrusive changes for multi-arch support.  Without the
first of these aptitude is effectively broken on multi-arch systems
due to #672340.  Changelog entry:

  * Multi-arch update for the problem resolver:
    - handle conflicts without removing all foreign-arch
      packages (Closes: #672340) (LP: #831768)
    - correctly recognise dependencies solved by Multi-Arch:
      foreign packages (LP: #968412)
  * Improve display of relationships on multi-arch systems:
    - hide multi-arch implicit relationships, which are an
      internal aide for libapt-pkg (LP: #972858)
    - hide duplicate entries in lists of package relationships
      (Closes: #271465)
  * Helpers for interacting with dpkg
  * Use dpkg package names when calling dpkg (Closes: #680333)

The last two are required to interface with dpkg-reconfigure on a
multi-arch system.

Another version, 0.6.9.1-1, is in experimental which has further
improvements to multi-arch support and general usability, including
some notable bug fixes.  Those are entangled with significant changes
to the command line interface.  Work is still underway to salvage that
release.

Unblock lines for all packages built from the aptitude source, only
aptitude, -common, and -dbg are changed in this version.

unblock aptitude/0.6.8-2
unblock aptitude-common/0.6.8-2
unblock aptitude-dbg/0.6.8-2
unblock aptitude-doc-cs/0.6.8-2
unblock aptitude-doc-en/0.6.8-2
unblock aptitude-doc-es/0.6.8-2
unblock aptitude-doc-fi/0.6.8-2
unblock aptitude-doc-fr/0.6.8-2
unblock aptitude-doc-it/0.6.8-2
unblock aptitude-doc-ja/0.6.8-2

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/1 CPU core)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru aptitude-0.6.8/debian/changelog aptitude-0.6.8/debian/changelog
--- aptitude-0.6.8/debian/changelog	2012-06-07 03:21:38.000000000 +0800
+++ aptitude-0.6.8/debian/changelog	2012-08-18 11:29:47.000000000 +0800
@@ -1,3 +1,20 @@
+aptitude (0.6.8-2) unstable; urgency=low
+
+  * Multi-arch update for the problem resolver:
+    - handle conflicts without removing all foreign-arch
+      packages (Closes: #672340) (LP: #831768)
+    - correctly recognise dependencies solved by Multi-Arch:
+      foreign packages (LP: #968412)
+  * Improve display of relationships on multi-arch systems:
+    - hide multi-arch implicit relationships, which are an
+      internal aide for libapt-pkg (LP: #972858)
+    - hide duplicate entries in lists of package relationships
+      (Closes: #271465)
+  * Helpers for interacting with dpkg
+  * Use dpkg package names when calling dpkg (Closes: #680333)
+
+ -- Daniel Hartwig <mandyke@gmail.com>  Sat, 18 Aug 2012 10:59:45 +0800
+
 aptitude (0.6.8-1) unstable; urgency=low
   
   * Fix build with g++ 4.7
diff -Nru aptitude-0.6.8/debian/patches/dpkg-helpers.patch aptitude-0.6.8/debian/patches/dpkg-helpers.patch
--- aptitude-0.6.8/debian/patches/dpkg-helpers.patch	1970-01-01 08:00:00.000000000 +0800
+++ aptitude-0.6.8/debian/patches/dpkg-helpers.patch	2012-08-18 11:31:01.000000000 +0800
@@ -0,0 +1,250 @@
+From: Daniel Hartwig <mandyke@gmail.com>
+Date: Tue, 10 Jul 2012 17:01:43 +0800
+Subject: [PATCH 1/2] Add helpers for interfacing with dpkg
+
+These should rather be in libapt-pkg but too late for Wheezy.
+
+* generic/apt/dpkg.{cc,h}:
+  - dpkg_base_args: base arguments for dpkg from APT conf
+  - dpkg_mult_arch: true if dpkg is multi-arch aware
+  - dpkg_package_name: returns the name that dpkg uses for
+    a package
+---
+ src/generic/apt/Makefile.am |    2 +
+ src/generic/apt/dpkg.cc     |  150 +++++++++++++++++++++++++++++++++++++++++++
+ src/generic/apt/dpkg.h      |   53 +++++++++++++++
+ 3 files changed, 205 insertions(+), 0 deletions(-)
+ create mode 100644 src/generic/apt/dpkg.cc
+ create mode 100644 src/generic/apt/dpkg.h
+
+diff --git a/src/generic/apt/Makefile.am b/src/generic/apt/Makefile.am
+index 29488f4..4df2cfe 100644
+--- a/src/generic/apt/Makefile.am
++++ b/src/generic/apt/Makefile.am
+@@ -47,6 +47,8 @@ libgeneric_apt_a_SOURCES = \
+ 	download_update_manager.h   \
+ 	download_signal_log.cc \
+ 	download_signal_log.h  \
++	dpkg.cc             \
++	dpkg.h              \
+ 	dump_packages.cc    \
+ 	dump_packages.h     \
+ 	globals.cc          \
+diff --git a/src/generic/apt/dpkg.cc b/src/generic/apt/dpkg.cc
+new file mode 100644
+index 0000000..a777ace
+--- /dev/null
++++ b/src/generic/apt/dpkg.cc
+@@ -0,0 +1,150 @@
++// dpkg.cc
++//
++//  Copyright 2012 Daniel Hartwig
++//
++//  This program is free software; you can redistribute it and/or modify
++//  it under the terms of the GNU General Public License as published by
++//  the Free Software Foundation; either version 2 of the License, or
++//  (at your option) any later version.
++//
++//  This program is distributed in the hope that it will be useful,
++//  but WITHOUT ANY WARRANTY; without even the implied warranty of
++//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++//  GNU General Public License for more details.
++//
++//  You should have received a copy of the GNU General Public License
++//  along with this program; see the file COPYING.  If not, write to
++//  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++//  Boston, MA 02111-1307, USA.
++
++#include "dpkg.h"
++
++#include <aptitude.h>
++
++#include <apt-pkg/configuration.h>
++#include <apt-pkg/error.h>
++#include <apt-pkg/fileutl.h>
++#include <apt-pkg/pkgcache.h>
++
++#include <boost/optional.hpp>
++
++#include <cerrno>
++#include <string>
++#include <vector>
++
++#include <sys/types.h>
++#include <sys/wait.h>
++#include <fcntl.h>
++
++using namespace std;
++
++namespace aptitude {
++namespace apt {
++
++std::vector<const char *> dpkg_base_args(const bool cached)
++{
++   static std::vector<const char *> Args;
++
++   if (cached == true && Args.empty() == false)
++      return Args;
++
++   // Generate the base argument list for dpkg
++   Args.clear();
++   string Tmp = _config->Find("Dir::Bin::dpkg","dpkg");
++   {
++      string const dpkgChrootDir = _config->FindDir("DPkg::Chroot-Directory", "/");
++      size_t dpkgChrootLen = dpkgChrootDir.length();
++      if (dpkgChrootDir != "/" && Tmp.find(dpkgChrootDir) == 0)
++      {
++	 if (dpkgChrootDir[dpkgChrootLen - 1] == '/')
++	    --dpkgChrootLen;
++	 Tmp = Tmp.substr(dpkgChrootLen);
++      }
++   }
++   Args.push_back(Tmp.c_str());
++
++   // Stick in any custom dpkg options
++   Configuration::Item const *Opts = _config->Tree("DPkg::Options");
++   if (Opts != 0)
++   {
++      Opts = Opts->Child;
++      for (; Opts != 0; Opts = Opts->Next)
++      {
++	 if (Opts->Value.empty() == true)
++	    continue;
++	 Args.push_back(Opts->Value.c_str());
++      }
++   }
++
++   return Args;
++}
++
++bool dpkg_multi_arch(const bool cached)
++{
++   static boost::optional<bool> dpkgMultiArch;
++
++   if (cached == true && dpkgMultiArch)
++      return *dpkgMultiArch;
++
++   std::vector<const char *> Args(dpkg_base_args(cached));
++
++   // we need to detect if we can qualify packages with the architecture or not
++   Args.push_back("--assert-multi-arch");
++   Args.push_back(NULL);
++
++
++   pid_t dpkgAssertMultiArch = ExecFork();
++   if (dpkgAssertMultiArch == 0)
++   {
++      std::string const chrootDir = _config->FindDir("DPkg::Chroot-Directory");
++      if (chrootDir != "/" && chroot(chrootDir.c_str()) != 0)
++	 _error->WarningE("dpkg_multi_arch",
++                          _("Couldn't chroot into %s for %s"),
++                          chrootDir.c_str(),
++                          "dpkg --assert-multi-arch");
++      // redirect everything to the ultimate sink as we only need the exit-status
++      int const nullfd = open("/dev/null", O_RDONLY);
++      dup2(nullfd, STDIN_FILENO);
++      dup2(nullfd, STDOUT_FILENO);
++      dup2(nullfd, STDERR_FILENO);
++      execvp(Args[0], (char**) &Args[0]);
++      _error->WarningE("dpkg_multi_arch", "Can't detect if dpkg supports multi-arch!");
++      _exit(2);
++   }
++
++   dpkgMultiArch.reset(false);
++   if (dpkgAssertMultiArch > 0)
++   {
++      int Status = 0;
++      while (waitpid(dpkgAssertMultiArch, &Status, 0) != dpkgAssertMultiArch)
++      {
++	 if (errno == EINTR)
++	    continue;
++	 _error->WarningE("dpkg_multi_arch",
++                          _("Waited for %s but it wasn't there"),
++                          "dpkg --assert-multi-arch");
++	 break;
++      }
++      if (WIFEXITED(Status) == true && WEXITSTATUS(Status) == 0)
++         dpkgMultiArch.reset(true);
++   }
++
++   return *dpkgMultiArch;
++}
++
++std::string dpkg_package_name(const pkgCache::PkgIterator &pkg)
++{
++  if(dpkg_multi_arch() == false)
++    return pkg.FullName(true);
++  else
++    {
++      if(pkg->CurrentVer != 0)
++        return string(pkg.Name()).append(":").append(pkg.CurrentVer().Arch());
++      else if(pkg.VersionList().end() == false)
++        return string(pkg.Name()).append(":").append(pkg.VersionList().Arch());
++      else
++        return pkg.FullName(false);
++    }
++}
++
++}} // namespace aptitude { namespace apt {
+diff --git a/src/generic/apt/dpkg.h b/src/generic/apt/dpkg.h
+new file mode 100644
+index 0000000..53a2d9b
+--- /dev/null
++++ b/src/generic/apt/dpkg.h
+@@ -0,0 +1,53 @@
++// dpkg.h  -*-c++-*-
++//
++//  Copyright 2012 Daniel Hartwig
++//
++//  This program is free software; you can redistribute it and/or modify
++//  it under the terms of the GNU General Public License as published by
++//  the Free Software Foundation; either version 2 of the License, or
++//  (at your option) any later version.
++//
++//  This program is distributed in the hope that it will be useful,
++//  but WITHOUT ANY WARRANTY; without even the implied warranty of
++//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++//  GNU General Public License for more details.
++//
++//  You should have received a copy of the GNU General Public License
++//  along with this program; see the file COPYING.  If not, write to
++//  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++//  Boston, MA 02111-1307, USA.
++//
++//  Helpers for interfacing with dpkg.
++//  Based on APT: dpkgpm.cc, apt-mark.cc
++
++// FIXME: These should really go in libapt-pkg.
++
++#ifndef APTITUDE_GENERIC_APT_DPKG_H
++#define APTITUDE_GENERIC_APT_DPKG_H
++
++#include <apt-pkg/pkgcache.h>
++
++#include <string>
++#include <vector>
++
++namespace aptitude {
++namespace apt {
++
++/** \brief Base arguments that should be passed to dpkg.  Append
++ *         additional arguments, followed by NULL, then pass to
++ *         execvp(3).
++ */
++std::vector<const char *> dpkg_base_args(const bool cached = true);
++
++/** \brief Returns \b true if dpkg is multi-arch aware.
++ */
++bool dpkg_multi_arch(const bool cached = true);
++
++/** \brief Returns the name by which dpkg knows /b pkg.  Note that
++ *         this is different to PkgIterator::FullName.
++ */
++std::string dpkg_package_name(const pkgCache::PkgIterator &pkg);
++
++}} // namespace aptitude { namespace apt {
++
++#endif // APTITUDE_GENERIC_APT_DPKG_H
+-- 
+1.7.9
+
diff -Nru aptitude-0.6.8/debian/patches/dpkg-names.patch aptitude-0.6.8/debian/patches/dpkg-names.patch
--- aptitude-0.6.8/debian/patches/dpkg-names.patch	1970-01-01 08:00:00.000000000 +0800
+++ aptitude-0.6.8/debian/patches/dpkg-names.patch	2012-08-18 11:32:11.000000000 +0800
@@ -0,0 +1,36 @@
+From b40e0bb56871b290fd98223cdd2b17e8b8a7257f Mon Sep 17 00:00:00 2001
+From: Daniel Hartwig <mandyke@gmail.com>
+Date: Tue, 10 Jul 2012 17:03:36 +0800
+Subject: [PATCH 2/2] Use dpkg package names when calling dpkg
+
+Closes: #680333
+---
+ src/pkg_item.cc |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/pkg_item.cc b/src/pkg_item.cc
+index e9d70df..c861c21 100644
+--- a/src/pkg_item.cc
++++ b/src/pkg_item.cc
+@@ -38,6 +38,7 @@
+ #include <generic/apt/apt.h>
+ #include <generic/apt/apt_undo_group.h>
+ #include <generic/apt/config_signal.h>
++#include <generic/apt/dpkg.h>
+ #include <generic/apt/matching/match.h>
+ #include <generic/apt/matching/parse.h>
+ #include <generic/apt/matching/pattern.h>
+@@ -402,8 +403,8 @@ bool pkg_item::dispatch_key(const cw::config::key &k, cw::tree *owner)
+ 	  char buf[512];
+ 	  if(sucmd)
+ 	    {
+-	      snprintf(buf, 512, sucmd,
+-		       package.FullName().c_str());
++              const string name(aptitude::apt::dpkg_package_name(package));
++              snprintf(buf, 512, sucmd, name.c_str());
+ 
+ 	      if(system(buf) != 0) { /* FIXME: ignore? */ }
+ 
+-- 
+1.7.9
+
diff -Nru aptitude-0.6.8/debian/patches/hide-duplicate-package-relations.patch aptitude-0.6.8/debian/patches/hide-duplicate-package-relations.patch
--- aptitude-0.6.8/debian/patches/hide-duplicate-package-relations.patch	1970-01-01 08:00:00.000000000 +0800
+++ aptitude-0.6.8/debian/patches/hide-duplicate-package-relations.patch	2012-08-18 11:26:32.000000000 +0800
@@ -0,0 +1,74 @@
+From: Daniel Hartwig <mandyke@gmail.com>
+Date: Sat, 4 Aug 2012 16:57:44 +0800
+Subject: [PATCH 2/2] Remove duplicate entries from lists of package
+ relationship
+
+Closes: #271465
+---
+ src/dep_item.cc |   23 +++++++++++++++++------
+ 1 files changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/src/dep_item.cc b/src/dep_item.cc
+index 98ceb9c..fa5ae33 100644
+--- a/src/dep_item.cc
++++ b/src/dep_item.cc
+@@ -33,6 +33,8 @@
+ 
+ #include <apt-pkg/version.h>
+ 
++#include <set>
++
+ using namespace std;
+ namespace cw = cwidget;
+ namespace cwidget
+@@ -77,6 +79,9 @@ pkg_depitem::pkg_depitem(pkgCache::DepIterator &first, pkg_signal *sig):
+   bool firstiter=true;
+   bool is_or=(start->CompareOp&pkgCache::Dep::Or);
+ 
++  typedef std::map<pkgCache::VerIterator, bool> entry_map;
++  entry_map entries;
++
+   do
+     {
+       if(!firstiter)
+@@ -97,18 +102,14 @@ pkg_depitem::pkg_depitem(pkgCache::DepIterator &first, pkg_signal *sig):
+       for(pkgCache::VerIterator i=start.TargetPkg().VersionList(); !i.end(); i++)
+ 	if(_system->VS->CheckDep(i.VerStr(), start->CompareOp, start.TargetVer()))
+ 	  {
+-	    available=true;
+             const bool show_pkg_name = is_or || is_foreign_arch(i);
+-            add_child(new pkg_ver_item(i, sig, show_pkg_name));
+-	    inc_num_packages();
++            entries.insert(entry_map::value_type(i, show_pkg_name));
+ 	  }
+ 
+       for(pkgCache::PrvIterator i=start.TargetPkg().ProvidesList(); !i.end(); i++)
+ 	if(_system->VS->CheckDep(i.ProvideVersion(), start->CompareOp, start.TargetVer()))
+ 	  {
+-	    available=true;
+-	    add_child(new pkg_ver_item(i.OwnerVer(), sig, true));
+-	    inc_num_packages();
++            entries.insert(entry_map::value_type(i.OwnerVer(), true));
+ 	  }
+ 
+       if(start==end)
+@@ -116,6 +117,16 @@ pkg_depitem::pkg_depitem(pkgCache::DepIterator &first, pkg_signal *sig):
+       // Bleach.  Anyone who can offer a cleaner way to do this gets a virtual cookie :)
+       start++;
+     } while(1);
++
++  if(entries.empty() == false)
++    {
++      available = true;
++      for(entry_map::const_iterator i = entries.begin();
++          i != entries.end(); ++i)
++        add_child(new pkg_ver_item(i->first, sig, i->second));
++      set_num_packages(entries.size());
++    }
++
+   pkg_subtree::set_label(cw::util::transcode(currlabel, "ASCII"));
+ }
+ 
+-- 
+1.7.9
+
diff -Nru aptitude-0.6.8/debian/patches/hide-multiarch-implicit.patch aptitude-0.6.8/debian/patches/hide-multiarch-implicit.patch
--- aptitude-0.6.8/debian/patches/hide-multiarch-implicit.patch	1970-01-01 08:00:00.000000000 +0800
+++ aptitude-0.6.8/debian/patches/hide-multiarch-implicit.patch	2012-08-18 11:26:21.000000000 +0800
@@ -0,0 +1,44 @@
+From: Daniel Hartwig <mandyke@gmail.com>
+Date: Sat, 4 Aug 2012 15:37:39 +0800
+Subject: [PATCH 1/2] Hide multi-arch implicit relations from package details
+
+LP: #972858
+---
+ src/cmdline/cmdline_show.cc |    3 ++-
+ src/dep_item.cc             |    6 ++++++
+ 2 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/src/cmdline/cmdline_show.cc b/src/cmdline/cmdline_show.cc
+index 287404a..2ed3693 100644
+--- a/src/cmdline/cmdline_show.cc
++++ b/src/cmdline/cmdline_show.cc
+@@ -91,7 +91,8 @@ static cwidget::fragment *dep_lst_frag(pkgCache::DepIterator dep,
+ 
+       vector<cw::fragment *> or_fragments;
+ 
+-      if(start->Type==T)
++      if(start->Type == T
++         && start.IsMultiArchImplicit() == false)
+ 	do
+ 	  {
+ 	    cw::fragment *verfrag;
+diff --git a/src/dep_item.cc b/src/dep_item.cc
+index 1df4be0..98ceb9c 100644
+--- a/src/dep_item.cc
++++ b/src/dep_item.cc
+@@ -278,6 +278,12 @@ void setup_package_deps(const pkgCache::PkgIterator &pkg,
+   pkgCache::DepIterator D=reverse?pkg.RevDependsList():ver.DependsList();
+   while(!D.end())
+     {
++      if(D.IsMultiArchImplicit() == true)
++        {
++          D++;
++          continue;
++        }
++
+       if(reverse)
+ 	{
+ 	  if((ver.end() && (D->CompareOp&0x0F)!=pkgCache::Dep::NoOp) ||
+-- 
+1.7.9
+
diff -Nru aptitude-0.6.8/debian/patches/multiarch-conflicts.patch aptitude-0.6.8/debian/patches/multiarch-conflicts.patch
--- aptitude-0.6.8/debian/patches/multiarch-conflicts.patch	1970-01-01 08:00:00.000000000 +0800
+++ aptitude-0.6.8/debian/patches/multiarch-conflicts.patch	2012-08-18 11:19:01.000000000 +0800
@@ -0,0 +1,237 @@
+From: Daniel Hartwig <mandyke@gmail.com>
+Date: Sat, 4 Aug 2012 14:01:49 +0800
+Subject: [PATCH] Enlighten resolver about multi-arch
+
+Internally, APT lets Multi-Arch: foreign packages satisfy their
+dependencies using versioned provides.  Aptitude's problem
+resolver was ignoring all provides when a version was associated
+with a dependency and so missed these critical providers.
+
+As a result any dependency problem would cause the problem
+resolver to remove all foreign-arch packages.
+
+Also update some provides tests to compare groups rather than
+packages and comment out redundant checks in some places.
+
+Closes: #672340
+LP: #831768
+LP: #933556
+LP: #968412
+---
+ src/generic/apt/aptitude_resolver_universe.cc |   92 ++++++++++++++-----------
+ src/generic/apt/aptitude_resolver_universe.h  |   57 +++++++++------
+ 2 files changed, 85 insertions(+), 64 deletions(-)
+
+diff --git a/src/generic/apt/aptitude_resolver_universe.cc b/src/generic/apt/aptitude_resolver_universe.cc
+index d1901c6..2074c22 100644
+--- a/src/generic/apt/aptitude_resolver_universe.cc
++++ b/src/generic/apt/aptitude_resolver_universe.cc
+@@ -264,11 +264,17 @@ aptitude_resolver_version::dep_iterator::applicable(const pkgCache::DepIterator
+       eassert(!prv.end());
+       eassert(is_conflict(dep->Type));
+ 
+-      if(const_cast<pkgCache::PrvIterator &>(prv).OwnerPkg() == const_cast<pkgCache::DepIterator &>(dep).ParentPkg())
+-	return false;
++      // NB: inlined pkgCache::DepIterator::IsIgnorable
++      // if(dep.IsIgnorable(prv) == true)
++      //   return false;
++      const pkgCache::PkgIterator pkg = dep.ParentPkg();
++      if(prv.OwnerPkg()->Group == pkg->Group)
++        return false;
++      if(pkg->Group == dep.TargetPkg()->Group && prv.OwnerPkg()->Group != pkg->Group)
++        return false;
+     }
+   else
+-    if(const_cast<pkgCache::DepIterator &>(dep).ParentPkg() == const_cast<pkgCache::DepIterator &>(dep).TargetPkg())
++    if(dep.ParentPkg() == dep.TargetPkg())
+       return false;
+ 
+   if(!is_interesting_dep(dep, cache))
+@@ -316,39 +322,34 @@ void aptitude_resolver_dep::solver_iterator::normalize()
+     {
+       while(!end())
+ 	{
+-	  while(!ver_lst.end())
+-	    {
+-	      bool ver_matches =
+-		!dep_lst.TargetVer() ||
+-		_system->VS->CheckDep(ver_lst.VerStr(),
+-				      dep_lst->CompareOp,
+-				      dep_lst.TargetVer());
++          for(; ver_lst.end() == false; ++ver_lst)
++            {
++              if(dep_lst.IsIgnorable(ver_lst.ParentPkg()) == true)
++                continue;
+ 
+-	      if(ver_matches && ver_disappeared(ver_lst))
+-		ver_matches = false;
++              if(_system->VS->CheckDep(ver_lst.VerStr(),
++                                       dep_lst->CompareOp,
++                                       dep_lst.TargetVer()) == false)
++                continue;
+ 
+-	      if(ver_matches)
+-		// Found the next entry; drop out.
+-		return;
+-	      else
+-		++ver_lst;
+-	    }
++              if(ver_disappeared(ver_lst) == false)
++                return;
++            }
+ 
+ 	  // If we ran out of versions, try provides instead.
+-	  while(!prv_lst.end())
+-	    {
+-	      bool prv_matches=(!dep_lst.TargetVer()) ||
+-		(prv_lst.ProvideVersion() &&
+-		 _system->VS->CheckDep(prv_lst.ProvideVersion(),
+-				       dep_lst->CompareOp,
+-				       dep_lst.TargetVer()));
++          for(; prv_lst.end() == false; ++prv_lst)
++            {
++              if(dep_lst.IsIgnorable(prv_lst) == true)
++                continue;
+ 
+-	      if(prv_matches &&
+-		 !ver_disappeared(prv_lst.OwnerVer()))
+-		return;
+-	      else
+-		++prv_lst;
+-	    }
++              if(_system->VS->CheckDep(prv_lst.ProvideVersion(),
++                                       dep_lst->CompareOp,
++                                       dep_lst.TargetVer()) == false)
++                continue;
++
++              if(ver_disappeared(prv_lst.OwnerVer()) == false)
++                return;
++            }
+ 
+ 	  // No more target versions or providers of the target;
+ 	  // increment the dependency list if we aren't yet at the
+@@ -440,18 +441,27 @@ bool aptitude_resolver_dep::solved_by(const aptitude_resolver_version &v) const
+ 
+       while(1)
+ 	{
+-	  if(d.TargetPkg() == v.get_pkg() &&
+-	     (!d.TargetVer() || _system->VS->CheckDep(v.get_ver().VerStr(),
+-						      d->CompareOp,
+-						      d.TargetVer())))
+-	    return true;
++          if(d.IsIgnorable(v.get_pkg()) == false
++             && _system->VS->CheckDep(v.get_ver().VerStr(),
++                                      d->CompareOp,
++                                      d.TargetVer()) == true)
++            return true;
+ 
+ 	  // Check for a resolution via Provides.
+-	  if(!d.TargetVer())
+-	    for(pkgCache::PrvIterator p2 = v.get_ver().ProvidesList();
+-		!p2.end(); ++p2)
+-	      if(const_cast<pkgCache::PrvIterator &>(p2).ParentPkg() == d.TargetPkg())
+-		return true;
++          for(pkgCache::PrvIterator p2 = v.get_ver().ProvidesList();
++              p2.end() == false; ++p2)
++            {
++              if(d.IsIgnorable(p2) == true)
++                continue;
++
++              if(p2.ParentPkg() != d.TargetPkg())
++                continue;
++
++              if(_system->VS->CheckDep(p2.ProvideVersion(),
++                                       d->CompareOp,
++                                       d.TargetVer()) == true)
++                return true;
++            }
+ 
+ 	  if((d->CompareOp & pkgCache::Dep::Or) != 0)
+ 	    ++d;
+diff --git a/src/generic/apt/aptitude_resolver_universe.h b/src/generic/apt/aptitude_resolver_universe.h
+index e10ce6a..285f372 100644
+--- a/src/generic/apt/aptitude_resolver_universe.h
++++ b/src/generic/apt/aptitude_resolver_universe.h
+@@ -982,25 +982,32 @@ bool aptitude_resolver_dep::broken_under(const InstallationType &I) const
+ 
+       while(!dep.end())
+ 	{
+-	  pkgCache::VerIterator direct_ver=I.version_of(aptitude_resolver_package(dep.TargetPkg(), cache)).get_ver();
+-	  if(!direct_ver.end())
+-	    {
+-	      const char * const direct_verstr = direct_ver.VerStr();
+-	      const char * const dep_targetstr = dep.TargetVer();
+-	      if(!direct_ver.end() &&
+-		 _system->VS->CheckDep(direct_verstr,
+-				       dep->CompareOp,
+-				       dep_targetstr))
+-		return false;
+-	    }
+-
+-	  if(!dep.TargetVer())
+-	    {
+-	      for(pkgCache::PrvIterator prv=dep.TargetPkg().ProvidesList();
+-		  !prv.end(); ++prv)
+-		if(prv.OwnerVer() == I.version_of(aptitude_resolver_package(prv.OwnerPkg(), cache)).get_ver())
+-		  return false;
+-	    }
++          if(dep.IsIgnorable(dep.TargetPkg()) == false)
++            {
++              const aptitude_resolver_package pkg(dep.TargetPkg(), cache);
++              const pkgCache::VerIterator direct_ver = I.version_of(pkg).get_ver();
++              if((direct_ver.end() == false)
++                 && (_system->VS->CheckDep(direct_ver.VerStr(),
++                                           dep->CompareOp,
++                                           dep.TargetVer()) == true))
++                return false;
++            }
++
++          for(pkgCache::PrvIterator prv = dep.TargetPkg().ProvidesList();
++              prv.end() == false; ++prv)
++            {
++              if(dep.IsIgnorable(prv) == true)
++                continue;
++
++              if(_system->VS->CheckDep(prv.ProvideVersion(),
++                                       dep->CompareOp,
++                                       dep.TargetVer()) == false)
++                continue;
++
++              const aptitude_resolver_package pkg(prv.OwnerPkg(), cache);
++              if(prv.OwnerVer() == I.version_of(pkg).get_ver())
++                return false;
++            }
+ 
+ 	  if(!(dep->CompareOp & pkgCache::Dep::Or))
+ 	    break;
+@@ -1015,10 +1022,14 @@ bool aptitude_resolver_dep::broken_under(const InstallationType &I) const
+       // single element of the Conflicts/Breaks: either a direct
+       // conflict or an indirect conflict (i.e., via a virtual pkg).
+ 
++      // NB: The dep_iterator already skips conflicts for which
++      // DepIterator::IsIgnorable is true so avoid repeating those
++      // tests here.
++
+       if(prv == NULL)
+ 	{
+-	  if(start_iter.TargetPkg() == start_iter.ParentPkg())
+-	    return false;
++          // if(start_iter.IsIgnorable(start_iter.TargetPkg()) == true)
++          //   return false;
+ 
+ 	  pkgCache::VerIterator direct_ver=I.version_of(aptitude_resolver_package(start_iter.TargetPkg(), cache)).get_ver();
+ 
+@@ -1034,8 +1045,8 @@ bool aptitude_resolver_dep::broken_under(const InstallationType &I) const
+ 	{
+ 	  pkgCache::PrvIterator prv_iter(cache->GetCache(), const_cast<pkgCache::Provides *>(prv), (pkgCache::Package *)0);
+ 
+-	  if(prv_iter.OwnerPkg() == start_iter.ParentPkg())
+-	    return false;
++	  // if(start_iter.IsIgnorable(prv_iter) == true)
++	  //   return false;
+ 
+ 	  if(start_iter.TargetVer() != NULL)
+ 	    return false;
+-- 
+1.7.9
+
diff -Nru aptitude-0.6.8/debian/patches/series aptitude-0.6.8/debian/patches/series
--- aptitude-0.6.8/debian/patches/series	1970-01-01 08:00:00.000000000 +0800
+++ aptitude-0.6.8/debian/patches/series	2012-08-18 11:31:22.000000000 +0800
@@ -0,0 +1,5 @@
+multiarch-conflicts.patch
+hide-multiarch-implicit.patch
+hide-duplicate-package-relations.patch
+dpkg-helpers.patch
+dpkg-names.patch

--- End Message ---
--- Begin Message ---
On Tue, 2012-08-28 at 15:09 +0800, Daniel Hartwig wrote:
> Control: retitle -1 unblock: aptitude/0.6.8.1-1
> 
> > Final debdiff attached, stripped of build system and po file noise.
> >
> > I will follow up again once it is in the archive.
> >
> > unblock aptitude/0.6.8.1-1
> 
> It is in the main archive now.

Unblocked; thanks.

Regards,

Adam

--- End Message ---

Reply to: