Testing: Updated Modules
Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
parent
39cca49267
commit
8da69b3d8f
|
@ -132,10 +132,14 @@ class BuildGflashback:
|
||||||
Determine what base to use and then build the ISO
|
Determine what base to use and then build the ISO
|
||||||
"""
|
"""
|
||||||
def __init__(self, sbase, sarch):
|
def __init__(self, sbase, sarch):
|
||||||
|
""" init the build process"""
|
||||||
self.sbase = sbase
|
self.sbase = sbase
|
||||||
self.sarch = sarch
|
self.sarch = sarch
|
||||||
# Change to the root of Fusato
|
self.change_to_fusato_root_and_build()
|
||||||
# then run the buils
|
|
||||||
|
|
||||||
|
def change_to_fusato_root_and_build(self):
|
||||||
|
""" change to the correct folder for the build """
|
||||||
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
os.chdir(HOME_FOLDER + FUSATO_ROOT)
|
||||||
self.build_system()
|
self.build_system()
|
||||||
|
|
||||||
|
@ -144,75 +148,46 @@ class BuildGflashback:
|
||||||
"""
|
"""
|
||||||
Helper for the lb setup this is shared for all builds
|
Helper for the lb setup this is shared for all builds
|
||||||
"""
|
"""
|
||||||
if self.sbase == "deb":
|
lbsetup = None
|
||||||
if self.sarch[1:] == "64":
|
if self.sbase in ["deb", "dev"]:
|
||||||
lbsetup = conf.LBSET_DEB64
|
arch_suffix = self.sarch[1:]
|
||||||
|
if arch_suffix in ["64", "32", "arm"]:
|
||||||
|
lbsetup = getattr(conf,
|
||||||
|
f"LBSET_{self.sbase.upper()}{arch_suffix}"
|
||||||
|
)
|
||||||
os.system(lbsetup)
|
os.system(lbsetup)
|
||||||
elif self.sarch[1:] == "32":
|
return lbsetup
|
||||||
lbsetup = conf.LBSET_DEB32
|
|
||||||
os.system(lbsetup)
|
|
||||||
elif self.sarch[1:] == "arm":
|
|
||||||
lbsetup = conf.LBSET_DEBARM
|
|
||||||
os.system(lbsetup)
|
|
||||||
else:
|
|
||||||
lbsetup = None
|
|
||||||
elif self.sbase == "dev":
|
|
||||||
if self.sarch[1:] == "64":
|
|
||||||
lbsetup = conf.LBSET_DEV64
|
|
||||||
os.system(lbsetup)
|
|
||||||
elif self.sarch[1:] == "32":
|
|
||||||
lbsetup = conf.LBSET_DEV32
|
|
||||||
os.system(lbsetup)
|
|
||||||
elif self.sarch[1:] == "arm":
|
|
||||||
lbsetup = conf.LBSET_DEVARM
|
|
||||||
os.system(lbsetup)
|
|
||||||
else:
|
|
||||||
lbsetup = None
|
|
||||||
|
|
||||||
|
|
||||||
def infra_helper(self):
|
def infra_helper(self):
|
||||||
"""
|
"""
|
||||||
Helper for the infra classes this is shared for all builds
|
Helper for the infra classes this is shared for all builds
|
||||||
"""
|
"""
|
||||||
infra.ChrootFolders(self.sbase, self.sarch)
|
infra_methods = [infra.ChrootFolders, infra.BinaryFolders,
|
||||||
infra.BinaryFolders(self.sbase, self.sarch)
|
infra.ArchitectureFiles, infra.Archive
|
||||||
infra.ArchitectureFiles(self.sbase, self.sarch)
|
]
|
||||||
infra.Archive(self.sbase, self.sarch)
|
for method in infra_methods:
|
||||||
|
method(self.sbase, self.sarch)
|
||||||
|
|
||||||
|
|
||||||
def gfb_helper(self):
|
def gfb_helper(self):
|
||||||
"""
|
"""
|
||||||
Helper for the gfb desktop shared for all builds
|
Helper for the gfb desktop shared for all builds
|
||||||
"""
|
"""
|
||||||
if self.sarch[1:] == "64":
|
arch_suffix = self.sarch[1:]
|
||||||
cmd_list = collections.deque(conf.build64_gfb_build)
|
cmd_list = None
|
||||||
list_size = len(cmd_list)
|
if arch_suffix in ["64", "32", "arm"]:
|
||||||
for _ in range(list_size):
|
cmd_list = getattr(conf, f"build{arch_suffix}_gfb_build", [])
|
||||||
i = cmd_list.popleft()
|
for command in cmd_list:
|
||||||
execute = i + '()'
|
execute = command + '()'
|
||||||
exec(execute)
|
exec(execute)
|
||||||
elif self.sarch[1:] == "32":
|
return cmd_list
|
||||||
cmd_list = collections.deque(conf.build32_gfb_build)
|
|
||||||
list_size = len(cmd_list)
|
|
||||||
for _ in range(list_size):
|
|
||||||
i = cmd_list.popleft()
|
|
||||||
execute = i + '()'
|
|
||||||
exec(execute)
|
|
||||||
elif self.sarch[1:] == "arm":
|
|
||||||
cmd_list = collections.deque(conf.buildarm_gfb_build)
|
|
||||||
list_size = len(cmd_list)
|
|
||||||
for _ in range(list_size):
|
|
||||||
i = cmd_list.popleft()
|
|
||||||
execute = i + '()'
|
|
||||||
exec(execute)
|
|
||||||
else:
|
|
||||||
cmd_list = None
|
|
||||||
|
|
||||||
|
|
||||||
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 """
|
||||||
finish_cleanup.make_check_sum()
|
finish_cleanup.make_check_sum()
|
||||||
finish_cleanup.check_build_type_xfce()
|
finish_cleanup.check_build_type_gfb()
|
||||||
finish_cleanup.kill_old_iso()
|
finish_cleanup.kill_old_iso()
|
||||||
|
|
||||||
|
|
||||||
|
@ -302,55 +277,41 @@ class Decsions:
|
||||||
|
|
||||||
def dgnomefb(self):
|
def dgnomefb(self):
|
||||||
""" Arguments for the gnomefb """
|
""" Arguments for the gnomefb """
|
||||||
if self.arguments.e == 'e-gnomefb':
|
build_type_mapping = {
|
||||||
if self.arguments.b == 'b-deb64':
|
'b-deb64': ("deb", "_64"),
|
||||||
readybuild()
|
'b-deb32': ("deb", "_32"),
|
||||||
BuildGflashback("deb", "_64")
|
'b-dev64': ("dev", "_64"),
|
||||||
elif self.arguments.b == 'b-deb32':
|
'b-dev32': ("dev", "_32"),
|
||||||
readybuild()
|
'b-debarm': ("deb", "_arm"),
|
||||||
BuildGflashback("deb", "_32")
|
'b-devarm': ("dev", "_arm"),
|
||||||
elif self.arguments.b == 'b-debarm':
|
}
|
||||||
readybuild()
|
|
||||||
BuildGflashback("deb", "_arm")
|
build_argument = self.arguments.b
|
||||||
elif self.arguments.b == 'b-dev32':
|
if build_argument in build_type_mapping:
|
||||||
readybuild()
|
readybuild()
|
||||||
BuildGflashback("dev", "_32")
|
BuildGflashback(*build_type_mapping[build_argument])
|
||||||
elif self.arguments.b == 'b-dev64':
|
else:
|
||||||
readybuild()
|
logger.critical("You have not specified a build to process!")
|
||||||
BuildGflashback("dev", "_64")
|
|
||||||
elif self.arguments.b == 'b-devarm':
|
|
||||||
readybuild()
|
|
||||||
BuildGflashback("dev", "_arm")
|
|
||||||
else:
|
|
||||||
logger.critical("You have not specified a build to process!")
|
|
||||||
|
|
||||||
|
|
||||||
def dopenbox(self):
|
def dopenbox(self):
|
||||||
""" Arguments for the openbox """
|
""" Arguments for the openbox """
|
||||||
if self.arguments.e == 'e-openbox':
|
build_type_mapping = {
|
||||||
if self.arguments.b == 'b-deb64':
|
'b-deb64': ("deb", "_64"),
|
||||||
readybuild()
|
'b-deb32': ("deb", "_32"),
|
||||||
print('run openbox builds deb64')
|
'b-dev64': ("dev", "_64"),
|
||||||
elif self.arguments.b == 'b-deb32':
|
'b-dev32': ("dev", "_32"),
|
||||||
readybuild()
|
'b-debarm': ("deb", "_arm"),
|
||||||
print('run openbox builds deb32')
|
'b-devarm': ("dev", "_arm"),
|
||||||
elif self.arguments.b == 'b-dev64':
|
}
|
||||||
readybuild()
|
|
||||||
print('run openbox builds dev64')
|
build_argument = self.arguments.b
|
||||||
elif self.arguments.b == 'b-dev32':
|
if build_argument in build_type_mapping:
|
||||||
readybuild()
|
pass
|
||||||
print('run openbox builds dev32')
|
#readybuild()
|
||||||
elif self.arguments.b == 'b-debarm':
|
#BuildGflashback(*build_type_mapping[build_argument])
|
||||||
readybuild()
|
|
||||||
print('run openbox builds debarm')
|
|
||||||
elif self.arguments.b == 'b-devarm':
|
|
||||||
readybuild()
|
|
||||||
print('run openbox builds devarm')
|
|
||||||
else:
|
|
||||||
print('You have not specified a valid '
|
|
||||||
'build architecture!!')
|
|
||||||
else:
|
else:
|
||||||
logger.critical("You have not specified a valid "
|
logger.critical("You have not specified a build to process!")
|
||||||
"desktop environment!!")
|
|
||||||
|
|
||||||
Decsions()
|
Decsions()
|
||||||
|
|
Loading…
Reference in New Issue