summaryrefslogtreecommitdiffstats
path: root/meta/classes/staging.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-07-22 11:27:13 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-22 11:44:28 +0100
commitdc807f54f858419f97e211cd62fd2d30db9a80de (patch)
tree59adc7578ccccd566b5db07ed2a8e764c30510d8 /meta/classes/staging.bbclass
parent5c63f8a2494cd74792e1a67b114a90a0a2fdbbcc (diff)
downloadpoky-dc807f54f858419f97e211cd62fd2d30db9a80de.tar.gz
Finally deprecate all legacy do_stage functions. This changes the existing warning
into a fatal error if any legacy do_stage functions are found. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/staging.bbclass')
-rw-r--r--meta/classes/staging.bbclass62
1 files changed, 21 insertions, 41 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index b771b92fae..0b2e457a93 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -76,21 +76,6 @@ sysroot_stage_all() {
76 sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR} 76 sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR}
77} 77}
78 78
79def is_legacy_staging(d):
80 stagefunc = bb.data.getVar('do_stage', d, True)
81 legacy = True
82 if stagefunc is None:
83 legacy = False
84 elif stagefunc.strip() == "use_do_install_for_stage":
85 legacy = False
86 elif stagefunc.strip() == "autotools_stage_all":
87 legacy = False
88 elif stagefunc.strip() == "do_stage_native" and bb.data.getVar('AUTOTOOLS_NATIVE_STAGE_INSTALL', d, 1) == "1":
89 legacy = False
90 elif bb.data.getVar('NATIVE_INSTALL_WORKS', d, 1) == "1":
91 legacy = False
92 return legacy
93
94do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGET}/${libdir} \ 79do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGET}/${libdir} \
95 ${STAGING_DIR_TARGET}/${includedir} \ 80 ${STAGING_DIR_TARGET}/${includedir} \
96 ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \ 81 ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \
@@ -119,36 +104,31 @@ python do_populate_sysroot () {
119 pstageactive = (bb.data.getVar("PSTAGING_ACTIVE", d, True) == "1") 104 pstageactive = (bb.data.getVar("PSTAGING_ACTIVE", d, True) == "1")
120 lockfile = bb.data.getVar("SYSROOT_LOCK", d, True) 105 lockfile = bb.data.getVar("SYSROOT_LOCK", d, True)
121 stagefunc = bb.data.getVar('do_stage', d, True) 106 stagefunc = bb.data.getVar('do_stage', d, True)
122 legacy = is_legacy_staging(d) 107
123 if legacy: 108 dest = bb.data.getVar('D', d, True)
124 bb.data.setVar("SYSROOT_DESTDIR", "", d) 109 sysrootdest = bb.data.expand('${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}', d)
125 bb.note("Legacy staging mode for %s" % bb.data.getVar("FILE", d, True)) 110 bb.mkdirhier(sysrootdest)
126 lock = bb.utils.lockfile(lockfile) 111
127 bb.build.exec_func('populate_sysroot_prehook', d) 112 bb.build.exec_func("sysroot_stage_all", d)
128 bb.build.exec_func('do_stage', d) 113 #os.system('cp -pPR %s/* %s/' % (dest, sysrootdest))
129 for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split(): 114 for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
130 bb.build.exec_func(f, d) 115 bb.build.exec_func(f, d)
131 bb.build.exec_func('populate_sysroot_posthook', d) 116 bb.build.exec_func("packagedstaging_fastpath", d)
132 bb.utils.unlockfile(lock) 117
133 else: 118 lock = bb.utils.lockfile(lockfile)
134 dest = bb.data.getVar('D', d, True) 119 os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d))
135 sysrootdest = bb.data.expand('${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}', d) 120 bb.utils.unlockfile(lock)
136 bb.mkdirhier(sysrootdest)
137
138 bb.build.exec_func("sysroot_stage_all", d)
139 #os.system('cp -pPR %s/* %s/' % (dest, sysrootdest))
140 for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
141 bb.build.exec_func(f, d)
142 bb.build.exec_func("packagedstaging_fastpath", d)
143
144 lock = bb.utils.lockfile(lockfile)
145 os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d))
146 bb.utils.unlockfile(lock)
147} 121}
148 122
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
149python () { 129python () {
150 if is_legacy_staging(d): 130 if is_legacy_staging(d):
151 bb.note("Legacy staging mode for %s" % bb.data.getVar("FILE", d, True)) 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))
152} 132}
153 133
154 134