summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2014-09-03 02:04:30 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-03 16:00:28 +0100
commitc7541a25f48bee6e62624495ac1428745f638358 (patch)
tree9d09e460f7980ea4fcdc762126bab7be7e4f791c /meta/recipes-devtools
parent628875eb21e9012564cdb324a422f6ad95c1908f (diff)
downloadpoky-c7541a25f48bee6e62624495ac1428745f638358.tar.gz
rpmresolve: ignore null requires
It is not a problem if a package requires nothing (similar to RDEPENDS is null), for example, these packages depends on nothing: [snip] alsa-conf-base base-files eglibc-binary-localedata-en-us xserver-xf86-config [snip] The rpmresolve-native's algorithm is: ===fake code for pkg in pkg1, pkg2, pkg3: rc = get_req(pkg) return rc ===fake code Suppose of the 3 pkgs requires null: - We are lukcy if pkg1 or pkg2 is null, nothing happend. - We are *not* lukcy if pkg3 is null, and will get the error when "INHERIT += 'buildhistory'": ERROR: Cannot get the package dependencies. Command '/path/to/x86_64-linux/usr/bin/rpmresolve -t /path/to/var/lib/rpm' returned 1: This patch fixes the problem. (From OE-Core rev: 2f234160ff4e9eccd8794a31df851b96328f6b74) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
index 4e9d055f24..7f4caf9886 100644
--- a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
+++ b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
@@ -275,7 +275,13 @@ int printDepList(rpmts *ts, int tscount)
275 char *name = strdup((char *)he->p.ptr); 275 char *name = strdup((char *)he->p.ptr);
276 /* Get its requires */ 276 /* Get its requires */
277 he->tag = RPMTAG_REQUIRENAME; 277 he->tag = RPMTAG_REQUIRENAME;
278 rc = (headerGet(h, he, 0) != 1); 278 if (rc = (headerGet(h, he, 0) != 1)) {
279 if (debugmode) {
280 printf("DEBUG: %s requires null\n", name);
281 }
282 rc = 0;
283 continue;
284 }
279 ARGV_t reqs = (ARGV_t)he->p.ptr; 285 ARGV_t reqs = (ARGV_t)he->p.ptr;
280 /* Get its requireflags */ 286 /* Get its requireflags */
281 he->tag = RPMTAG_REQUIREFLAGS; 287 he->tag = RPMTAG_REQUIREFLAGS;