From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id GJhhKmlqSGeBXwEAe85BDQ:P1 (envelope-from ) for ; Thu, 28 Nov 2024 13:04:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id GJhhKmlqSGeBXwEAe85BDQ (envelope-from ) for ; Thu, 28 Nov 2024 14:04:41 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=QqRj7iEc; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=k2hboyku; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732799081; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=dzDijL/PyuLE584GxeB7TNf806cxuVb6ixuA7CdOayI=; b=huQO2niAjzLp3B1nmOBPsUilpcddL2MYVXwfa7jqQNNSDe2kmYi6DAM94dIjKhq3rXnA/I ezf3Asq8XGJ/wV+N3gn0Aiseq08hauEX+JomkK+N1eWp5zGhvJ2i2dwWby/m5tXItlI51s VQCXyVtWM1VRiMYGolBetd094rphR4c6orPwow3bMY+8sGCJyQxOi0PHuWdznMEVwAvbut lZPB/6XPtWRNGP8xRQ0KTrR4wjf1zCIgfkZwgqYkry7JnIM86rd305PReMzfwSCMw4uFVY Xn0fs+cT71y9RpQhd058Fwy89HVy7+JtHjKrGfnzEiweIskfnnDpe6mZto5oyg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=QqRj7iEc; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=k2hboyku; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732799081; a=rsa-sha256; cv=none; b=TnFYOCAUBWW5JCjnNwFjlHY9i1g2X/Xw5JF0dGmU7HPzpxSzfy30/vIX5hMfS2rGDfyTrI x+tS0f9+9KGXiDxTt62I73geFa/6aoNiP36a/8Sam9QVJYacEkFxEbbFDQvg6+MQpXfJ/7 DXE6tpoqCXIRaBfumZ/Rp/X3ucqReiUwR8Gio+310bnkJc+z58AchyhF8nlItAV6bSpB0N 1nhSyCGbk/X6bbz+ja8APghkFN3eF2Eep7+MpI2HkaNfmdSHlMpyopJTl7ndFw2hTlMFeV l4/5Uge0C3Txf0Y3J7SgGDutwwjr0iym22eckmKzRpoCPDyRTVi9Ob+nfH1Byg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3425A89905 for ; Thu, 28 Nov 2024 14:04:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGdUJ-0002G7-15; Thu, 28 Nov 2024 07:19:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGdUE-0002F5-Eu for guix-patches@gnu.org; Thu, 28 Nov 2024 07:19:12 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tGdUD-0003CK-Ay; Thu, 28 Nov 2024 07:19:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=dzDijL/PyuLE584GxeB7TNf806cxuVb6ixuA7CdOayI=; b=QqRj7iEcdSZ+FbaKWs4OBjq94lRsJmoSLLTWgXgPsXMfHZZ7iIiumpaPL/TU8odDVPzlxZ9JzgYh2pCMWQ2WRJ5OiMaXKGc6OQDUnbtqSP55VOtSDVr5EtwDo21q8k3X5pHLq2C1LtYQNez3X1/H02+fHUwCg3U/Lr65SpPJ4BD8zPRjL0sIoNWne2Xr21Wtzs5yeuxW06ISgclEzaLES4gt/mWP6pdSiMC1mab/wSGJULbLrCRwIv87NxsyaEZb294mlp9FMYHJQEtjjrPH8TQgmT+KhVV1Xrlc8f6y1f9UEf5bBx5J4llj4v3X3PWnCARhiaEag5HT0qTvVWh/HQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGdU5-0005zk-Qd; Thu, 28 Nov 2024 07:19:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74582] [PATCH python-team 1/4] build/pyproject: Really merge directories in install phase. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: maxim.cournoyer@gmail.com, lars@6xq.net, marius@gnu.org, me@bonfacemunyoki.com, sharlatanus@gmail.com, tanguy@bioneland.org, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Thu, 28 Nov 2024 12:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74582 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74582@debbugs.gnu.org Cc: Maxim Cournoyer , Maxim Cournoyer , Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart X-Debbugs-Original-Xcc: Maxim Cournoyer , Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart Received: via spool by 74582-submit@debbugs.gnu.org id=B74582.173279629122931 (code B ref 74582); Thu, 28 Nov 2024 12:19:01 +0000 Received: (at 74582) by debbugs.gnu.org; 28 Nov 2024 12:18:11 +0000 Received: from localhost ([127.0.0.1]:37082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGdTG-0005xl-PQ for submit@debbugs.gnu.org; Thu, 28 Nov 2024 07:18:11 -0500 Received: from mail-pf1-f180.google.com ([209.85.210.180]:48435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGdTE-0005xO-V9 for 74582@debbugs.gnu.org; Thu, 28 Nov 2024 07:18:09 -0500 Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-7250c199602so652284b3a.1 for <74582@debbugs.gnu.org>; Thu, 28 Nov 2024 04:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732796222; x=1733401022; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dzDijL/PyuLE584GxeB7TNf806cxuVb6ixuA7CdOayI=; b=k2hboykuhjxJlnjWn0HWml8nrqs6dgf8221woe8dJ2PjOd53M3czkTXiG2LZCBwDLn wXKuQ4UIDLxDCW6KecENmf6w9WhJVSiO0nD9876buctjmuay0c4gc1NIRSWhOHRXyjlB 9/avtc3+SxIKeyZg+fou0un248P3KOZljNO75F0FhCCIXfYuFQnQpkeilbcUG0ASkYPN 3Qs+2yIw9QBsbWCTSKyp4x2Qj9eM7NZQikqBVC5lR39yayqKqMO4itTXypbP6Xe/I7M9 FDWh/sC74v6/I1ENyKxvQ84lOjvBlccMjY+g6c5z6QNYP1UWEHGTbrEBYXWHLF9q0gNr xs4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732796222; x=1733401022; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dzDijL/PyuLE584GxeB7TNf806cxuVb6ixuA7CdOayI=; b=lJz9RrkHEkTHDCq6Z9t4csTwJwsB6Uxc4FVG1D6Po++QuCLsCBNVwmRJj73ExSb3VY Foi9NNiR/LFf8r9CalLqzlfDt6jSWIP2pa98wgDLANrci6/WS7BdC0g39bcZXoGPQhfK dO7EmD2wU29Q2AlBA/lF9EHA48AJyUOyQrky6A+6YNorvQMEfKYl838DdljBSiIm/sbJ HsdnQgTU4pWFJEKDo+SeE5v0ibLgvd8WuxAADSMLVVNAEnIdLaRS1JJV8m6+PQOD2ElY KH1wsHz/fOxBf3kNbNPK6hg6ZkCsJy+Wo6G6n7iE1ZQ0ZXjXRa+QM6/20F35fRua1rXS 2raA== X-Gm-Message-State: AOJu0Yxg/Iz2JVWOtDvQcs82cdGjO/KoORMU1nugmMnckfmiZsIwhGic 7gdXid1YC+7gUg6mQyYVbFECF7hZPaLl6zO5qMn+8IBLJ9erxWzfmaIGbg== X-Gm-Gg: ASbGncsg2d0AU1bOC76/NloLxqQhqpTN4c4pQWtBL5HPGtqZ247sU4mOweYZBxjd0he llp3RZsDtVHvR/q2ELpGiEzeG9XuNzcNpdq4mu9huTxB0oSq8LoMY7UW3c7ba2ah0lg24yWGymq KKpVwOIliDNDuESDEZf7OR0h13UC7vieY68Tz44fTbNyRS1soW7HspSKUpgJo2dgQsBpH2g6vDp gXzJJi7UvRT0W0yopVD3mWNLXoqh0wBM3Ol/wdNflw7zKPwJ7v1E0XeYj6yNoQjswXo X-Google-Smtp-Source: AGHT+IHd33GYf0/zTzmjt+IiG1fF2FGTBGguOZZtqrMKALNgVtbq5HaDU2X1fG5vUYk0ClR4vgyxLw== X-Received: by 2002:a17:903:2b0e:b0:211:ebd:e370 with SMTP id d9443c01a7336-21501385f12mr89893555ad.25.1732796222320; Thu, 28 Nov 2024 04:17:02 -0800 (PST) Received: from localhost.localdomain ([2405:6586:be0:0:c8ff:1707:9b9:af89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-215219064bbsm12181475ad.101.2024.11.28.04.17.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2024 04:17:01 -0800 (PST) From: Maxim Cournoyer Date: Thu, 28 Nov 2024 21:16:39 +0900 Message-ID: <35ca6b4d6fb04d511694f38e52e766134b8565dc.1732781055.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 4.83 X-Spam-Score: 4.83 X-Migadu-Queue-Id: 3425A89905 X-TUID: nCDKr7XrABbb Using rename-file, the destination had to be empty otherwise it would error out. By using copy-recursively, a directory can be copied onto a pre-existing directory, really merging them. This problem manifested itself attempting to build the python-pyre package. * guix/build/pyproject-build-system.scm (install) : Use copy-recursively instead of rename-file. Change-Id: Iceb8609a86f29b17e5fbe6a9629339d0bc26e11f --- guix/build/pyproject-build-system.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject-build-system.scm index c69ccc9d64..03992d915f 100644 --- a/guix/build/pyproject-build-system.scm +++ b/guix/build/pyproject-build-system.scm @@ -194,8 +194,13 @@ (define* (install #:key inputs outputs #:allow-other-keys) (format #t "~a/~a -> ~a/~a~%" source file destination file) (mkdir-p destination) - (rename-file (string-append source "/" file) - (string-append destination "/" file)) + ;; Use 'copy-recursively' rather than 'rename-file' to guard + ;; against the odd case where DESTINATION is a non-empty + ;; directory, which may happen when using hybrid Python + ;; build systems. + (copy-recursively (string-append source "/" file) + (string-append destination "/" file)) + (delete-file-recursively (string-append source "/" file)) (when post-move (post-move file))) (scandir source -- 2.46.0