summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-10-07 00:34:07 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-10-07 00:34:07 +0000
commit2f8521c6d1173dd650d9ae2bba8c18e690fa3b1f (patch)
tree06bc2b997b60797bc42f696f3427f92890089d2b /classes/base.bbclass
parent0d0bf315513039bd8560ac91865c7174e789d675 (diff)
parent6e90aae26efa66553063b74b9afa9563b70fb982 (diff)
merge of '603b2d0c7e4ad80e5779bd3bbdb822331cc0ea2b'
and '6ab53da82d157971966f5a17d0c29d54df22cac9'
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass83
1 files changed, 15 insertions, 68 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 9998982bd1..999d409914 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -374,6 +374,9 @@ oe_machinstall() {
fi
}
+# Remove and re-create ${D} so that is it guaranteed to be empty
+do_install[cleandirs] = "${D}"
+
addtask listtasks
do_listtasks[nostamp] = "1"
python do_listtasks() {
@@ -482,8 +485,11 @@ python base_do_fetch() {
(type,host,path,_,_,_) = bb.decodeurl(url)
uri = "%s://%s%s" % (type,host,path)
try:
- if not base_chk_file(parser, pn, pv,uri, localpath, d):
- bb.note("%s-%s-%s has no section, not checking URI" % (pn,pv,uri))
+ if not base_chk_file(parser, pn, pv,uri, localpath, d):
+ if type != "file":
+ bb.note("%s-%s: %s has no entry in conf/checksums.ini, not checking URI" % (pn,pv,uri))
+ else:
+ bb.debug("%s-%s: %s has no entry in conf/checksums.ini, not checking URI" % (pn,pv,uri))
except Exception:
raise bb.build.FuncFailed("Checksum of '%s' failed" % uri)
}
@@ -573,10 +579,6 @@ python base_do_unpack() {
local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata)
except bb.MalformedUrl, e:
raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
- # dont need any parameters for extraction, strip them off
- # RP: Insane. localpath shouldn't have parameters
- # RP: Scehdule for removal with bitbake 1.8.8
- local = re.sub(';.*$', '', local)
local = os.path.realpath(local)
ret = oe_unpack_file(local, localdata, url)
if not ret:
@@ -681,7 +683,8 @@ do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${T
${STAGING_DATADIR} \
${S} ${B}"
-addtask populate_staging after do_package_write
+# Could be compile but populate_staging and do_install shouldn't run at the same time
+addtask populate_staging after do_install
python do_populate_staging () {
bb.build.exec_func('do_stage', d)
@@ -724,7 +727,7 @@ def explode_deps(s):
def packaged(pkg, d):
import os, bb
- return os.access(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), os.R_OK)
+ return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK)
def read_pkgdatafile(fn):
pkgdata = {}
@@ -750,23 +753,23 @@ def read_pkgdatafile(fn):
def has_subpkgdata(pkg, d):
import bb, os
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d)
+ fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
return os.access(fn, os.R_OK)
def read_subpkgdata(pkg, d):
import bb, os
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d)
+ fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
return read_pkgdatafile(fn)
def has_pkgdata(pn, d):
import bb, os
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d)
+ fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d)
return os.access(fn, os.R_OK)
def read_pkgdata(pn, d):
import bb, os
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d)
+ fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d)
return read_pkgdatafile(fn)
python read_subpackage_metadata () {
@@ -847,7 +850,6 @@ def base_after_parse(d):
paths = []
for p in [ "${PF}", "${P}", "${PN}", "files", "" ]:
- paths.append(bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d))
path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)
if os.path.isdir(path):
paths.append(path)
@@ -864,65 +866,10 @@ def base_after_parse(d):
bb.data.setVar('PACKAGE_ARCH', "${MACHINE_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)
}
-# Remove me when we switch to bitbake 1.8.8
-def base_get_srcrev(d):
- import bb
-
- if hasattr(bb.fetch, "get_srcrev"):
- return bb.fetch.get_srcrev(d)
- return "NOT IMPLEMENTED"
-
# Patch handling
inherit patch