commit b318706536796a67bd251020cac459a5e714cc3e
parent 1952f7b1f34e7b8a5777010ec3d3ca163c4b6a1f
Author: torter <koubbamohamedrayan@gmail.com>
Date: Mon, 23 Nov 2026 16:18:40 +0000
MAG_YES in the scripts, the AUR index waits for the first boot
Diffstat:
4 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/handbook/handbook.md b/handbook/handbook.md
@@ -446,7 +446,9 @@ nothing but the download command, and bash when it builds from a source tree (4.
mag deps PKG what it needs; rdeps PKG for what needs it
mag fetch PKG... only download them
-`-n` says what would happen and does nothing, `-f` goes on when files clash or something still needs a package.
+Before it installs or removes anything it lists the packages, where they come from and their sizes, and asks.
+`-n` says what would happen and does nothing, `-f` goes on when files clash or something still needs a package. `-y`
+or `MAG_YES=1` answers yes, for scripts.
`MAG_ROOT=/mnt mag ...` works on another root, which is what chamesle-bootstrap does.
### 4.2 Installing and removing
@@ -1073,6 +1075,6 @@ X writes `~/.local/share/xorg/Xorg.0.log`; `grep EE` in it shows the errors.
arch-chroot DIR [COMMAND...]
chamesle-disk DISK
chamesle-boot [DIR]
- mag [-nf] update|install|build|remove|upgrade|autoremove|list|info|search|files|owns|deps|rdeps|fetch
+ mag [-nfy] update|install|build|remove|upgrade|autoremove|list|info|search|files|owns|deps|rdeps|fetch
rifle --install DIR | --list
limine bios-install DEVICE
diff --git a/pkg/mag/trigger b/pkg/mag/trigger
@@ -4,5 +4,5 @@ f=/var/lib/mag/.install-if
[ -e $f ] && exit 0
touch $f
unset MAG_ROOT
-mag upgrade
+MAG_YES=1 mag upgrade
exit 0
diff --git a/tools/chamesle-boot b/tools/chamesle-boot
@@ -7,6 +7,7 @@
die() { echo "chamesle-boot: $*" >&2; exit 1; }
usage() { echo "usage: chamesle-boot [-b limine|grub] [DIR]" >&2; exit 2; }
loader=limine
+export MAG_YES=1
while getopts b: o; do
case $o in
b) loader=$OPTARG;;
diff --git a/tools/chamesle-bootstrap b/tools/chamesle-bootstrap
@@ -40,10 +40,11 @@ esac
mkdir -p "$target/etc/mag" "$target/dev" "$target/proc" "$target/sys" "$target/run" "$target/tmp" "$target/boot"
chmod 1777 "$target/tmp"
-cp $conf/repos "$target/etc/mag/repos"
+# the base never comes from the AUR: its index (15 MB) waits for the first mag update on the system
+grep -v '^aur ' $conf/repos > "$target/etc/mag/repos"
cp -R $conf/keys "$target/etc/mag/"
[ -n "$arch" ] && echo "$arch" > "$target/etc/mag/arch"
-export MAG_ROOT=$target
+export MAG_ROOT=$target MAG_YES=1
mag update
if [ $libc = glibc ]; then
# pacman's hooks (the initramfs, the users, tmpfiles) want /proc, /sys and /dev in there, as pacstrap gives them
@@ -51,6 +52,7 @@ if [ $libc = glibc ]; then
trap 'for m in run dev sys proc; do umount -R "$target/$m" 2>/dev/null; done' EXIT
mag install chamesle-base ${kernel:-linux} $firmware "$@"
rm -f "$target"/etc/mag/keys/*.gpg
+ cp $conf/repos "$target/etc/mag/repos"
# Artix's localmount would mount a second /sys over the cgroups: proc and sys are its services' to mount
[ -f "$target/etc/fstab" ] && sed -i '/^proc[[:space:]]/d; /^sysfs[[:space:]]/d' "$target/etc/fstab"
else