From patchwork Thu Jul 5 16:03:21 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: 141201 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2141376ljj; Thu, 5 Jul 2018 09:28:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcfcSLrTTdamaC9lHdJIZxOYgXtBZmv06ktVJi5fD/JOLBWHNwqTVYGpkKfU1hc2fsyfPKj X-Received: by 2002:a37:ddd5:: with SMTP id u82-v6mr5609221qku.420.1530808084298; Thu, 05 Jul 2018 09:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530808084; cv=none; d=google.com; s=arc-20160816; b=hqcsUuACFtKCsMrEZZPP8wVCO5l98w456meELRC8xI4Rd7w/1qjqrhhDuwigEz+s6a jQNWU3qBX+IrAeM1dhJP/MfzYu/ZmaPcR4zZIxLaNbXBGb/JVpNOc5YWYfzbqjBOLre8 02F8+uUkZjWZx7b/3adiCKJcg3bh0vcrL8b1Z8HWniqofIxAx7Mxnev/Ktp3wf+/mU/y u+ZJCfQOKf8nzpD5pFoh3z4KIynbMCGCkDvZvWbV34fTr4ZH08XXxaqagXMLCIFAHTDy j2kEuVFss0suAXDDv6oOq7lN7BGXj1sewe6TYtytEcO4jBdekwofoCgbVOzquMsvnVQA iNdA== 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=67PRJX64n01zQtdiLOJbiBT3rliQYwWOfXFA2tr7xWQ=; b=PnrANg0fEICiTuO7vktEd4oKhhm0H3YmSXdVgLB3fqcYAUYf0/VmKbKqHvMgw6oPLJ ID1QvVLedJpR4S3PyXZy466AlaN0XCBN/6S/hWjmX83BMxJptkNYHcSpL9QBQgsZ9Kkv 2UCy9FIn355Y6P7xV7tzO61/TsJyDWNo64mPAOGHtlZk66vAK+ExEYP/VBdKsobKWWZf wNWh9zDmaoJoMjsMVODWNhAlaoYBIsHEXavS5VETlrUOWdi9QbD8+niw8oSXj5M0QNIF EVrwYJEzkZuieFf2liBtzJ2TnZazT4+sGSH0LHYC2lRz8frdBdfXeDequ3WuzTSU1kmx uIWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Hc8QRizl; 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 c79-v6si1981508qkg.128.2018.07.05.09.28.04 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 05 Jul 2018 09:28:04 -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=Hc8QRizl; 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]:53680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb76x-00024u-Lk for patch@linaro.org; Thu, 05 Jul 2018 12:28:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb6jN-0008Ni-UL for qemu-devel@nongnu.org; Thu, 05 Jul 2018 12:03:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb6jM-00081q-Qd for qemu-devel@nongnu.org; Thu, 05 Jul 2018 12:03:41 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:33962) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fb6jM-00081O-JF for qemu-devel@nongnu.org; Thu, 05 Jul 2018 12:03:40 -0400 Received: by mail-wr1-x430.google.com with SMTP id c13-v6so1432746wrt.1 for ; Thu, 05 Jul 2018 09:03:40 -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=67PRJX64n01zQtdiLOJbiBT3rliQYwWOfXFA2tr7xWQ=; b=Hc8QRizlWUJmewQj7zCHbzoE+fzk+PhAPsv+6aQCN1lFk/+UA56zvU90kBJKPaYGm0 1uaEXOOLnIwpjuEWQh2lA7ZKpuqyLdCXLxgdzSM9fBluwWSwvbZh1ijxO+OdRhi1lUot Ya17gkwD+VPNDlTkhlhqH7LRSdh2erVjdFdkg= 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=67PRJX64n01zQtdiLOJbiBT3rliQYwWOfXFA2tr7xWQ=; b=BQTOD7TvlVxyqEyt3wBYafUPBl1y4PpxmhlLAoBxY4lt5pWDozhAX9JIKv87TY5gSJ Xt0WS2s7Toeiz/5t8/p2/gAFRk4RP5mHgCojkgm+yvfunnW3arHh3CLyJhrtgxtyue5+ +eW3vtezWGGLKI6HkyHBnIGpzoWzKu8LvRnRx8pB7KOvFOG7hoq/HijMa82LolI4lkha hM9loz3iiMtwLTRt/ojMmU5vRvIZPD00Ypat/Sgj9E4QHobvvmNh0xeOzWoV8M1SEFCs 3cnrrdSPP0rdo3G7Ynu8/w77KpMN/AjTiVtksNQ99w7IE+5FN+sizHihrpO/Qh1Pq2zv /gpg== X-Gm-Message-State: APt69E0wHA7VtciGuAZ2cwWbv9GF9hzQnAKwkAFvEsj6puumcPUqEqrC vR4JqLCFoVzHJ06OAyr4O3m/tA== X-Received: by 2002:adf:ce04:: with SMTP id p4-v6mr4770445wrn.275.1530806619468; Thu, 05 Jul 2018 09:03:39 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 131-v6sm13547090wmm.31.2018.07.05.09.03.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jul 2018 09:03:37 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 4C01A3E0BB0; Thu, 5 Jul 2018 17:03:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 5 Jul 2018 17:03:21 +0100 Message-Id: <20180705160329.30386-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180705160329.30386-1-alex.bennee@linaro.org> References: <20180705160329.30386-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:4864:20::430 Subject: [Qemu-devel] [PULL 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: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= 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 -- 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