diff --git a/src/image.sh b/src/image.sh index 4ab57e7b..73a405ff 100644 --- a/src/image.sh +++ b/src/image.sh @@ -80,6 +80,23 @@ getVersions() { done + # Preserve NAME precedence, but allow a recognized DISPLAYNAME edition to + # refine an otherwise generic family name. + if [ -n "$candidate_base" ] && [ -n "$candidate_id" ] && [ -n "$display" ]; then + name=$(normalizeEdition "$(printVersion "$candidate_base" "")") || return 1 + candidate=$(normalizeEdition "$candidate") || return 1 + + if [ "$candidate" = "$name" ]; then + structured=$(getVersion "$display" "$platform") + + if [ "$(fromName "$display" "$platform")" = "$candidate_base" ] && + [ -n "$structured" ] && [[ "${structured%-eval}" != "$candidate_base" ]] && + [[ "$(getVersionPriority "$structured" "$candidate_base")" != "other" ]]; then + candidate_id="$structured" + fi + fi + fi + if [ -z "$candidate_base" ] || [ -z "$candidate_id" ]; then name="${display:-${image:-$product}}" diff --git a/src/install.sh b/src/install.sh index 79074146..232b96f8 100644 --- a/src/install.sh +++ b/src/install.sh @@ -338,12 +338,14 @@ skipUnattended() { # Standalone ESD files and nested archives are not directly bootable media, # so they cannot use the manual-install fallback. - [[ "${iso,,}" == *".esd" ]] && exit 60 - enabled "${UNPACK:-}" && exit 60 + if enabled "${UNPACK:-}" || [[ "${iso,,}" == *".esd" ]]; then + error "Failed to boot \"$iso\" because it is not a directly bootable ISO image!" + exit 60 + fi # When automatic preparation fails, inspect extracted media to determine # whether it can still be booted manually using legacy firmware. - if [[ "${PLATFORM,,}" == "x64" ]] && [ -d "$dir" ]; then + if enabled "$aborted" && [[ "${PLATFORM,,}" == "x64" ]] && [ -d "$dir" ]; then efi=$(find "$dir" -maxdepth 1 -type d -iname efi -print -quit) || return 1 efi32=$(find "$dir" -maxdepth 3 -type f -ipath '*/efi/boot/bootia32.efi' -print -quit) || return 1