]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: Update to use SSTATE variables everywhere and remove the now unneeded...
authorRichard Purdie <rpurdie@linux.intel.com>
Wed, 29 Sep 2010 10:19:22 +0000 (11:19 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 29 Sep 2010 11:12:26 +0000 (12:12 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/sanity.bbclass
meta/classes/sstate.bbclass
meta/conf/abi_version.conf
meta/conf/bitbake.conf
meta/conf/local.conf.sample

index 15faa7e431f12a7be9d925e8e9e866cd22092d8e..ef1020b215f34c7e27d98ea40f67d149bc5277df 100644 (file)
@@ -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)
index d4e996536977714d35336c2909760e9e5f28724f..d405aaa75259e38f6da0211471d425c1119374f5 100644 (file)
@@ -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)
index e679aaa9c3a450358f3a3ecfc06385adf63da53a..3920766a47425818e63b84b846181d9156b19428 100644 (file)
@@ -4,4 +4,4 @@
 # that breaks the format and have been previously discussed on the mailing list 
 # with general agreement from the core team.
 #
-OELAYOUT_ABI = "5"
+OELAYOUT_ABI = "6"
index e2c160685c4d2deefef39ff7cce3f4d3d5ea88d1..c2a211967881b49d425156409a446af2c8c6a42d 100644 (file)
@@ -650,7 +650,7 @@ require conf/abi_version.conf
 ##################################################################
 
 DL_DIR ?= "${TOPDIR}/downloads"
-PSTAGE_DIR ?= "${TOPDIR}/pstage"
+SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
 IMAGE_FSTYPES ?= "tar.gz"
 PCMCIA_MANAGER ?= "pcmcia-cs"
 DEFAULT_TASK_PROVIDER ?= "task-base"
index 8ccdd138cb1781ba43bed80193f42f81cf9a8e28..fa5e3f183f6554c7e59eabf54cbda592cc2ca466 100644 (file)
@@ -5,8 +5,8 @@ CONF_VERSION = "1"
 # location, default it ${TOPDIR}/downloads
 #DL_DIR ?= "${TOPDIR}/downloads"
 # Uncomment and change to cache Poky's built staging output in an alternative
-# location, default ${TOPDIR}/pstage
-#PSTAGE_DIR ?= "${TOPDIR}/pstage"
+# location, default ${TOPDIR}/sstate-cache
+#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
 
 # Uncomment and set to allow bitbake to execute multiple tasks at once.
 # For a quadcore, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
@@ -142,7 +142,7 @@ ENABLE_BINARY_LOCALE_GENERATION = "1"
 
 # Poky can try and fetch packaged-staging packages from a http, https or ftp
 # mirror. Set this variable to the root of a pstage directory on a server.
-#PSTAGE_MIRROR ?= "http://someserver.tld/share/pstage"
+#SSTATE_MIRROR ?= "http://someserver.tld/share/pstage"
 
 # Set IMAGETEST to qemu if you want to build testcases and start 
 # testing in qemu after do_rootfs.