feat: use 1.1.1.1 when installing packages

This commit is contained in:
Rudra Saraswat 2024-06-05 18:34:05 +00:00
parent dada7f79d3
commit a0b4a25934

View file

@ -222,6 +222,11 @@ def update_system():
if type(blend_release.get('user-services')) == list:
user_services += blend_release.get('user-services')
exec_chroot('cp', '/.new_rootfs/etc/resolv.conf', '/.new_rootfs/etc/resolv.conf.orig')
with open('/.new_rootfs/etc/resolv.conf', 'w') as pacman_mirrorlist_conf:
pacman_mirrorlist_conf.write('nameserver 1.1.1.1\n')
with open('/.new_rootfs/etc/pacman.d/mirrorlist', 'w') as pacman_mirrorlist_conf:
pacman_mirrorlist_conf.write('Server = https://cloudflaremirrors.com/archlinux/$repo/os/$arch\n')
@ -347,6 +352,8 @@ Server = {package_repo["repo-url"]}
exec('cp', '-ax', '/etc/locale.gen', '/.new_rootfs/etc/locale.gen')
exec_chroot('locale-gen')
exec_chroot('mv', '/.new_rootfs/etc/resolv.conf.orig', '/.new_rootfs/etc/resolv.conf')
exec('cp', '-ax', '/.new_rootfs/etc', '/.new.etc')
if os.environ.get('AKSHARA_INSTALL') == '1':