summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-01-17 16:31:21 +0200
committerMichal Domonkos <mdomonko@redhat.com>2022-07-01 10:52:14 +0200
commit315b30abc46dd14fc155d600b0a533d88a66ba0f (patch)
treedaaae299a68effe8288a6f530645e59bd3876f0a
parent86730dcd206d60556d7e8e847e82eff65ae39cb3 (diff)
downloadrpm-315b30abc46dd14fc155d600b0a533d88a66ba0f.tar.gz
Ignore strong ordering hints from weak dependencies
Most qualifiers make as much sense to weak dependencies as they do for normal dependencies, so we'd like to allow them in packages. Rpmbuild doesn't currently allow them but packages from other implementations may have them anyway. To protect rpm's primary means of dependency loop cutting, don't let weak dependencies inflate the value of pre/post etc dependencies by simply ignoring those flags. (cherry picked from commit d6353c96fed98a8d30d9ebadf4d6a19a5149edee)
-rw-r--r--lib/order.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/order.c b/lib/order.c
index a22f241ab..f56917e2b 100644
--- a/lib/order.c
+++ b/lib/order.c
@@ -94,6 +94,10 @@ static inline int addSingleRelation(rpmte p,
RPMSENSE_SCRIPT_PRE : RPMSENSE_SCRIPT_PREUN;
}
+ /* Avoid loop-breaker inflation from weak dependencies for now */
+ if rpmdsIsWeak(dep)
+ flags = 0;
+
if (reversed) {
rpmte r = p;
p = q;