2023-12-21 19:42:13 +00:00
|
|
|
"""Step 1: Disk Partitioning
|
|
|
|
Step 2: Mounting {gentooimgr.config.GENTOO_MOUNT}
|
|
|
|
Step 3: Stage3 Tarball
|
|
|
|
Step 4: Binding Filesystems
|
|
|
|
Step 5: Portage
|
|
|
|
Step 6: Licenses
|
|
|
|
Step 7: Repo Configuration
|
|
|
|
Step 8: Resolv
|
|
|
|
Step 9: sync
|
|
|
|
Step 10: emerge pkgs
|
|
|
|
Step 11: kernel
|
|
|
|
Step 12: kernel
|
|
|
|
Step 13: Serial
|
|
|
|
Step 14: Services
|
|
|
|
Step 15: Eth Naming
|
|
|
|
Step 16: Sysconfig
|
|
|
|
Step 17: fstab
|
|
|
|
"""
|
|
|
|
import os
|
2023-12-26 00:06:43 +00:00
|
|
|
import sys
|
2023-12-21 18:53:25 +00:00
|
|
|
import json
|
2023-12-21 19:42:13 +00:00
|
|
|
|
|
|
|
# from gentooimgr import LOG
|
2023-12-21 18:53:25 +00:00
|
|
|
import gentooimgr.config
|
|
|
|
import gentooimgr.configs
|
2023-12-26 00:06:43 +00:00
|
|
|
from gentooimgr import install
|
2023-12-21 18:53:25 +00:00
|
|
|
|
2023-12-26 00:06:43 +00:00
|
|
|
def print_template(args, configjson, prefix='/tmp'):
|
2023-12-21 19:42:13 +00:00
|
|
|
print(__doc__)
|
2023-12-26 00:06:43 +00:00
|
|
|
sys.stderr.write(f"the last step to succeed is {install.getlaststep(prefix)}\n")
|
2023-12-21 19:42:13 +00:00
|
|
|
print(f"the last step to succeed is {install.getlaststep(prefix)}\n")
|
2023-12-21 18:53:25 +00:00
|
|
|
print(f"""------------------------ STATUS ------------------------
|
|
|
|
|
|
|
|
CPU_THREADS = {args.threads or 1}
|
|
|
|
TEMPORARY_DIRECTORY = {args.temporary_dir}
|
|
|
|
PROFILE = {args.profile}
|
|
|
|
""")
|
|
|
|
print(f"CONFIG {args.config}")
|
|
|
|
print(json.dumps(configjson, sort_keys=True, indent=4))
|
|
|
|
|
|
|
|
# inherit = configjson.get("inherit")
|
|
|
|
# if inherit:
|
|
|
|
# print(f"CONFIG {inherit}")
|
|
|
|
# j = gentooimgr.config.load_default_config(inherit)
|
|
|
|
# if not j:
|
|
|
|
# j = gentooimgr.config.load_config(inherit)
|
|
|
|
#
|
|
|
|
# print(json.dumps(j, sort_keys=True, indent=4))
|
|
|
|
|
|
|
|
# print(f"""------------------------ PACKAGES ------------------------""")
|
|
|
|
# for k, v in configjson.get("packages").items():
|
|
|
|
# print(k.upper())
|
|
|
|
# print("\t" + '\n\t'.join(v))
|
|
|
|
# print()
|