diff options
| author | Nippy <nippy@Nippy-Mac-mini.local> | 2026-10-07 17:42:26 +0200 |
|---|---|---|
| committer | Nippy <nippy@Nippy-Mac-mini.local> | 2026-10-07 17:42:26 +0200 |
| commit | fd9c185c60eba55a66c62e4a73a3b17bd1fd0026 (patch) | |
| tree | 594384c0d4a228d761e248b432be4f724aa01262 /raveos-mirrorlist/raveos-mirrorlist.install | |
| parent | 61bec98143c421f22871603c958c0df869bff702 (diff) | |
| download | RaveOS-PKGBUILD-fd9c185c60eba55a66c62e4a73a3b17bd1fd0026.tar.gz RaveOS-PKGBUILD-fd9c185c60eba55a66c62e4a73a3b17bd1fd0026.zip | |
fos gnome
Diffstat (limited to 'raveos-mirrorlist/raveos-mirrorlist.install')
| -rw-r--r-- | raveos-mirrorlist/raveos-mirrorlist.install | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/raveos-mirrorlist/raveos-mirrorlist.install b/raveos-mirrorlist/raveos-mirrorlist.install index ce67191..c44a35e 100644 --- a/raveos-mirrorlist/raveos-mirrorlist.install +++ b/raveos-mirrorlist/raveos-mirrorlist.install @@ -10,17 +10,52 @@ _patch_pacman_conf() { conf=/etc/pacman.conf [ -f "$conf" ] || return 0 - # Csak akkor nyulunk hozza, ha pontosan a regi, egysoros Server= allapotot - # talaljuk (meg nincs Include-ra atallitva) - igy nem irunk felul kezzel - # modositott konfigot. + # 1) Regi, egysoros Server= allapot -> Include= (GitHub tartalek szerverrel). if grep -qF 'Server = https://page.rp1.hu/x86_64/' "$conf" \ && ! grep -qF 'Include = /etc/pacman.d/raveos-core-mirrorlist' "$conf"; then sed -i \ '\|^Server = https://page.rp1.hu/x86_64/$|c\Include = /etc/pacman.d/raveos-core-mirrorlist' \ "$conf" - # Ha a masodlagos Server sor is mar ott volt kulon sorban, azt kivesszuk, - # mert most mar az Include fajl adja mindket szervert. sed -i '\|^Server = https://github.com/rave-os/RaveOS-core-repo-mirror/releases/download/core-repo-x86_64/$|d' "$conf" echo "raveos-mirrorlist: /etc/pacman.conf frissitve (raveos-core-repo -> Include mirrorlist, GitHub tartalek szerverrel)" fi + + # 2) [raveos-core-repo] szekcio athelyezese a [core] ELE. + # A pacman az ELSO repot valasztja azonos nevu csomagra, verziotol + # fuggetlenul - ha a raveos repo hatul van, az official csomagok nyernek. + core_line=$(grep -n '^\[core\]' "$conf" | head -n1 | cut -d: -f1) + rav_line=$(grep -n '^\[raveos-core-repo\]' "$conf" | head -n1 | cut -d: -f1) + if [ -n "$core_line" ] && [ -n "$rav_line" ] && [ "$rav_line" -gt "$core_line" ]; then + [ -f "$conf.raveos-bak" ] || cp -f "$conf" "$conf.raveos-bak" 2>/dev/null || true + if awk ' + NR==FNR { + if ($0 ~ /^\[raveos-core-repo\]/) grab=1 + else if (grab && $0 ~ /^\[/) grab=0 + if (grab) block = block $0 "\n" + next + } + { + if (skip) { + if ($0 ~ /^\[/) { skip=0; print; next } + next + } + if ($0 ~ /^\[raveos-core-repo\]/) { skip=1; next } + if ($0 ~ /^\[core\]/ && !moved) { printf "%s", block; moved=1 } + print + } + ' "$conf" "$conf" > "$conf.raveos-new" && mv -f "$conf.raveos-new" "$conf"; then + echo "raveos-mirrorlist: [raveos-core-repo] athelyezve a [core] ele (repo-sorrend javitas)" + else + rm -f "$conf.raveos-new" + echo "raveos-mirrorlist: FIGYELEM - a [raveos-core-repo] athelyezes nem sikerult" + fi + fi + + # 3) IgnorePkg: a gnome lista torlese (a repo-sorrend mar nyer; az IgnorePkg + # blokkolna a sajat frissiteseinket). A kernel pin meghagyva. + if grep -q '^IgnorePkg' "$conf"; then + sed -i 's/^IgnorePkg.*/IgnorePkg = linux-cachyos linux-cachyos-headers/' "$conf" + fi + + echo "raveos-mirrorlist: kesz - futtass meg egy 'pacman -Syu'-t a GNOME 50 pin ervenyesitesehez" } |