Patchwork [2/2] rpmresolve: fix reporting of multiple matches error

login
register
mail settings
Submitter Paul Eggleton
Date Oct. 3, 2012, 12:37 p.m.
Message ID <fff585d226978ede378b506d85b296ea2b5abeb4.1349267792.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/37697/
State Accepted
Commit c26542eb4e8707b9639ec309a44809a728839db8
Headers show

Comments

Paul Eggleton - Oct. 3, 2012, 12:37 p.m.
We were mistakenly writing what was meant to go to stderr into the
output file, so when the "Multiple matches" error showed we weren't
actually seeing the matches printed.

Also change the wording of the "Unable to find package..." to "Unable
to resolve package..." instead so that it makes more sense if it is
printed after the "Multiple matches" error.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c |    6 +++---
 meta/recipes-devtools/rpm/rpmresolve_1.0.bb       |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
index 3613ee5..4e9d055 100644
--- a/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
+++ b/meta/recipes-devtools/rpm/rpmresolve/rpmresolve.c
@@ -185,7 +185,7 @@  int processPackages(rpmts *ts, int tscount, const char *packagelistfn, int ignor
                                 char *value = NULL;
                                 rc = getPackageStr(ts[i], keys[keyindex], RPMTAG_PACKAGEORIGIN, &value);
                                 if(rc == 0)
-                                    fprintf(outf, "  %s\n", value);
+                                    fprintf(stderr, "  %s\n", value);
                                 else
                                     fprintf(stderr, "  (%s)\n", keys[keyindex]);
                             }
@@ -197,10 +197,10 @@  int processPackages(rpmts *ts, int tscount, const char *packagelistfn, int ignor
 
                 if( !found ) {
                     if( ignoremissing ) {
-                        fprintf(stderr, "unable to find package %s - ignoring\n", line);
+                        fprintf(stderr, "Unable to resolve package %s - ignoring\n", line);
                     }
                     else {
-                        fprintf(stderr, "unable to find package %s\n", line);
+                        fprintf(stderr, "Unable to resolve package %s\n", line);
                         missing = 1;
                     }
                 }
diff --git a/meta/recipes-devtools/rpm/rpmresolve_1.0.bb b/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
index 3ce4369..ea542e1 100644
--- a/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
+++ b/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
@@ -4,7 +4,7 @@  DESCRIPTION = "OpenEmbedded RPM resolver - performs RPM database lookups in batc
 DEPENDS = "rpm"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "file://rpmresolve.c"