fix: overwrite pacman mirrorlist directly
This commit is contained in:
parent
5d28f203cf
commit
952bcd738c
1 changed files with 1 additions and 5 deletions
6
akshara
6
akshara
|
@ -213,8 +213,6 @@ def update_system():
|
||||||
|
|
||||||
print(blend_release)
|
print(blend_release)
|
||||||
|
|
||||||
exec_chroot('cp', '/.new_rootfs/etc/pacman.d/mirrorlist', '/.new_rootfs/etc/pacman.d/mirrorlist.bkp')
|
|
||||||
|
|
||||||
with open('/.new_rootfs/etc/pacman.d/mirrorlist', 'w') as pacman_mirrorlist_conf:
|
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')
|
pacman_mirrorlist_conf.write('Server = https://cloudflaremirrors.com/archlinux/$repo/os/$arch\n')
|
||||||
|
|
||||||
|
@ -236,9 +234,7 @@ def update_system():
|
||||||
if return_val == 0:
|
if return_val == 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
exec_chroot('mv', '/.new_rootfs/etc/pacman.d/mirrorlist.bkp', '/.new_rootfs/etc/pacman.d/mirrorlist')
|
exec_chroot('reflector', '--latest', '5', '--protocol', 'https', '--sort', 'rate', '--save', '/etc/pacman.d/mirrorlist')
|
||||||
|
|
||||||
exec_chroot('reflector', '--latest', '20', '--protocol', 'https', '--sort', 'rate', '--save', '/etc/pacman.d/mirrorlist')
|
|
||||||
|
|
||||||
#exec_chroot('sed', 's/#//g', '-i', '/etc/pacman.d/mirrorlist')
|
#exec_chroot('sed', 's/#//g', '-i', '/etc/pacman.d/mirrorlist')
|
||||||
#exec_chroot('bash', '-c', 'grep "^Server =" /etc/pacman.d/mirrorlist > /etc/pacman.d/mirrorlist.tmp; mv /etc/pacman.d/mirrorlist.tmp /etc/pacman.d/mirrorlist')
|
#exec_chroot('bash', '-c', 'grep "^Server =" /etc/pacman.d/mirrorlist > /etc/pacman.d/mirrorlist.tmp; mv /etc/pacman.d/mirrorlist.tmp /etc/pacman.d/mirrorlist')
|
||||||
|
|
Loading…
Reference in a new issue