[ostree] yocto: Don't overwrite target with initial compose
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] yocto: Don't overwrite target with initial compose
- Date: Sat, 18 Feb 2012 16:56:48 +0000 (UTC)
commit 0a428d2bcedf9ffbf7aa52f14b550678d1e7a563
Author: Colin Walters <walters verbum org>
Date: Sat Feb 18 11:21:17 2012 -0500
yocto: Don't overwrite target with initial compose
The idea of creating the "initial compose" is it should be just that -
initial. If we've later added stuff via ostbuild, we don't want to
overwrite it. ostbuild will itself recompose from the base.
gnomeos/yocto/classes/gnomeos-contents.bbclass | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnomeos/yocto/classes/gnomeos-contents.bbclass b/gnomeos/yocto/classes/gnomeos-contents.bbclass
index f51adec..d84d089 100644
--- a/gnomeos/yocto/classes/gnomeos-contents.bbclass
+++ b/gnomeos/yocto/classes/gnomeos-contents.bbclass
@@ -190,7 +190,10 @@ fakeroot do_rootfs () {
fi
ostree --repo=${repo} commit -s "${IMAGE_LINK_NAME}" --skip-if-unchanged "Build" -b ${base} --tree=tar=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.tar.gz
ostree --repo=${repo} diff "${base}" || true
- ostree --repo=${repo} compose -s "Initial compose" -b ${buildroot} ${base}:/
+ # Create the initial root if it doesn't exist
+ if ! ostree --repo=${repo} rev-parse "${buildroot}" 2>/dev/null; then
+ ostree --repo=${repo} compose -s "Initial compose" -b ${buildroot} ${base}:/
+ fi
}
log_check() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]