Update dpkg commands to be non-interactive
The current `dpkg --configure -a` command does not always work if the package that needs to be configured has a modified conffile which can require user input to resolve. This change adds flags to make these lines work as intended in that scenario. Change-Id: I8f459b0c1c2fc7ecbe1ff478bdb77fd9af31dc90
This commit is contained in:
parent
7d968220c7
commit
b98efc4f29
|
@ -111,7 +111,7 @@ DEBIAN_FRONTEND=noninteractive apt-get update
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
# Run dpkg in case of interruption of previous dpkg operation
|
# Run dpkg in case of interruption of previous dpkg operation
|
||||||
dpkg --configure -a
|
dpkg --configure -a --force-confold,confdef
|
||||||
|
|
||||||
# Perform package installs
|
# Perform package installs
|
||||||
set +x
|
set +x
|
||||||
|
@ -192,7 +192,7 @@ if [ -f ${persist_path}/packages ]; then
|
||||||
TO_KEEP=$(echo "$TO_DELETE" | comm -23 ${persist_path}/packages -)
|
TO_KEEP=$(echo "$TO_DELETE" | comm -23 ${persist_path}/packages -)
|
||||||
{{- end }}
|
{{- end }}
|
||||||
if [ ! -z "$TO_DELETE" ]; then
|
if [ ! -z "$TO_DELETE" ]; then
|
||||||
dpkg --configure -a
|
dpkg --configure -a --force-confold,confdef
|
||||||
|
|
||||||
{{- if hasKey .Values.conf.apt "whitelistpkgs" }}
|
{{- if hasKey .Values.conf.apt "whitelistpkgs" }}
|
||||||
WHITELIST=({{ include "helm-toolkit.utils.joinListWithSpace" .Values.conf.apt.whitelistpkgs }})
|
WHITELIST=({{ include "helm-toolkit.utils.joinListWithSpace" .Values.conf.apt.whitelistpkgs }})
|
||||||
|
@ -236,7 +236,7 @@ fi
|
||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
{{- if hasKey .Values.conf.apt "blacklistpkgs" }}
|
{{- if hasKey .Values.conf.apt "blacklistpkgs" }}
|
||||||
dpkg --configure -a
|
dpkg --configure -a --force-confold,confdef
|
||||||
{{- range .Values.conf.apt.blacklistpkgs }}
|
{{- range .Values.conf.apt.blacklistpkgs }}
|
||||||
{{- $package := . }}
|
{{- $package := . }}
|
||||||
DEBIAN_FRONTEND=noninteractive $APT_PURGE {{ $package | squote }}
|
DEBIAN_FRONTEND=noninteractive $APT_PURGE {{ $package | squote }}
|
||||||
|
|
Loading…
Reference in New Issue