Skip to content

Commit

Permalink
Use consistent apt options for upgrades
Browse files Browse the repository at this point in the history
The 'apt-get upgrade' does not set confdef and confold currently, so an
upgrade which requires user input can break the cache build[1].

[1] http://paste.openstack.org/raw/733076/

Change-Id: Ic6689387a28539b7eb341d55a9db08f078e8e975
(cherry picked from commit f63abfa)
  • Loading branch information
logan2211 authored and Jesse Pretorius (odyssey4me) committed Oct 26, 2018
1 parent c418d58 commit 9aeedde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/prep-scripts/ubuntu_16_prep.sh.j2
Expand Up @@ -10,7 +10,7 @@ apt-get remove -y --purge snap* lxc* lxd* resolvconf* || true

# Update base distribution
apt-get update
apt-get upgrade -y
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes {{ lxc_cache_distro_packages | join(' ') }}
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
rm -f /usr/bin/python
Expand Down
2 changes: 1 addition & 1 deletion templates/prep-scripts/ubuntu_18_prep.sh.j2
Expand Up @@ -14,7 +14,7 @@ apt-get remove -y --purge snap* lxc* lxd* resolvconf* || true
apt-get update
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes gnupg

apt-get upgrade -y
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
apt-get install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes {{ lxc_cache_distro_packages | join(' ') }}
apt-get upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes
rm -f /usr/bin/python
Expand Down

0 comments on commit 9aeedde

Please sign in to comment.