catalyst-auto: defer purge until all sets are done

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
Robin H. Johnson 2020-05-11 22:46:34 -07:00
parent affe649205
commit 62bfd232bb
No known key found for this signature in database
GPG key ID: 19395F23C58826C4

View file

@ -421,11 +421,25 @@ run_catalyst_commands() {
fi
done
# Do not purge yet, because there might be interdendency between specs
# in different build sets!
update_symlinks
done
# Now do the cleanup
for a in "" ${SETS}; do
if [[ -z ${a} ]]; then
specs_var="SPECS"
optional_specs_var="OPTIONAL_SPECS"
else
specs_var="SET_${a}_SPECS"
optional_specs_var="SET_${a}_OPTIONAL_SPECS"
fi
for i in ${!specs_var} ${!optional_specs_var}; do
LOGFILE="${TMPDIR}/log/$(echo "${i}" | sed -e 's:/:_:' -e 's:\.spec$::')_purge.log"
run_cmd "${LOGFILE}" "${timeprefix[@]}" catalyst --purgetmponly -c "${CATALYST_CONFIG}" -f "${i}"
done
update_symlinks
done