From patchwork Sat Aug 1 12:01:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1339690 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=HRUZLFK/; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BJjRj070qz9s1x for ; Sat, 1 Aug 2020 22:01:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D326488525; Sat, 1 Aug 2020 12:01:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xiwB4wEsELRY; Sat, 1 Aug 2020 12:01:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0D8E68852A; Sat, 1 Aug 2020 12:01:31 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id A1CAF1BF2CC for ; Sat, 1 Aug 2020 12:01:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9C8D58852A for ; Sat, 1 Aug 2020 12:01:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0H0-GGHbKmtE for ; Sat, 1 Aug 2020 12:01:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id 9C2DC88525 for ; Sat, 1 Aug 2020 12:01:28 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id l2so19600055wrc.7 for ; Sat, 01 Aug 2020 05:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=h92NNEnqwiI3KczW3r/BCbDcFrMRWFTplZeZZwPdaYg=; b=HRUZLFK//WO6Lbv/l9dR4xRkNtGPus3m59WOnfeq3Hnz1ZstjpCwu4THibbdKq154U idQd99WNaHBRhO4w74JnKP4QWduVesLZoLV3qESUVVDAyH7ihcVdVUrDEYFTneyXYxfY 65bya7pBEWh/CRo/w5oA70Ia9VREf3k+IAlpGQEyw98swZmUjfYUrFcPNmOccr8Ljrgi 9MuhLAx4mHE24lQthzVmRpHfthuDS5bwRRavvPhJrsaMzyCDVAyGuG6oOAvKxU7C1Wdt u5vpmKoHHyQgDM3e7YXvH07qlbm34hkmJiPIJxDWgP7JeKyNiStvsOBEoclAphPMYQ4m zY9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=h92NNEnqwiI3KczW3r/BCbDcFrMRWFTplZeZZwPdaYg=; b=mcTZpUVtYNjNJORy1MQ9RDq9A1gCU+NLvaamvQu0gbzU58pS4Dd8fv1SBfmw1OtJJ8 XbbxKfNbwPm4zG8ycgo2mxdph/TTIt+6P7sPIl79gKuULuwHWlhUD/EhgCRJc5qZXFj8 o3mhLtVlxjFFuXKFpSDVnQIBydDb0MGWpXEY8lX5oMOyWFCYXkuhQg4bJ65VZ8Kr/d89 DZPpDi5pR0ArVA5cQ30cVYxfNYJHzhVtvcXOVp8T+YR3zu+sKSh9b8d2+jVDnF1hbCGU pYAFnAM1+Zxioqsb0bNjno+XqwHvNhRyLllJEyzUo1YcdiXz0nts1BpiLO5feexLWjVU BguQ== X-Gm-Message-State: AOAM5300jfcY4FVbt7FxpvN8Y7d+DGm4c2w+tImSQoIlHrqeERkVCBM6 ITBNd7+Ayx++bqCQNfEONBrkGY1I X-Google-Smtp-Source: ABdhPJwfWDIebkfkH6523nNFELd5xhmnSU+D/BVaBBKR7H9dT7zr848756BJWpu85iHpd4n+nppbFg== X-Received: by 2002:adf:c986:: with SMTP id f6mr7427998wrh.168.1596283286581; Sat, 01 Aug 2020 05:01:26 -0700 (PDT) Received: from scaer.home ([2a01:cb19:8b51:cb00:11:a2d0:43b9:2e46]) by smtp.gmail.com with ESMTPSA id o7sm15908603wrv.50.2020.08.01.05.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2020 05:01:25 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 1 Aug 2020 14:01:20 +0200 Message-Id: <20200801120120.28745-1-yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] Revert "package/pkg-generic.mk: create directories upfront in the configure step" X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Raphael Jacob , "Yann E. MORIN" , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This _partially_ reverts commit 2dbb0660fb4d89f8eac86fcff08e9b3d0a705917. Indeed, before 2dbb0660fb, the per-package ../host/ directory was explicitly created right before it was populated. With 2dbb0660fb, it is now created only at the begining of the configure step. However, some packages may have download or extract host dependencies, and when we are trying to rsync them, the destination .../host/ directory does not yet exist at the download or wxtract steps, thus the build fails. E.g., with wget which needs host-lzip if the system does not have it yet: rsync -a --link-dest=/home/ymorin/dev/buildroot/O/per-package/host-lzip/host/ /home/ymorin/dev/buildroot/O/per-package/host-lzip/host/ /home/ymorin/dev/buildroot/O/per-package/wget/host rsync: mkdir "/home/ymorin/dev/buildroot/O/per-package/wget/host" failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(682) [Receiver=3.1.3] make[1]: *** [package/pkg-generic.mk:170: /home/ymorin/dev/buildroot/O/build/wget-1.20.3/.stamp_extracted] Error 11 Kudos to Raphael for pin-pointing the culprit commit. Fixes: http://autobuild.buildroot.org/results/4c8/4c895c7ac0a635d38f5015b5df0393581ad7b508/ and a slew of similar failures Notes: An alternatative solution would be to move the creation of the directories from the configure step to the download step *and* to the rsync step, but this is not so nice in the end... Let's just ensure they are created where needed: at the configure step, and when populating them. Reported-by: Raphael Jacob Signed-off-by: Yann E. MORIN Cc: Thomas Petazzoni --- package/pkg-utils.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index f6de295b7f..ad7a84475a 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -167,6 +167,7 @@ ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y) # $2: 'host' or 'target' # $3: destination directory define per-package-rsync + mkdir -p $(3) $(foreach pkg,$(1),\ rsync -a --link-dest=$(PER_PACKAGE_DIR)/$(pkg)/$(2)/ \ $(PER_PACKAGE_DIR)/$(pkg)/$(2)/ \