mirror of
https://abf.rosa.ru/djam/livecd-tools.git
synced 2025-02-23 15:42:58 +00:00
Make list of failed packages
This commit is contained in:
parent
e7f06d7a8f
commit
b936f1cb6b
2 changed files with 9 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
Summary: Tools for building live CDs
|
||||
Name: livecd-tools
|
||||
Version: 21.1
|
||||
Release: 44
|
||||
Release: 46
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
Group: System/Base
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
# I previously made this hack in
|
||||
# https://github.com/mikhailnov/docker-rosa/blob/master/mkimage-urpmi.sh
|
||||
set -xefu
|
||||
failed_pkgs=""
|
||||
|
||||
urpmi_exec(){
|
||||
urpmi \
|
||||
|
@ -55,7 +56,10 @@ process_packages(){
|
|||
# now check the return code of the _last_ urpmi iteration
|
||||
if [ "${urpmi_return_code}" != 0 ]; then
|
||||
echo "urpmi bootstrapping failed!"
|
||||
if [ "$EXIT" = 1 ]; then exit "${urpmi_return_code}"; fi
|
||||
if [ "$EXIT" = 1 ]; then
|
||||
if [ -n "${failed_pkgs}" ]; then echo "Failed packages: ${failed_pkgs}"; fi
|
||||
exit "${urpmi_return_code}"
|
||||
fi
|
||||
return "${urpmi_return_code}"
|
||||
fi
|
||||
# return failing the whole script on any error
|
||||
|
@ -87,6 +91,9 @@ do
|
|||
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 )
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue