summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-08-14 15:13:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-16 11:14:33 +0100
commitca367d02fde01bebc37666a05341a91d6b1366cc (patch)
treee857c378268ffbcf99f591277b9968ebacf53989 /scripts
parent969f4edcf939d191b1cc30df668294a66199d4b3 (diff)
downloadpoky-ca367d02fde01bebc37666a05341a91d6b1366cc.tar.gz
wipe-sysroots: don't assume TMPDIR is under BUILDDIR
The previous code used the environment variable BUILDDIR and assumed that TMPDIR was a subdirectory. This often isn't the case, so instead ask bitbake where the directories we're about to delete are. (From OE-Core rev: 29491a72acac81ebb7e9ecfbc9392fbeb9a7ea26) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/wipe-sysroot24
1 files changed, 17 insertions, 7 deletions
diff --git a/scripts/wipe-sysroot b/scripts/wipe-sysroot
index e751a91e92..2d2cbeac8c 100755
--- a/scripts/wipe-sysroot
+++ b/scripts/wipe-sysroot
@@ -18,17 +18,27 @@
18# along with this program; if not, write to the Free Software 18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 20
21if [ -z "$BUILDDIR" ]; then 21set -e
22 echo >&2 "Error: BUILDDIR is not defined, please initialise the build system." 22
23 return 1 23ENVS=`mktemp --suffix -wipe-sysroot-envs`
24bitbake -p -e > $ENVS
25
26eval `grep -F SSTATE_MANIFESTS= $ENVS`
27eval `grep -F STAGING_DIR= $ENVS`
28eval `grep -F STAMPS_DIR= $ENVS`
29rm -f $ENVS
30
31if [ -z "$SSTATE_MANIFESTS" -o -z "$STAGING_DIR" -o -z "$STAMPS_DIR" ]; then
32 echo "Could not determine SSTATE_MANIFESTS/STAGING_DIR/STAMPS_DIR, check above for errors"
33 exit 1
24fi 34fi
25 35
26# The sysroots themselves 36# The sysroots themselves
27rm -rf $BUILDDIR/tmp/sysroots/ 37rm -rf "$STAGING_DIR"
28 38
29# The stamps that said the sysroot was populated 39# The stamps that said the sysroot was populated
30rm -rf $BUILDDIR/tmp/stamps/*/*/*.do_populate_sysroot.* 40rm -rf "$STAMPS_DIR/*/*/*.do_populate_sysroot.*"
31rm -rf $BUILDDIR/tmp/stamps/*/*/*.do_populate_sysroot_setscene.* 41rm -rf "$STAMPS_DIR/*/*/*.do_populate_sysroot_setscene.*"
32 42
33# The sstate manifests 43# The sstate manifests
34rm -rf $BUILDDIR/tmp/sstate-control/manifest-*.populate-sysroot 44rm -rf "$SSTATE_MANIFESTS/manifest-*.populate-sysroot"