summaryrefslogtreecommitdiff
path: root/recipes/rpm/files/missingok.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/rpm/files/missingok.patch')
-rw-r--r--recipes/rpm/files/missingok.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes/rpm/files/missingok.patch b/recipes/rpm/files/missingok.patch
new file mode 100644
index 0000000000..b008c9a02b
--- /dev/null
+++ b/recipes/rpm/files/missingok.patch
@@ -0,0 +1,44 @@
+Obey MISSINGOK flag for dependencies. Backport from rpm-4.4.7.
+
+Index: lib/depends.c
+===================================================================
+--- lib/depends.c.orig 2008-04-01 08:28:22.000000000 +0100
++++ lib/depends.c 2008-09-04 14:09:58.000000000 +0100
+@@ -593,8 +593,13 @@
+ /*@=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 @@
+ 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 2008-09-03 22:22:43.000000000 +0100
++++ lib/rpmlib.h 2008-09-04 15:17:17.000000000 +0100
+@@ -562,6 +562,8 @@
+ RPMSENSE_SCRIPT_POSTUN | \
+ RPMSENSE_SCRIPT_VERIFY | \
+ RPMSENSE_FIND_REQUIRES | \
++ RPMSENSE_MISSINGOK | \
++ RPMSENSE_STRONG | \
+ RPMSENSE_SCRIPT_PREP | \
+ RPMSENSE_SCRIPT_BUILD | \
+ RPMSENSE_SCRIPT_INSTALL | \