mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
rm_work: handle non-existant stamps directory
Since 'build/siggen: Rework stamps functions'[1] the stamps directory for each recipe is only created if there are stamps to be written. Some recipes - such as package-index - only have nostamp tasks so the stamps directory is never created, resulting in the rm_work task trying to cd into a directory that doesn't exist. Resolve this by simply checking the stamps directory exists before trying to delete files in it. [1] bitbake c79ecec580e4c2a141ae483ec0f6448f70593dcf (From OE-Core rev: 80e9b32a000b25420997068543d3631231eb3ccf) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
eb2a1c7830
commit
de5aac2a0b
@@ -57,55 +57,58 @@ do_rm_work () {
|
|||||||
# Change normal stamps into setscene stamps as they better reflect the
|
# Change normal stamps into setscene stamps as they better reflect the
|
||||||
# fact WORKDIR is now empty
|
# fact WORKDIR is now empty
|
||||||
# Also leave noexec stamps since setscene stamps don't cover them
|
# Also leave noexec stamps since setscene stamps don't cover them
|
||||||
cd `dirname ${STAMP}`
|
STAMPDIR=`dirname ${STAMP}`
|
||||||
for i in `basename ${STAMP}`*
|
if test -d $STAMPDIR; then
|
||||||
do
|
cd $STAMPDIR
|
||||||
case $i in
|
for i in `basename ${STAMP}`*
|
||||||
*sigdata*|*sigbasedata*)
|
do
|
||||||
# Save/skip anything that looks like a signature data file.
|
case $i in
|
||||||
;;
|
*sigdata*|*sigbasedata*)
|
||||||
*do_image_complete_setscene*|*do_image_qa_setscene*)
|
# Save/skip anything that looks like a signature data file.
|
||||||
# Ensure we don't 'stack' setscene extensions to these stamps with the sections below
|
;;
|
||||||
;;
|
*do_image_complete_setscene*|*do_image_qa_setscene*)
|
||||||
*do_image_complete*)
|
# Ensure we don't 'stack' setscene extensions to these stamps with the sections below
|
||||||
# Promote do_image_complete stamps to setscene versions (ahead of *do_image* below)
|
;;
|
||||||
mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"`
|
*do_image_complete*)
|
||||||
;;
|
# Promote do_image_complete stamps to setscene versions (ahead of *do_image* below)
|
||||||
*do_image_qa*)
|
mv $i `echo $i | sed -e "s#do_image_complete#do_image_complete_setscene#"`
|
||||||
# Promote do_image_qa stamps to setscene versions (ahead of *do_image* below)
|
;;
|
||||||
mv $i `echo $i | sed -e "s#do_image_qa#do_image_qa_setscene#"`
|
*do_image_qa*)
|
||||||
;;
|
# Promote do_image_qa stamps to setscene versions (ahead of *do_image* below)
|
||||||
*do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*)
|
mv $i `echo $i | sed -e "s#do_image_qa#do_image_qa_setscene#"`
|
||||||
;;
|
;;
|
||||||
*do_addto_recipe_sysroot*)
|
*do_package_write*|*do_rootfs*|*do_image*|*do_bootimg*|*do_write_qemuboot_conf*|*do_build*)
|
||||||
# Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used
|
;;
|
||||||
excludes="$excludes recipe-sysroot-native"
|
*do_addto_recipe_sysroot*)
|
||||||
;;
|
# Preserve recipe-sysroot-native if do_addto_recipe_sysroot has been used
|
||||||
*do_package|*do_package.*|*do_package_setscene.*)
|
excludes="$excludes recipe-sysroot-native"
|
||||||
# We remove do_package entirely, including any
|
;;
|
||||||
# sstate version since otherwise we'd need to leave 'plaindirs' around
|
*do_package|*do_package.*|*do_package_setscene.*)
|
||||||
# such as 'packages' and 'packages-split' and these can be large. No end
|
# We remove do_package entirely, including any
|
||||||
# of chain tasks depend directly on do_package anymore.
|
# sstate version since otherwise we'd need to leave 'plaindirs' around
|
||||||
"${RM_BIN}" -f -- $i;
|
# such as 'packages' and 'packages-split' and these can be large. No end
|
||||||
;;
|
# of chain tasks depend directly on do_package anymore.
|
||||||
*_setscene*)
|
"${RM_BIN}" -f -- $i;
|
||||||
# Skip stamps which are already setscene versions
|
;;
|
||||||
;;
|
*_setscene*)
|
||||||
*)
|
# Skip stamps which are already setscene versions
|
||||||
# For everything else: if suitable, promote the stamp to a setscene
|
;;
|
||||||
# version, otherwise remove it
|
*)
|
||||||
for j in ${SSTATETASKS} do_shared_workdir
|
# For everything else: if suitable, promote the stamp to a setscene
|
||||||
do
|
# version, otherwise remove it
|
||||||
case $i in
|
for j in ${SSTATETASKS} do_shared_workdir
|
||||||
*$j|*$j.*)
|
do
|
||||||
mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"`
|
case $i in
|
||||||
break
|
*$j|*$j.*)
|
||||||
;;
|
mv $i `echo $i | sed -e "s#${j}#${j}_setscene#"`
|
||||||
esac
|
break
|
||||||
done
|
;;
|
||||||
"${RM_BIN}" -f -- $i
|
esac
|
||||||
esac
|
done
|
||||||
done
|
"${RM_BIN}" -f -- $i
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
cd ${WORKDIR}
|
cd ${WORKDIR}
|
||||||
for dir in *
|
for dir in *
|
||||||
|
|||||||
Reference in New Issue
Block a user