diff --git a/livecd-tools.spec b/livecd-tools.spec index 54c418b..ac8daaf 100644 --- a/livecd-tools.spec +++ b/livecd-tools.spec @@ -3,7 +3,7 @@ Summary: Tools for building live CDs Name: livecd-tools Version: 21.1 -Release: 63 +Release: 64 Epoch: 1 License: GPLv2+ Group: System/Base diff --git a/urpmi-bootstrapper.sh b/urpmi-bootstrapper.sh index 32e7e60..18a6b86 100755 --- a/urpmi-bootstrapper.sh +++ b/urpmi-bootstrapper.sh @@ -36,6 +36,17 @@ urpmi_bootstrap(){ done } +diagnostics(){ + # Now, when packages have been installed successfully, + # verify that really all of them have been installed. + # Can't redirect to >/dev/null here, because errors are also in stdout. + chroot "$rpmRoot" /bin/rpm -q ${packagesList_orig} + + # Perform a check + # TODO: we should fail if there are errors, but will just print to log for now + chroot "$rpmRoot" /bin/rpm -Va || : +} + process_packages(){ # This will validate that all requested packages do exist @@ -88,7 +99,10 @@ packagesList="${packagesList_orig}" EXIT=0 process_packages # exit if all packages have been installed -if [ "$urpmi_return_code" = 0 ]; then exit 0; fi +if [ "$urpmi_return_code" = 0 ]; then + diagnostics && \ + exit 0 +fi # If installing packages still failed, let's try to install them one-by-one packagesList_sorted="$(echo "${packagesList_orig}" | tr ' ' '\n' | sort -u)" @@ -117,12 +131,3 @@ fi packagesList="${packagesList_orig}" EXIT=1 process_packages - -# Now, when packages have been installed successfully, -# verify that really all of them have been installed. -# Can't redirect to >/dev/null here, because errors are also in stdout. -chroot "$rpmRoot" /bin/rpm -q ${packagesList_orig} - -# Perform a check -# TODO: we should fail if there are errors, but will just print to log for now -chroot "$rpmRoot" /bin/rpm -Va || :