Add: A package validation check (Arch repos & AUR) has been implemented, to ensure that the packages to be installed are valid (exist) before installation starts.

If not, the installer exits and logs the error.
Add: 'Intel Graphics' > A new package has been added.
This commit is contained in:
Jane Doe
2025-11-25 00:10:40 +02:00
parent e9512cbf3c
commit 058b85253e
+53 -17
View File
@@ -2,7 +2,7 @@
# Amelia Installer # Amelia Installer
# Source: https://gitlab.com/prism7/archery # Source: https://gitlab.com/prism7/archery
# Version: 1.0.14 # Version: 1.1.0
set -euo pipefail set -euo pipefail
################################################################################################### ###################################################################################################
@@ -61,14 +61,6 @@ alternatives() {
--> [${green}Providing alternatives..${nc}] " --> [${green}Providing alternatives..${nc}] "
} }
pkg_displ() {
sleep 0.2
YELLOWL "
Packages to be installed${nc}:
${deskpkgs}"
}
deskname() { deskname() {
sleep 0.2 sleep 0.2
YELLOW " YELLOW "
@@ -1198,6 +1190,7 @@ Enter [y/N]: "
if [[ "${sb_sign}" == "y" ]]; then if [[ "${sb_sign}" == "y" ]]; then
local prompt="Secure Boot 'Setup' Mode Verification" local prompt="Secure Boot 'Setup' Mode Verification"
validpkgs+=(sbctl)
SB_Status="$(bootctl status 2> "${void}" | grep -E 'Secure Boot' | awk "{print \$4}")" SB_Status="$(bootctl status 2> "${void}" | grep -E 'Secure Boot' | awk "{print \$4}")"
if [[ "${SB_Status}" == "(setup)" ]]; then if [[ "${SB_Status}" == "(setup)" ]]; then
ok ok
@@ -1978,7 +1971,7 @@ gfxpkgs_set() {
if [[ "${vendor}" == "Intel" || "${vendors}" =~ "Intel" ]]; then if [[ "${vendor}" == "Intel" || "${vendors}" =~ "Intel" ]]; then
# /etc/sysctl.d/99-sysctld.conf # /etc/sysctl.d/99-sysctld.conf
perf_stream="dev.i915.perf_stream_paranoid = 0" perf_stream="dev.i915.perf_stream_paranoid = 0"
gfxpkgs+=(intel-compute-runtime intel-media-driver intel-media-sdk libva-intel-driver libva-utils libvpl opencl-headers vpl-gpu-rt vkd3d vulkan-intel vulkan-mesa-layers) gfxpkgs+=(igsc intel-compute-runtime intel-media-driver intel-media-sdk libva-intel-driver libva-utils libvpl opencl-headers vpl-gpu-rt vkd3d vulkan-intel vulkan-mesa-layers)
fi fi
# AMD Graphics # AMD Graphics
@@ -2352,6 +2345,7 @@ Enter [y/N]: "
case "${dev}" in case "${dev}" in
y) y)
devel="base-devel" devel="base-devel"
validpkgs+=(base-devel)
YELLOW " YELLOW "
### The 'base-devel' meta-package will be installed ### The 'base-devel' meta-package will be installed
@@ -2473,7 +2467,8 @@ Enter a number ${bwhite}(empty to skip)${blue}: "
keypress keypress
fi fi
if [[ "${web}" =~ ^(1|2|3|4|5|6|7|8)$ ]]; then [[ "${web}" =~ ^(4|5|6|7|8|9)$ ]] && validpkgs+=("base-devel" "git")
if [[ "${web}" =~ ^(1|2|3|4|5|6|7|8|9)$ ]]; then
local prompt="${web_name}" local prompt="${web_name}"
web_slct="yes" web_slct="yes"
ok ok
@@ -2882,6 +2877,7 @@ Enter [v/y/N]: "
case "${genoptm}" in case "${genoptm}" in
y) y)
validpkgs+=("ccache" "ntfs-3g" "pbzip2" "pigz")
YELLOW " YELLOW "
### System Optimizations will be set ### System Optimizations will be set
@@ -3037,6 +3033,7 @@ Enter [y/N]: "
irqbalance="${irqbalance,,}" irqbalance="${irqbalance,,}"
if [[ "${irqbalance}" == "y" ]]; then if [[ "${irqbalance}" == "y" ]]; then
validpkgs+=(irqbalance)
YELLOW " YELLOW "
### 'irqbalance' service will be enabled ### 'irqbalance' service will be enabled
@@ -3082,6 +3079,7 @@ Enter [y/N]: "
thermald="${thermald,,}" thermald="${thermald,,}"
if [[ "${thermald}" == "y" ]]; then if [[ "${thermald}" == "y" ]]; then
validpkgs+=(thermald)
YELLOW " YELLOW "
### 'thermald' service will be enabled ### 'thermald' service will be enabled
@@ -3127,6 +3125,7 @@ Enter [y/N]: "
rngd="${rngd,,}" rngd="${rngd,,}"
if [[ "${rngd}" == "y" ]]; then if [[ "${rngd}" == "y" ]]; then
validpkgs+=(rng-tools)
YELLOW " YELLOW "
### 'rngd' service will be enabled ### 'rngd' service will be enabled
@@ -3172,6 +3171,7 @@ Enter [y/N]: "
rtkit="${rtkit,,}" rtkit="${rtkit,,}"
if [[ "${rtkit}" == "y" ]]; then if [[ "${rtkit}" == "y" ]]; then
validpkgs+=("realtime-privileges" "rtkit")
YELLOW " YELLOW "
### 'rtkit' service will be enabled ### 'rtkit' service will be enabled
@@ -3217,6 +3217,7 @@ Enter [y/N]: "
tlp="${tlp,,}" tlp="${tlp,,}"
if [[ "${tlp}" == "y" ]]; then if [[ "${tlp}" == "y" ]]; then
validpkgs+=(tlp)
YELLOW " YELLOW "
### 'tlp' service will be enabled ### 'tlp' service will be enabled
@@ -6208,6 +6209,39 @@ Enter [y/N]: "
ok ok
} }
################################################################################################### ###################################################################################################
pkg_validation() {
local prompt="Arch Packages Validation"
local stage_prompt="Arch Packages Validation"
sleep 0.2
YELLOWL "
-------------------------------------------
### ${bwhite}Validating installation packages: ${yellowl}###
-------------------------------------------
"
validpkgs+=("${deskpkgs}")
echo "${validpkgs[*]} ${web_aur}"
valids="${validpkgs[*]}"
line2
if pacman -Syy > "${void}" 2>&1 2> "${log}" && pacman -Spd ${valids} > "${void}" 2>&1 2> "${log}"; then
ok
if [[ -n "${web_aur}" ]]; then
local prompt="AUR Package Validation"
local stage_prompt="AUR Package Validation"
if pacman -S git --noconfirm > "${void}" 2>&1 2> "${log}" && git clone --branch "${web_aur}" --single-branch https://github.com/archlinux/aur.git "${web_aur}" > "${void}" 2>&1 2> "${log}" && rm -R "${web_aur}"; then
ok
else
stage_fail
fi
fi
else
stage_fail
fi
keypress
}
###################################################################################################
pacstrap_system() { pacstrap_system() {
sleep 0.2 sleep 0.2
@@ -6224,10 +6258,11 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
[[ "${fs}" == "2" ]] && bootldr_pkgs="grub-btrfs inotify-tools os-prober" [[ "${fs}" == "2" ]] && bootldr_pkgs="grub-btrfs inotify-tools os-prober"
fi fi
basepkgs=(base efibootmgr nano networkmanager pkgstats sudo vim "${bootldr_pkgs}" "${fstools}" "${kernel}" "${microcode}" "${shell_pkgs}") basepkgs=(base efibootmgr nano networkmanager pkgstats sudo vim "${fstools}" "${kernel}" "${microcode}" "${shell_pkgs}")
[[ -n "${shell}" ]] && basepkgs+=("${shell}") [[ -n "${shell}" ]] && basepkgs+=("${shell}")
[[ -n "${nrg_plc}" ]] && basepkgs+=("${nrg_plc}") [[ -n "${nrg_plc}" ]] && basepkgs+=("${nrg_plc}")
[[ -n "${bootldr_pkgs}" ]] && basepkgs+=("${bootldr_pkgs}")
[[ -n "${ukify}" ]] && basepkgs+=("${ukify}") [[ -n "${ukify}" ]] && basepkgs+=("${ukify}")
[[ -n "${zram}" ]] && basepkgs+=("${zram}") [[ -n "${zram}" ]] && basepkgs+=("${zram}")
[[ -n "${gfxpkgs[*]}" ]] && basepkgs+=("${gfxpkgs[*]}") [[ -n "${gfxpkgs[*]}" ]] && basepkgs+=("${gfxpkgs[*]}")
@@ -6287,9 +6322,10 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
deskpkgs="${basepkgs[*]}" ;; deskpkgs="${basepkgs[*]}" ;;
12) # Custom System: 12) # Custom System:
custarray=(base sudo "${bootldr_pkgs}" "${custompkgs}" "${fstools}" "${kernel}" "${microcode}") custarray=(base sudo "${custompkgs}" "${fstools}" "${kernel}" "${microcode}")
[[ -n "${shell}" ]] && custarray+=("${shell}") [[ -n "${shell}" ]] && custarray+=("${shell}")
[[ -n "${bootldr_pkgs}" ]] && custarray+=("${bootldr_pkgs}")
[[ -n "${ukify}" ]] && custarray+=("${ukify}") [[ -n "${ukify}" ]] && custarray+=("${ukify}")
[[ -n "${zram}" ]] && custarray+=("${zram}") [[ -n "${zram}" ]] && custarray+=("${zram}")
[[ -n "${gfxpkgs[*]}" ]] && custarray+=("${gfxpkgs[*]}") [[ -n "${gfxpkgs[*]}" ]] && custarray+=("${gfxpkgs[*]}")
@@ -6307,15 +6343,14 @@ ${magenta}###${nc}-------------------------------------${magenta}[ ${bwhite}Pacs
displaymanager="cosmic-greeter" ;; displaymanager="cosmic-greeter" ;;
esac esac
pkg_displ pkg_validation
echo
keypress
if pacstrap -K /mnt ${deskpkgs} 2> "${log}" ; then if pacstrap -K /mnt ${deskpkgs} 2> "${log}" ; then
local prompt="Pacstrap System" local prompt="Pacstrap System"
local stage_prompt="Pacstrap System"
ok ok
else else
failure stage_fail
fi fi
if [[ "${fs}" == "2" ]]; then if [[ "${fs}" == "2" ]]; then
@@ -7467,6 +7502,7 @@ CUSTOM_SRVC
trg="" trg=""
vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vendor="" vendors="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" greeter="" greeternmbr="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" encr_home_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" genoptm="" set_optm="" ask_param="" desk_setup="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="" efiname="" path="" hometype="" homeform="" LuksParts="") vars=(LOCALESET="" SETLOCALE="" lcl_slct="" USERNAME="" kernelnmbr="" fs="" gfxcount="" gfxcard="" intelcount="" intelcards="" nvidiacount="" nvidiacards="" amdcount="" amdcards="" vendor="" vendors="" desktop="" terminal="" efi_entr_del="" sanity="" install="" bootldr_pkgs="" devel="" REGDOM="" gfx_bootopts="" btrfs_bootopts="" trim="" swapmode="" greeter="" greeternmbr="" cust_bootopts="" vmpkgs="" vm_services="" perf_stream="" displaymanager="" wireless_reg="" bitness="" bootloader="" gfx_slct="" espsize="" autoroot="" autoesp="" autoxboot="" autohome="" autoswap="" rootprt="" espprt="" xbootprt="" homeprt="" swapprt="" partok="" instl_drive="" sgdsk_nmbr="" part_mode="" preset="" capacity="" cap_gib="" rootsize="" sgdrive="" cgdrive="" smartpart="" presetpart="" prcnt="" roottype="" stage_prompt="" zram="" xbootloader="" multibooting="" hypervisor="" mkinitcpio_mods="" mkinitcpio_bins="" uki="" ukify="" cng_espmnt="" sep_home="" encr_swap_bootopts="" encr_home_bootopts="" uefimode="" luks_encrypt="" nrg_plc="" multilib="" nvname="" nogsp="" luks_root="" luks_swap="" luks_home="" installation="" kill_watchdog="" oomd="" setrescue="" lowlat="" dev="" web="" web_pkg="" web_aur="" web_slct="" printer="" print_pkgs="" shellnmbr="" shell="" shellname="" shellname2="" shell_pkgs="" genoptm="" set_optm="" ask_param="" desk_setup="" irqbalance="" thermald="" rngd="" rtkit="" tlp="" CRYPTPASS="" CRYPTPASS2="" askoptm="" gptslct="" gptok="" gptabort="" nvdprop="" nowarning="" efiname="" path="" hometype="" homeform="" LuksParts="")
export "${vars[@]}" export "${vars[@]}"
validpkgs=()
sleep 0.2 sleep 0.2
CYANBG "************************************************************************************************* " CYANBG "************************************************************************************************* "
CYANBG " " CYANBG " "