X-Loop: help-debbugs@HIDDEN
Subject: bug#61161: package-input-rewriting causes different ordering of grafts
Resent-From: Akira Kyle <akira@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 30 Jan 2023 01:18:01 +0000
Resent-Message-ID: <handler.61161.B.1675041468355 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 61161
X-GNU-PR-Package: guix
X-GNU-PR-Keywords:
To: 61161 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-guix@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.1675041468355
(code B ref -1); Mon, 30 Jan 2023 01:18:01 +0000
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 <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1pMIns-00005f-CJ
for submit <at> 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 <akira@HIDDEN>) id 1pMInq-00005X-4o
for submit <at> 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 <akira@HIDDEN>)
id 1pMInp-00008z-Qd
for bug-guix@HIDDEN; 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 <akira@HIDDEN>)
id 1pMInn-0006GK-Pc
for bug-guix@HIDDEN; 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 <bug-guix@HIDDEN>; Mon, 30 Jan 2023 01:17:40 +0000 (UTC)
User-agent: mu4e 1.9.16; emacs 29.0.50
From: Akira Kyle <akira@HIDDEN>
Date: Sun, 29 Jan 2023 17:59:57 -0700
Message-ID: <875ycox1l8.fsf@HIDDEN>
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: vendor=fsecure engine=1.1.170-22c6f66c430a71ce266a39bfe25bc2903e8d5c8f:6.0.138,18.0.572,17.0.605.474.0000000 definitions=2020-02-14_11:2020-02-14_02,2020-02-14_11,2020-01-23_02 signatures=0
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@HIDDEN;
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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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.
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Akira Kyle <akira@HIDDEN> Subject: bug#61161: Acknowledgement (package-input-rewriting causes different ordering of grafts) Message-ID: <handler.61161.B.1675041468355.ack <at> debbugs.gnu.org> References: <875ycox1l8.fsf@HIDDEN> X-Gnu-PR-Message: ack 61161 X-Gnu-PR-Package: guix Reply-To: 61161 <at> debbugs.gnu.org Date: Mon, 30 Jan 2023 01:18:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guix@HIDDEN If you wish to submit further information on this problem, please send it to 61161 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 61161: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61161 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
Received: (at control) by debbugs.gnu.org; 30 Jan 2023 16:24:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 30 11:24:31 2023 Received: from localhost ([127.0.0.1]:50201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pMWxL-0002nW-Gk for submit <at> 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 <ludo@HIDDEN>) id 1pMWxK-0002nE-4A for control <at> 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 <ludo@HIDDEN>) id 1pMWxE-0000tZ-Pr for control <at> 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 <ludo@HIDDEN>) id 1pMWxE-0001mt-2p for control <at> debbugs.gnu.org; Mon, 30 Jan 2023 11:24:24 -0500 Date: Mon, 30 Jan 2023 17:24:22 +0100 Message-Id: <87mt60yoqx.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> 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 <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) severity 61161 important quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.