apt: Remove /var/lib/apt/lists before update

When divingbell-apt is managing the apt sources list, remove the
contents of /var/lib/apt/lists before running apt-get update.

Change-Id: I379af0b1a887bc81bc76f57289f35bae64e146c6
This commit is contained in:
Phil Sphicas 2021-03-14 06:34:34 +00:00
parent 918da6d055
commit d657f7968c
1 changed files with 1 additions and 0 deletions

View File

@ -85,6 +85,7 @@ rm -rf /etc/apt/sources.list.d/*
mv /etc/apt/trusted.gpg.d/divingbell_temp.gpg /etc/apt/trusted.gpg.d/divingbell.gpg
rm -f /etc/apt/trusted.gpg
find /etc/apt/trusted.gpg.d/ -type f ! -name 'divingbell.gpg' -exec rm {{ "{}" }} \;
rm -rf /var/lib/apt/lists/*
DEBIAN_FRONTEND=noninteractive apt-get update
{{- end }}
{{- if hasKey .Values.conf.apt "packages" }}