diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-06-11 13:18:55 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-12 11:10:35 +0100 |
commit | 75c302ca809d25fdf7e0a3d803aefd0b846c4f54 (patch) | |
tree | 3d20070a0890579e20de226e2cc941c862a6b04d /meta/recipes-devtools/rpm | |
parent | b81d788c799a576dd1dc0db573639df69d91afef (diff) | |
download | 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')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch | 23 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.4.9.bb | 3 |
2 files changed, 25 insertions, 1 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 0000000000..3c6dad4d50 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Add the ability to query the packageorigin | ||
2 | |||
3 | Written by jbj at rpm5.org | ||
4 | |||
5 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
6 | |||
7 | Index: rpm-5.4.8/rpmdb/hdrfmt.c | ||
8 | =================================================================== | ||
9 | --- rpm-5.4.8.orig/rpmdb/hdrfmt.c | ||
10 | +++ rpm-5.4.8/rpmdb/hdrfmt.c | ||
11 | @@ -2403,8 +2403,10 @@ static int pkgoriginTag(Header h, HE_t | ||
12 | int rc = 1; | ||
13 | |||
14 | he->tag = RPMTAG_PACKAGEORIGIN; | ||
15 | - if (!headerGet(h, he, HEADERGET_NOEXTENSION) | ||
16 | - && (origin = headerGetOrigin(h)) != NULL) | ||
17 | + /* XXX two sources for tag data: what search precedence? */ | ||
18 | + if (headerGet(h, he, HEADERGET_NOEXTENSION)) | ||
19 | + rc = 0; | ||
20 | + else if ((origin = headerGetOrigin(h)) != NULL) | ||
21 | { | ||
22 | he->t = RPM_STRING_TYPE; | ||
23 | he->p.str = xstrdup(origin); | ||
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb index 2ca0f58ff0..a38a684ff4 100644 --- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb | |||
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1" | |||
43 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" | 43 | LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" |
44 | 44 | ||
45 | DEPENDS = "libpcre attr acl popt ossp-uuid file" | 45 | DEPENDS = "libpcre attr acl popt ossp-uuid file" |
46 | PR = "r41" | 46 | PR = "r42" |
47 | 47 | ||
48 | # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed | 48 | # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed |
49 | # in order to extract the distribution SRPM into a format we can extract... | 49 | # in order to extract the distribution SRPM into a format we can extract... |
@@ -70,6 +70,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex | |||
70 | file://rpm-macros.patch \ | 70 | file://rpm-macros.patch \ |
71 | file://rpm-lua.patch \ | 71 | file://rpm-lua.patch \ |
72 | file://rpm-ossp-uuid.patch \ | 72 | file://rpm-ossp-uuid.patch \ |
73 | file://rpm-packageorigin.patch \ | ||
73 | " | 74 | " |
74 | 75 | ||
75 | SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" | 76 | SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" |