File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 5353from archinstall .lib .packages .packages import installed_package
5454from archinstall .lib .pacman .config import PacmanConfig
5555from archinstall .lib .pacman .pacman import Pacman
56- from archinstall .lib .pathnames import PACMAN_CONF
56+ from archinstall .lib .pathnames import MIRRORLIST , PACMAN_CONF
5757from archinstall .lib .plugins import plugins
5858from archinstall .lib .translationhandler import tr
5959
@@ -565,9 +565,12 @@ def set_mirrors(
565565 if result := plugin .on_mirrors (mirror_config ):
566566 mirror_config = result
567567
568- root = self .target if on_target else Path ('/' )
569- mirrorlist_config = root / 'etc/pacman.d/mirrorlist'
570- pacman_config = root / PACMAN_CONF .relative_to_root ()
568+ if on_target :
569+ mirrorlist_config = self .target / MIRRORLIST .relative_to_root ()
570+ pacman_config = self .target / PACMAN_CONF .relative_to_root ()
571+ else :
572+ mirrorlist_config = MIRRORLIST
573+ pacman_config = PACMAN_CONF
571574
572575 repositories_config = mirror_config .repositories_config ()
573576 if repositories_config :
Original file line number Diff line number Diff line change 66from archinstall .lib .models .mirrors import MirrorStatusEntryV3 , MirrorStatusListV3
77from archinstall .lib .networking import fetch_data_from_url
88from archinstall .lib .output import debug , info
9+ from archinstall .lib .pathnames import MIRRORLIST
910
1011
1112class MirrorListHandler :
1213 def __init__ (
1314 self ,
14- local_mirrorlist : Path = Path ( '/etc/pacman.d/mirrorlist' ) ,
15+ local_mirrorlist : Path = MIRRORLIST ,
1516 offline : bool = False ,
1617 verbose : bool = False ,
1718 ) -> None :
Original file line number Diff line number Diff line change 44from archinstall .lib .linux_path import LPath
55
66ARCHISO_MOUNTPOINT : Final = Path ('/run/archiso/airootfs' )
7+ MIRRORLIST : Final = LPath ('/etc/pacman.d/mirrorlist' )
78PACMAN_CONF : Final = LPath ('/etc/pacman.conf' )
You can’t perform that action at this time.
0 commit comments