@@ -202,12 +202,11 @@ def step10_emerge_pkgs(args, cfg):
202
202
completestep (10 , "pkgs" )
203
203
204
204
def step11_kernel (args , cfg ):
205
- # at this point, genkernel will be installed
205
+ # at this point, genkernel will be installed. Please note that configuration files must be copied before this point
206
206
LOG .info (f":: Step 11: kernel" )
207
207
proc = Popen (["eselect" , "kernel" , "set" , "1" ])
208
208
proc .communicate ()
209
209
if not args .kernel_dist :
210
- os .chdir (args .kernel_dir )
211
210
threads = str (gentooimgr .config .THREADS )
212
211
gentooimgr .kernel .build_kernel (args , cfg )
213
212
@@ -379,6 +378,8 @@ def prechroot(args, cfg):
379
378
"""
380
379
LOG .info ("\t ::Doing some pre-chroot work" )
381
380
gentooimgr .kernel .kernel_copy_conf (args , cfg )
381
+ exists = os .path .exists (cfg .get ("kernel" , {}).get ("path" , gentooimgr .kernel .DEFAULT_KERNEL_CONFIG_PATH ))
382
+ LOG .info (f"\t ::Kernel configuration exists: { exists } " )
382
383
383
384
def configure (args , config : dict ) -> int :
384
385
# Load configuration
@@ -410,7 +411,9 @@ def configure(args, config: dict) -> int:
410
411
LOG .info (":: Binding and Mounting, Entering CHROOT" )
411
412
prechroot (args , cfg )
412
413
gentooimgr .chroot .bind ()
414
+ os .chdir (os .sep )
413
415
os .chroot (config .get ("mountpoint" ))
416
+ os .chdir (os .sep )
414
417
415
418
# emerge --sync
416
419
if not stepdone (9 ): step9_sync (args , cfg )
0 commit comments