Skip to content
Snippets Groups Projects
Commit c081825e authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

noninteractive installation of packages

parent 7c655f5c
No related branches found
No related tags found
No related merge requests found
...@@ -29,11 +29,22 @@ def main(): ...@@ -29,11 +29,22 @@ def main():
!= 0 != 0
): ):
result = run( result = run(
["/usr/bin/apt-get", "install", "-y", pkg], [
"/usr/bin/apt-get",
"install",
"-q",
"-y",
"-o",
"Dpkg::Options::='--force-confdef'",
"-o",
"Dpkg::Options::='--force-confold'",
pkg,
],
shell=False, shell=False,
stdout=PIPE, stdout=PIPE,
stderr=STDOUT, stderr=STDOUT,
stdin=PIPE, stdin=PIPE,
env={"DEBIAN_FRONTEND": "noninteractive"},
) )
if result.returncode == 0: if result.returncode == 0:
print("{} install succeeded".format(pkg)) print("{} install succeeded".format(pkg))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment