run_cmd pacman -r"$NEWROOT"-U${named}-*.pkg.tar.xz --config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to install packages $named""clean_install"
pacman -r"$NEWROOT"-U${named}-*.pkg.tar.xz --config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to install packages $named""clean_install"
run_cmd pacman -r"$NEWROOT"-U${named}-*.pkg.tar.zst --config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to install packages $named""clean_install"
pacman -r"$NEWROOT"-U${named}-*.pkg.tar.zst --config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to install packages $named""clean_install"
fi
oblog -t"Copy all ${named}-*.pkg.tar.{xz,zst} to $CACHE_DIR"
# if $NEWROOT/usr/bin/bash doesn't exist means that is the first pass
# into the function install_system; so install base package first
if![[-x"$NEWROOT/usr/bin/bash"]];then
run_cmd pacman -r"$NEWROOT"-S$(grep-h-v ^# $GENERAL_DIR/$CONFIG_DIR/package_list/base)--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to install base system""clean_install"
pacman -r"$NEWROOT"-S$(grep-h-v ^# $GENERAL_DIR/$CONFIG_DIR/package_list/base)--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to install base system""clean_install"
run_cmd pacman -S${result_base[@]}-r"$NEWROOT"--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman" 2>/dev/null || die " Failed to install packages""clean_install"
pacman -S${result_base[@]}-r"$NEWROOT"--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman" 2>/dev/null || die " Failed to install packages""clean_install"
result_base=()
else
oblog "Nothing to do for base system"
...
...
@@ -116,7 +116,7 @@ install_package(){
if[[-n${pacman_list[@]}]];then
oblog -w"Install missing packages coming from repo define in pacman.conf"
run_cmd pacman -r"$NEWROOT"-S${pacman_list[@]}--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to install packages with pacman""clean_install"
pacman -r"$NEWROOT"-S${pacman_list[@]}--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to install packages with pacman""clean_install"
fi
if[[-n${aur_list[@]}]];then
...
...
@@ -138,7 +138,7 @@ install_package(){
sync_data(){
oblog -t"Synchronize database"
run_cmd pacman -Sy--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"|| die " Impossible to synchronize database""clean_install"
pacman -Sy--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"|| die " Impossible to synchronize database""clean_install"
oblog -t"Copying database on $NEWROOT/var/lib/pacman/sync/"
mkdir-p-m0755"$NEWROOT/var/lib/pacman/sync/"
...
...
@@ -152,5 +152,5 @@ sync_data(){
update_newroot(){
oblog -t"Check for update..."
run_cmd pacman -r"$NEWROOT"-Syu--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to update the fresh system with pacman""clean_install"
pacman -r"$NEWROOT"-Syu--config"$GENERAL_DIR/$CONFIG_DIR/pacman.conf"--cachedir"$CACHE_DIR"--noconfirm--dbpath"$NEWROOT/var/lib/pacman"|| die " Failed to update the fresh system with pacman""clean_install"