More improvement in aptget.py

This commit is contained in:
VirtuBox
2019-10-11 13:01:00 +02:00
parent 5d0f9f62bf
commit 947efe1e21
3 changed files with 16 additions and 89 deletions

View File

@@ -154,19 +154,19 @@ class WOAptGet():
try:
with open('/var/log/wo/wordops.log', 'a') as f:
if purge:
proc = subprocess.Popen('DEBIAN_FRONTEND=noninteractive '
'apt-get autoremove --purge '
'-qq {0}'
.format(all_packages), shell=True,
stdin=None, stdout=f, stderr=f,
executable="/bin/bash")
proc = subprocess.Popen(
'DEBIAN_FRONTEND=noninteractive '
'apt-get autoremove --purge -qq {0}'
.format(all_packages), shell=True,
stdin=None, stdout=f, stderr=f,
executable="/bin/bash")
else:
proc = subprocess.Popen('DEBIAN_FRONTEND=noninteractive '
'apt-get autoremove '
'-qq {0}'
.format(all_packages), shell=True,
stdin=None, stdout=f, stderr=f,
executable="/bin/bash")
proc = subprocess.Popen(
'DEBIAN_FRONTEND=noninteractive '
'apt-get autoremove -qq {0}'
.format(all_packages), shell=True,
stdin=None, stdout=f, stderr=f,
executable="/bin/bash")
proc.wait()
if proc.returncode == 0:
return True
@@ -235,13 +235,13 @@ class WOAptGet():
WORepo.add_key(self, repo_key)
proc = subprocess.Popen(
"DEBIAN_FRONTEND=noninteractive apt-get update "
"--allow-releaseinfo-change && "
"-qq && "
"DEBIAN_FRONTEND=noninteractive "
"apt-get install -o "
"Dpkg::Options::=\"--force-confdef\""
" -o "
"Dpkg::Options::=\"--force-confold\""
" -y --download-only {0}"
" -y --download-only {0}"
.format(packages), shell=True,
stdin=None, stdout=f, stderr=f,
executable="/bin/bash")