2006-12-19 00:17:44 +01:00
|
|
|
Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7.
|
2011-05-16 18:07:44 +02:00
|
|
|
|
2008-09-12 20:37:28 +02:00
|
|
|
Index: lib/depends.c
|
|
|
|
===================================================================
|
|
|
|
--- lib/depends.c.orig
|
|
|
|
+++ lib/depends.c
|
|
|
|
@@ -593,8 +593,13 @@ retry:
|
2006-12-19 00:17:44 +01:00
|
|
|
/*@=boundsread@*/
|
2006-12-19 00:17:44 +01:00
|
|
|
|
|
|
|
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:
|
2006-12-19 00:17:44 +01:00
|
|
|
/*
|
2008-09-12 20:37:28 +02:00
|
|
|
@@ -963,6 +968,8 @@ static inline /*@observer@*/ const char
|
2006-12-19 00:17:44 +01:00
|
|
|
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:";
|
2008-09-12 20:37:28 +02:00
|
|
|
Index: lib/rpmlib.h
|
|
|
|
===================================================================
|
|
|
|
--- lib/rpmlib.h.orig
|
|
|
|
+++ lib/rpmlib.h
|
|
|
|
@@ -548,6 +548,7 @@ typedef enum rpmsenseFlags_e {
|
2006-12-19 00:17:44 +01:00
|
|
|
RPMSENSE_SCRIPT_POSTUN | \
|
|
|
|
RPMSENSE_SCRIPT_VERIFY | \
|
|
|
|
RPMSENSE_FIND_REQUIRES | \
|
|
|
|
+ RPMSENSE_MISSINGOK | \
|
2006-12-19 00:17:44 +01:00
|
|
|
RPMSENSE_SCRIPT_PREP | \
|
|
|
|
RPMSENSE_SCRIPT_BUILD | \
|
|
|
|
RPMSENSE_SCRIPT_INSTALL | \
|