Don't use python APT module, install ogagent dependencies #3
|
@ -58,30 +58,8 @@ def cache_search (pkgs):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def install (pkgs, opts={}):
|
def install (pkgs, opts={}):
|
||||||
apt_pkg.init()
|
opts_list = []
|
||||||
|
for k in opts: opts_list += ['-o', f'{k}={opts[k]}']
|
||||||
if opts:
|
print ('about to install these packages: "{}"'.format (' '.join (pkgs)))
|
||||||
apt_pkg.init_config()
|
import subprocess
|
||||||
for k in opts:
|
subprocess.run (['apt-get', '--yes', 'install'] + pkgs + opts_list)
|
||||||
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)
|
|
||||||
|
|
|
@ -68,6 +68,8 @@ isolinux_template =
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
|
|
||||||
|
agent = policykit-1 python3 python3-pyqt6 python3-requests python3-six python3-prctl python3-distro libxss1 zenity
|
||||||
|
|
||||||
basic =
|
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
|
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
|
#console-data # ogLive anterior a Ubuntu 20.04
|
||||||
|
|
Loading…
Reference in New Issue