Your message dated Mon, 01 Mar 2010 12:17:07 +0000
with message-id <[email protected]>
and subject line Bug#572052: fixed in apt-xapian-index 0.25
has caused the Debian Bug report #572052,
regarding [PATCH] python-apt 0.8 API transition: Please update apt-xapian-index 
to new API
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 [email protected]
immediately.)


-- 
572052: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572052
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: apt-xapian-index
Tags: patch
User: [email protected]
Usertags: python-apt-0-8-api

As part of the python-apt API transition mass bug filing[1],
I would like to ask you to update your package for the new
API using the attached patch.

The first python-apt upload after the Squeeze release will
drop the old API and will get a 'Breaks' for all packages
which have not been adjusted yet. All not-fixed bugs will 
become release critical then.

[1] http://lists.debian.org/debian-devel/2010/02/msg00424.html

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
From 9d50cd36f87541222fd21ee27b49a16ea6d3a9c0 Mon Sep 17 00:00:00 2001
From: Julian Andres Klode <[email protected]>
Date: Mon, 1 Mar 2010 12:15:45 +0100
Subject: [PATCH 1/2] Upgrade to the new python-apt API.

---
 examples/aptxapianindex.py      |    3 ++-
 examples/axi-query-pkgtype.py   |    3 ++-
 examples/axi-query-simple.py    |    5 +++--
 examples/axi-query.py           |    3 ++-
 examples/axi-searchasyoutype.py |    5 +++--
 examples/axi-searchcloud.py     |    8 +++++++-
 plugins/apttags.py              |    2 +-
 plugins/descriptions.py         |    2 +-
 plugins/sections.py             |    2 +-
 plugins/sizes.py                |    2 +-
 10 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/examples/aptxapianindex.py b/examples/aptxapianindex.py
index 75ddfbf..a425b62 100644
--- a/examples/aptxapianindex.py
+++ b/examples/aptxapianindex.py
@@ -97,7 +97,8 @@ def show_mset(mset):
         pkg = cache[name]
 
         # Print the match, together with the short description
-        print "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.summary)
+        if pkg.candidate:
+            print "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.candidate.summary)
 
 def readValueDB(pathname):
     """
diff --git a/examples/axi-query-pkgtype.py b/examples/axi-query-pkgtype.py
index b434607..0d0c34c 100755
--- a/examples/axi-query-pkgtype.py
+++ b/examples/axi-query-pkgtype.py
@@ -101,7 +101,8 @@ for m in matches:
     # description
     pkg = cache[name]
 
+    if pkg.candidate:
     # Print the match, together with the short description
-    print "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.summary)
+        print "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.candidate.summary)
 
 sys.exit(0)
diff --git a/examples/axi-query-simple.py b/examples/axi-query-simple.py
index ce0f88f..5eb33d5 100755
--- a/examples/axi-query-simple.py
+++ b/examples/axi-query-simple.py
@@ -117,7 +117,8 @@ for m in matches:
     # description
     pkg = cache[name]
 
-    # Print the match, together with the short description
-    print "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.summary)
+    if pkg.candidate:
+        # Print the match, together with the short description
+        print "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.candidate.summary)
 
 sys.exit(0)
diff --git a/examples/axi-query.py b/examples/axi-query.py
index fb4e8bd..5b4cc08 100755
--- a/examples/axi-query.py
+++ b/examples/axi-query.py
@@ -101,6 +101,7 @@ print "Results 1-%i:" % matches.size()
 for m in matches:
     name = m[xapian.MSET_DOCUMENT].get_data()
     pkg = cache[name]
-    print "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.summary)
+    if pkg.candidate:
+        print "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.candidate.summary)
 
 sys.exit(0)
diff --git a/examples/axi-searchasyoutype.py b/examples/axi-searchasyoutype.py
index 39b61bb..3b6b1bc 100755
--- a/examples/axi-searchasyoutype.py
+++ b/examples/axi-searchasyoutype.py
@@ -152,8 +152,9 @@ class Results:
             # description
             pkg = cache[name]
 
-            # Print the match, together with the short description
-            self.win.addstr(y+1, 0, "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.summary))
+            if pkg.candidate:
+                # Print the match, together with the short description
+                self.win.addstr(y+1, 0, "%i%% %s - %s" % (m[xapian.MSET_PERCENT], name, pkg.candidate.summary))
 
         self.win.refresh()
 
diff --git a/examples/axi-searchcloud.py b/examples/axi-searchcloud.py
index 863de2c..42e0fce 100755
--- a/examples/axi-searchcloud.py
+++ b/examples/axi-searchcloud.py
@@ -132,7 +132,13 @@ def SimpleOrQuery(input_terms):
             pkg = cache[name]
         except KeyError:
             continue
-        shortdesc = pkg.summary
+
+        # pkg.candidate may be none
+        try:
+            shortdesc = pkg.candidate.summary
+        except AttributeError:
+            continue
+
         packages.append((score, name, shortdesc))
 
     class Filter(xapian.ExpandDecider):
diff --git a/plugins/apttags.py b/plugins/apttags.py
index d12e733..b8b221d 100644
--- a/plugins/apttags.py
+++ b/plugins/apttags.py
@@ -25,7 +25,7 @@ class AptTags:
         """
         self.re_expand = re.compile(r"\b([^{]+)\{([^}]+)\}")
         self.re_split = re.compile(r"\s*,\s*")
-        file = apt.apt_pkg.Config.find_file("Dir::Cache::pkgcache")
+        file = apt.apt_pkg.config.find_file("Dir::Cache::pkgcache")
         return dict(timestamp = os.path.getmtime(file))
 
     def init(self, info, progress):
diff --git a/plugins/descriptions.py b/plugins/descriptions.py
index 57d9155..6126e64 100644
--- a/plugins/descriptions.py
+++ b/plugins/descriptions.py
@@ -22,7 +22,7 @@ class Descriptions:
         the timestamp shows that this plugin is currently not needed, then the
         long initialisation can just be skipped.
         """
-        file = apt.apt_pkg.Config.find_file("Dir::Cache::pkgcache")
+        file = apt.apt_pkg.config.find_file("Dir::Cache::pkgcache")
         return dict(timestamp = os.path.getmtime(file))
 
     def init(self, info, progress):
diff --git a/plugins/sections.py b/plugins/sections.py
index 78cd02a..197efb9 100644
--- a/plugins/sections.py
+++ b/plugins/sections.py
@@ -21,7 +21,7 @@ class Sections:
         the timestamp shows that this plugin is currently not needed, then the
         long initialisation can just be skipped.
         """
-        file = apt.apt_pkg.Config.find_file("Dir::Cache::pkgcache")
+        file = apt.apt_pkg.config.find_file("Dir::Cache::pkgcache")
         return dict(timestamp = os.path.getmtime(file))
 
     def init(self, info, progress):
diff --git a/plugins/sizes.py b/plugins/sizes.py
index d0c79bb..26da747 100644
--- a/plugins/sizes.py
+++ b/plugins/sizes.py
@@ -21,7 +21,7 @@ class Sizes:
         the timestamp shows that this plugin is currently not needed, then the
         long initialisation can just be skipped.
         """
-        file = apt.apt_pkg.Config.find_file("Dir::Cache::pkgcache")
+        file = apt.apt_pkg.config.find_file("Dir::Cache::pkgcache")
         return dict(
                 timestamp = os.path.getmtime(file),
                 values = [
-- 
1.7.0

From cf4739d617d2b0a4311aae25f3e24f51ea5e1dbe Mon Sep 17 00:00:00 2001
From: Julian Andres Klode <[email protected]>
Date: Mon, 1 Mar 2010 12:19:41 +0100
Subject: [PATCH 2/2] plugins: Import apt_pkg directly instead of using apt.apt_pkg.

---
 plugins/apttags.py      |    4 ++--
 plugins/descriptions.py |    3 ++-
 plugins/sections.py     |    3 ++-
 plugins/sizes.py        |    3 ++-
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/plugins/apttags.py b/plugins/apttags.py
index b8b221d..ecf4501 100644
--- a/plugins/apttags.py
+++ b/plugins/apttags.py
@@ -1,6 +1,6 @@
 # Add debtags tags to the index
 
-import re, os, os.path, apt
+import re, os, os.path, apt, apt_pkg
 
 DEBTAGSDB = "/var/lib/debtags/package-tags"
 
@@ -25,7 +25,7 @@ class AptTags:
         """
         self.re_expand = re.compile(r"\b([^{]+)\{([^}]+)\}")
         self.re_split = re.compile(r"\s*,\s*")
-        file = apt.apt_pkg.config.find_file("Dir::Cache::pkgcache")
+        file = apt_pkg.config.find_file("Dir::Cache::pkgcache")
         return dict(timestamp = os.path.getmtime(file))
 
     def init(self, info, progress):
diff --git a/plugins/descriptions.py b/plugins/descriptions.py
index 6126e64..fb892a7 100644
--- a/plugins/descriptions.py
+++ b/plugins/descriptions.py
@@ -1,4 +1,5 @@
 import apt
+import apt_pkg
 import xapian
 import re
 import os, os.path
@@ -22,7 +23,7 @@ class Descriptions:
         the timestamp shows that this plugin is currently not needed, then the
         long initialisation can just be skipped.
         """
-        file = apt.apt_pkg.config.find_file("Dir::Cache::pkgcache")
+        file = apt_pkg.config.find_file("Dir::Cache::pkgcache")
         return dict(timestamp = os.path.getmtime(file))
 
     def init(self, info, progress):
diff --git a/plugins/sections.py b/plugins/sections.py
index 197efb9..36801b3 100644
--- a/plugins/sections.py
+++ b/plugins/sections.py
@@ -1,4 +1,5 @@
 import apt
+import apt_pkg
 import xapian
 import os, os.path
 
@@ -21,7 +22,7 @@ class Sections:
         the timestamp shows that this plugin is currently not needed, then the
         long initialisation can just be skipped.
         """
-        file = apt.apt_pkg.config.find_file("Dir::Cache::pkgcache")
+        file = apt_pkg.config.find_file("Dir::Cache::pkgcache")
         return dict(timestamp = os.path.getmtime(file))
 
     def init(self, info, progress):
diff --git a/plugins/sizes.py b/plugins/sizes.py
index 26da747..5d13aec 100644
--- a/plugins/sizes.py
+++ b/plugins/sizes.py
@@ -1,4 +1,5 @@
 import apt
+import apt_pkg
 import xapian
 import os, os.path
 
@@ -21,7 +22,7 @@ class Sizes:
         the timestamp shows that this plugin is currently not needed, then the
         long initialisation can just be skipped.
         """
-        file = apt.apt_pkg.config.find_file("Dir::Cache::pkgcache")
+        file = apt_pkg.config.find_file("Dir::Cache::pkgcache")
         return dict(
                 timestamp = os.path.getmtime(file),
                 values = [
-- 
1.7.0

Attachment: pgpSM4zC9B1An.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: apt-xapian-index
Source-Version: 0.25

We believe that the bug you reported is fixed in the latest version of
apt-xapian-index, which is due to be installed in the Debian FTP archive:

apt-xapian-index_0.25.dsc
  to main/a/apt-xapian-index/apt-xapian-index_0.25.dsc
apt-xapian-index_0.25.tar.gz
  to main/a/apt-xapian-index/apt-xapian-index_0.25.tar.gz
apt-xapian-index_0.25_all.deb
  to main/a/apt-xapian-index/apt-xapian-index_0.25_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Enrico Zini <[email protected]> (supplier of updated apt-xapian-index package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 01 Mar 2010 11:56:55 +0000
Source: apt-xapian-index
Binary: apt-xapian-index
Architecture: source all
Version: 0.25
Distribution: unstable
Urgency: low
Maintainer: Enrico Zini <[email protected]>
Changed-By: Enrico Zini <[email protected]>
Description: 
 apt-xapian-index - maintenance tools for a Xapian index of Debian packages
Closes: 572052
Changes: 
 apt-xapian-index (0.25) unstable; urgency=low
 .
   * Upgrade to the new python-apt API. Thanks Julian Andres Klode for the
     patch. Closes: #572052
Checksums-Sha1: 
 88ecba3fb75ec7d4f7fdf2011e87f43d4eaec1b9 1562 apt-xapian-index_0.25.dsc
 e8daba43cb2f691971ddbe6e4c03af546965e4e9 25043 apt-xapian-index_0.25.tar.gz
 eadbdbae09ddd2e259a03a6a95271a7917ffd1f1 35138 apt-xapian-index_0.25_all.deb
Checksums-Sha256: 
 2db520b49cba20310d438e09d126a81f7a28c0014312fab914c5d314eb613d88 1562 
apt-xapian-index_0.25.dsc
 54123b6c67787ea08688ad368576f4dd9f390a67cdb86d9832555a0273e767f5 25043 
apt-xapian-index_0.25.tar.gz
 ca0ed21d9837ceb691ba4683f8fddd780b9c659fd899ee74c888a12501dd35e5 35138 
apt-xapian-index_0.25_all.deb
Files: 
 56bcea3cb325fc941649f29792f517a4 1562 admin optional apt-xapian-index_0.25.dsc
 14f8731c797f5137fda6ba03865d835d 25043 admin optional 
apt-xapian-index_0.25.tar.gz
 805142415b2e2e7bbce40cb402f03092 35138 admin optional 
apt-xapian-index_0.25_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJLi69zAAoJEB5qw/OH8O2s7J4QAKh+coFEjMlaMtX0qHVu5IXh
iwGhdoGhfIB7LESeaslv/ayHn5TXhu3oYmjKhkH7+0QhKB9yg9jnK8R2q+1epf6U
doIBOTGz/KRDLrvBOu8ZxlyFu5zN4EH/BExUvBQCNQzjgyIDZ42TuO8IPXwHNqpY
4sQdMBlMFCeR1AR4dj++6WjHaMz2QKRTrm74h8ebR4JMOeXGR7hgqgpa+wGSBea0
s7peWApkGkVnwK9Hqf8VUSZ+WGfLqd1k9vh4r7ubgWp9q9tmsshQqKzZRHPrvvup
LWLs2z0MLtjv0alhSEWrnFr/xCEC4e+dHWGju4UzbvrFE3S5oozDieenayppmczu
2FVIIQ5TuD8rGbOCXEKwKL6vR38rd0RG/5YOH/J+QI11JpFt5tc2yRYRdmTpofLG
AE1N2kf7dngP1uzEl0AX1BgJ6i96qL5Zf4htA1ia8DoPff+/VuInuFSHykVa7Kg4
nDt92i4AcBQSeZiAESYq9+X8DFk7zEi3nsrzfy8dwqyw0t/bRF5pkFokAlC/B9Dp
lU1hssZhtNybxwjjXAy7ovpMcuaP4dn+VYDfcz7DkECp7d3bdWnCDahxIs1i8MHP
KcwZi5llCeDEcUB4MGvDrqrsZjysy0v1PO0My9/bIg4bBD3yGWsK7MgEnFwENzFy
oijE8sY2OGsfgFc8O82/
=+wfo
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to