summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass66
1 files changed, 47 insertions, 19 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index aa693cd4c6..d78bd3cec3 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -78,22 +78,9 @@ def base_dep_prepend(d):
# the case where host == build == target, for now we don't work in
# that case though.
#
+ deps = "shasum-native "
if bb.data.getVar('PN', d, True) == "shasum-native":
deps = ""
- else:
- deps = "shasum-native "
-
- # INHIBIT_PATCH_TOOL don't apply the patch tool dependency
- inhibit_patch = (bb.data.getVar("INHIBIT_PATCH_TOOL", d, True) == "1") or False
-
- # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
- # we need that built is the responsibility of the patch function / class, not
- # the application.
- patchdeps = bb.data.getVar("PATCHTOOL", d, 1)
- if patchdeps and not inhibit_patch:
- patchdeps = "%s-native" % patchdeps
- if not patchdeps in bb.data.getVar("PROVIDES", d, 1):
- deps += patchdeps
if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d):
if (bb.data.getVar('HOST_SYS', d, 1) !=
@@ -819,11 +806,6 @@ def base_after_parse(d):
pn = bb.data.getVar('PN', d, 1)
- # OBSOLETE in bitbake 1.7.4
- srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1)
- if srcdate != None:
- bb.data.setVar('SRCDATE', srcdate, d)
-
use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1)
if use_nls != None:
bb.data.setVar('USE_NLS', use_nls, d)
@@ -850,8 +832,54 @@ def base_after_parse(d):
bb.data.setVar('PACKAGE_ARCH', mach_arch, d)
return
+#
+# Various backwards compatibility stuff to be removed
+# when we switch to bitbake 1.8.2+ as a minimum version
+#
+def base_oldbitbake_workarounds(d):
+ import bb
+ from bb import __version__
+ from distutils.version import LooseVersion
+
+ if (LooseVersion(__version__) > "1.8.0"):
+ return
+
+ pn = bb.data.getVar('PN', d, True)
+ srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, True)
+ if srcdate != None:
+ bb.data.setVar('SRCDATE', srcdate, d)
+ depends = bb.data.getVar('DEPENDS', d, False)
+ patchdeps = bb.data.getVar("PATCHTOOL", d, True)
+ if patchdeps:
+ patchdeps = "%s-native " % patchdeps
+ if not patchdeps in bb.data.getVar("PROVIDES", d, True):
+ depends = patchdeps + depends
+ if bb.data.inherits_class('rootfs_ipk', d):
+ depends = "ipkg-native ipkg-utils-native fakeroot-native " + depends
+ if bb.data.inherits_class('rootfs_deb', d):
+ depends = "dpkg-native apt-native fakeroot-native " + depends
+ if bb.data.inherits_class('image', d):
+ depends = "makedevs-native " + depends
+ for type in (bb.data.getVar('IMAGE_FSTYPES', d, True) or "").split():
+ deps = bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or ""
+ if deps:
+ depends = depends + " %s" % deps
+ for dep in (bb.data.getVar('EXTRA_IMAGEDEPENDS', d, True) or "").split():
+ depends = depends + " %s" % dep
+
+ packages = bb.data.getVar('PACKAGES', d, True)
+ if packages != '':
+ if bb.data.inherits_class('package_ipk', d):
+ depends = "ipkg-utils-native " + depends
+ if bb.data.inherits_class('package_deb', d):
+ depends = "dpkg-native " + depends
+ if bb.data.inherits_class('package', d):
+ depends = "${PACKAGE_DEPENDS} fakeroot-native" + depends
+
+ bb.data.setVar('DEPENDS', depends, d)
python () {
+ base_oldbitbake_workarounds(d)
base_after_parse(d)
}