summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package_rpm.bbclass18
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch23
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb3
3 files changed, 34 insertions, 10 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 35928abb91..097fa1227a 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -130,12 +130,12 @@ resolve_package_rpm () {
130 shift 130 shift
131 local pkg_name="" 131 local pkg_name=""
132 for solve in `cat ${conffile}`; do 132 for solve in `cat ${conffile}`; do
133 pkg_name=$(${RPM} -D "_dbpath $solve" -D "__dbi_txn create nofsync" -q --yaml $@ | grep -i 'Packageorigin' | cut -d : -f 2) 133 pkg_name=$(${RPM} -D "_dbpath $solve" -D "__dbi_txn create nofsync" -q --qf "%{packageorigin}\n" "$@" | grep -v "is not installed" || true)
134 if [ -n "$pkg_name" ]; then 134 if [ -n "$pkg_name" -a "$pkg_name" != "(none)" ]; then
135 echo $pkg_name
135 break; 136 break;
136 fi 137 fi
137 done 138 done
138 echo $pkg_name
139} 139}
140 140
141# rpm common command and options 141# rpm common command and options
@@ -401,9 +401,9 @@ package_install_internal_rpm () {
401 401
402 # Now that we have a solution, pull out a list of what to install... 402 # Now that we have a solution, pull out a list of what to install...
403 echo "Manifest: ${target_rootfs}/install/install.manifest" 403 echo "Manifest: ${target_rootfs}/install/install.manifest"
404 ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --yaml \ 404 ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
405 -D "__dbi_txn create nofsync private" \ 405 -D "__dbi_txn create nofsync private" \
406 | grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/install_solution.manifest 406 > ${target_rootfs}/install/install_solution.manifest
407 407
408 touch ${target_rootfs}/install/install_multilib_solution.manifest 408 touch ${target_rootfs}/install/install_multilib_solution.manifest
409 409
@@ -421,9 +421,9 @@ package_install_internal_rpm () {
421 421
422 # Now that we have a solution, pull out a list of what to install... 422 # Now that we have a solution, pull out a list of what to install...
423 echo "Manifest: ${target_rootfs}/install/install_multilib.manifest" 423 echo "Manifest: ${target_rootfs}/install/install_multilib.manifest"
424 ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --yaml \ 424 ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
425 -D "__dbi_txn create nofsync private" \ 425 -D "__dbi_txn create nofsync private" \
426 | grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/install_multilib_solution.manifest 426 > ${target_rootfs}/install/install_multilib_solution.manifest
427 427
428 fi 428 fi
429 429
@@ -478,9 +478,9 @@ EOF
478 -U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \ 478 -U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
479 ${target_rootfs}/install/initial_install.manifest 479 ${target_rootfs}/install/initial_install.manifest
480 480
481 ${RPM} -D "_dbpath ${target_rootfs}/initial" -qa --yaml \ 481 ${RPM} -D "_dbpath ${target_rootfs}/initial" -qa --qf "%{packageorigin}\n" \
482 -D "__dbi_txn create nofsync private" \ 482 -D "__dbi_txn create nofsync private" \
483 | grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/initial_solution.manifest 483 > ${target_rootfs}/install/initial_solution.manifest
484 484
485 rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest 485 rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest
486 486
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 @@
1Add the ability to query the packageorigin
2
3Written by jbj at rpm5.org
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7Index: 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"
43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" 43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
44 44
45DEPENDS = "libpcre attr acl popt ossp-uuid file" 45DEPENDS = "libpcre attr acl popt ossp-uuid file"
46PR = "r41" 46PR = "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
75SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" 76SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"