summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-29 11:19:22 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-29 12:12:26 +0100
commit97dec8410b071660937fa1f30827a2926c21cca2 (patch)
treee5a6b134ce025bebed4dc32f32fbd11dcd3f8e25 /meta/classes
parentdd28a9c516017cf34c88d491875a61dfaf502d4c (diff)
downloadopenembedded-core-97dec8410b071660937fa1f30827a2926c21cca2.tar.gz
openembedded-core-97dec8410b071660937fa1f30827a2926c21cca2.tar.bz2
openembedded-core-97dec8410b071660937fa1f30827a2926c21cca2.tar.xz
openembedded-core-97dec8410b071660937fa1f30827a2926c21cca2.zip
sstate.bbclass: Update to use SSTATE variables everywhere and remove the now unneeded complicated paths from the sstate files
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sanity.bbclass7
-rw-r--r--meta/classes/sstate.bbclass20
2 files changed, 14 insertions, 13 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 15faa7e43..ef1020b21 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -189,8 +189,13 @@ def check_sanity(e):
f = file(abifile, "w")
f.write(current_abi)
- elif abi == "5" and current_abi != "5":
+ elif abi == "4":
messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n"
+ elif abi == "5" and current_abi == "6":
+ bb.note("Converting staging layout from version 5 to layout version 6")
+ os.system(bb.data.expand("mv ${TMPDIR}/pstagelogs ${TMPDIR}/sstate-control", e.data))
+ f = file(abifile, "w")
+ f.write(current_abi)
elif (abi != current_abi):
# Code to convert from one ABI to another could go here if possible.
messages = messages + "Error, TMPDIR has changed ABI (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index d4e996536..d405aaa75 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -1,15 +1,11 @@
-SSTATE_MANIFESTS = "${TMPDIR}/pstagelogs"
-SSTATE_MANFILEPREFIX = "${SSTATE_MANIFESTS}/manifest-${SSTATE_PKGARCH}-${PN}"
+SSTATE_VERSION = "1"
+SSTATE_MANIFESTS = "${TMPDIR}/sstate-control"
+SSTATE_MANFILEPREFIX = "${SSTATE_MANIFESTS}/manifest-${SSTATE_PKGARCH}-${PN}"
SSTATE_PKGARCH = "${BASE_PACKAGE_ARCH}"
-SSTATE_PKGVERSION = "${PV}-${PR}"
-SSTATE_PKGPN = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d).replace('_', '-')}"
-
-SSTATE_PKGNAME = "${SSTATE_PKGPN}_${SSTATE_PKGVERSION}_${SSTATE_PKGARCH}"
-SSTATE_EXTRAPATH ?= ""
-SSTATE_PKGPATH = "${DISTRO}/${OELAYOUT_ABI}${SSTATE_EXTRAPATH}"
-SSTATE_PKG = "${PSTAGE_DIR}2/${SSTATE_PKGPATH}/${SSTATE_PKGNAME}"
+SSTATE_PKGNAME = "sstate-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}-${PV}-${PR}-${SSTATE_PKGARCH}-${SSTATE_VERSION}"
+SSTATE_PKG = "${SSTATE_DIR}/${SSTATE_PKGNAME}"
SSTATE_SCAN_CMD ?= "find ${SSTATE_BUILDDIR} \( -name "*.la" -o -name "*-config" \) -type f"
@@ -249,11 +245,11 @@ def pstaging_fetch(sstatepkg, d):
import bb.fetch
# only try and fetch if the user has configured a mirror
- if bb.data.getVar('PSTAGE_MIRROR', d) != "":
+ if bb.data.getVar('SSTATE_MIRROR', d) != "":
# Copy the data object and override DL_DIR and SRC_URI
pd = d.createCopy()
- dldir = bb.data.expand("${PSTAGE_DIR}/${SSTATE_PKGPATH}", pd)
- mirror = bb.data.expand("${PSTAGE_MIRROR}/${SSTATE_PKGPATH}/", pd)
+ dldir = bb.data.expand("${SSTATE_DIR}", pd)
+ mirror = bb.data.expand("${SSTATE_MIRROR}/", pd)
srcuri = mirror + os.path.basename(sstatepkg)
bb.data.setVar('DL_DIR', dldir, pd)
bb.data.setVar('SRC_URI', srcuri, pd)