diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-28 15:44:30 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-29 19:24:22 +0000 |
commit | 29afbb5e1449d03cce34192193dfd9b85d5fb081 (patch) | |
tree | 8fd03efeeab81538d3c9768d8dbb6ca55da399fd /scripts/bitbake-prserv-tool | |
parent | f3ad36d15ccb88f89cb0621593b69b63b47a5358 (diff) | |
download | poky-29afbb5e1449d03cce34192193dfd9b85d5fb081.tar.gz |
scripts/bitbake-prserv-tool: Fix to work with memres bitbake
Deleting data files whilst bitbake is running isn't a great idea.
Make sure memory resident bitbake is stopped if present and make
the file deletions a little more specific and safer too while we're
here.
Note: The cache directory layout is different on older releases (some
are split level) so this won't be a direct backport to some.
(From OE-Core rev: fa3f1f67abae1d90bede2e98bf7293603fd1307c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/bitbake-prserv-tool')
-rwxr-xr-x | scripts/bitbake-prserv-tool | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool index bed97bd8ac..80028342b1 100755 --- a/scripts/bitbake-prserv-tool +++ b/scripts/bitbake-prserv-tool | |||
@@ -17,8 +17,11 @@ help () | |||
17 | clean_cache() | 17 | clean_cache() |
18 | { | 18 | { |
19 | s=`bitbake -e | grep ^CACHE= | cut -f2 -d\"` | 19 | s=`bitbake -e | grep ^CACHE= | cut -f2 -d\"` |
20 | # Stop any active memory resident server | ||
21 | bitbake -m | ||
22 | # Remove cache entries since we want to trigger a full reparse | ||
20 | if [ "x${s}" != "x" ]; then | 23 | if [ "x${s}" != "x" ]; then |
21 | rm -rf ${s} | 24 | rm -f ${s}/bb_cache*.dat.* |
22 | fi | 25 | fi |
23 | } | 26 | } |
24 | 27 | ||
@@ -62,7 +65,7 @@ do_migrate_localcount () | |||
62 | return 1 | 65 | return 1 |
63 | fi | 66 | fi |
64 | 67 | ||
65 | rm -rf $df | 68 | rm -f $df |
66 | clean_cache | 69 | clean_cache |
67 | echo "Exporting LOCALCOUNT to AUTOINCs..." | 70 | echo "Exporting LOCALCOUNT to AUTOINCs..." |
68 | bitbake -R conf/migrate_localcount.conf -p | 71 | bitbake -R conf/migrate_localcount.conf -p |