2006-12-19 00:17:44 +01:00
|
|
|
Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7.
|
|
|
|
|
2008-09-12 20:37:28 +02:00
|
|
|
Index: lib/depends.c
|
|
|
|
===================================================================
|
|
|
|
--- lib/depends.c.orig
|
|
|
|
+++ lib/depends.c
|
2009-08-28 15:54:03 +02:00
|
|
|
@@ -518,8 +518,13 @@ retry:
|
|
|
|
}
|
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:
|
|
|
|
/*
|
2009-08-28 15:54:03 +02:00
|
|
|
@@ -827,6 +832,8 @@ static inline const char * identifyDepen
|
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:";
|
2009-08-28 15:54:03 +02:00
|
|
|
Index: lib/rpmds.h
|
2008-09-12 20:37:28 +02:00
|
|
|
===================================================================
|
2009-08-28 15:54:03 +02:00
|
|
|
--- lib/rpmds.h.orig
|
|
|
|
+++ lib/rpmds.h
|
|
|
|
@@ -73,6 +73,7 @@ typedef enum rpmsenseFlags_e {
|
2006-12-19 00:17:44 +01:00
|
|
|
RPMSENSE_SCRIPT_POSTUN | \
|
|
|
|
RPMSENSE_SCRIPT_VERIFY | \
|
|
|
|
RPMSENSE_FIND_REQUIRES | \
|
|
|
|
+ RPMSENSE_MISSINGOK | \
|
|
|
|
RPMSENSE_SCRIPT_PREP | \
|
|
|
|
RPMSENSE_SCRIPT_BUILD | \
|
|
|
|
RPMSENSE_SCRIPT_INSTALL | \
|