summaryrefslogtreecommitdiff
path: root/package/rpm/rpm-5.2.0_parentdir-vs-requires.patch
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-01-18 12:34:02 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2010-01-18 12:34:02 +0100
commit54729d498af886d933c38f5d79337cc525e665a8 (patch)
tree4c81ffa1ac6e3ac9be0251af374128f0acfaf4a7 /package/rpm/rpm-5.2.0_parentdir-vs-requires.patch
parent55f591ed1d45b8eb756d66cfa5459e1527e48cc5 (diff)
parentf16a9799b65214ffe1b07372676386e31ad51801 (diff)
Merge branch 'rpm-update3' of git://git.busybox.net/~nkukard/git/buildroot
Diffstat (limited to 'package/rpm/rpm-5.2.0_parentdir-vs-requires.patch')
-rw-r--r--package/rpm/rpm-5.2.0_parentdir-vs-requires.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/package/rpm/rpm-5.2.0_parentdir-vs-requires.patch b/package/rpm/rpm-5.2.0_parentdir-vs-requires.patch
new file mode 100644
index 000000000..309ab254e
--- /dev/null
+++ b/package/rpm/rpm-5.2.0_parentdir-vs-requires.patch
@@ -0,0 +1,37 @@
+Avoid looking up files or directories that this package provides
+Included upstream
+diff -u --new-file --recursive rpm-5.2.0_vanilla/lib/depends.c rpm-5.2.0_parentdir-vs-requires/lib/depends.c
+--- rpm-5.2.0_vanilla/lib/depends.c 2009-05-23 01:23:46.000000000 +0000
++++ rpm-5.2.0_parentdir-vs-requires/lib/depends.c 2009-09-22 17:00:24.880956271 +0000
+@@ -2095,6 +2095,7 @@
+ rpmtsi qi; rpmte q;
+ tsortInfo tsi;
+ nsType NSType = rpmdsNSType(requires);
++ const char * N = rpmdsN(requires);
+ fnpyKey key;
+ int teType = rpmteType(p);
+ alKey pkgKey;
+@@ -2128,6 +2129,23 @@
+ break;
+ }
+
++ /* Avoid looking up files/directories that are "owned" by _THIS_ package. */
++ if (*N == '/') {
++ rpmfi fi = rpmteFI(p, RPMTAG_BASENAMES);
++ int bingo = 0;
++
++ fi = rpmfiInit(fi, 0);
++ while (rpmfiNext(fi) >= 0) {
++ const char * fn = rpmfiFN(fi);
++ if (strcmp(N, fn))
++ continue;
++ bingo = 1;
++ break;
++ }
++ if (bingo)
++ return 0;
++ }
++
+ pkgKey = RPMAL_NOMATCH;
+ key = rpmalSatisfiesDepend(al, requires, &pkgKey);
+