Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [RC Fixes 13/19] Update python dependencies to be simply to "python"
Date: Wed, 21 Sep 2011 02:39:29 -0700	[thread overview]
Message-ID: <870d78888ddf98705ab9c4e1a3025c23bc2d6a37.1316597628.git.sgw@linux.intel.com> (raw)
In-Reply-To: <cover.1316597628.git.sgw@linux.intel.com>
In-Reply-To: <cover.1316597628.git.sgw@linux.intel.com>

From: Mark Hatle <mark.hatle@windriver.com>

Previously python dependencies were of the format "python(abi) = ..."
This format is not yet supportable within OE, so revert to a form
we know we can handle.

Introduce a change to package.bbclass that ensures it will causes the
sstate-cache's "package" to invalidate.  Since pythondeps changed, the
output of rpmdeps changes, which causes the per-file dependency
information to change.... thus we need to invalidate the cache!

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/package.bbclass                |    6 ++++++
 meta/recipes-devtools/rpm/rpm/pythondeps.sh |   16 ++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.0.bb      |    4 +++-
 3 files changed, 25 insertions(+), 1 deletions(-)
 create mode 100755 meta/recipes-devtools/rpm/rpm/pythondeps.sh

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 3f5c904..e581ae2 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1,3 +1,9 @@
+# Change the following version to cause sstate to invalidate the package
+# cache.  This is useful if an item this class depends on changes in a
+# way that the output of this class changes.  rpmdeps is a good example
+# as any change to rpmdeps requires this to be rerun.
+PACKAGE_BBCLASS_VERSION = "r1"
+
 #
 # Packaging process
 #
diff --git a/meta/recipes-devtools/rpm/rpm/pythondeps.sh b/meta/recipes-devtools/rpm/rpm/pythondeps.sh
new file mode 100755
index 0000000..083b174
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/pythondeps.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+[ $# -ge 1 ] || {
+    cat > /dev/null
+    exit 0
+}
+
+case $1 in
+-R|--requires)
+    shift
+    grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python"
+    exit 0
+    ;;
+esac
+
+exit 0
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index b805f7d..a7b360d 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"
 DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}"
 extrarpmdeps = "python perl"
 extrarpmdeps_virtclass-native = ""
-PR = "r20"
+PR = "r21"
 
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # 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
 	   file://rpm-fileclass.patch \
 	   file://rpm-canonarch.patch \
 	   file://rpm-no-loopmsg.patch \
+	   file://pythondeps.sh \
 	  "
 
 #	   file://rpm-autoconf.patch \
@@ -352,6 +353,7 @@ do_install_append() {
 	# Enable Debian style arbitrary tags...
 	sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
 
+	install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
 	install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
 
 	# Remove unpackaged files (based on list in rpm.spec)
-- 
1.7.6




  parent reply	other threads:[~2011-09-21  9:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21  9:39 [RC Fixes 00/19] Fixes for Multi-Lib & other patches Saul Wold
2011-09-21  9:39 ` [RC Fixes 01/19] scripts/combo-layer: fix still overzealous regex in default hook script Saul Wold
2011-09-21  9:39 ` [RC Fixes 02/19] deb packages support: switch from /var/dpkg to /var/lib/dpkg Saul Wold
2011-09-21  9:39 ` [RC Fixes 03/19] libzypp: git repo moved to github Saul Wold
2011-09-21  9:39 ` [RC Fixes 04/19] sat-solver: " Saul Wold
2011-09-21  9:39 ` [RC Fixes 05/19] zypper: " Saul Wold
2011-09-21  9:39 ` [RC Fixes 06/19] distrodata: fix distro_check code Saul Wold
2011-09-21  9:39 ` [RC Fixes 07/19] distro tracking: Update Distro Aliases Saul Wold
2011-09-21 10:35   ` Koen Kooi
2011-09-21  9:39 ` [RC Fixes 08/19] avahi: Refactor recipe to move UI to avahi-ui Saul Wold
2011-09-21  9:39 ` [RC Fixes 09/19] rpm: add multilib prefix for archs under deploy/rpm Saul Wold
2011-09-21  9:39 ` [RC Fixes 10/19] multilib: install MULTILIB_IMAGE_INSTALL Saul Wold
2011-09-21  9:39 ` [RC Fixes 11/19] Fix RPM dependencies Saul Wold
2011-09-21  9:39 ` [RC Fixes 12/19] Add a run-time dependency that eglibc support GNU_HASH Saul Wold
2011-09-21  9:39 ` Saul Wold [this message]
2011-09-21  9:39 ` [RC Fixes 14/19] busybox: Enhance to add dynamic per-file provides Saul Wold
2011-09-21  9:39 ` [RC Fixes 15/19] multilib_global.bbclass: Fix non-multilib package provides Saul Wold
2011-09-21  9:39 ` [RC Fixes 16/19] Fix alsa-utils package dependencies Saul Wold
2011-09-21  9:39 ` [RC Fixes 17/19] oprofileui: Change avahi to avahi-ui depends Saul Wold
2011-09-21  9:39 ` [RC Fixes 18/19] libpng: avoid dangling link in libpng package Saul Wold
2011-09-21  9:39 ` [RC Fixes 19/19] libpng: add libpng12-dev packages Saul Wold
2011-09-21 12:44 ` [RC Fixes 00/19] Fixes for Multi-Lib & other patches Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=870d78888ddf98705ab9c4e1a3025c23bc2d6a37.1316597628.git.sgw@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox