From patchwork Fri Jun 29 20:52:23 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: 10497523 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 770FA60325 for ; Fri, 29 Jun 2018 21:00:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65D3A29653 for ; Fri, 29 Jun 2018 21:00:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A60029660; Fri, 29 Jun 2018 21:00:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E765B2965F for ; Fri, 29 Jun 2018 21:00:34 +0000 (UTC) Received: from localhost ([::1]:44455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ0VO-0008Mf-5P for patchwork-qemu-devel@patchwork.kernel.org; Fri, 29 Jun 2018 17:00:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ0Nv-0008Cv-6y for qemu-devel@nongnu.org; Fri, 29 Jun 2018 16:52:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZ0Ns-0006Zz-9k for qemu-devel@nongnu.org; Fri, 29 Jun 2018 16:52:51 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:36077) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZ0Ns-0006ZD-2i for qemu-devel@nongnu.org; Fri, 29 Jun 2018 16:52:48 -0400 Received: by mail-wm0-x232.google.com with SMTP id u18-v6so3306745wmc.1 for ; Fri, 29 Jun 2018 13:52:47 -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=OFIDy4DQ5V05TcY3qpahg/tWvckzsMWIU4tx0aZrBAYeAMd9AjFRwdi0uQv/1tQ4sD GBFlvdsQdtqIDv+H0mQ2eli6kSIIYDIEbB5pq+IFzIp1vOFsd/qwvUQkeIqMdP6lOYUV oc8hOhmHpsAKDg4Q2x1fIo74w2POKJ7Cn1Yjc= 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=KEsXVJX8Pvv3MRYnHbT7i6FrvLcomA4KDfhZDOHJ4OBRNc2QMDzcOm0NP2iAIIEGnz pFXBynQzD8d/evhBCieId5gI8oLv68fPq6jb+90CXTNarOco3iuIzXwiRl/e9CDwosA7 bxWaW+ZczCXXkVy1MbSQL6dxQI1MOul2uRSi7dA4fK7X6K+XdBNpzEsyNr7W6eJaWWXb bEjEKoD2CE7iZyDfVGZ0oYz2vqSEZSUhN8qkUFVM0vHsQhksBJGCv/1UGtNg6oYoIOLw K/GryrERxgrNdQPo/jMCpTxg3pw2ejFqrAeAVM2a2ZEi0ne8hUDRvHhNXMnBl4B06Oc5 Io4Q== X-Gm-Message-State: APt69E00qfyvn/ePZYs4yg0DO0mr5L4RGkDeEtI24jfcKzjAgZLC0BiR 9osxvBBSySXJK4WhWeN8TNHFhA== X-Google-Smtp-Source: AAOMgpckpNq7vUfA++WvUZzqcwt1RTtA5ukvWBfQf6eM2yQM0akS6uP+Q2p88hCgGULF8Kd1eT0CyQ== X-Received: by 2002:a1c:96d3:: with SMTP id y202-v6mr2727995wmd.76.1530305566907; Fri, 29 Jun 2018 13:52:46 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u4-v6sm8696339wro.12.2018.06.29.13.52.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 13:52:40 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id B9B653E0930; Fri, 29 Jun 2018 21:52:33 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=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: Fri, 29 Jun 2018 21:52:23 +0100 Message-Id: <20180629205232.27190-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629205232.27190-1-alex.bennee@linaro.org> References: <20180629205232.27190-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:c09::232 Subject: [Qemu-devel] [PATCH v2 12/21] 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=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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