Don't ignore errors of 'apt-get update' command
This change fixes an issue with 'apt-get update' command and stop
container building with erroneous source repositories.
Change-Id: I5ce2eb66a647e1805f086aa37942bf5d13eb4106
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
(cherry picked from commit bce06d2d5a
)
This commit is contained in:
parent
2fbc86f555
commit
836e5945a3
|
@ -53,7 +53,7 @@ def debian_package_install(packages, clean_package_cache=True):
|
||||||
|
|
||||||
# handle the apt-get install
|
# handle the apt-get install
|
||||||
if reg_packages:
|
if reg_packages:
|
||||||
cmds.append('apt-get update')
|
cmds.append('apt-get --error-on=any update')
|
||||||
cmds.append('apt-get -y install --no-install-recommends {}'.format(
|
cmds.append('apt-get -y install --no-install-recommends {}'.format(
|
||||||
' '.join(reg_packages)
|
' '.join(reg_packages)
|
||||||
))
|
))
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
The ``apt-get update`` command by default didn't fail on erroneous source
|
||||||
|
repositories, it show the warning 'W: Some index files failed to download.
|
||||||
|
They have been ignored, or old ones used instead.' and continue to work.
|
||||||
|
This causes some containers (eg. rabbitmq, kolla-toolbox) successfully
|
||||||
|
built, but makes them inconsistent because the official Ubuntu repository
|
||||||
|
contains packages with the same names. Now we use ``apt-get -eany update``
|
||||||
|
command to stop building with an error in such cases.
|
Loading…
Reference in New Issue