aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-11-08 21:23:20 +0100
committerPatrick Ohly <patrick.ohly@intel.com>2016-12-08 14:12:56 +0100
commitf4279241025a28873e1ec9741861129d6c521ce2 (patch)
treebc25f1f1e2fb0a35c528192114f91640df006b09
parent7c7b11c209f5d24c42c30767928142206840da36 (diff)
downloadmeta-swupd-f4279241025a28873e1ec9741861129d6c521ce2.tar.gz
meta-swupd-f4279241025a28873e1ec9741861129d6c521ce2.tar.bz2
meta-swupd-f4279241025a28873e1ec9741861129d6c521ce2.zip
do_swupd_update: pseudo database under deploy directory
Putting the database under the deploy directory automatically makes it specific to the OS_VERSION and removing the deploy directory also removes the corresponding pseudo database, thus ensuring a clean rebuild with a single command. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-rw-r--r--classes/swupd-image.bbclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/classes/swupd-image.bbclass b/classes/swupd-image.bbclass
index 4e03c1a..dc1144d 100644
--- a/classes/swupd-image.bbclass
+++ b/classes/swupd-image.bbclass
@@ -366,8 +366,12 @@ END
# Activate pseudo explicitly for all following commands which need it.
# We use a database that is specific to the OS_VERSION, because that
# avoids (potential?) performance degradation that might occur when
- # the same database is used for a growing number of files.
- PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR}/meta-swupd-${OS_VERSION} ${FAKEROOTCMD}"
+ # the same database is used for a growing number of files. Placing
+ # it inside the swupd deploy dir ensures that it gets wiped out
+ # together with that.
+ PSEUDO_LOCALSTATEDIR=${DEPLOY_DIR_SWUPD}/image/${OS_VERSION}.pseudo
+ rm -rf $PSEUDO_LOCALSTATEDIR
+ PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=$PSEUDO_LOCALSTATEDIR ${FAKEROOTCMD}"
# Unpack the input rootfs dir(s) for use with the swupd tools. Might have happened
# already in a previous run of this task.