]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes: Various staging improvement fixups
authorRichard Purdie <rpurdie@linux.intel.com>
Tue, 3 Nov 2009 22:02:34 +0000 (22:02 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 13 Nov 2009 12:15:23 +0000 (12:15 +0000)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/autotools.bbclass
meta/classes/base.bbclass
meta/classes/packaged-staging.bbclass

index bd88184a7410e142a37ce8222120ae1095b510e9..4946222f78a3ed35d7464dcdf7e3ec61ab4dd9e4 100644 (file)
@@ -170,14 +170,13 @@ autotools_stage_includes() {
 }
 
 autotools_stage_dir() {
-       sysroot_stage_dir $1 ${STAGE_TEMP_PREFIX}$2
+       sysroot_stage_dir $1 ${STAGE_TEMP_PREFIX}$2
 }
 
 autotools_stage_libdir() {
        sysroot_stage_libdir $1 ${STAGE_TEMP_PREFIX}$2
 }
 
-
 autotools_stage_all() {
        if [ "${INHIBIT_AUTO_STAGE}" = "1" ]
        then
@@ -186,8 +185,11 @@ autotools_stage_all() {
        rm -rf ${STAGE_TEMP}
        mkdir -p ${STAGE_TEMP}
        oe_runmake DESTDIR="${STAGE_TEMP}" install
-
+       rm -rf ${STAGE_TEMP}/${mandir} || true
+       rm -rf ${STAGE_TEMP}/${infodir} || true
        sysroot_stage_dirs ${STAGE_TEMP} ${STAGE_TEMP_PREFIX}
+       rm -rf ${STAGE_TEMP}
 }
 
 EXPORT_FUNCTIONS do_configure do_install
+
index 086a6d05d05d1cb4723a2c7776a5e6abee8c5471..f0142add3b2faa7fbeaf2037af830cda029a27d7 100644 (file)
@@ -626,14 +626,12 @@ base_do_buildall() {
        :
 }
 
-
 def subprocess_setup():
-       import signal
-       # Python installs a SIGPIPE handler by default. This is usually not what
-       # non-Python subprocesses expect.
-       # SIGPIPE errors are known issues with gzip/bash
-       signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+       import signal
+       # Python installs a SIGPIPE handler by default. This is usually not what
+       # non-Python subprocesses expect.
+       # SIGPIPE errors are known issues with gzip/bash
+       signal.signal(signal.SIGPIPE, signal.SIG_DFL)
 
 def oe_unpack_file(file, data, url = None):
        import bb, os, subprocess
@@ -981,6 +979,7 @@ sysroot_stage_all() {
 }
 
 def is_legacy_staging(d):
+    import bb
     stagefunc = bb.data.getVar('do_stage', d, True)
     legacy = True
     if stagefunc is None:
@@ -1016,7 +1015,7 @@ python populate_staging_posthook () {
        return
 }
 
-packagedstageing_fastpath () {
+packagedstaging_fastpath () {
        :
 }
 
@@ -1052,10 +1051,10 @@ python do_populate_staging () {
         #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("packagedstageing_fastpath", d)
+        bb.build.exec_func("packagedstaging_fastpath", d)
 
         lock = bb.utils.lockfile(lockfile)
-        os.system('cp -pPR %s/* /' % (sysrootdest))
+        os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}/* ${STAGING_DIR_TARGET}/', d))
         bb.utils.unlockfile(lock)
 }
 
index 44f657a2c0443b265a91bd99b02188d7c2b29e41..b9d59bbd8ae67944a2ed2e4603a175190f5a3a74 100644 (file)
@@ -297,7 +297,7 @@ populate_staging_postamble () {
        fi
 }
 
-packagedstageing_fastpath () {
+packagedstaging_fastpath () {
        if [ "$PSTAGING_ACTIVE" = "1" ]; then
                mkdir -p ${PSTAGE_TMPDIR_STAGE}/staging/
                mkdir -p ${PSTAGE_TMPDIR_STAGE}/cross/