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
changes/05/17105/2
Manuel Montecelo 8 years ago
parent 58b9e82ebb
commit e4960b4633

@ -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

Loading…
Cancel
Save