summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-09-18 14:53:30 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2008-09-18 14:53:30 +0200
commitbf833994a066cba0917c87105db41aa72ebe713a (patch)
tree608a0f55df920e67e5448a8183aa77a48c8c41d5
parent4474bb62bda8087f63a9e35edb2f6fcaa1bd96d1 (diff)
downloadpython-apt-bf833994a066cba0917c87105db41aa72ebe713a.tar.gz
* apt/package.py:
- do not return None in sourcePackageName (LP: #123062) - add "SelState{Unknown,Install,Hold,DeInstall,Purge}" constants
-rw-r--r--apt/package.py3
-rw-r--r--debian/changelog4
2 files changed, 5 insertions, 2 deletions
diff --git a/apt/package.py b/apt/package.py
index 096b1bd1..6300b91a 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -186,7 +186,8 @@ class Package(object):
def sourcePackageName(self):
""" Return the source package name as string """
if not self._lookupRecord():
- return None
+ if not self._lookupRecord(UseCanidate=False):
+ return self._pkg.Name
src = self._records.SourcePkg
if src != "":
return src
diff --git a/debian/changelog b/debian/changelog
index dc9c2501..28335af0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,11 +9,13 @@ python-apt (0.7.8) UNRELEASED; urgency=low
- do not change working dir in debExtractArchive() (LP: #184093)
* apt/cache.py:
- support "in" in apt.Cache() (LP: #251587)
+ * apt/package.py:
+ - do not return None in sourcePackageName (LP: #123062)
* python/progress.cc:
- when pulse() does not return a boolean assume "true"
(thanks to Martin Pitt for telling me about the problem)
* python/apt_pkgmodule.cc:
- add "SelState{Unknown,Install,Hold,DeInstall,Purge}" constants
+ - add "SelState{Unknown,Install,Hold,DeInstall,Purge}" constants
* aptsources/__init__.py, aptsources/distinfo.py:
- run apt_pkg.init() when aptsources gets imported and not
the distinfo function