diff --git a/boottools/apt.py b/boottools/apt.py index d50f6dd..7fe0656 100644 --- a/boottools/apt.py +++ b/boottools/apt.py @@ -58,30 +58,8 @@ def cache_search (pkgs): return res def install (pkgs, opts={}): - apt_pkg.init() - - if opts: - apt_pkg.init_config() - for k in opts: - apt_pkg.config.set (k, opts[k]) - - cache = apt_pkg.Cache() - sl = apt_pkg.SourceList() - sl.read_main_list() - cache.update (apt.progress.base.AcquireProgress(), sl) - - _to_install = [] - dep_cache = apt_pkg.DepCache(cache) - for p in pkgs: - package = cache[p] - if not package: - print (f'package "{p}" not found') - continue - _to_install.append (p) - dep_cache.mark_install(package) - - if _to_install: - print ('about to install these packages: "{}"'.format (' '.join (_to_install))) - fetcher = apt_pkg.Acquire() - install_progress = apt.progress.base.InstallProgress() - dep_cache.commit(fetcher, install_progress) + opts_list = [] + for k in opts: opts_list += ['-o', f'{k}={opts[k]}'] + print ('about to install these packages: "{}"'.format (' '.join (pkgs))) + import subprocess + subprocess.run (['apt-get', '--yes', 'install'] + pkgs + opts_list) diff --git a/mkoglive.cfg b/mkoglive.cfg index 16507d7..ba97641 100644 --- a/mkoglive.cfg +++ b/mkoglive.cfg @@ -68,6 +68,8 @@ isolinux_template = [Packages] +agent = policykit-1 python3 python3-pyqt6 python3-requests python3-six python3-prctl python3-distro libxss1 zenity + basic = dialog man-db fbset gdebi-core bash-static busybox-static locales lshw gawk git python3-openssl python3 php-cli dmidecode rpm sqlite3 os-prober moreutils jq #console-data # ogLive anterior a Ubuntu 20.04