summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-07-29 15:03:45 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-30 14:41:45 +0100
commit049aaa0233ae0a6e62298a09071337f34f9effb6 (patch)
treef2576e574b8630cd840e114dee8b885cce470211
parentab37f53c7ba4487cbb67e831abd5f5fc80608d29 (diff)
downloadpoky-049aaa0233ae0a6e62298a09071337f34f9effb6.tar.gz
staging: Remove now unused legacy staging code
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/classes/packaged-staging.bbclass33
-rw-r--r--meta/classes/staging.bbclass25
2 files changed, 3 insertions, 55 deletions
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass
index fe4d938709..650d38bee4 100644
--- a/meta/classes/packaged-staging.bbclass
+++ b/meta/classes/packaged-staging.bbclass
@@ -288,31 +288,6 @@ python packagedstage_stampfixing_eventhandler() {
288 return NotHandled 288 return NotHandled
289} 289}
290 290
291populate_sysroot_preamble () {
292 if [ "$PSTAGING_ACTIVE" = "1" ]; then
293 stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true
294 fi
295}
296
297populate_sysroot_postamble () {
298 if [ "$PSTAGING_ACTIVE" = "1" ]; then
299 # list the packages currently installed in staging
300 # ${PSTAGE_LIST_CMD} | awk '{print $1}' > ${PSTAGE_WORKDIR}/installed-list
301
302 # exitcode == 5 is ok, it means the files change
303 set +e
304 stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u -d ${PSTAGE_TMPDIR_STAGE}/sysroots
305 exitcode=$?
306 if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
307 exit $exitcode
308 fi
309 if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
310 exit $exitcode
311 fi
312 set -e
313 fi
314}
315
316packagedstaging_fastpath () { 291packagedstaging_fastpath () {
317 if [ "$PSTAGING_ACTIVE" = "1" ]; then 292 if [ "$PSTAGING_ACTIVE" = "1" ]; then
318 mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/ 293 mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/
@@ -321,14 +296,6 @@ packagedstaging_fastpath () {
321} 296}
322 297
323do_populate_sysroot[dirs] =+ "${PSTAGE_DIR}" 298do_populate_sysroot[dirs] =+ "${PSTAGE_DIR}"
324python populate_sysroot_prehook() {
325 bb.build.exec_func("populate_sysroot_preamble", d)
326}
327
328python populate_sysroot_posthook() {
329 bb.build.exec_func("populate_sysroot_postamble", d)
330}
331
332 299
333staging_packager () { 300staging_packager () {
334 301
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 0b2e457a93..4f398652be 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -1,10 +1,3 @@
1python populate_sysroot_prehook () {
2 return
3}
4
5python populate_sysroot_posthook () {
6 return
7}
8 1
9packagedstaging_fastpath () { 2packagedstaging_fastpath () {
10 : 3 :
@@ -81,6 +74,7 @@ do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGE
81 ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \ 74 ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \
82 ${STAGING_INCDIR_NATIVE} \ 75 ${STAGING_INCDIR_NATIVE} \
83 ${STAGING_DATADIR} \ 76 ${STAGING_DATADIR} \
77 ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET} \
84 ${S} ${B}" 78 ${S} ${B}"
85 79
86# Could be compile but populate_sysroot and do_install shouldn't run at the same time 80# Could be compile but populate_sysroot and do_install shouldn't run at the same time
@@ -101,33 +95,20 @@ python do_populate_sysroot () {
101 # Otherwise setup a destdir, copy the results from do_install 95 # Otherwise setup a destdir, copy the results from do_install
102 # and run the staging preprocess against that 96 # and run the staging preprocess against that
103 # 97 #
104 pstageactive = (bb.data.getVar("PSTAGING_ACTIVE", d, True) == "1")
105 lockfile = bb.data.getVar("SYSROOT_LOCK", d, True)
106 stagefunc = bb.data.getVar('do_stage', d, True)
107
108 dest = bb.data.getVar('D', d, True)
109 sysrootdest = bb.data.expand('${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}', d)
110 bb.mkdirhier(sysrootdest)
111 98
112 bb.build.exec_func("sysroot_stage_all", d) 99 bb.build.exec_func("sysroot_stage_all", d)
113 #os.system('cp -pPR %s/* %s/' % (dest, sysrootdest))
114 for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split(): 100 for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
115 bb.build.exec_func(f, d) 101 bb.build.exec_func(f, d)
116 bb.build.exec_func("packagedstaging_fastpath", d) 102 bb.build.exec_func("packagedstaging_fastpath", d)
117 103
104 lockfile = bb.data.getVar("SYSROOT_LOCK", d, True)
118 lock = bb.utils.lockfile(lockfile) 105 lock = bb.utils.lockfile(lockfile)
119 os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d)) 106 os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d))
120 bb.utils.unlockfile(lock) 107 bb.utils.unlockfile(lock)
121} 108}
122 109
123def is_legacy_staging(d):
124 stagefunc = bb.data.getVar('do_stage', d, True)
125 if stagefunc is None:
126 return False
127 return True
128
129python () { 110python () {
130 if is_legacy_staging(d): 111 if bb.data.getVar('do_stage', d, True) is not None:
131 bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with Poky" % bb.data.getVar("FILE", d, True)) 112 bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with Poky" % bb.data.getVar("FILE", d, True))
132} 113}
133 114