Skip to content

Commit 9149428

Browse files
authored
fix(build): Force main mirror and rebuild apt cache
1 parent 87b2cfb commit 9149428

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

03-install-desktop.sh

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# ==============================================================================
33
# LuminOS Build Script, Phase 3: Desktop Environment Installation
44
# Author: Gabriel, Project Leader @ LuminOS
5-
# Version: 0.1.7
5+
# Version: 0.1.8
66
# ==============================================================================
77
set -e
88
LUMINOS_CHROOT_DIR="chroot"
@@ -20,38 +20,51 @@ cat > "$LUMINOS_CHROOT_DIR/tmp/install_desktop.sh" << "EOF"
2020
set -e
2121
export DEBIAN_FRONTEND=noninteractive
2222
23-
echo "--> Cleaning existing APT cache inside chroot..."
23+
echo "--> Forcing main Debian mirror..."
24+
# Overwrite sources.list just to be sure we use the main mirror
25+
cat > /etc/apt/sources.list << "SOURCES"
26+
deb http://deb.debian.org/debian trixie main contrib non-free-firmware
27+
deb http://security.debian.org/debian-security trixie-security main contrib non-free-firmware
28+
deb http://deb.debian.org/debian trixie-updates main contrib non-free-firmware
29+
SOURCES
30+
31+
echo "--> Cleaning existing APT cache AND lists inside chroot..."
2432
apt-get clean
33+
rm -rf /var/lib/apt/lists/* # Force removal of potentially corrupt lists
2534
26-
echo "--> Updating package lists inside chroot (first pass)..."
35+
echo "--> Updating package lists inside chroot (forcing main mirror)..."
2736
apt-get update
2837
2938
echo "--> Installing Linux kernel and GRUB bootloader..."
3039
# Keep debug options for now
3140
apt-get install -y -o Debug::pkgProblemResolver=yes linux-image-amd64 grub-pc
3241
33-
echo "--> Updating package lists again before main desktop install..."
42+
echo "--> Cleaning and Updating lists again before main desktop install..."
43+
apt-get clean
44+
rm -rf /var/lib/apt/lists/*
3445
apt-get update
3546
3647
echo "--> Installing CORE KDE Plasma desktop and services (with debug)..."
37-
# Install everything EXCEPT neofetch first
3848
CORE_DESKTOP_PACKAGES="plasma-desktop konsole sddm network-manager"
3949
apt-get install -y -o Debug::pkgProblemResolver=yes $CORE_DESKTOP_PACKAGES
4050
41-
echo "--> Updating package lists one last time before neofetch..." # Added step
42-
apt-get update # Added command
51+
echo "--> Cleaning and Updating one last time before neofetch..."
52+
apt-get clean
53+
rm -rf /var/lib/apt/lists/*
54+
apt-get update
4355
44-
echo "--> Installing neofetch separately (with debug)..." # Added step
45-
# Install neofetch in its own step
46-
apt-get install -y -o Debug::pkgProblemResolver=yes neofetch # Added command
56+
echo "--> Installing neofetch separately (with debug)..."
57+
apt-get install -y -o Debug::pkgProblemResolver=yes neofetch
4758
48-
echo "--> Cleaning up APT cache..."
59+
echo "--> Final cleaning of APT cache..."
4960
apt-get clean
61+
rm -rf /var/lib/apt/lists/*
5062
rm /tmp/install_desktop.sh
5163
EOF
5264

5365
chmod +x "$LUMINOS_CHROOT_DIR/tmp/install_desktop.sh"
5466

67+
# --- Mounts, Chroot Execution, Unmounts remain the same ---
5568
echo "--> Mounting virtual filesystems for chroot..."
5669
mount --bind /dev "$LUMINOS_CHROOT_DIR/dev"; mount --bind /dev/pts "$LUMINOS_CHROOT_DIR/dev/pts"; mount -t proc /proc "$LUMINOS_CHROOT_DIR/proc"; mount -t sysfs /sys "$LUMINOS_CHROOT_DIR/sys"
5770

0 commit comments

Comments
 (0)