summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package.bbclass6
-rwxr-xr-xmeta/recipes-devtools/rpm/rpm/pythondeps.sh16
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.0.bb4
3 files changed, 25 insertions, 1 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 3f5c904cf0..a9c510d27c 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1652,6 +1652,12 @@ PACKAGEFUNCS ?= "package_get_auto_pr \
1652 emit_pkgdata" 1652 emit_pkgdata"
1653 1653
1654python do_package () { 1654python do_package () {
1655 # Change the following version to cause sstate to invalidate the package
1656 # cache. This is useful if an item this class depends on changes in a
1657 # way that the output of this class changes. rpmdeps is a good example
1658 # as any change to rpmdeps requires this to be rerun.
1659 # PACKAGE_BBCLASS_VERSION = "1"
1660
1655 packages = (bb.data.getVar('PACKAGES', d, True) or "").split() 1661 packages = (bb.data.getVar('PACKAGES', d, True) or "").split()
1656 if len(packages) < 1: 1662 if len(packages) < 1:
1657 bb.debug(1, "No packages to build, skipping do_package") 1663 bb.debug(1, "No packages to build, skipping do_package")
diff --git a/meta/recipes-devtools/rpm/rpm/pythondeps.sh b/meta/recipes-devtools/rpm/rpm/pythondeps.sh
new file mode 100755
index 0000000000..083b174f17
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/pythondeps.sh
@@ -0,0 +1,16 @@
1#!/bin/sh
2
3[ $# -ge 1 ] || {
4 cat > /dev/null
5 exit 0
6}
7
8case $1 in
9-R|--requires)
10 shift
11 grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python"
12 exit 0
13 ;;
14esac
15
16exit 0
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index b805f7d834..a7b360d64f 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -45,7 +45,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
45DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}" 45DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}"
46extrarpmdeps = "python perl" 46extrarpmdeps = "python perl"
47extrarpmdeps_virtclass-native = "" 47extrarpmdeps_virtclass-native = ""
48PR = "r20" 48PR = "r21"
49 49
50# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed 50# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
51# in order to extract the distribution SRPM into a format we can extract... 51# in order to extract the distribution SRPM into a format we can extract...
@@ -63,6 +63,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex
63 file://rpm-fileclass.patch \ 63 file://rpm-fileclass.patch \
64 file://rpm-canonarch.patch \ 64 file://rpm-canonarch.patch \
65 file://rpm-no-loopmsg.patch \ 65 file://rpm-no-loopmsg.patch \
66 file://pythondeps.sh \
66 " 67 "
67 68
68# file://rpm-autoconf.patch \ 69# file://rpm-autoconf.patch \
@@ -352,6 +353,7 @@ do_install_append() {
352 # Enable Debian style arbitrary tags... 353 # Enable Debian style arbitrary tags...
353 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros 354 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
354 355
356 install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
355 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh 357 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
356 358
357 # Remove unpackaged files (based on list in rpm.spec) 359 # Remove unpackaged files (based on list in rpm.spec)