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
|
|
|
|
2006-12-19 00:17:44 +01:00
|
|
|
--- ./lib/depends.c.orig 2005-12-14 19:51:34.000000000 +0000
|
|
|
|
+++ ./lib/depends.c 2006-01-27 21:05:13.000000000 +0000
|
|
|
|
@@ -581,8 +632,13 @@ retry:
|
|
|
|
/*@=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
|
|
|
/*
|
|
|
|
@@ -975,6 +1082,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:";
|
|
|
|
--- ./lib/rpmlib.h.orig 2005-12-15 14:50:30.000000000 +0000
|
|
|
|
+++ ./lib/rpmlib.h 2006-02-03 13:22:27.000000000 +0000
|
|
|
|
@@ -547,6 +561,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 | \
|