diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-08-17 14:31:25 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-08-22 16:43:26 +0000 |
commit | 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch) | |
tree | ecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/scripts/wipe-sysroot | |
parent | e18c61205e0234b03697129c20cc69c9b3940efc (diff) | |
download | blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz blackbird-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip |
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to
hold all of the layers that we import with git-subtree.
Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/scripts/wipe-sysroot')
-rwxr-xr-x | import-layers/yocto-poky/scripts/wipe-sysroot | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/scripts/wipe-sysroot b/import-layers/yocto-poky/scripts/wipe-sysroot new file mode 100755 index 000000000..9e067e8df --- /dev/null +++ b/import-layers/yocto-poky/scripts/wipe-sysroot @@ -0,0 +1,54 @@ +#! /bin/sh + +# Wipe out all of the sysroots and all of the stamps that populated it. +# Author: Ross Burton <ross.burton@intel.com> +# +# Copyright (c) 2012 Intel Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +set -e + +if [ $# -gt 0 ]; then + echo "Wipe all sysroots and sysroot-related stamps for the current build directory." >&2 + echo "Usage: $0" >&2 + exit 1 +fi + +ENVS=`mktemp --suffix -wipe-sysroot-envs` +bitbake -p -e > $ENVS + +eval `grep -F SSTATE_MANIFESTS= $ENVS` +eval `grep -F STAGING_DIR= $ENVS` +eval `grep -F STAMPS_DIR= $ENVS` +rm -f $ENVS + +if [ -z "$SSTATE_MANIFESTS" -o -z "$STAGING_DIR" -o -z "$STAMPS_DIR" ]; then + echo "Could not determine SSTATE_MANIFESTS/STAGING_DIR/STAMPS_DIR from bitbake, check above for errors" + exit 1 +fi + +echo "Deleting the sysroots in $STAGING_DIR, and selected stamps in $SSTATE_MANIFESTS and $STAMPS_DIR." + +# The sysroots themselves +rm -rf $STAGING_DIR ${STAGING_DIR}-uninative + +# The stamps that said the sysroot was populated +rm -rf $STAMPS_DIR/*/*/*.do_populate_sysroot.* +rm -rf $STAMPS_DIR/*/*/*.do_populate_sysroot_setscene.* +rm -rf $STAMPS_DIR/*/*/*.do_packagedata.* +rm -rf $STAMPS_DIR/*/*/*.do_packagedata_setscene.* + +# The sstate manifests +rm -rf $SSTATE_MANIFESTS/manifest-*.populate-sysroot |