FIXME: Add --force-yes to apt-get dist-upgrade.
[armband.git] / patches / fuel-agent / 0009-FIXME-Add-force-yes-to-apt-get-dist-upgrade.patch
1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Fri, 8 Apr 2016 15:28:43 +0200
3 Subject: [PATCH] FIXME: Add --force-yes to apt-get dist-upgrade.
4
5 arm64 udev in Ubuntu Trusty is broken, so we had to provide our own
6 patched udev package in armband MOS repos.
7
8 Due to dpkg version comparison algorithm, our MOS version of udev
9 is considered a downgrade, which requires --force-yes for
10 apt-get dist-upgrade to work and pick up this version, otherwise
11 bootstrap/target image build would fail with apt-get error code 100.
12
13 This change can be dropped later, if other packages do not manifest
14 the same behavior.
15 ---
16  fuel_agent/utils/build.py | 2 +-
17  1 file changed, 1 insertion(+), 1 deletion(-)
18
19 diff --git a/fuel_agent/utils/build.py b/fuel_agent/utils/build.py
20 index e11ceba..8cca26d 100644
21 --- a/fuel_agent/utils/build.py
22 +++ b/fuel_agent/utils/build.py
23 @@ -111,7 +111,7 @@ def run_apt_get(chroot, packages, eatmydata=False, attempts=10):
24      time in X times.
25      """
26      for action in ('update', 'dist-upgrade'):
27 -        cmds = ['chroot', chroot, 'apt-get', '-y', action]
28 +        cmds = ['chroot', chroot, 'apt-get', '-y', '--force-yes', action]
29          stdout, stderr = utils.execute(*cmds, attempts=attempts)
30          LOG.debug('Running apt-get %s completed.\nstdout: %s\nstderr: %s',
31                    action, stdout, stderr)