From af5b7a1fd26a80ae03462dc46878197fd3115370 Mon Sep 17 00:00:00 2001 From: debianpepper Date: Mon, 7 Aug 2023 21:54:46 +0900 Subject: [PATCH] The copy locations wer adjusted in the tuples Signed-off-by: debianpepper --- iso_configs/grub/deb_64/grub | 3 ++ python_modules/conf.py | 64 ++++++++++++++++++++---------------- python_modules/deb_64.py | 17 ++++++++-- python_modules/dev_64.py | 2 ++ 4 files changed, 55 insertions(+), 31 deletions(-) diff --git a/iso_configs/grub/deb_64/grub b/iso_configs/grub/deb_64/grub index f0e6cd4d..f4cff6c5 100755 --- a/iso_configs/grub/deb_64/grub +++ b/iso_configs/grub/deb_64/grub @@ -33,3 +33,6 @@ GRUB_GFXMODE=1360x768 #Grub theme GRUB_THEME="/boot/grub/themes/peppermint/theme.txt" + +# Uncomment this to run os-prober so search for and add other OS installations to the grub boot menu +GRUB_DISABLE_OS_PROBER=false diff --git a/python_modules/conf.py b/python_modules/conf.py index 0367f9b6..29d2d9ef 100644 --- a/python_modules/conf.py +++ b/python_modules/conf.py @@ -2,32 +2,37 @@ import paths # Copy folder lists for debian 64 -src_paths_deb64 = [paths.src_deb64_osrelease, - paths.src_deb64_osrelease, - paths.src_deb64_slpash, - paths.src_deb64_isolinux, - paths.src_deb64_multi, - paths.src_deb_grub_theme, - paths.src_deb64_modules, - paths.src_deb_splash_image, - paths.src_deb_splash_image, - paths.src_deb_live_theme - ] - -des_paths_deb64 =[paths.des_osrelease, - paths.des_osrelease_opt, - paths.des_splash, - paths.des_isolinux, - paths.des_archives, - paths.des_grub_theme, - paths.des_modules, - paths.des_splash_image_isolinux, - paths.des_splash_image_grub, - paths.des_live_theme - ] +# Source CHROOT +src_paths_chroot_deb64 = (paths.src_deb64_osrelease, + paths.src_deb64_osrelease, + paths.src_deb_grub_theme, + paths.src_deb64_modules, + ) +# Source NON CHROOT +src_paths_non_chroot_deb64 = ( paths.src_deb64_slpash, + paths.src_deb64_isolinux, + paths.src_deb64_multi, + paths.src_deb_splash_image, + paths.src_deb_splash_image, + paths.src_deb_live_theme + ) +# Destination CHROOT +des_paths_chroot_deb64 =(paths.des_osrelease, + paths.des_osrelease_opt, + paths.des_grub_theme, + paths.des_modules, + ) +# Destination NON CHROOT +des_paths_non_chroot_deb64 = (paths.des_splash, + paths.des_isolinux, + paths.des_archives, + paths.des_splash_image_isolinux, + paths.des_splash_image_grub, + paths.des_live_theme + ) # Copy file lists for debian 64 -src_files_deb64 = [paths.src_deb64_grub_etc, +src_files_deb64 = (paths.src_deb64_grub_etc, paths.src_deb64_settings, paths.src_deb64_installer, paths.src_deb64_sourcesfinal, @@ -35,8 +40,8 @@ src_files_deb64 = [paths.src_deb64_grub_etc, paths.src_deb64_netinstall, paths.src_deb64_sourcelist, paths.src_main_line_pep_id - ] -des_files_deb64 = [paths.des_grub_etc, + ) +des_files_deb64 = (paths.des_grub_etc, paths.des_setttings, paths.des_installer, paths.des_sourcesfinal, @@ -44,9 +49,10 @@ des_files_deb64 = [paths.des_grub_etc, paths.des_netinstall, paths.des_sourcelist, paths.des_main_line_pep_id - ] + ) -deb_64_cmds= ['lbinit', +# Run Deb 64 Commands +deb_64_cmds= ('lbinit', 'inflate_bubble.set_fusato_structure', 'inflate_bubble.set_desktop_environment', 'inflate_bubble.set_extra_packages', @@ -66,7 +72,7 @@ deb_64_cmds= ['lbinit', 'finish_cleanup.copy_iso_file_nightly_deb64', 'finish_cleanup.copy_iso_file_prod_deb64', 'finish_cleanup.kill_old_iso' - ] + ) ### Inflate bubble section diff --git a/python_modules/deb_64.py b/python_modules/deb_64.py index 96d0517d..37815e99 100644 --- a/python_modules/deb_64.py +++ b/python_modules/deb_64.py @@ -44,8 +44,9 @@ def copy_deb64_specific(): Then we copy specific files. The inputs are stored in the conf.py file """ - source_q = collections.deque(conf.src_paths_deb64) - destination_q = collections.deque(conf.des_paths_deb64) + # Get the CHROOT Folders + source_q = collections.deque(conf.src_paths_chroot_deb64) + destination_q = collections.deque(conf.des_paths_chroot_deb64) src_size_q = len(source_q) for p in range(src_size_q): x = source_q.popleft() @@ -54,6 +55,18 @@ def copy_deb64_specific(): WP_CHROOT + y, dirs_exist_ok=True ) + # Get the NONChroot Folders + source_n = collections.deque(conf.src_paths_non_chroot_deb64) + destination_n = collections.deque(conf.des_paths_non_chroot_deb64) + src_size_n = len(source_n) + for p in range(src_size_n): + x = source_n.popleft() + y = destination_n.popleft() + shutil.copytree(cur_dir + x, + cur_dir + y, + dirs_exist_ok=True + ) + # Get Specific files for Chroot source_f = collections.deque(conf.src_files_deb64) destination_f = collections.deque(conf.des_files_deb64) src_size_f = len(source_f) diff --git a/python_modules/dev_64.py b/python_modules/dev_64.py index 0e467993..6b8d65d0 100644 --- a/python_modules/dev_64.py +++ b/python_modules/dev_64.py @@ -81,6 +81,8 @@ def copy_dev64_specific(): cur_dir + paths.des_live_theme, dirs_exist_ok=True ) + + shutil.copy(cur_dir + paths.src_dev64_grub_etc, WP_CHROOT + paths.des_grub_etc )