Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] rpmresolve: ignore null requires
@ 2014-09-03  9:04 Robert Yang
  2014-09-03  9:04 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2014-09-03  9:04 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 4c0a9ccbad2889b27b4b1d2ab91215a4bdcca3ce:

  python-numpy: Fix build for mips64 (2014-09-01 18:00:32 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/rpmresolve
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/rpmresolve

Robert Yang (1):
  rpmresolve: ignore null requires

 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] rpmresolve: ignore null requires
  2014-09-03  9:04 [PATCH 0/1] rpmresolve: ignore null requires Robert Yang
@ 2014-09-03  9:04 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2014-09-03  9:04 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
index 4e9d055..7f4caf9 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)
                 char *name = strdup((char *)he->p.ptr);
                 /* Get its requires */
                 he->tag = RPMTAG_REQUIRENAME;
-                rc = (headerGet(h, he, 0) != 1);
+                if (rc = (headerGet(h, he, 0) != 1)) {
+                    if (debugmode) {
+                        printf("DEBUG: %s requires null\n", name);
+                    }
+                    rc = 0;
+                    continue;
+                }
                 ARGV_t reqs = (ARGV_t)he->p.ptr;
                 /* Get its requireflags */
                 he->tag = RPMTAG_REQUIREFLAGS;
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-03  9:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-03  9:04 [PATCH 0/1] rpmresolve: ignore null requires Robert Yang
2014-09-03  9:04 ` [PATCH 1/1] " Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox