feat: add ignore packages block minecraft hosts and do not reinstall latex packages

This commit is contained in:
Krzysztof kuhy Rudnicki 2025-02-01 21:19:00 +01:00
parent 556e374236
commit 59ea3c8293
3 changed files with 60 additions and 9 deletions

View File

@ -350,10 +350,53 @@ pacman_packages=(
)
for pkg in "${pacman_packages[@]}"; do
if ! pacman -Qi $pkg > /dev/null 2>&1; then
# Check if the package exists in the AUR packages list
# Check for texlive subpackages
if [ "$pkg" == "texlive" ]; then
sub_pkgs=(
texlive-basic texlive-bibtexextra texlive-binextra texlive-context texlive-fontsextra
texlive-fontsrecommended texlive-fontutils texlive-formatsextra texlive-games texlive-humanities
texlive-latex texlive-latexextra texlive-latexrecommended texlive-luatex texlive-mathscience
texlive-metapost texlive-music texlive-pictures texlive-plaingeneric texlive-pstricks
texlive-publishers texlive-xetex
)
all_installed=true
for subpkg in "${sub_pkgs[@]}"; do
if ! pacman -Qi "$subpkg" &> /dev/null; then
all_installed=false
break
fi
done
if [ "$all_installed" = true ]; then
echo "All texlive subpackages are installed, skipping texlive"
continue
fi
fi
# Check for texlive-lang subpackages
if [ "$pkg" == "texlive-lang" ]; then
sub_pkgs=(
texlive-langarabic texlive-langchinese texlive-langcjk texlive-langcyrillic
texlive-langczechslovak texlive-langenglish texlive-langeuropean texlive-langfrench
texlive-langgerman texlive-langgreek texlive-langitalian texlive-langjapanese
texlive-langkorean texlive-langother texlive-langpolish texlive-langportuguese
texlive-langspanish
)
all_installed=true
for subpkg in "${sub_pkgs[@]}"; do
if ! pacman -Qi "$subpkg" &> /dev/null; then
all_installed=false
break
fi
done
if [ "$all_installed" = true ]; then
echo "All texlive-lang subpackages are installed, skipping texlive-lang"
continue
fi
fi
if ! pacman -Qi "$pkg" &> /dev/null; then
if ! echo "${aur_packages[@]}" | grep -q "$pkg"; then
yes | sudo pacman -Sy --noconfirm $pkg
yes | sudo pacman -Sy --noconfirm "$pkg"
else
echo "$pkg exists in AUR packages, skipping pacman installation"
fi
@ -413,7 +456,7 @@ aur_packages=(
# "https://aur.archlinux.org/vtk-git.git vtk-git"
# "https://aur.archlinux.org/ant-git.git ant-git"
# "https://aur.archlinux.org/chrpath-git.git chrpath-git"
"https://aur.archlinux.org/openexr-git.git openexr-git"
#"https://aur.archlinux.org/openexr-git.git openexr-git"
# "https://aur.archlinux.org/gdb-git.git gdb-git"
"https://aur.archlinux.org/valgrind-git.git valgrind-git"
@ -506,7 +549,6 @@ aur_packages=(
# "https://aur.archlinux.org/vtk-git.git vtk-git"
# "https://aur.archlinux.org/ant-git.git ant-git"
# "https://aur.archlinux.org/chrpath-git.git chrpath-git"
"https://aur.archlinux.org/openexr-git.git openexr-git"
# "https://aur.archlinux.org/gdb-git.git gdb-git"
"https://aur.archlinux.org/valgrind-git.git valgrind-git"

View File

@ -22,8 +22,8 @@ HoldPkg = pacman-git glibc
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
IgnorePkg = steam steam-runtime prismlauncher prismlauncher-git youtube-music freetube freetube-git
IgnoreGroup = steam steam-runtime prismlauncher prismlauncher-git youtube-music freetube freetube-git
#NoUpgrade =
#NoExtract =

View File

@ -32,3 +32,12 @@
0.0.0.0 cdn.discordapp.com
0.0.0.0 cdn.discord.com
0.0.0.0 media.discordapp.net
# Block Minecraft download sites
127.0.0.1 minecraft.net
127.0.0.1 www.minecraft.net
127.0.0.1 mojang.com
127.0.0.1 www.mojang.com
127.0.0.1 launcher.mojang.com
127.0.0.1 libraries.minecraft.net
127.0.0.1 files.minecraft.net
# 127.0.0.1 s3.amazonaws.com # If Minecraft uses Amazon S3 for downloads