Update: Refractored the gbf section of the cleanup

Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
debianpepper 2023-10-19 21:41:18 +09:00
parent e1c6b5c941
commit 459f8518d1
2 changed files with 218 additions and 210 deletions

View File

@ -124,15 +124,10 @@ class BuildXfce:
def cleanup_helper(self): def cleanup_helper(self):
""" Clean up Helper to move the ISOs to the nightly location """ """ Clean up Helper to move the ISOs to the nightly location """
if self.sbase == "deb": finish_cleanup.make_check_sum()
finish_cleanup.make_check_sum() finish_cleanup.check_build_type_xfce()
finish_cleanup.check_build_type() finish_cleanup.kill_old_iso()
finish_cleanup.kill_old_iso()
else:
finish_cleanup.make_check_sum()
finish_cleanup.copy_devuan_xfce_based()
finish_cleanup.kill_old_iso()
def build_system(self): def build_system(self):
""" Builds the ISO XFCE Depedning on the Arch """ """ Builds the ISO XFCE Depedning on the Arch """
@ -249,15 +244,10 @@ class BuildGflashback:
def cleanup_helper(self): def cleanup_helper(self):
""" Clean up Helper to move the ISOs to the nightly location """ """ Clean up Helper to move the ISOs to the nightly location """
if self.sbase == "deb": finish_cleanup.make_check_sum()
finish_cleanup.make_check_sum() finish_cleanup.check_build_type_xfce()
finish_cleanup.copy_debian_gfb_based() finish_cleanup.kill_old_iso()
finish_cleanup.kill_old_iso()
else:
finish_cleanup.make_check_sum()
finish_cleanup.copy_devuan_gfb_based()
finish_cleanup.kill_old_iso()
def build_system(self): def build_system(self):
""" Builds the ISO GFB Depedning on the Arch """ """ Builds the ISO GFB Depedning on the Arch """

View File

@ -36,8 +36,8 @@ def make_check_sum():
os.system(gen_sum) os.system(gen_sum)
def check_build_type(): def check_build_type_xfce():
""" Simply used to change Directory to the root of fusato """ """ Decided which ISO needs to be moved for XFCE """
os.chdir(HOME_FOLDER + FUSATO_ROOT) os.chdir(HOME_FOLDER + FUSATO_ROOT)
look_for_file = ['deb.64xfc', 'deb.32xfc', 'deb.armxfc', look_for_file = ['deb.64xfc', 'deb.32xfc', 'deb.armxfc',
'dev.64xfc', 'dev.32xfc', 'dev.armxfc' 'dev.64xfc', 'dev.32xfc', 'dev.armxfc'
@ -63,8 +63,8 @@ def check_build_type():
process_deb_arm_xfce() process_deb_arm_xfce()
break break
else: else:
#check_devuan_xfce() check_devuan_xfce()
print("Nothing to do") break
def check_devuan_xfce(): def check_devuan_xfce():
@ -74,20 +74,75 @@ def check_build_type():
check_path = Path(build_version) check_path = Path(build_version)
if check_path.is_file(): if check_path.is_file():
process_dev_64_xfce() process_dev_64_xfce()
break
elif build_version == look_for_file[4]: elif build_version == look_for_file[4]:
check_path = Path(build_version) check_path = Path(build_version)
if check_path.is_file(): if check_path.is_file():
process_dev_32_xfce() process_dev_32_xfce()
break
elif build_version == look_for_file[5]: elif build_version == look_for_file[5]:
check_path = Path(build_version) check_path = Path(build_version)
if check_path.is_file(): if check_path.is_file():
process_dev_arm_xfce() process_dev_arm_xfce()
break
else: else:
#check_devuan_gfb()
print("Nothing to do") print("Nothing to do")
break
check_debian_xfce() check_debian_xfce()
def check_build_type_gfb():
""" Decided which ISO needs to be moved for gfb """
os.chdir(HOME_FOLDER + FUSATO_ROOT)
look_for_file = ['deb.64gfb', 'deb.32gfb', 'deb.armgfb'
'dev.64gfb', 'dev.32gfb', 'dev.armgfb'
]
def check_debian_gfb():
""" Check is a debian build is needed """
for build_version in look_for_file:
if build_version == look_for_file[0]:
check_path = Path(build_version)
if check_path.is_file():
process_deb_64_gfb()
break
elif build_version == look_for_file[1]:
check_path = Path(build_version)
if check_path.is_file():
process_deb_32_gfb()
break
elif build_version == look_for_file[2]:
check_path = Path(build_version)
if check_path.is_file():
process_deb_arm_gfb()
break
else:
check_devuan_gfb()
break
def check_devuan_gfb():
""" Check is a debian build is needed """
for build_version in look_for_file:
if build_version == look_for_file[3]:
check_path = Path(build_version)
if check_path.is_file():
process_dev_64_gfb()
break
elif build_version == look_for_file[4]:
check_path = Path(build_version)
if check_path.is_file():
process_dev_32_gfb()
break
elif build_version == look_for_file[5]:
check_path = Path(build_version)
if check_path.is_file():
process_dev_arm_gfb()
break
else:
print("Nothing to do")
break
check_debian_gfb()
# Debian XFCE # # Debian XFCE #
@ -234,68 +289,159 @@ def process_dev_arm_xfce():
os.rename(src_sum, rdes_sum) os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum) shutil.copy(rdes_sum, des_sum)
def copy_debian_gfb_based():
""" Copy the new ISO debian base to its Nightly folder
Gnome Flashback # Debian Gnome Flashback #
def process_deb_64_gfb():
"""
Copy the NEW 64 bit Debian base to its Nightly folder
GnomeFlashBack
""" """
os.chdir(HOME_FOLDER + FUSATO_ROOT)
current_working_directory = os.listdir(".") current_working_directory = os.listdir(".")
today = str(date.today()) today = str(date.today())
look_for_file_64 = Path('deb.64gfb') for files in current_working_directory:
look_for_file_32 = Path('deb.32gfb') if files.endswith('.iso'):
look_for_file_arm = Path('deb.armgfb') src_iso = files
rdes = (BASE_NAME + '-Debian_64_gfb'
+ today +
'.iso'
)
des_iso = BASE_DESTINATION + 'deb64/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if files.endswith('.checksum'):
src_sum = files
rdes_sum = BASE_NAME + 'Debian_64_gfb-sha512.checksum'
des_sum = BASE_DESTINATION + 'deb64/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
def process_deb_32_gfb():
"""
Copy the NEW 32 bit Debian base to its Nightly folder
GnomeFlashBack
"""
current_working_directory = os.listdir(".")
today = str(date.today())
for files in current_working_directory:
if files.endswith('.iso'):
src_iso = files
rdes = (BASE_NAME + '-Debian_32_gfb'
+ today +
'.iso'
)
des_iso = BASE_DESTINATION + 'deb32/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if files.endswith('.checksum'):
src_sum = files
rdes_sum = BASE_NAME + 'Debian_32_gfb-sha512.checksum'
des_sum = BASE_DESTINATION + 'deb32/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
def process_deb_arm_gfb():
"""
Copy the NEW arm bit Debian base to its Nightly folder
GnomeFlashBack
"""
current_working_directory = os.listdir(".")
today = str(date.today())
for files in current_working_directory:
if files.endswith('.iso'):
src_iso = files
rdes = (BASE_NAME + '-Debian_arm_gfb'
+ today +
'.iso'
)
des_iso = BASE_DESTINATION + 'debarm/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if files.endswith('.checksum'):
src_sum = files
rdes_sum = BASE_NAME + 'Debian_arm_gfb-sha512.checksum'
des_sum = BASE_DESTINATION + 'debarm/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
# Devuan Gnome Flashback
def process_dev_64_gfb():
"""
Copy the NEW 64 bit Devuan base to its Nightly folder
GnomeFlashBack
"""
current_working_directory = os.listdir(".")
today = str(date.today())
for files in current_working_directory:
if files.endswith('.iso'):
src_iso = files
rdes = (BASE_NAME + '-Devuan_64_gfb'
+ today +
'.iso'
)
des_iso = BASE_DESTINATION + 'dev64/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if files.endswith('.checksum'):
src_sum = files
rdes_sum = BASE_NAME + 'Devuan_64_gfb-sha512.checksum'
des_sum = BASE_DESTINATION + 'dev64/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
def process_dev_32_gfb():
"""
Copy the NEW 32 bit Devuan base to its Nightly folder
GnomeFlashBack
"""
current_working_directory = os.listdir(".")
today = str(date.today())
for files in current_working_directory:
if files.endswith('.iso'):
src_iso = files
rdes = (BASE_NAME + '-Devuan_32_gfb'
+ today +
'.iso'
)
des_iso = BASE_DESTINATION + 'dev32/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if files.endswith('.checksum'):
src_sum = files
rdes_sum = BASE_NAME + 'Devuan_32_gfb-sha512.checksum'
des_sum = BASE_DESTINATION + 'dev32/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
def process_dev_arm_gfb():
"""
Copy the NEW arm bit Devuan base to its Nightly folder
GnomeFlashBack
"""
current_working_directory = os.listdir(".")
today = str(date.today())
for files in current_working_directory:
if files.endswith('.iso'):
src_iso = files
rdes = (BASE_NAME + '-Devuan_arm_gfb'
+ today +
'.iso'
)
des_iso = BASE_DESTINATION + 'devarm/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if files.endswith('.checksum'):
src_sum = files
rdes_sum = BASE_NAME + 'Devuan_arm_gfb-sha512.checksum'
des_sum = BASE_DESTINATION + 'devarm/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
if look_for_file_64.is_file():
for f_v in current_working_directory:
if f_v.endswith('.iso'):
src_iso = f_v
rdes = ('PeppermintOS-Debian_64_gfb'
+ today +
'.iso'
)
des_iso = '/var/www/html/nightly/deb64/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if f_v.endswith('.checksum'):
src_sum = f_v
rdes_sum = 'PeppermintOS-Debian_64_gfb-sha512.checksum'
des_sum = '/var/www/html/nightly/deb64/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
elif look_for_file_32.is_file():
for f_v in current_working_directory:
if f_v.endswith('.iso'):
src_iso = f_v
rdes = ('PeppermintOS-Debian_32_gfb'
+ today +
'.iso'
)
des_iso = '/var/www/html/nightly/deb32/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if f_v.endswith('.checksum'):
src_sum = f_v
rdes_sum = 'PeppermintOS-Debian_32-sha512.checksum'
des_sum = '/var/www/html/nightly/deb32/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
elif look_for_file_arm.is_file():
for f_v in current_working_directory:
if f_v.endswith('.iso'):
src_iso = f_v
rdes = ('PeppermintOS-Debian_arm_gfb'
+ today +
'.iso'
)
des_iso = '/var/www/html/nightly/debarm/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if f_v.endswith('.checksum'):
src_sum = f_v
rdes_sum = 'PeppermintOS-Debian_arm_gfb-sha512.checksum'
des_sum = '/var/www/html/nightly/debarm/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
def copy_debian_opb_based(): def copy_debian_opb_based():
""" Copy the new ISO debian base to its Nightly folder """ Copy the new ISO debian base to its Nightly folder
@ -361,134 +507,6 @@ def copy_debian_opb_based():
shutil.copy(rdes_sum, des_sum) shutil.copy(rdes_sum, des_sum)
def copy_devuan_xfce_based():
""" Copy the new ISO devuan baseto its Nightly folder
XFCE
"""
os.chdir(HOME_FOLDER + FUSATO_ROOT)
current_working_directory = os.listdir(".")
today = str(date.today())
look_for_file_64 = Path('dev.64xfc')
look_for_file_32 = Path('dev.32xfc')
look_for_file_arm = Path('dev.armxfc')
if look_for_file_64.is_file():
for f_v in current_working_directory:
if f_v.endswith('.iso'):
src_iso = f_v
rdes = ('PeppermintOS-devuan_64_xfce'
+ today +
'.iso'
)
des_iso = '/var/www/html/nightly/dev64/xfce'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if f_v.endswith('.checksum'):
src_sum = f_v
rdes_sum = 'PeppermintOS-devuan_64_xfce-sha512.checksum'
des_sum = '/var/www/html/nightly/dev64/xfce'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
elif look_for_file_32.is_file():
for f_v in current_working_directory:
if f_v.endswith('.iso'):
src_iso = f_v
rdes = ('PeppermintOS-devuan_32_xfce'
+ today +
'.iso'
)
des_iso = '/var/www/html/nightly/dev32/xfce'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if f_v.endswith('.checksum'):
src_sum = f_v
rdes_sum = 'PeppermintOS-devuan_32_xfce-sha512.checksum'
des_sum = '/var/www/html/nightly/dev32/xfce'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
elif look_for_file_arm.is_file():
for f_v in current_working_directory:
if f_v.endswith('.iso'):
src_iso = f_v
rdes = ('PeppermintOS-devuan_arm_xfce'
+ today +
'.iso'
)
des_iso = '/var/www/html/nightly/devarm/xfce'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if f_v.endswith('.checksum'):
src_sum = f_v
rdes_sum = 'PeppermintOS-devuan_arma_xfce-sha512.checksum'
des_sum = '/var/www/html/nightly/devarm/xfce'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
def copy_devuan_gfb_based():
""" Copy the new ISO devuan base to its Nightly folder
Gnome Flashback
"""
os.chdir(HOME_FOLDER + FUSATO_ROOT)
current_working_directory = os.listdir(".")
today = str(date.today())
look_for_file_64 = Path('dev.64gfb')
look_for_file_32 = Path('dev.32gfb')
look_for_file_arm = Path('dev.armgfb')
if look_for_file_64.is_file():
for f_v in current_working_directory:
if f_v.endswith('.iso'):
src_iso = f_v
rdes = ('PeppermintOS-devuan_64_gfb'
+ today +
'.iso'
)
des_iso = '/var/www/html/nightly/dev64/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if f_v.endswith('.checksum'):
src_sum = f_v
rdes_sum = 'PeppermintOS-devuan_64_gfb-sha512.checksum'
des_sum = '/var/www/html/nightly/dev64/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
elif look_for_file_32.is_file():
for f_v in current_working_directory:
if f_v.endswith('.iso'):
src_iso = f_v
rdes = ('PeppermintOS-devuan_32_gfb'
+ today +
'.iso'
)
des_iso = '/var/www/html/nightly/dev32/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if f_v.endswith('.checksum'):
src_sum = f_v
rdes_sum = 'PeppermintOS-devuan_32-sha512.checksum'
des_sum = '/var/www/html/nightly/dev32/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
elif look_for_file_arm.is_file():
for f_v in current_working_directory:
if f_v.endswith('.iso'):
src_iso = f_v
rdes = ('PeppermintOS-devuan_arm_gfb'
+ today +
'.iso'
)
des_iso = '/var/www/html/nightly/devarm/gnome-flashback'
os.rename(src_iso, rdes)
shutil.copy(rdes, des_iso)
if f_v.endswith('.checksum'):
src_sum = f_v
rdes_sum = 'PeppermintOS-devuan_arm_gfb-sha512.checksum'
des_sum = '/var/www/html/nightly/devarm/gnome-flashback'
os.rename(src_sum, rdes_sum)
shutil.copy(rdes_sum, des_sum)
def copy_devuan_opb_based(): def copy_devuan_opb_based():
""" Copy the new ISO devuan base to its Nightly folder """ Copy the new ISO devuan base to its Nightly folder
OpenBox OpenBox