package_rpm: don't run against native/cross recipes, explicitly
authorChris Larson <clarson@mvista.com>
Thu, 18 Jun 2009 19:41:50 +0000 (12:41 -0700)
committerChris Larson <clarson@mvista.com>
Wed, 19 Aug 2009 21:54:27 +0000 (14:54 -0700)
In the past, it only avoided adding the rpm-native/fakeroot-native deps if
PACKAGES is empty, but unfortunately some native recipes have PACKAGES set to
non-empty, so let's explicitly check for native/cross.

Signed-off-by: Chris Larson <clarson@mvista.com>
classes/package_rpm.bbclass

index 9755bf1..13cb877 100644 (file)
@@ -210,7 +210,9 @@ python do_package_rpm () {
 
 python () {
     import bb
-    if bb.data.getVar('PACKAGES', d, True) != '':
+    if bb.data.getVar('PACKAGES', d, True) != '' and \
+       not bb.data.inherits_class('native', d) and \
+       not bb.data.inherits_class('cross', d):
         deps = (bb.data.getVarFlag('do_package_write_rpm', 'depends', d) or "").split()
         deps.append('rpm-native:do_populate_staging')
         deps.append('fakeroot-native:do_populate_staging')