subutai-io / packer

Apache License 2.0
1 stars 2 forks source link

Replace invocations to apt with DEBIAN_FRONTEND=noninteractive apt-get #74

Closed happyaron closed 6 years ago

happyaron commented 6 years ago

This PR tries to address two issues in subutai-io/vagrant#103.

According to apt's man page:

The apt(8) commandline is designed as an end-user tool and it may change behavior between versions. While it tries not to break backward compatibility this is not guaranteed either if a change seems beneficial for interactive use.

All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt-cache(8) as well.  apt(8) just changes the default value of some options (see apt.conf(5) and specifically the Binary scope). So you should prefer using these commands (potentially with some additional options enabled) in your scripts as they keep backward compatibility as much as possible.

So we should replace the usage of apt to apt-get and apt-cache where applicable.

Also to avoid warnings to dpkg-preconfigure we need to add DEBIAN_FRONTEND=noninteractive to apt-get.