From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 29 20:17:48 2023 Received: (at submit) by debbugs.gnu.org; 30 Jan 2023 01:17:48 +0000 Received: from localhost ([127.0.0.1]:45643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMIns-00005f-CJ for submit@debbugs.gnu.org; Sun, 29 Jan 2023 20:17:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:55100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMInq-00005X-4o for submit@debbugs.gnu.org; Sun, 29 Jan 2023 20:17:46 -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 1pMInp-00008z-Qd for bug-guix@gnu.org; Sun, 29 Jan 2023 20:17:45 -0500 Received: from ms11p00im-qufo17281401.me.com ([17.58.38.51]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMInn-0006GK-Pc for bug-guix@gnu.org; Sun, 29 Jan 2023 20:17:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akirakyle.com; s=sig1; t=1675041461; bh=5rr+y4prxqYDcPcgiRlBqK4kkCkFKB8cY04pJ9D5Sio=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=e5NZ5VBSbmTTMVy5U0A+VL+JNeAOjSetuW2Z3uLSPtfppMWeJ7fLRFZMNceqSX+f8 K75BVdbZ6X17DQAzJ5AL8TmEuxsJ5rgNFoAmZ8aO2m2hS+P8zlO8qsNutJNIZUfWcR C31dD8Fj+9rAXKhSAn1r5EmWjuNQhhUUGnK39TRWdMej79JLDpKFHg1XhFc0rmU1jP NZJ/zovI/znwWI9lK7rSD+rQ6flnFQfP46mGY28L/rHWfUhJj2VblpXqZ1XLicDHmG hpevJ/utPA8Fx9WBzyiZjBbyMGMjnlviTLQgWXxN7x1KKjNX9iqZJ7yqTmJ0s5Wwmy IP0Ck5p05L07g== Received: from data (ms11p00im-dlb-asmtpmailmevip.me.com [17.57.154.19]) by ms11p00im-qufo17281401.me.com (Postfix) with ESMTPSA id D3D19BA03EE for ; Mon, 30 Jan 2023 01:17:40 +0000 (UTC) User-agent: mu4e 1.9.16; emacs 29.0.50 From: Akira Kyle To: bug-guix@gnu.org Subject: package-input-rewriting causes different ordering of grafts Date: Sun, 29 Jan 2023 17:59:57 -0700 Message-ID: <875ycox1l8.fsf@akirakyle.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Proofpoint-ORIG-GUID: zy-L2FKCIeHxRZVjefUqoi1NYekoErCR X-Proofpoint-GUID: zy-L2FKCIeHxRZVjefUqoi1NYekoErCR X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.572,17.0.605.474.0000000_definitions?= =?UTF-8?Q?=3D2020-02-14=5F11:2020-02-14=5F02,2020-02-14=5F11,2020-01-23?= =?UTF-8?Q?=5F02_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=534 phishscore=0 mlxscore=0 spamscore=0 clxscore=1030 bulkscore=0 adultscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2301300010 Received-SPF: pass client-ip=17.58.38.51; envelope-from=akira@akirakyle.com; helo=ms11p00im-qufo17281401.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) I think this may be a strange, subtle bug and hopefully this is sufficient to reproduce. This was all done with guix commit da9af8c72fe427e3eeb718b53c599139a8958d61. Consider the following: (use-modules (guix packages) (guix gexp) (guix monads) (guix store) (guix git) (guix download) (guix git-download) (gnu packages compression) (gnu packages emacs-xyz)) (define (package-commit pkg commit checksum) "Return a package variant using the given commit and sha256." (package (inherit pkg) (name (package-name pkg)) (version (substring commit 0 7)) (source (origin (method git-fetch) (uri (git-reference (url (git-checkout-url (git-reference->git-checkout (origin-uri (package-source pkg))))) (commit commit))) (sha256 (base32 checksum)) (file-name (git-file-name name version)))))) (define emacs-magit-latest (package-commit emacs-magit "45be64e5f1ef0d03156c53543eb198829177a934" "19b1d4200x1rhffmxf834kh55nj2zjps09hkkhw9hrsdig3nlfl9")) (define emacs-compat-latest (package (inherit emacs-compat) (version "29.1.3.0") (source (origin (method url-fetch) (uri (string-append "https://elpa.gnu.org/packages/" "compat-" version ".tar.lz")) (sha256 (base32 "0jnk81rg5w6zhf413nf3j72i2mr8vfdms55gahrdx28727w8gfj8")))) (native-inputs (modify-inputs (package-native-inputs emacs-compat) (prepend lzip))))) (define with-replacements (package-input-rewriting `((,emacs-compat . ,emacs-compat-latest)))) (list emacs-magit-latest (with-replacements emacs-magit-latest) ) emacs-magit-latest depends on /gnu/store/xrwyv6s8gsazgb2hqxxvh3h6d9cvkxal-git-2.39.1.drv whereas (with-replacements emacs-magit-latest)` depends on /gnu/store/x2gd1dsqvpas4rwvlxdmj7p9w2d2ba49-git-2.39.1.drv Which is surprising since I didn't change anything about the git package. Following this a bit further reveals that the difference comes down to the grafts being applied to python where emacs-magit-latest depends on /gnu/store/848hfdz4xj91jail0y8lfj22dkgb3d12-python-3.9.9-builder whereas (with-replacements emacs-magit-latest)` depends on /gnu/store/f3b6wlkwnnp2zfm20br6hbc9i0pipi24-python-3.9.9-builder Inspecting these derivations, the difference between them seems to be that in the former has zlib first in the `mapping` field of the graft while in the latter zlib is last. My guess is this is due to the fact that the emacs-compat override adds lzip to its native-inputs and causes a different traversal order for grafting zlib. But this is my first time attempting to look at the grafting machinery in detail, so hopefully the experts can figure out if this really is a bug and how to fix it! I don't have a concrete example where this causes issues in practice, since here the two packages would conflict anyways due to different compat versions, but it seems like that's mostly a consequence of emacs-packages having propagated dependencies. At the very least it would seem to cause unnecessary duplication in the store. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 30 11:24:31 2023 Received: (at control) by debbugs.gnu.org; 30 Jan 2023 16:24:31 +0000 Received: from localhost ([127.0.0.1]:50201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMWxL-0002nW-Gk for submit@debbugs.gnu.org; Mon, 30 Jan 2023 11:24:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMWxK-0002nE-4A for control@debbugs.gnu.org; Mon, 30 Jan 2023 11:24:30 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMWxE-0000tZ-Pr for control@debbugs.gnu.org; Mon, 30 Jan 2023 11:24:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=drg6hdyH06vvtdbnGZ1OvsYPGpcxLMiTAfldDiUbM0U=; b=bXjb1Z28gRWugi kRCsjnmXVk0nKf6GddVFEULe7S+OJbbqFH9p0fLyQrILmfC5XnOY1ZTQElf81CSl3cvLzL0n4ahCN 1QknhT4inMDsSf1zVEpwHtyyDyEPwkXNRnBlRp0uoY9muOz78F+zs7cWPRJmkqHXYzyURh+0DmyRb HoQcm8+O+S23XTZ7WdYMGELDypY58/VNR9r05wyN2DkXguTW7IFKIIcPOK8REvgVRx275T/Koo7jq fSqtN6FazxUOusQWYFs+jt33GwPhTl04hY5YZs1HClxfJSvZGMNkkagKWnvDRVrUP6PLXRL0ebYGJ G7YNFLTl0cY7+yKfr1CA==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMWxE-0001mt-2p for control@debbugs.gnu.org; Mon, 30 Jan 2023 11:24:24 -0500 Date: Mon, 30 Jan 2023 17:24:22 +0100 Message-Id: <87mt60yoqx.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #61161 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 61161 important quit From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 01 12:23:27 2023 Received: (at 61161) by debbugs.gnu.org; 1 Feb 2023 17:23:27 +0000 Received: from localhost ([127.0.0.1]:59755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNGpT-0004nN-3V for submit@debbugs.gnu.org; Wed, 01 Feb 2023 12:23:27 -0500 Received: from jpoiret.xyz ([206.189.101.64]:58894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNGpP-0004nD-N2 for 61161@debbugs.gnu.org; Wed, 01 Feb 2023 12:23:25 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id B9024184F0F; Wed, 1 Feb 2023 17:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1675272201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nPuTuEs2c3lvIPd63oKTwOEKpzc1y7Ywbpdrbr0jG+s=; b=jyuI+U4VvlDhR172o7pHB6pP45kxu5XhOTlCw8N40yZ3rYWE4l3FA4oILkjqdk+6mZAv5O IqhBqluphZEauWRXVpfeqRz2TCoFwC5qjMOdyt9RzLXTr9R6l6fZCKJBVa9AmRShMy8wsS BuV8YCXo9UPRCSAWPo7mSG9wPrf8f3NK+Qh2/1Pl0qTHjZHbFSIOF5+AlPf7dQvXpR4RWR /hD5I6u8AxKZzb0PvQFNhDwTJMVnROgh3pzHfjUnDaNelGnQPFPZ/IpIGiXYGsl0nImGHC WxEq90O7kllXcJqKibgbnCJJNxcBVyhh4EKL4EzmYFyNgTR/aBZD0+qcHruieA== From: Josselin Poiret To: Akira Kyle , 61161@debbugs.gnu.org Subject: Re: bug#61161: package-input-rewriting causes different ordering of grafts In-Reply-To: <875ycox1l8.fsf@akirakyle.com> References: <875ycox1l8.fsf@akirakyle.com> Date: Wed, 01 Feb 2023 18:23:21 +0100 Message-ID: <87a61xb8qe.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61161 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi Akira, Akira Kyle writes: > Inspecting these derivations, the difference between them seems to > be that in the former has zlib first in the `mapping` field of the > graft while in the latter zlib is last. My guess is this is due to > the fact that the emacs-compat override adds lzip to its > native-inputs and causes a different traversal order for grafting > zlib. But this is my first time attempting to look at the grafting > machinery in detail, so hopefully the experts can figure out if > this really is a bug and how to fix it! > > I don't have a concrete example where this causes issues in > practice, since here the two packages would conflict anyways due > to different compat versions, but it seems like that's mostly a > consequence of emacs-packages having propagated dependencies. At > the very least it would seem to cause unnecessary duplication in > the store. This makes me think of [1], which was supposedly fixed, although from what I remember we didn't actually find out what was causing this. [1] https://issues.guix.gnu.org/58419 Best, -- Josselin Poiret