build: fix STAGING_DIR cleaning for packages
This fixes two issues with cleaning package files from STAGING_DIR:
* CleanStaging currently can only remove files and not directories. This
changes CleanStaging to use clean-package.sh, which does remove
directories.
* Because of the way directories are ordered in the staging files list,
clean-package.sh currently tries (and fails) to remove parent
directories before removing subdirectories. This changes
clean-package.sh to process the staging files list in reverse, so that
subdirectories are removed first.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from commit a117093679)
This commit is contained in:
committed by
Jo-Philipp Wich
parent
e6c2f3feb1
commit
b98b55a64f
@@ -14,7 +14,7 @@ cat "$1" | (
|
||||
[ -f "$entry" ] && rm -f $entry
|
||||
done
|
||||
)
|
||||
cat "$1" | (
|
||||
sort -r "$1" | (
|
||||
cd "$2"
|
||||
while read entry; do
|
||||
[ -n "$entry" ] || break
|
||||
|
||||
Reference in New Issue
Block a user