diff options
| author | Michael Vogt <egon@tas> | 2007-03-06 16:23:21 +0100 |
|---|---|---|
| committer | Michael Vogt <egon@tas> | 2007-03-06 16:23:21 +0100 |
| commit | 20f485d22f8dd73854a740814e4bf8bf03953d48 (patch) | |
| tree | 262e9be4bea33602ce39f20cefcd3b8b22afdfef | |
| parent | 711d4f883b99ffdeecdcb2717a214ec589b4ec9f (diff) | |
| parent | 8205cc8ecaae7c60d688498d5d2d1d415879c58c (diff) | |
| download | python-apt-20f485d22f8dd73854a740814e4bf8bf03953d48.tar.gz | |
- support candidateRecord, installedRecord
| -rw-r--r-- | apt/package.py | 15 | ||||
| -rw-r--r-- | debian/changelog | 3 |
2 files changed, 16 insertions, 2 deletions
diff --git a/apt/package.py b/apt/package.py index 4691b482..fec438c0 100644 --- a/apt/package.py +++ b/apt/package.py @@ -236,6 +236,19 @@ class Package(object): return self._records.LongDesc rawDescription = property(rawDescription) + def candidateRecord(self): + " return the full pkgrecord as string of the candidate version " + if not self._lookupRecord(True): + return None + return self._records.Record + candidateRecord = property(candidateRecord) + + def installedRecord(self): + " return the full pkgrecord as string of the installed version " + if not self._lookupRecord(False): + return None + return self._records.Record + installedRecord = property(installedRecord) # depcache states def markedInstall(self): @@ -415,7 +428,7 @@ if __name__ == "__main__": for dep in pkg.candidateDependencies: print ",".join(["%s (%s) (%s) (%s)" % (o.name,o.version,o.relation, o.preDepend) for o in dep.or_dependencies]) print "arch: %s" % pkg.architecture - + print "rec: ",pkg.candidateRecord # now test install/remove import apt diff --git a/debian/changelog b/debian/changelog index 55b4e978..5e648c93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,9 @@ python-apt (0.6.20ubuntu11) feisty; urgency=low * apt/packages.py: - support candidateDependencies, installedDependencies - support pkg.architecture + - support candidateRecord, installedRecord - -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 6 Mar 2007 12:39:35 +0100 + -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 6 Mar 2007 16:22:49 +0100 python-apt (0.6.20ubuntu10) feisty; urgency=low |
