aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
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
parent5c63f8a2494cd74792e1a67b114a90a0a2fdbbcc (diff)
downloadopenembedded-core-contrib-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')
-rw-r--r--meta/classes/autotools.bbclass7
-rw-r--r--meta/classes/cpan.bbclass3
-rw-r--r--meta/classes/cpan_build.bbclass1
-rw-r--r--meta/classes/cross.bbclass4
-rw-r--r--meta/classes/native.bbclass24
-rw-r--r--meta/classes/staging.bbclass62
-rw-r--r--meta/classes/xlibs.bbclass8
7 files changed, 22 insertions, 87 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 20dc72a1df..649e269f3e 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -1,6 +1,3 @@
-# use autotools_stage_all for native packages
-AUTOTOOLS_NATIVE_STAGE_INSTALL = "1"
-
def autotools_dep_prepend(d):
if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1):
return ''
@@ -204,8 +201,4 @@ autotools_stage_all() {
rm -rf ${STAGE_TEMP}
}
-do_stage () {
- autotools_stage_all
-}
-
EXPORT_FUNCTIONS do_configure do_install
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 3b1280c07b..513f0b3ce7 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -31,9 +31,8 @@ cpan_do_compile () {
oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}"
}
-NATIVE_INSTALL_WORKS = "1"
cpan_do_install () {
oe_runmake DESTDIR="${D}" install_vendor
}
-EXPORT_FUNCTIONS do_configure do_compile do_install do_stage
+EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/meta/classes/cpan_build.bbclass b/meta/classes/cpan_build.bbclass
index 944e8d4ac0..dd8d5434d5 100644
--- a/meta/classes/cpan_build.bbclass
+++ b/meta/classes/cpan_build.bbclass
@@ -42,7 +42,6 @@ cpan_build_do_compile () {
perl Build
}
-NATIVE_INSTALL_WORKS = "1"
cpan_build_do_install () {
perl Build install
}
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index b7dbd86c35..de44e99d70 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -50,10 +50,6 @@ do_install () {
oe_runmake 'DESTDIR=${D}' install
}
-do_stage () {
- autotools_stage_all
-}
-
#
# Override the default sysroot staging copy since this won't look like a target system
#
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 9d678fd802..529f1c259d 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -66,25 +66,6 @@ STAGING_DIR_TARGET = ""
SHLIBSDIR = "${STAGING_DIR_NATIVE}/shlibs"
PKG_CONFIG_DIR = "${libdir}/pkgconfig"
-#
-# If changing this function, please make sure packaged-staging.bbclass is
-# updated too
-#
-do_stage_native () {
- # If autotools is active, use the autotools staging function, else
- # use our "make install" equivalent
- if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" == "1" ]
- then
- autotools_stage_all
- else
- oe_runmake install
- fi
-}
-
-do_stage () {
- do_stage_native
-}
-
PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
PKG_CONFIG_SYSROOT_DIR = ""
@@ -93,11 +74,6 @@ ORIG_DEPENDS := "${DEPENDS}"
DEPENDS_virtclass-native ?= "${ORIG_DEPENDS}"
python __anonymous () {
- # If we've a legacy native do_stage, we need to neuter do_install
- stagefunc = bb.data.getVar('do_stage', d, True)
- if (stagefunc.strip() != "do_stage_native" and stagefunc.strip() != "autotools_stage_all") and bb.data.getVar('AUTOTOOLS_NATIVE_STAGE_INSTALL', d, 1) == "1":
- bb.data.setVar("do_install", " :", d)
-
if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
pn = bb.data.getVar("PN", d, True)
depends = bb.data.getVar("DEPENDS_virtclass-native", d, True)
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() {
sysroot_stage_dirs ${D} ${SYSROOT_DESTDIR}
}
-def is_legacy_staging(d):
- stagefunc = bb.data.getVar('do_stage', d, True)
- legacy = True
- if stagefunc is None:
- legacy = False
- elif stagefunc.strip() == "use_do_install_for_stage":
- legacy = False
- elif stagefunc.strip() == "autotools_stage_all":
- legacy = False
- elif stagefunc.strip() == "do_stage_native" and bb.data.getVar('AUTOTOOLS_NATIVE_STAGE_INSTALL', d, 1) == "1":
- legacy = False
- elif bb.data.getVar('NATIVE_INSTALL_WORKS', d, 1) == "1":
- legacy = False
- return legacy
-
do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGET}/${libdir} \
${STAGING_DIR_TARGET}/${includedir} \
${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \
@@ -119,36 +104,31 @@ python do_populate_sysroot () {
pstageactive = (bb.data.getVar("PSTAGING_ACTIVE", d, True) == "1")
lockfile = bb.data.getVar("SYSROOT_LOCK", d, True)
stagefunc = bb.data.getVar('do_stage', d, True)
- legacy = is_legacy_staging(d)
- if legacy:
- bb.data.setVar("SYSROOT_DESTDIR", "", d)
- bb.note("Legacy staging mode for %s" % bb.data.getVar("FILE", d, True))
- lock = bb.utils.lockfile(lockfile)
- bb.build.exec_func('populate_sysroot_prehook', d)
- bb.build.exec_func('do_stage', d)
- for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
- bb.build.exec_func(f, d)
- bb.build.exec_func('populate_sysroot_posthook', d)
- bb.utils.unlockfile(lock)
- else:
- dest = bb.data.getVar('D', d, True)
- sysrootdest = bb.data.expand('${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}', d)
- bb.mkdirhier(sysrootdest)
-
- bb.build.exec_func("sysroot_stage_all", d)
- #os.system('cp -pPR %s/* %s/' % (dest, sysrootdest))
- for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
- bb.build.exec_func(f, d)
- bb.build.exec_func("packagedstaging_fastpath", d)
-
- lock = bb.utils.lockfile(lockfile)
- os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d))
- bb.utils.unlockfile(lock)
+
+ dest = bb.data.getVar('D', d, True)
+ sysrootdest = bb.data.expand('${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}', d)
+ bb.mkdirhier(sysrootdest)
+
+ bb.build.exec_func("sysroot_stage_all", d)
+ #os.system('cp -pPR %s/* %s/' % (dest, sysrootdest))
+ for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
+ bb.build.exec_func(f, d)
+ bb.build.exec_func("packagedstaging_fastpath", d)
+
+ lock = bb.utils.lockfile(lockfile)
+ os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d))
+ bb.utils.unlockfile(lock)
}
+def is_legacy_staging(d):
+ stagefunc = bb.data.getVar('do_stage', d, True)
+ if stagefunc is None:
+ return False
+ return True
+
python () {
if is_legacy_staging(d):
- bb.note("Legacy staging mode for %s" % bb.data.getVar("FILE", d, True))
+ 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))
}
diff --git a/meta/classes/xlibs.bbclass b/meta/classes/xlibs.bbclass
index fc52400b9f..7271d7b029 100644
--- a/meta/classes/xlibs.bbclass
+++ b/meta/classes/xlibs.bbclass
@@ -5,11 +5,3 @@ XLIBS_CVS = "${FREEDESKTOP_CVS}/xlibs"
inherit autotools pkgconfig
-do_stage() {
- oe_runmake install prefix=${STAGING_DIR_HOST}${prefix} \
- bindir=${STAGING_BINDIR} \
- includedir=${STAGING_INCDIR} \
- libdir=${STAGING_LIBDIR} \
- datadir=${STAGING_DATADIR} \
- mandir=${STAGING_DIR_HOST}${mandir}
-}