Your message dated Sun, 21 Mar 2010 09:17:35 +0000
with message-id <[email protected]>
and subject line Bug#572078: fixed in apt-p2p 0.1.6
has caused the Debian Bug report #572078,
regarding [PATCH] python-apt 0.8 API transition: Please update apt-p2p 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.)
--
572078: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572078
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: apt-p2p
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 a35f5ad13382691b345e6269c99edb6dd57778e1 Mon Sep 17 00:00:00 2001
From: Julian Andres Klode <[email protected]>
Date: Mon, 1 Mar 2010 14:29:19 +0100
Subject: [PATCH] Upgrade to the new python-apt API.
---
apt_p2p/AptPackages.py | 38 +++++++++++++++++++-------------------
debian/control | 2 +-
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/apt_p2p/AptPackages.py b/apt_p2p/AptPackages.py
index f7681a7..1238c65 100644
--- a/apt_p2p/AptPackages.py
+++ b/apt_p2p/AptPackages.py
@@ -282,7 +282,7 @@ class AptPackages:
if self.loaded: return True
# Modify the default configuration to create the fake one.
- apt_pkg.InitSystem()
+ apt_pkg.init_system()
self.cache_dir.preauthChild(self.apt_config['Dir::State']
).preauthChild(self.apt_config['Dir::State::Lists']).remove()
self.cache_dir.preauthChild(self.apt_config['Dir::State']
@@ -312,7 +312,7 @@ class AptPackages:
source_line='deb '+fake_dirname+'/ /'
listpath = self.cache_dir.preauthChild(self.apt_config['Dir::State']
).preauthChild(self.apt_config['Dir::State::Lists']
- ).child(apt_pkg.URItoFileName(fake_uri))
+ ).child(apt_pkg.uri_to_filename(fake_uri))
sources.write(source_line+'\n')
log.msg("Sources line: " + source_line)
sources_count = sources_count + 1
@@ -329,12 +329,12 @@ class AptPackages:
log.msg("Loading Packages database for "+self.cache_dir.path)
for key, value in self.apt_config.items():
- apt_pkg.Config[key] = value
+ apt_pkg.config[key] = value
- self.cache = apt_pkg.GetCache(OpProgress())
- self.records = apt_pkg.GetPkgRecords(self.cache)
+ self.cache = apt_pkg.Cache(OpProgress())
+ self.records = apt_pkg.PackageRecords(self.cache)
if deb_src_added:
- self.srcrecords = apt_pkg.GetPkgSrcRecords()
+ self.srcrecords = apt_pkg.SourceRecords()
else:
self.srcrecords = None
@@ -416,11 +416,11 @@ class AptPackages:
# Check the binary packages
try:
- for version in self.cache[package].VersionList:
- size = version.Size
- for verFile in version.FileList:
- if self.records.Lookup(verFile):
- if '/' + self.records.FileName == path:
+ for version in self.cache[package].version_list:
+ size = version.size
+ for verFile in version.file_list:
+ if self.records.lookup(verFile):
+ if '/' + self.records.filename == path:
h.setFromPkgRecord(self.records, size)
d.callback(h)
return loadResult
@@ -429,9 +429,9 @@ class AptPackages:
# Check the source packages' files
if self.srcrecords:
- self.srcrecords.Restart()
- if self.srcrecords.Lookup(package):
- for f in self.srcrecords.Files:
+ self.srcrecords.restart()
+ if self.srcrecords.lookup(package):
+ for f in self.srcrecords.files:
if path == '/' + f[2]:
h.setFromSrcRecord(f)
d.callback(h)
@@ -478,28 +478,28 @@ class TestAptPackages(unittest.TestCase):
"""Tests loading the binary package records cache."""
self.client._load()
- self.client.records.Lookup(self.client.cache['dpkg'].VersionList[0].FileList[0])
+ self.client.records.lookup(self.client.cache['dpkg'].version_list[0].file_list[0])
pkg_hash = os.popen('grep -A 30 -E "^Package: dpkg$" ' +
'/var/lib/apt/lists/' + self.packagesFile +
' | grep -E "^SHA1:" | head -n 1' +
' | cut -d\ -f 2').read().rstrip('\n')
- self.failUnless(self.client.records.SHA1Hash == pkg_hash,
- "Hashes don't match: %s != %s" % (self.client.records.SHA1Hash, pkg_hash))
+ self.failUnless(self.client.records.sha1_hash == pkg_hash,
+ "Hashes don't match: %s != %s" % (self.client.records.sha1_hash, pkg_hash))
def test_src_hash(self):
"""Tests loading the source package records cache."""
self.client._load()
- self.client.srcrecords.Lookup('dpkg')
+ self.client.srcrecords.lookup('dpkg')
src_hashes = os.popen('grep -A 20 -E "^Package: dpkg$" ' +
'/var/lib/apt/lists/' + self.sourcesFile +
' | grep -A 4 -E "^Files:" | grep -E "^ " ' +
' | cut -d\ -f 2').read().split('\n')[:-1]
- for f in self.client.srcrecords.Files:
+ for f in self.client.srcrecords.files:
self.failUnless(f[0] in src_hashes, "Couldn't find %s in: %r" % (f[0], src_hashes))
def test_index_hash(self):
diff --git a/debian/control b/debian/control
index d594d98..65eb49c 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ XS-Dm-Upload-Allowed: yes
Package: apt-p2p
Architecture: all
-Depends: ${python:Depends}, python-twisted-web2 (>= 8.0), adduser, python-debian (>= 0.1.4), python-apt (>= 0.6.20), python-pysqlite2 (>= 2.1)
+Depends: ${python:Depends}, python-twisted-web2 (>= 8.0), adduser, python-debian (>= 0.1.4), python-apt (>= 0.7.93), python-pysqlite2 (>= 2.1)
Provides: python-apt-p2p, python-apt-p2p-khashmir
Description: apt helper for peer-to-peer downloads of Debian packages
Apt-P2P is a helper for downloading Debian packages files with APT.
--
1.7.0
pgp02sgsjeCzD.pgp
Description: PGP signature
--- End Message ---
--- Begin Message ---
Source: apt-p2p
Source-Version: 0.1.6
We believe that the bug you reported is fixed in the latest version of
apt-p2p, which is due to be installed in the Debian FTP archive:
apt-p2p_0.1.6.dsc
to main/a/apt-p2p/apt-p2p_0.1.6.dsc
apt-p2p_0.1.6.tar.gz
to main/a/apt-p2p/apt-p2p_0.1.6.tar.gz
apt-p2p_0.1.6_all.deb
to main/a/apt-p2p/apt-p2p_0.1.6_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.
Cameron Dale <[email protected]> (supplier of updated apt-p2p 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: SHA1
Format: 1.8
Date: Sun, 21 Mar 2010 00:30:52 -0700
Source: apt-p2p
Binary: apt-p2p
Architecture: source all
Version: 0.1.6
Distribution: unstable
Urgency: low
Maintainer: Cameron Dale <[email protected]>
Changed-By: Cameron Dale <[email protected]>
Description:
apt-p2p - apt helper for peer-to-peer downloads of Debian packages
Closes: 518548 518549 518550 518590 518594 572078
Changes:
apt-p2p (0.1.6) unstable; urgency=low
.
* Update for python-apt 0.8 API transition (Closes: #572078)
* Fix a lot of lintian warnings and errors
- Update standards version to 3.8.4 (no changes)
* Fix various documentation issues
(Closes: #518590, #518549, #518548, 518550)
* Add an enable variable to the /etc/default file (Closes: #518594)
* Use python-debian's new debian package instead of debian_bundle
Checksums-Sha1:
00448819fc0a679ba78d924e2c37184681835b67 953 apt-p2p_0.1.6.dsc
c299cab60ae6b7fcb3afcb2d15368345af4c6b9e 1368683 apt-p2p_0.1.6.tar.gz
310a2285ab5fc4e88a729b32f121ee6fa8d344e8 109416 apt-p2p_0.1.6_all.deb
Checksums-Sha256:
0f61213fe818c7922ef7112e43f4a491c365eee038fe6761bf7ddc48810895ec 953
apt-p2p_0.1.6.dsc
5d5c8433979559df53b30d8c2ddb8f87691af52c640245f396f3c90cf0bbf08a 1368683
apt-p2p_0.1.6.tar.gz
3167c2d0cbdc5c480eca3605d3b7d8b51ca1b5931edd46f3e40c7f68b9fad2da 109416
apt-p2p_0.1.6_all.deb
Files:
98fd3172c2d400fe0e7f7380800f72de 953 net optional apt-p2p_0.1.6.dsc
224deec99802eea3aa24ed0789da3393 1368683 net optional apt-p2p_0.1.6.tar.gz
f6b5d071b8c9d3056120a7619a28d76c 109416 net optional apt-p2p_0.1.6_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkulz44ACgkQDx924g0gNq3d6gCfYPkQx5Ei/MIcrOlc+bUMq1VZ
O9gAoICuYSoB1WMgcZ61ohAfVPPx5tWs
=ZCXH
-----END PGP SIGNATURE-----
--- End Message ---