diff --git a/examples/guided.py b/examples/guided.py index 384cf40..d89796a 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -334,13 +334,18 @@ def install_packages(installation,additional_packages): return try: # install additional_packages package + tmpFolder = '/tmp/acosail' installation.log("Installing additional_packages package, {}".format("..."), level=logging.INFO) + archinstall.SysCommand('chroot {} bash -c "mkdir -p {}"'.format(target,tmpFolder)) + archinstall.SysCommand('chroot {} bash -c "cp -a /media/pool/other/plugins/ {}"'.format(target,tmpFolder)) for key_name in additional_packages: installation.log("Installing {} package...".format(key_name), level=logging.INFO) if key_name == 'kde-plasma': + installation.log("tar -zxvf {} to folder {}".format(key_name,tmpFolder)) archinstall.SysCommand('chroot {} bash -c "dpkg -i /media/pool/other/plugins/{}/*.deb"'.format(target,'psmisc')) - time.sleep(0.1) - archinstall.SysCommand('chroot {} bash -c "dpkg -i /media/pool/other/plugins/{}/*.deb"'.format(target,key_name)) + archinstall.SysCommand('chroot {} bash -c "tar -zxvf {}/plugins/{}.tgz -C /tmp/acosail/plugins/"'.format(target,tmpFolder,key_name)) + archinstall.SysCommand('chroot {} bash -c "dpkg -i {}/plugins/{}/*.deb"'.format(target,tmpFolder,key_name)) + # change default dm time.sleep(0.1) archinstall.SysCommand('chroot {} bash -c "rm -rf /etc/systemd/system/display-manager.service"'.format(target)) @@ -350,6 +355,7 @@ def install_packages(installation,additional_packages): installation.log(f"additional_packages error: {error!r}", level=logging.ERROR, fg="red") raise error + archinstall.SysCommand('chroot {} bash -c "rm -rf {}"'.format(target,tmpFolder)) installation.log("Installing additional_packages finish.", level=logging.INFO) installation.log("And The default startup session may not be KDE-Plasma DM, and you can modify it on the login page.", level=logging.INFO) diff --git a/package_images.sh b/package_images.sh new file mode 100644 index 0000000..aa7b1b2 --- /dev/null +++ b/package_images.sh @@ -0,0 +1,9 @@ +#/sbin/bin + +. /root/miniconda3/etc/profile.d/conda.sh +conda activate + +rm -rf /target/tmp +rm -rf /target/var/cache/* + +cd /target && tar -caf /data/rootfs.tar.xz . \ No newline at end of file