mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
don't hardcode packages and actions, move them to defaults
This commit is contained in:
parent
dc0ca7eed6
commit
caa6a31042
2 changed files with 13 additions and 10 deletions
|
@ -1,11 +1,16 @@
|
|||
# defaults for archboot
|
||||
# packages to install (eg. firmware, kernel packages)
|
||||
_PACKAGES="base linux linux-firmware linux-firmware-marvell"
|
||||
# Download packages for pacman cache directory
|
||||
_DOWNLOAD_PACKAGES="xorg chromium xfce4 tigervnc breeze-icons gvfs gvfs-smb thunar-archive-plugin thunar-volman file-roller gparted gnome-keyring nss-mdns mousepad ristretto"
|
||||
# grub setup
|
||||
_GRUB_CONFIG="/usr/share/archboot/grub/archboot-main-grub.cfg"
|
||||
_GRUB_BACKGROUND="/usr/share/archboot/grub/archboot-background.png"
|
||||
### XFCE defaults
|
||||
# needed full installed packages in environment for X
|
||||
_FULL_PACKAGES="llvm-libs gcc-libs perl glibc libtiff glib2 libcups harfbuzz avahi nss p11-kit libp11-kit fuse tpm2-tss libsecret smbclient libcap tevent libbsd libldap tdb ldb libmd jansson libsasl"
|
||||
# X packages
|
||||
_X_PACKAGES="xorg chromium xfce4 tigervnc breeze-icons gvfs gvfs-smb thunar-archive-plugin thunar-volman file-roller gparted gnome-keyring nss-mdns mousepad ristretto"
|
||||
# packages to remove from cache before X startup happens
|
||||
_X_RM_PACKAGES="xorg xfce4 chromium llvm-libs mesa ffmpeg"
|
||||
### zram setup
|
||||
_ZRAM_ALGORITHM="zstd"
|
||||
# size for --latest and --latest-install option
|
||||
|
|
|
@ -239,16 +239,15 @@ _cleanup_xfce() {
|
|||
|
||||
_launch_xfce() {
|
||||
# fix libs first, then install packages from defaults
|
||||
X_PACKAGES="llvm-libs gcc-libs perl glibc libtiff glib2 libcups harfbuzz \
|
||||
avahi nss p11-kit libp11-kit fuse tpm2-tss libsecret smbclient libcap tevent libbsd libldap tdb ldb \
|
||||
libmd jansson libsasl ${_DOWNLOAD_PACKAGES}"
|
||||
# try to save RAM by calling the cleanup hook and installing each package alone
|
||||
_XORG="${_FULL_PACKAGES} ${_X_PACKAGES}"
|
||||
# saving RAM by calling always cleanup hook and installing each package alone
|
||||
if [[ -e /var/cache/pacman/pkg/archboot.db ]]; then
|
||||
echo "Install packages ..."
|
||||
_INSTALL_SOURCE="file:///var/cache/pacman/pkg"
|
||||
_create_pacman_conf
|
||||
#shellcheck disable=SC2086
|
||||
pacman -Sy --config ${_PACMAN_CONF}
|
||||
for i in ${X_PACKAGES}; do
|
||||
for i in ${_XORG}; do
|
||||
#shellcheck disable=SC2086
|
||||
pacman -S ${i} --config ${_PACMAN_CONF} --noconfirm || exit 1
|
||||
_cleanup_xfce
|
||||
|
@ -258,15 +257,14 @@ _launch_xfce() {
|
|||
pacman -Syu --ignore linux --ignore linux-firmware --ignore linux-firmware-marvell --noconfirm || exit 1
|
||||
_cleanup_xfce
|
||||
echo "Install packages ..."
|
||||
for i in ${X_PACKAGES}; do
|
||||
for i in ${_XORG}; do
|
||||
#shellcheck disable=SC2086
|
||||
pacman -S ${i} --noconfirm || exit 1
|
||||
_cleanup_xfce
|
||||
done
|
||||
fi
|
||||
# remove installed packages
|
||||
_RM_PACKAGE="xorg xfce4 chromium llvm-libs mesa ffmpeg"
|
||||
for i in ${_RM_PACKAGE}; do
|
||||
for i in ${_X_RM_PACKAGES}; do
|
||||
rm -f /var/cache/pacman/pkg/"${i}"-*
|
||||
done
|
||||
# remove firmware
|
||||
|
|
Loading…
Reference in a new issue