Validate --local-source paths before any sudo work
Also includes the build-iso.sh cleanup that I prepared earlier but forgot to stage (replacing the inline ugly $(...) conditional pipe with a normal if/then-fi block).
This commit is contained in:
2 files changed
+21
-10
No files matched your search
+11
-5
@@ -72,20 +72,26 @@ else
|
||||
base_pkg_lists=(/tmp/omarchy-pkglists/usr/share/omarchy/install/omarchy-base.packages /tmp/omarchy-pkglists/usr/share/omarchy/install/omarchy-other.packages)
|
||||
fi
|
||||
|
||||
# Collect every package we want available in the offline mirror.
|
||||
declare -a all_packages
|
||||
mapfile -t all_packages < <(
|
||||
{
|
||||
cat "$build_cache_dir/packages.x86_64"
|
||||
grep -hv '^#\|^$' "${base_pkg_lists[@]}"
|
||||
grep -hv '^#\|^$' /builder/archinstall.packages
|
||||
# Always include the omarchy meta-package set so the target install can
|
||||
# find omarchy-installer in the offline mirror.
|
||||
# Always include the omarchy meta-packages so the target install can find
|
||||
# omarchy-installer in the offline mirror.
|
||||
printf 'omarchy\nomarchy-settings\nomarchy-installer\nomarchy-limine\n'
|
||||
} |
|
||||
$([[ -n ${LOCAL_OMARCHY_BUILD:-} ]] && echo "grep -vE ^(omarchy|omarchy-settings|omarchy-installer|omarchy-limine)$" || echo cat) |
|
||||
sort -u
|
||||
} | sort -u
|
||||
)
|
||||
|
||||
# With --local-source we already built the four omarchy* packages directly
|
||||
# into the mirror; strip them from the pacman -Syw list so it doesn't try to
|
||||
# fetch the published versions on top.
|
||||
if [[ -n ${LOCAL_OMARCHY_BUILD:-} ]]; then
|
||||
all_packages=($(printf '%s\n' "${all_packages[@]}" | grep -vE '^(omarchy|omarchy-settings|omarchy-installer|omarchy-limine)$'))
|
||||
fi
|
||||
|
||||
mkdir -p /tmp/offlinedb
|
||||
pacman --config /configs/pacman-online-${OMARCHY_MIRROR}.conf --noconfirm -Syw \
|
||||
"${all_packages[@]}" --cachedir "$offline_mirror_dir/" --dbpath /tmp/offlinedb --needed
|
||||
|
||||
Reference in new issue
Block a user