rpm/missingok.diff

31 lines
917 B
Diff
Raw Normal View History

support missingok dependency bit
--- ./lib/depends.c.orig 2011-02-15 13:10:59.000000000 +0000
+++ ./lib/depends.c 2011-05-10 16:06:39.000000000 +0000
@@ -448,8 +448,13 @@ retry:
}
unsatisfied:
- rc = 1; /* dependency is unsatisfied */
- rpmdsNotify(dep, NULL, rc);
+ if (rpmdsFlags(dep) & RPMSENSE_MISSINGOK) {
+ rc = 0; /* dependency is unsatisfied, but just a hint. */
+ rpmdsNotify(dep, _("(hint skipped)"), rc);
+ } else {
+ rc = 1; /* dependency is unsatisfied */
+ rpmdsNotify(dep, NULL, rc);
+ }
exit:
return rc;
--- ./lib/rpmds.h.orig 2011-05-10 16:09:22.000000000 +0000
+++ ./lib/rpmds.h 2011-05-10 16:08:04.000000000 +0000
@@ -68,6 +68,7 @@ typedef rpmFlags rpmsenseFlags;
RPMSENSE_SCRIPT_POSTUN | \
RPMSENSE_SCRIPT_VERIFY | \
RPMSENSE_FIND_REQUIRES | \
+ RPMSENSE_MISSINGOK | \
RPMSENSE_RPMLIB | \
RPMSENSE_KEYRING | \
RPMSENSE_PRETRANS | \