Fix listing failed packages

This commit is contained in:
Mikhail Novosyolov 2019-03-09 13:56:54 +03:00
parent b936f1cb6b
commit a662819225
2 changed files with 5 additions and 7 deletions

View file

@ -3,7 +3,7 @@
Summary: Tools for building live CDs
Name: livecd-tools
Version: 21.1
Release: 46
Release: 47
Epoch: 1
License: GPLv2+
Group: System/Base

View file

@ -57,7 +57,6 @@ process_packages(){
if [ "${urpmi_return_code}" != 0 ]; then
echo "urpmi bootstrapping failed!"
if [ "$EXIT" = 1 ]; then
if [ -n "${failed_pkgs}" ]; then echo "Failed packages: ${failed_pkgs}"; fi
exit "${urpmi_return_code}"
fi
return "${urpmi_return_code}"
@ -87,15 +86,14 @@ if [ "$urpmi_return_code" = 0 ]; then exit 0; fi
packagesList_sorted="$(echo "${packagesList_orig}" | tr ' ' '\n' | sort -u)"
for i in ${packagesList_sorted}
do
( set +e
set +e
packagesList="$i"
urpmi_options="--auto --no-suggests --allow-force --allow-nodeps"
urpmi_exec
if [ "$urpmi_return_code" != 0 ]; then
export failed_pkgs="${failed_pkgs} ${i}"
fi
set -e )
if [ "$urpmi_return_code" != 0 ]; then failed_pkgs="${failed_pkgs} ${i}"; fi
set -e
done
if [ -n "${failed_pkgs}" ]; then echo "Failed packages: ${failed_pkgs}"; fi
# Now, regardless success of installing one-by-one, let's install all packages and see if it will be successfull
# and exit with error, if it failed