From 3aaf50270475e0a2a5fc8e7783e2f8917f8ac327 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 7 Sep 2010 13:34:02 +0200 Subject: cherry pick -r453 from lp:~mvo/python-apt/debian-sid --- python/cache.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/cache.cc b/python/cache.cc index e87d73d4..cd51fcc3 100644 --- a/python/cache.cc +++ b/python/cache.cc @@ -573,8 +573,9 @@ static PyGetSetDef PackageGetSet[] = { {"rev_depends_list",PackageGetRevDependsList,0, "An apt_pkg.DependencyList object of all reverse dependencies."}, {"provides_list",PackageGetProvidesList,0, - "Ignore it, it does nothing. You want to use\n" - "apt_pkg.Version.provides_list instead."}, + "A list of all packages providing this package. The list contains\n" + "tuples in the format (providesname, providesver, version)\n" + "where 'version' is an apt_pkg.Version object."}, {"selected_state",PackageGetSelectedState,0, "The state of the selection, which can be compared against the constants\n" "SELSTATE_DEINSTALL, SELSTATE_HOLD, SELSTATE_INSTALL, SELSTATE_PURGE,\n" -- cgit v1.2.3 From 0a6326c9776eec69eb6222f0d215aa42587c8a8a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 7 Sep 2010 13:45:28 +0200 Subject: cherry pick from debian-sid --- apt/debfile.py | 1 + debian/changelog | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/apt/debfile.py b/apt/debfile.py index eca07d14..7728ed21 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -599,6 +599,7 @@ class DscSrcPackage(DebPackage): self.filename = filename self._depends = [] self._conflicts = [] + self._installed_conflicts = set() self.pkgname = "" self.binaries = [] if self.filename is not None: diff --git a/debian/changelog b/debian/changelog index a1b060e6..bcab48a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,10 @@ python-apt (0.7.97.2) UNRELEASED; urgency=low * apt/debfile: - don't fail if we conflict with the pkgs we are reinstalling + [ Michael Vogt ] + * apt/debfile.py: + - add missing init for _installed_conflicts (LP: #618597) + -- Michael Vogt Fri, 27 Aug 2010 11:22:23 +0200 python-apt (0.7.97) UNRELEASED; urgency=low -- cgit v1.2.3 From fc2a74a4863095c3ac87b1569675054b63a63412 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 7 Sep 2010 13:49:25 +0200 Subject: tests/test_apt_cache.py: fix test --- tests/test_apt_cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index 428060f3..2f74a0bd 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -87,7 +87,8 @@ class TestAptCache(unittest.TestCase): def test_apt_update(self): rootdir = "./data/tmp" - shutil.rmtree(rootdir) + if os.path.exists(rootdir): + shutil.rmtree(rootdir) try: os.makedirs(os.path.join(rootdir, "var/lib/apt/lists/partial")) except OSError, e: -- cgit v1.2.3 From 57c801f9472ac8572110f8958be1089fca6937f1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 7 Sep 2010 13:57:09 +0200 Subject: tests/test_apt_cache.py: reset apt_pkg.config when running the tests --- tests/test_apt_cache.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index 2f74a0bd..a5b52ea3 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -21,6 +21,10 @@ import shutil class TestAptCache(unittest.TestCase): """ test the apt cache """ + def setUp(self): + # reset any config manipulations done in the individual tests + apt_pkg.init_config() + def testAptCache(self): """cache: iterate all packages and all dependencies """ cache = apt.Cache() -- cgit v1.2.3