[Yum-devel] [PATCH] Handle avail_po.returnPrco('strong_requires') in RpmBase.
Zdenek Pavlas
zpavlas at redhat.com
Tue May 15 14:58:31 UTC 2012
> NAK. This will give 0 strong_requires for all available packages.
I see. Thought strong_requires are "additional" requires that
only RPM knows about, but it's a subset of requires actually.
> 1. Get the RPMTAG_REQUIREFLAGS bits into createrepo data, and then
> act on them. This means we'll be giving correct data out, although I'm
> not sure how useful that is ... and doing all this will be annoyingly
> hard (have to change all the repo. metadata ... lol).
AIUI, Yum does not need requireflags when installing packages,
and in all other cases we can just ask RPM. So it's really
not of much use anyway.
> 2. Just make strong_requires == requires, this is kind of hacky ...
> but at least is on the right side of failure (and could be argued to be
> correct anyway, as all the requires are strong ... until the package
> is installed).
I think that would be ok, too.
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index f6df93e..41ed124 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -382,6 +382,8 @@ class YumAvailablePackageSqlite(YumAvailablePackage, PackageObject, RpmBase):
def returnPrco(self, prcotype, printable=False):
+ if prcotype == 'strong_requires':
+ prcotype = 'requires'
prcotype = _share_data(prcotype)
if isinstance(self.prco[prcotype], tuple):
sql = "SELECT name, version, release, epoch, flags " \
"FROM %s WHERE pkgKey = ?" % prcotype
More information about the Yum-devel
mailing list