From e4960b4633420aa1a1816e6c7edda3796d1dfd31 Mon Sep 17 00:00:00 2001 From: Manuel Montecelo Date: Wed, 22 Nov 2017 16:44:48 +0100 Subject: [PATCH] TT#25551 Improve the way to detect installed packages "dpkg-query -s" doesn't give the desired answer, it includes packages known to dpkg for different reasons, but does not exactly reply whether they are installed or not, which is the intention of the code. Change-Id: I84b4a6c4c7c84997c31b2bdb3f10e0fe9ab0b721 --- t/api-rest/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/api-rest/Dockerfile b/t/api-rest/Dockerfile index 7348863bfc..02625ea7b2 100644 --- a/t/api-rest/Dockerfile +++ b/t/api-rest/Dockerfile @@ -5,7 +5,7 @@ FROM docker.mgm.sipwise.com/sipwise-stretch:latest # is updated with the current date. It will force refresh of all # of the base images and things like `apt-get update` won't be using # old cached versions when the Dockerfile is built. -ENV REFRESHED_AT 2017-09-21 +ENV REFRESHED_AT 2017-11-22 # files that get-code generates COPY t/api-rest/sources.list.d/builddeps.list /etc/apt/sources.list.d/ @@ -34,7 +34,7 @@ RUN dpkg --force-depends -i /tmp/ngcp-panel-tests-rest-api-build-deps_1.0_all.de RUN apt-get --assume-yes -f install # Ensure package ngcp-panel-tests-rest-api-build-deps is installed as # apt-get might just remove it instead of installing (due to force option). -RUN dpkg-query -s ngcp-panel-tests-rest-api-build-deps +RUN test "$(dpkg-query -f '${db:Status-Status} ${db:Status-Eflag}' -W ngcp-panel-tests-rest-api-build-deps 2>/dev/null)" = 'installed ok' # for prove execution RUN wget http://deb.sipwise.com/files/libtest-pretty-perl_0.31-1~bpo80+1_all.deb