summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt/package.py15
-rw-r--r--debian/changelog3
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