summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/openmoko-base.bbclass2
-rw-r--r--classes/openmoko2.bbclass2
-rw-r--r--classes/packaged-staging.bbclass35
-rw-r--r--classes/qmake_base.bbclass2
-rw-r--r--classes/relocatable.bbclass3
-rw-r--r--classes/utils.bbclass7
6 files changed, 22 insertions, 29 deletions
diff --git a/classes/openmoko-base.bbclass b/classes/openmoko-base.bbclass
index 8cbf7df884..f1ca536c54 100644
--- a/classes/openmoko-base.bbclass
+++ b/classes/openmoko-base.bbclass
@@ -13,7 +13,7 @@ def openmoko_base_get_subdir(d):
SUBDIR = "${@openmoko_base_get_subdir(d)}"
-SRC_URI := "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=${PN};proto=http"
+SRC_URI = "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=${PN};proto=http"
S = "${WORKDIR}/${PN}"
FILES_${PN} += "${datadir}/icons"
diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass
index 233c721ff7..1dfef64963 100644
--- a/classes/openmoko2.bbclass
+++ b/classes/openmoko2.bbclass
@@ -22,7 +22,7 @@ def openmoko_two_get_subdir(d):
LICENSE = "${@openmoko_two_get_license(d)}"
SUBDIR = "${@openmoko_two_get_subdir(d)}"
-SRC_URI := "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=${PN};proto=http"
+SRC_URI = "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=${PN};proto=http"
S = "${WORKDIR}/${PN}"
FILES_${PN} += "${datadir}/icons"
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index 68c973a9c7..8a98940c09 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -28,16 +28,6 @@ PSTAGE_NATIVEDEPENDS = "\
BB_STAMP_WHITELIST = "${PSTAGE_NATIVEDEPENDS}"
-def _package_unlink (f):
- import os, errno
- try:
- os.unlink(f)
- return True
- except OSError, e:
- if e.errno == errno.ENOENT:
- return False
- raise
-
python () {
pstage_allowed = True
@@ -47,7 +37,7 @@ python () {
path = bb.data.getVar('PSTAGE_PKGPATH', d, 1)
path = path + bb.data.getVar('TMPDIR', d, 1).replace('/', '-')
bb.data.setVar('PSTAGE_PKGPATH', path, d)
- scan_cmd = "grep -Irl ${STAGING_DIR} ${PSTAGE_TMDPDIR_STAGE}"
+ scan_cmd = "grep -Irl ${STAGING_DIR} ${PSTAGE_TMPDIR_STAGE}"
bb.data.setVar('PSTAGE_SCAN_CMD', scan_cmd, d)
# PSTAGE_NATIVEDEPENDS lists the packages we need before we can use packaged
@@ -106,7 +96,7 @@ def pstage_manualclean(srcname, destvarname, d):
if (file == "staging.lock"):
continue
filepath = os.path.join(walkroot, file).replace(src, dest)
- _package_unlink(filepath)
+ oe.path.remove(filepath)
def pstage_set_pkgmanager(d):
path = bb.data.getVar("PATH", d, 1)
@@ -148,10 +138,10 @@ do_clean_prepend() {
pstage_cleanpackage(removepkg, d)
stagepkg = bb.data.expand("${PSTAGE_PKG}", d)
- bb.note("Removing staging package %s" % base_path_out(stagepkg, d))
- # Add a wildcard to the end of stagepkg to also get its md5
- # if it's a fetched package
- os.system('rm -rf ' + stagepkg + '*')
+ if os.path.exists(stagepkg):
+ bb.note("Removing staging package %s" % base_path_out(stagepkg, d))
+ oe.path.remove(stagepkg)
+ oe.path.remove(stagepkg + ".md5")
}
staging_helper () {
@@ -270,10 +260,9 @@ python packagestage_scenefunc () {
# Remove the stamps and files we added above
# FIXME - we should really only remove the stamps we added
for fname in glob.glob(stamp + '.*'):
- _package_unlink(fname)
-
- os.system(bb.data.expand("rm -rf ${WORKDIR}/tstage", d))
+ oe.path.remove(fname)
+ oe.path.remove(bb.data.expand("${WORKDIR}/tstage", d))
if stageok:
bb.note("Staging package found, using it for %s." % file)
installcmd = bb.data.getVar("PSTAGE_INSTALL_CMD", d, 1)
@@ -305,9 +294,9 @@ python packagedstage_stampfixing_eventhandler() {
# We're targetting a task which was skipped with packaged staging
# so we need to remove the autogenerated stamps.
for task in taskscovered:
- dir = "%s.do_%s" % (e.stampPrefix[fn], task)
- _package_unlink(dir)
- _package_unlink(stamp)
+ covered = "%s.do_%s" % (e.stampPrefix[fn], task)
+ oe.path.remove(covered)
+ oe.path.remove(stamp)
}
populate_sysroot_preamble () {
@@ -417,7 +406,7 @@ python staging_package_libtoolhack () {
fixmefd = open(fixmefn,"r")
fixmefiles = fixmefd.readlines()
fixmefd.close()
- os.system('rm -f ' + fixmefn)
+ oe.path.remove(fixmefn)
for file in fixmefiles:
os.system("sed -i -e s:FIXMESTAGINGDIR:%s:g %s" % (staging, tmpdir + '/' + file))
except IOError:
diff --git a/classes/qmake_base.bbclass b/classes/qmake_base.bbclass
index 4fbe21f2e1..577c0fab3b 100644
--- a/classes/qmake_base.bbclass
+++ b/classes/qmake_base.bbclass
@@ -1,6 +1,6 @@
OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++"
-QMAKESPEC := "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
+QMAKESPEC = "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
# We override this completely to eliminate the -e normally passed in
EXTRA_OEMAKE = ' MAKEFLAGS= '
diff --git a/classes/relocatable.bbclass b/classes/relocatable.bbclass
index eb5b9e62ed..e4ababa57d 100644
--- a/classes/relocatable.bbclass
+++ b/classes/relocatable.bbclass
@@ -75,7 +75,8 @@ def process_dir (directory, d):
if len(new_rpaths):
args = ":".join(new_rpaths)
#bb.note("Setting rpath for %s to %s" %(fpath,args))
- sub.call([cmd, '-r', args, fpath])
+ oe_system(d, [cmd, '-r', args, fpath], shell=False,
+ stdout=open("/dev/null", "a"))
if perms:
os.chmod(fpath, perms)
diff --git a/classes/utils.bbclass b/classes/utils.bbclass
index 4e352e3b9c..64d6c231ec 100644
--- a/classes/utils.bbclass
+++ b/classes/utils.bbclass
@@ -61,13 +61,16 @@ def oe_popen(d, cmd, **kwargs):
d.setVar("__oe_popen_env", env)
kwargs["env"] = env
+ kwargs["close_fds"] = True
kwargs["preexec_fn"] = subprocess_setup
return Popen(cmd, **kwargs)
-def oe_system(d, cmd):
+def oe_system(d, cmd, **kwargs):
""" Popen based version of os.system. """
- return oe_popen(d, cmd, shell=True).wait()
+ if not "shell" in kwargs:
+ kwargs["shell"] = True
+ return oe_popen(d, cmd, **kwargs).wait()
# for MD5/SHA handling
def base_chk_load_parser(config_paths):