]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
scripts/bitbake-prserv-tool: Fix to work with memres bitbake
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 28 Jan 2023 15:44:30 +0000 (15:44 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 29 Jan 2023 19:22:54 +0000 (19:22 +0000)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/bitbake-prserv-tool

index bed97bd8ac36bb5237e8dc17ed8482c9d63cbcc9..80028342b167a9e3a19b5fe8f19a53cf645dfd98 100755 (executable)
@@ -17,8 +17,11 @@ help ()
 clean_cache()
 {
     s=`bitbake -e | grep ^CACHE= | cut -f2 -d\"`
+    # Stop any active memory resident server
+    bitbake -m
+    # Remove cache entries since we want to trigger a full reparse
     if [ "x${s}" != "x" ]; then
-        rm -rf ${s}
+        rm -f ${s}/bb_cache*.dat.*
     fi
 }
 
@@ -62,7 +65,7 @@ do_migrate_localcount ()
         return 1
     fi
 
-    rm -rf $df
+    rm -f $df
     clean_cache
     echo "Exporting LOCALCOUNT to AUTOINCs..."
     bitbake -R conf/migrate_localcount.conf -p