Print list of not existing packages and fail if there are any

This commit is contained in:
Mikhail Novosyolov 2019-03-09 00:23:41 +03:00
parent 39a01d1082
commit e6f0939a8a
2 changed files with 8 additions and 2 deletions

View file

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

View file

@ -15,7 +15,7 @@ set -xefu
# can't resolve dependencies during bootstrap
urpmi_bootstrap(){
for urpmi_options in \
"--auto --no-suggests --allow-force --allow-nodeps --ignore-missing --split-length 200" \
"--auto --no-suggests --allow-force --allow-nodeps --split-length 200" \
"--auto --no-suggests"
do
urpmi \
@ -27,6 +27,12 @@ urpmi_bootstrap(){
urpmi_return_code="$?"
done
}
# This will validate that all requested packages do exist
# and will print a list of not existing ones.
# Returns 0 only if all packages do exist.
urpmq --sources --urpmi-root "$urpmiRoot" ${packagesList}
# temporarily don't fail the whole scripts when not last iteration of urpmi fails
set +e
for i in $(seq 1 22)