summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/backend/yumpkgmgr.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/backend/yumpkgmgr.py b/plugins/backend/yumpkgmgr.py
index 8603da3..1673639 100644
--- a/plugins/backend/yumpkgmgr.py
+++ b/plugins/backend/yumpkgmgr.py
@@ -454,6 +454,23 @@ class Yum(BackendPlugin, yum.YumBase):
msger.disable_logstderr()
def getVcsInfo(self):
+ if self.__pkgs_vcsinfo:
+ return self.__pkgs_vcsinfo
+ if not self.ts:
+ self.__initialize_transaction()
+ mi = self.ts.dbMatch()
+ for hdr in mi:
+ lname = misc.RPM_FMT % {
+ 'name': hdr['name'],
+ 'arch': hdr['arch'],
+ 'version': hdr['version'],
+ 'release': hdr['release']
+ }
+ try:
+ self.__pkgs_vcsinfo[lname] = hdr['VCS']
+ except KeyError:
+ self.__pkgs_vcsinfo[lname] = None
+
return self.__pkgs_vcsinfo
def getAllContent(self):