summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
blob: d272fe9cff27cb489553a1ffd9b1cb3e4225903d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
lib/rpmts.c: Ensure that we check both providename and filepaths

When looking up a missing dependencies, such as /bin/sh, we need to lookup
in both the providename and filepaths DB, not just the filepaths DB.

Upstream-Status: Pending

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>

--- rpm-5.4.0.orig/lib/rpmts.c	2010-12-27 16:08:25.000000000 -0600
+++ rpm-5.4.0/lib/rpmts.c	2012-04-12 15:01:12.990184067 -0500
@@ -403,8 +403,8 @@
 	if (sdb == NULL)
 	    continue;
 
-	/* Look for a matching Provides: in suggested universe. */
-	rpmtag = (*keyp == '/' ? RPMTAG_FILEPATHS : RPMTAG_PROVIDENAME);
+	rpmtag = RPMTAG_PROVIDENAME;
+       do {
 	mi = rpmmiInit(sdb, rpmtag, keyp, keylen);
 	while ((h = rpmmiNext(mi)) != NULL) {
 	    size_t hnamelen;
@@ -439,6 +439,15 @@
 	    bhnamelen = hnamelen;
 	}
 	mi = rpmmiFree(mi);
+
+	if (bh == NULL && *keyp == '/' && rpmtag == RPMTAG_PROVIDENAME) {
+	   rpmtag = RPMTAG_FILEPATHS;
+	   continue;
+        }
+
+        break;
+      } while (1);
+
     }
 
     /* Is there a suggested resolution? */