Refusal to build libvirt src.rpm after CTRL-C
Problem: An incremental build was interrupted by CTRL-C. Libvirt was one of the packages interrupted mid build. Subsequent incremental builds failed to rebuild libvirt. The BUILD_NEEDED logic fails to trigger if the working directory has been created, but is empty of src.rpms's. Solution: Add additional tests to ensure empty working directories trigger a BUILD_NEEDED condition. Closes-Bug: 1798191 Change-Id: I99e1fe76b016a5779d623d2ff91cc924b45a9338 Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
parent
cf4084e2e5
commit
1aee4a42e6
@ -152,7 +152,7 @@ md5sums_from_input_vars () {
|
||||
fi
|
||||
)
|
||||
if [ $? -eq 1 ]; then
|
||||
return -1
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Create sorted, unique list of cononical paths
|
||||
|
@ -684,6 +684,7 @@ build_dir_srpm () {
|
||||
fi
|
||||
|
||||
if [ -d "$FULL_BUILD_DIR/SRPMS" ]; then
|
||||
b=""
|
||||
for SRPM_PATH in $(find "$FULL_BUILD_DIR/SRPMS" -name '*.src.rpm' | sort -V); do
|
||||
b=$(basename $SRPM_PATH)
|
||||
SRPM_OUT_PATH2=$(find $SRPM_OUT -name $b)
|
||||
@ -692,6 +693,11 @@ build_dir_srpm () {
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$b" == "" ]; then
|
||||
echo "Rebuild required due no src.rpm in directory: '$FULL_BUILD_DIR/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
else
|
||||
echo "Rebuild required due to missing directory: '$FULL_BUILD_DIR/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
@ -995,14 +1001,24 @@ build_dir_spec () {
|
||||
fi
|
||||
|
||||
if [ -d "$FULL_BUILD_DIR/SRPMS" ]; then
|
||||
for SRPM_PATH2 in $(find "$RPMBUILD_BASE/SRPMS" -name '*.src.rpm' | sort -V); do
|
||||
b=$(basename $SRPM_PATH2)
|
||||
SRPM_OUT_PATH2=$(find $SRPM_OUT -name $b)
|
||||
if [ "x$SRPM_OUT_PATH2" == "x" ]; then
|
||||
echo "Rebuild required due to missing srpm: $b"
|
||||
BUILD_NEEDED=1
|
||||
if [ -d "$RPMBUILD_BASE/SRPMS" ]; then
|
||||
b=""
|
||||
for SRPM_PATH2 in $(find "$RPMBUILD_BASE/SRPMS" -name '*.src.rpm' | sort -V); do
|
||||
b=$(basename $SRPM_PATH2)
|
||||
SRPM_OUT_PATH2=$(find $SRPM_OUT -name $b)
|
||||
if [ "x$SRPM_OUT_PATH2" == "x" ]; then
|
||||
echo "Rebuild required due to missing srpm: $b"
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
done
|
||||
if [ "$b" == "" ]; then
|
||||
echo "Rebuild required due no src.rpm found in directory: '$RPMBUILD_BASE/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Rebuild required due to missing directory: '$RPMBUILD_BASE/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
else
|
||||
echo "Rebuild required due to missing directory: '$FULL_BUILD_DIR/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
|
@ -662,6 +662,7 @@ build_dir_srpm () {
|
||||
fi
|
||||
|
||||
if [ -d "$FULL_BUILD_DIR/SRPMS" ]; then
|
||||
b=""
|
||||
for SRPM_PATH in $(find "$FULL_BUILD_DIR/SRPMS" -name '*.src.rpm' | sort -V); do
|
||||
b=$(basename $SRPM_PATH)
|
||||
SRPM_OUT_PATH2=$(find $SRPM_OUT -name $b)
|
||||
@ -670,6 +671,11 @@ build_dir_srpm () {
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$b" == "" ]; then
|
||||
echo "Rebuild required due no src.rpm in directory: '$FULL_BUILD_DIR/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
else
|
||||
echo "Rebuild required due to missing directory: '$FULL_BUILD_DIR/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
@ -971,14 +977,25 @@ build_dir_spec () {
|
||||
fi
|
||||
|
||||
if [ -d "$FULL_BUILD_DIR/SRPMS" ]; then
|
||||
for SRPM_PATH2 in $(find "$RPMBUILD_BASE/SRPMS" -name '*.src.rpm' | sort -V); do
|
||||
b=$(basename $SRPM_PATH2)
|
||||
SRPM_OUT_PATH2=$(find $SRPM_OUT -name $b)
|
||||
if [ "x$SRPM_OUT_PATH2" == "x" ]; then
|
||||
echo "Rebuild required due to missing srpm: $b"
|
||||
BUILD_NEEDED=1
|
||||
if [ -d "$RPMBUILD_BASE/SRPMS" ]; then
|
||||
b=""
|
||||
for SRPM_PATH2 in $(find "$RPMBUILD_BASE/SRPMS" -name '*.src.rpm' | sort -V); do
|
||||
b=$(basename $SRPM_PATH2)
|
||||
SRPM_OUT_PATH2=$(find $SRPM_OUT -name $b)
|
||||
if [ "x$SRPM_OUT_PATH2" == "x" ]; then
|
||||
echo "Rebuild required due to missing srpm: $b"
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$b" == "" ]; then
|
||||
echo "Rebuild required due no src.rpm found in directory: '$RPMBUILD_BASE/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Rebuild required due to missing directory: '$RPMBUILD_BASE/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
fi
|
||||
else
|
||||
echo "Rebuild required due to missing directory: '$FULL_BUILD_DIR/SRPMS'"
|
||||
BUILD_NEEDED=1
|
||||
|
Loading…
x
Reference in New Issue
Block a user