From patchwork Mon Jul 2 14:30:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 140791 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp39679ljj; Mon, 2 Jul 2018 07:46:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfl5um64M4hV8pQ9DoqOIMN7ba9/dCUXF3ee7VQQFBs998KfBBsf1pOL5DiLPGPxwixxzQT X-Received: by 2002:a37:1a69:: with SMTP id a102-v6mr22909427qka.43.1530542770677; Mon, 02 Jul 2018 07:46:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530542770; cv=none; d=google.com; s=arc-20160816; b=v6nuCebRGQZ71VWF/VKPpVGrVpd/xFdPkp9faDHFQN/rDRw0X7FDGHErhz1fIEQN7W CsiHr218uyva1wvS+JlwrMzzff/LwbkeGn73Oyt87RLxaQqkp0tEMzKewfglqMktr9p0 cm5RzhNRBYgR8RWXV/zMg6sEPUXQYlHK9OuvTz2JzMijVWIvN0yGaQmOjDGgyqc2GT+L wtjrmkiGCqaOVA3DKw6YqfLDOXqrjjCGQ5V4ZB2qMlUIqZhP/96awBjMJcUz5PZgFlSz SNNZs481OCYbCyMpYbopiAbhwA13MeUHplrU0ZZ/NZp1GFUKGyHzdI0wbwkHsAwbQGFV 85lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=sBeHvXm/t1SfF3vsnFkcs20PuDdWpHXaUau5jpp2CDY=; b=fVygxqXZSvzW1LtfyIc0P5NZveUCy1BDfljV6rtutzDTNK9LRcR8w9dH4MqjhX8Mly TQfD1pON6husQQZHa9zWTPwcOBbi7VTiL4Iy+F9qWtYSUdLqV8M7ri+HMPRwKQaJtQDt VHt4QO8DRR+eZtx7Qfwdsn4/7yPBWb2uheopbOKb9Z638MqupVjpiqwjxiTrCvdy5yfA YDjsquOUmkwsCaxtKHW9/GWhsPeQet0GFDvXVmBqA9doWsulsEIGIVmlRJNyc29jV0KW RzKmeku134MaQjyazOaP8Z8keJ4bXXuAINg+RfksnJ/IoqV8o2tF5nhQ+zWGKNFXChbE 9qsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cRq0gE5+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c68-v6si1460875qkb.305.2018.07.02.07.46.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 02 Jul 2018 07:46:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cRq0gE5+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fa05h-0000OT-Tn for patch@linaro.org; Mon, 02 Jul 2018 10:46:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZzxw-00035Q-Qm for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:38:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZzxu-0005E3-87 for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:38:08 -0400 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:33853) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZzxt-0005Cn-V5 for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:38:06 -0400 Received: by mail-wr0-x229.google.com with SMTP id a12-v6so15817041wro.1 for ; Mon, 02 Jul 2018 07:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sBeHvXm/t1SfF3vsnFkcs20PuDdWpHXaUau5jpp2CDY=; b=cRq0gE5+6cd9+5kr6oQ9W8ca7Vg5+Nnv0hcnjuUpkyIgegaAwZyLhHL0gqovZxISH2 sd5ZYAVSm1tpvoqRAT4x9VebThzQ1bgAqioaap/9T8hLc7ygnLptpsf3PKPI/4qJX6ml 5b48WB8rGfQiDnRfIhlHya+eE3Yi81ug7yK9w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sBeHvXm/t1SfF3vsnFkcs20PuDdWpHXaUau5jpp2CDY=; b=Jqwpd3GVps+xENPS90gCmWYs4UiVku2ubsdau1F9ahAMbAg5QFVGo6GD0NEabPHt0G 2FS2L2hDWshiGdwXL5BTe40L7UnWTLAP4qBY9HHvZTtH+bxS1y1mGYbJdw+IK65IycrJ zwT0uqS4hS4DKYkpL+PsTWA7fxQO94n6mGfYXA7Il0PrdBTf71i+obk05dPdbqloC/sG mEaLdeH8hOKvqVmO9gxv7c/ghqp11oZTSP9sFaXy37l6pICcUxK43ti2XMKns9pH5zcv 8o0cYnsu0G0KZwB1m1km/HbIijCR0NN2jdoEkMPxmt/xHzhxSAz2G3vF9owBQ1kNxc5b X5DA== X-Gm-Message-State: APt69E207P73g5UOb8IEw1FGmr32STqtvgk3RWYWJZyJkcbkqALmLJeF nfD87qOBcnLiV0umvJqJ/mNHSg== X-Received: by 2002:adf:9063:: with SMTP id h90-v6mr20576835wrh.147.1530542284862; Mon, 02 Jul 2018 07:38:04 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h193-v6sm16926527wmd.25.2018.07.02.07.38.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Jul 2018 07:38:01 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B2A003E0AC0; Mon, 2 Jul 2018 15:30:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Date: Mon, 2 Jul 2018 15:30:13 +0100 Message-Id: <20180702143021.18864-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180702143021.18864-1-alex.bennee@linaro.org> References: <20180702143021.18864-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::229 Subject: [Qemu-devel] [PATCH v3 12/20] docker: ubuntu: Update the package list before installing new ones X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Since docker caches the different layers, updating the package list does not invalidate the previous "apt-get update" layer, and it is likely "apt-get install" hits an outdated repository. See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get This fixes: $ make docker-image-ubuntu V=1 ./tests/docker/docker.py build qemu:ubuntu tests/docker/dockerfiles/ubuntu.docker --add-current-user Sending build context to Docker daemon 3.072kB [...] E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgles2-mesa_17.0.7-0ubuntu0.16.04.2_amd64.deb 404 Not Found E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgles2-mesa-dev_17.0.7-0ubuntu0.16.04.2_amd64.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? The command '/bin/sh -c apt-get -y install $PACKAGES' returned a non-zero code: 100 tests/docker/Makefile.include:40: recipe for target 'docker-image-ubuntu' failed make: *** [docker-image-ubuntu] Error 1 Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/ubuntu.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker index dabbf2a8a4..c03520ce3f 100644 --- a/tests/docker/dockerfiles/ubuntu.docker +++ b/tests/docker/dockerfiles/ubuntu.docker @@ -1,7 +1,6 @@ FROM ubuntu:16.04 RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty universe multiverse" >> \ /etc/apt/sources.list -RUN apt-get update ENV PACKAGES flex bison \ libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev libncursesw5-dev \ libseccomp-dev libgnutls-dev libssh2-1-dev libspice-server-dev \ @@ -13,6 +12,7 @@ ENV PACKAGES flex bison \ libjemalloc-dev libcacard-dev libusbredirhost-dev libnfs-dev libcap-dev libattr1-dev \ texinfo \ gettext git make ccache python-yaml gcc clang sparse -RUN apt-get -y install $PACKAGES +RUN apt-get update && \ + apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt ENV FEATURES clang pyyaml