summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/conf/local.conf.sample2
-rw-r--r--meta/classes/packaged-staging.bbclass24
-rw-r--r--meta/conf/bitbake.conf1
3 files changed, 15 insertions, 12 deletions
diff --git a/build/conf/local.conf.sample b/build/conf/local.conf.sample
index fea0a1828a..149c73d664 100644
--- a/build/conf/local.conf.sample
+++ b/build/conf/local.conf.sample
@@ -1,5 +1,7 @@
1# Where to cache the files Poky downloads 1# Where to cache the files Poky downloads
2DL_DIR ?= "${OEROOT}/sources" 2DL_DIR ?= "${OEROOT}/sources"
3# Where to cache Poky's built staging output
4PSTAGE_DIR ?= "${OEROOT}/pstage"
3BBFILES += "\ 5BBFILES += "\
4 ${OEROOT}/meta/packages/*/*.bb \ 6 ${OEROOT}/meta/packages/*/*.bb \
5 ${OEROOT}/meta-moblin/packages/*/*.bb" 7 ${OEROOT}/meta-moblin/packages/*/*.bb"
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass
index cdee42256e..74855c4ab3 100644
--- a/meta/classes/packaged-staging.bbclass
+++ b/meta/classes/packaged-staging.bbclass
@@ -17,7 +17,8 @@ PSTAGE_EXTRAPATH ?= ""
17PSTAGE_PKGPATH = "${DISTRO}/${OELAYOUT_ABI}${PSTAGE_EXTRAPATH}" 17PSTAGE_PKGPATH = "${DISTRO}/${OELAYOUT_ABI}${PSTAGE_EXTRAPATH}"
18PSTAGE_PKGPN = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d).replace('_', '-')}" 18PSTAGE_PKGPN = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d).replace('_', '-')}"
19PSTAGE_PKGNAME = "${PSTAGE_PKGPN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk" 19PSTAGE_PKGNAME = "${PSTAGE_PKGPN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk"
20PSTAGE_PKG = "${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}" 20PSTAGE_PKG = "${PSTAGE_DIR}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}"
21PSTAGE_WORKDIR = "${TMPDIR}/pstage"
21 22
22PSTAGE_NATIVEDEPENDS = "\ 23PSTAGE_NATIVEDEPENDS = "\
23 shasum-native \ 24 shasum-native \
@@ -69,8 +70,7 @@ python () {
69 bb.data.setVar("PSTAGING_ACTIVE", "0", d) 70 bb.data.setVar("PSTAGING_ACTIVE", "0", d)
70} 71}
71 72
72DEPLOY_DIR_PSTAGE ?= "${DEPLOY_DIR}/pstage" 73PSTAGE_MACHCONFIG = "${PSTAGE_WORKDIR}/opkg.conf"
73PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/opkg.conf"
74 74
75PSTAGE_PKGMANAGER = "stage-manager-ipkg" 75PSTAGE_PKGMANAGER = "stage-manager-ipkg"
76 76
@@ -141,7 +141,7 @@ do_clean_prepend() {
141staging_helper () { 141staging_helper () {
142 # Assemble appropriate opkg.conf 142 # Assemble appropriate opkg.conf
143 conffile=${PSTAGE_MACHCONFIG} 143 conffile=${PSTAGE_MACHCONFIG}
144 mkdir -p ${DEPLOY_DIR_PSTAGE}/pstaging_lists 144 mkdir -p ${PSTAGE_WORKDIR}/pstaging_lists
145 if [ ! -e $conffile ]; then 145 if [ ! -e $conffile ]; then
146 ipkgarchs="${BUILD_SYS}" 146 ipkgarchs="${BUILD_SYS}"
147 priority=1 147 priority=1
@@ -263,24 +263,24 @@ python packagedstage_stampfixing_eventhandler() {
263 263
264populate_sysroot_preamble () { 264populate_sysroot_preamble () {
265 if [ "$PSTAGING_ACTIVE" = "1" ]; then 265 if [ "$PSTAGING_ACTIVE" = "1" ]; then
266 stage-manager -p ${STAGING_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-staging -u || true 266 stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true
267 stage-manager -p ${CROSS_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-cross -u || true 267 stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u || true
268 fi 268 fi
269} 269}
270 270
271populate_sysroot_postamble () { 271populate_sysroot_postamble () {
272 if [ "$PSTAGING_ACTIVE" = "1" ]; then 272 if [ "$PSTAGING_ACTIVE" = "1" ]; then
273 # list the packages currently installed in staging 273 # list the packages currently installed in staging
274 # ${PSTAGE_LIST_CMD} | awk '{print $1}' > ${DEPLOY_DIR_PSTAGE}/installed-list 274 # ${PSTAGE_LIST_CMD} | awk '{print $1}' > ${PSTAGE_WORKDIR}/installed-list
275 275
276 # exitcode == 5 is ok, it means the files change 276 # exitcode == 5 is ok, it means the files change
277 set +e 277 set +e
278 stage-manager -p ${STAGING_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-staging -u -d ${PSTAGE_TMPDIR_STAGE}/sysroots 278 stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u -d ${PSTAGE_TMPDIR_STAGE}/sysroots
279 exitcode=$? 279 exitcode=$?
280 if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then 280 if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
281 exit $exitcode 281 exit $exitcode
282 fi 282 fi
283 stage-manager -p ${CROSS_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-cross -u -d ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH} 283 stage-manager -p ${CROSS_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-cross -u -d ${PSTAGE_TMPDIR_STAGE}/cross/${BASE_PACKAGE_ARCH}
284 if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then 284 if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
285 exit $exitcode 285 exit $exitcode
286 fi 286 fi
@@ -297,7 +297,7 @@ packagedstaging_fastpath () {
297 fi 297 fi
298} 298}
299 299
300do_populate_sysroot[dirs] =+ "${DEPLOY_DIR_PSTAGE}" 300do_populate_sysroot[dirs] =+ "${PSTAGE_DIR}"
301python populate_sysroot_prehook() { 301python populate_sysroot_prehook() {
302 bb.build.exec_func("populate_sysroot_preamble", d) 302 bb.build.exec_func("populate_sysroot_preamble", d)
303} 303}
@@ -310,7 +310,7 @@ python populate_sysroot_posthook() {
310staging_packager () { 310staging_packager () {
311 311
312 mkdir -p ${PSTAGE_TMPDIR_STAGE}/CONTROL 312 mkdir -p ${PSTAGE_TMPDIR_STAGE}/CONTROL
313 mkdir -p ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH} 313 mkdir -p ${PSTAGE_DIR}/${PSTAGE_PKGPATH}
314 314
315 echo "Package: ${PSTAGE_PKGPN}" > ${PSTAGE_TMPDIR_STAGE}/CONTROL/control 315 echo "Package: ${PSTAGE_PKGPN}" > ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
316 echo "Version: ${PSTAGE_PKGVERSION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control 316 echo "Version: ${PSTAGE_PKGVERSION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
@@ -335,7 +335,7 @@ staging_packager () {
335 sed -i -e s:${STAGING_DIR}:FIXMESTAGINGDIR:g $i 335 sed -i -e s:${STAGING_DIR}:FIXMESTAGINGDIR:g $i
336 done 336 done
337 337
338 ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH} 338 ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${PSTAGE_DIR}/${PSTAGE_PKGPATH}
339} 339}
340 340
341staging_package_installer () { 341staging_package_installer () {
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 37b428905a..2e8af0ab50 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -616,6 +616,7 @@ require conf/abi_version.conf
616################################################################## 616##################################################################
617 617
618DL_DIR ?= "${TMPDIR}/downloads" 618DL_DIR ?= "${TMPDIR}/downloads"
619PSTAGE_DIR ?= "${TMPDIR}/pstage"
619IMAGE_FSTYPES ?= "tar.gz" 620IMAGE_FSTYPES ?= "tar.gz"
620PCMCIA_MANAGER ?= "pcmcia-cs" 621PCMCIA_MANAGER ?= "pcmcia-cs"
621DEFAULT_TASK_PROVIDER ?= "task-base" 622DEFAULT_TASK_PROVIDER ?= "task-base"