44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7.
|
|
|
|
Index: lib/depends.c
|
|
===================================================================
|
|
--- lib/depends.c.orig
|
|
+++ lib/depends.c
|
|
@@ -593,8 +593,13 @@ retry:
|
|
/*@=boundsread@*/
|
|
|
|
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:
|
|
/*
|
|
@@ -963,6 +968,8 @@ static inline /*@observer@*/ const char
|
|
return "Requires(postun):";
|
|
if (f & RPMSENSE_SCRIPT_VERIFY)
|
|
return "Requires(verify):";
|
|
+ if (f & RPMSENSE_MISSINGOK)
|
|
+ return "Requires(hint):";
|
|
if (f & RPMSENSE_FIND_REQUIRES)
|
|
return "Requires(auto):";
|
|
return "Requires:";
|
|
Index: lib/rpmlib.h
|
|
===================================================================
|
|
--- lib/rpmlib.h.orig
|
|
+++ lib/rpmlib.h
|
|
@@ -548,6 +548,7 @@ typedef enum rpmsenseFlags_e {
|
|
RPMSENSE_SCRIPT_POSTUN | \
|
|
RPMSENSE_SCRIPT_VERIFY | \
|
|
RPMSENSE_FIND_REQUIRES | \
|
|
+ RPMSENSE_MISSINGOK | \
|
|
RPMSENSE_SCRIPT_PREP | \
|
|
RPMSENSE_SCRIPT_BUILD | \
|
|
RPMSENSE_SCRIPT_INSTALL | \
|