From 7998ee57bfebb93b1fe6ed4472e4943061cabbe3 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Mon, 17 Apr 2017 11:13:53 -0700 Subject: [PATCH 1/3] Use dpkg_apt properly --- platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 | 3 +-- platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 index 912f52cf73a7..ee8c2c24e908 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 @@ -12,9 +12,8 @@ debs/ RUN dpkg -r syncd RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \ -dpkg_apt \ {% for deb in docker_syncd_brcm_rpc_debs.split(' ') -%} -debs/{{ deb }}{{' '}} +dpkg_apt debs/{{ deb }}{{'; '}} {%- endfor %} ## Pre-install the fundamental packages diff --git a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 index 15c998385abc..8c71d610eb30 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 @@ -12,9 +12,8 @@ debs/ RUN dpkg -r syncd RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \ -dpkg_apt \ {% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%} -debs/{{ deb }}{{' '}} +dpkg_apt debs/{{ deb }}{{'; '}} {%- endfor %} ## Pre-install the fundamental packages From 036bd7c5c4ff344172133612c8c7141bc821595f Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Mon, 17 Apr 2017 11:15:56 -0700 Subject: [PATCH 2/3] Remove unused dpkg_apt --- platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 | 1 - platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 | 1 - 2 files changed, 2 deletions(-) diff --git a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 index ee8c2c24e908..00a6cc0e071c 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 @@ -44,7 +44,6 @@ RUN apt-get update \ && mkdir -p /opt \ && cd /opt \ && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ - && dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \ && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ && rm -rf /deps diff --git a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 index 8c71d610eb30..f721c06f795c 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 @@ -44,7 +44,6 @@ RUN apt-get update \ && mkdir -p /opt \ && cd /opt \ && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ - && dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \ && apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \ && rm -rf /deps From 392fb0f26cba61e3aafe5fd33753be595f0a4910 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Mon, 17 Apr 2017 20:02:37 +0000 Subject: [PATCH 3/3] Purge not remove previous version of syncd --- platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 | 2 +- platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 index 00a6cc0e071c..40c573f09c79 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 @@ -9,7 +9,7 @@ debs/{{ deb }}{{' '}} {%- endfor -%} debs/ -RUN dpkg -r syncd +RUN dpkg -P syncd RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \ {% for deb in docker_syncd_brcm_rpc_debs.split(' ') -%} diff --git a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 index f721c06f795c..64e208112783 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 @@ -9,7 +9,7 @@ debs/{{ deb }}{{' '}} {%- endfor -%} debs/ -RUN dpkg -r syncd +RUN dpkg -P syncd RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \ {% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}