summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-07-14 16:28:26 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2022-08-29 10:31:20 -0400
commit1fdf266c535a8176155bf2f4c8f3c11df2307e13 (patch)
tree9c43636eb935146ea39158b8821e5d19c1654bc2
parent30642efeb9a238306766f2cc5dc6cb274a8a748d (diff)
add $PHANTOM_PKGS array to tolerate unresolvable dependencies
-rw-r--r--src/chroot-tools/chcleanup.in14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/chroot-tools/chcleanup.in b/src/chroot-tools/chcleanup.in
index fcee568..784afb0 100644
--- a/src/chroot-tools/chcleanup.in
+++ b/src/chroot-tools/chcleanup.in
@@ -68,8 +68,10 @@ source /etc/libretools.d/chroot.conf # sets $CHROOTEXTRAPKG
CHROOTPKG=( $( pacman -Sgq base-devel) )
-CHROOTPKG+=() # DEBUG: normally empty - mandatory core package-set
-WHITELIST_PKGS=() # DEBUG: normally empty - optional packages, possibly insane
+CHROOTPKG+=() # DEBUG: normally empty - mandatory core package-set additions
+WHITELIST_PKGS=() # DEBUG: normally empty - allowed outdated packages, possibly insane
+PHANTOM_PKGS=() # DEBUG: normally empty - fake dependencies, possibly insane
+PHANTOM_PKGS=( ${PHANTOM_PKGS[*]/#/--assume-installed=} )
# FIXME: ARM chroots require 'fakeroot-tcp' (BR #2775)
fakeroot_pkg=fakeroot$( [[ "$(uname -m)" == 'armv7l' ]] && echo '-tcp' )
@@ -95,7 +97,7 @@ else
DEPENDS=()
fi
-readonly CHROOTPKG WHITELIST_PKGS DEPENDS
+readonly CHROOTPKG WHITELIST_PKGS PHANTOM_PKGS DEPENDS
## Main Entry ##
@@ -148,8 +150,8 @@ done
# This is done by installing those into a temporary pacman DB;
# then querying the DB for it's complete package list.
msg2 "Collecting the minimal set of packages needed ..."
-if ! "${pacman_cmd[@]}" -S --dbonly --noscriptlet --needed --noconfirm \
- -- ${CHROOTPKG[*]} ${CHROOTEXTRAPKG[*]} ${DEPENDS[*]} \
+if ! "${pacman_cmd[@]}" -S --dbonly --noscriptlet --needed --noconfirm ${PHANTOM_PKGS} \
+ -- ${CHROOTPKG[*]} ${CHROOTEXTRAPKG[*]} ${DEPENDS[*]} \
<&- >& "$ERROR_PKGS_FILE"
then
error "Could not create a full list of packages, exiting."
@@ -217,7 +219,7 @@ else
if ${DRYRUN}; then
echo "${packages[*]}"
else
- pacman --noconfirm -S "${packages[@]}"
+ pacman --noconfirm ${PHANTOMS} -S "${packages[@]}"
fi
fi