From bf833994a066cba0917c87105db41aa72ebe713a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 18 Sep 2008 14:53:30 +0200 Subject: * apt/package.py: - do not return None in sourcePackageName (LP: #123062) - add "SelState{Unknown,Install,Hold,DeInstall,Purge}" constants --- apt/package.py | 3 ++- debian/changelog | 4 +++- 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 -- cgit v1.2.3