Merge "always update APT lists when install packages"
This commit is contained in:
commit
e4fa287158
@ -24,8 +24,7 @@ COPY {{ opendaylight_repo }} /etc/yum.repos.d/
|
||||
{% set odl_release_deb_url = 'http://download.opensuse.org/repositories/home:/akshitajha/Debian_8.0/' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
RUN sh -c "echo 'deb {{ odl_release_deb_url }} /' > /etc/apt/sources.list.d/opendaylight.list" \
|
||||
&& apt-get update
|
||||
RUN sh -c "echo 'deb {{ odl_release_deb_url }} /' > /etc/apt/sources.list.d/opendaylight.list"
|
||||
{% endif %}
|
||||
|
||||
{{ macros.install_packages(opendaylight_packages | customizable("packages")) }}
|
||||
|
@ -44,6 +44,7 @@ def debian_package_install(packages):
|
||||
|
||||
# handle the apt-get install
|
||||
if reg_packages:
|
||||
cmds.append('apt-get update')
|
||||
cmds.append('apt-get -y install --no-install-recommends {}'.format(
|
||||
' '.join(reg_packages)
|
||||
))
|
||||
|
@ -20,4 +20,4 @@ class MethodsTest(base.TestCase):
|
||||
packages = ['https://packages.debian.org/package1.deb', 'package2.deb']
|
||||
result = methods.debian_package_install(packages)
|
||||
expectCmd = 'apt-get -y install --no-install-recommends package2.deb'
|
||||
self.assertEqual(expectCmd, result.split("&&")[0])
|
||||
self.assertEqual(expectCmd, result.split("&&")[1].strip())
|
||||
|
Loading…
Reference in New Issue
Block a user