summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-06-11 13:18:55 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-12 11:10:35 +0100
commit75c302ca809d25fdf7e0a3d803aefd0b846c4f54 (patch)
tree3d20070a0890579e20de226e2cc941c862a6b04d /meta/recipes-devtools/rpm/rpm
parentb81d788c799a576dd1dc0db573639df69d91afef (diff)
downloadast2050-yocto-poky-75c302ca809d25fdf7e0a3d803aefd0b846c4f54.zip
ast2050-yocto-poky-75c302ca809d25fdf7e0a3d803aefd0b846c4f54.tar.gz
package_rpm: Add capability to directly query packageorigin
Add functionality to RPM to directly query the packageorigin (path) from the resolver database, instead of having to do this via an indirect method. This results in a minor performance improvement. (From OE-Core rev: a8ff3141fd78442bf328c9d3a489db88ad27486b) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch b/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
new file mode 100644
index 0000000..3c6dad4
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
@@ -0,0 +1,23 @@
+Add the ability to query the packageorigin
+
+Written by jbj at rpm5.org
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.8/rpmdb/hdrfmt.c
+===================================================================
+--- rpm-5.4.8.orig/rpmdb/hdrfmt.c
++++ rpm-5.4.8/rpmdb/hdrfmt.c
+@@ -2403,8 +2403,10 @@ static int pkgoriginTag(Header h, HE_t
+ int rc = 1;
+
+ he->tag = RPMTAG_PACKAGEORIGIN;
+- if (!headerGet(h, he, HEADERGET_NOEXTENSION)
+- && (origin = headerGetOrigin(h)) != NULL)
++ /* XXX two sources for tag data: what search precedence? */
++ if (headerGet(h, he, HEADERGET_NOEXTENSION))
++ rc = 0;
++ else if ((origin = headerGetOrigin(h)) != NULL)
+ {
+ he->t = RPM_STRING_TYPE;
+ he->p.str = xstrdup(origin);
OpenPOWER on IntegriCloud