GNU bug report logs - #76582
[PATCH] build-system: asdf: Don't search and replace inputs when unnecessary.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Wed, 26 Feb 2025 10:41:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76582 in the body.
You can then email your comments to 76582 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to glv <at> posteo.net, cox.katherine.e+guix <at> gmail.com, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, jgart <at> dismail.de, guix-patches <at> gnu.org:
bug#76582; Package guix-patches. (Wed, 26 Feb 2025 10:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to glv <at> posteo.net, cox.katherine.e+guix <at> gmail.com, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, jgart <at> dismail.de, guix-patches <at> gnu.org. (Wed, 26 Feb 2025 10:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] build-system: asdf: Don't search and replace inputs when
 unnecessary.
Date: Wed, 26 Feb 2025 10:38:30 +0000
If the new-name matches the original name, just use the original package.
This avoids situations where there are several packages matching the name and
the behaviour will be inconsistent, occasionally picking different packages.

Since there are multiple glibc packages currently, I'm seeing this behaviour
with cl-posix-mqueue and ecl-cl-posix-mqueue, occasionally they'll use the
hurd glibc variant.

* guix/build-system/asdf.scm (package-with-build-system): Use the original
input packages unless the new-name differs.

Change-Id: I08a1f3ad1290689b5497d31950ada4dc0bfa3a3a
---
 guix/build-system/asdf.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index 26b5a5008a..ad0fb993f6 100644
--- a/guix/build-system/asdf.scm
+++ b/guix/build-system/asdf.scm
@@ -155,9 +155,13 @@ (define* (package-with-build-system from-build-system to-build-system
 
   (define (find-input-package pkg)
     (let* ((name (package-name pkg))
-           (new-name (transform-package-name name))
-           (pkgs (find-packages-by-name new-name)))
-      (if (null? pkgs) #f (list-ref pkgs 0))))
+           (new-name (transform-package-name name)))
+      (if (string=? name new-name)
+          pkg
+          (let ((pkgs (find-packages-by-name new-name)))
+            (if (null? pkgs)
+                #f
+                (list-ref pkgs 0))))))
 
   (define transform
     (mlambda (pkg)

base-commit: 90ee330bafc5a95493f9cdae2e32ddf740104ebc
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#76582; Package guix-patches. (Wed, 26 Feb 2025 13:40:02 GMT) Full text and rfc822 format available.

Message #8 received at 76582 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 76582 <at> debbugs.gnu.org
Subject: Re: [bug#76582] [PATCH] build-system: asdf: Don't search and
 replace inputs when unnecessary.
Date: Wed, 26 Feb 2025 13:39:08 +0000
[Message part 1 (text/plain, inline)]
Christopher Baines <mail <at> cbaines.net> skribis:

> If the new-name matches the original name, just use the original package.
> This avoids situations where there are several packages matching the name and
> the behaviour will be inconsistent, occasionally picking different packages.
>
> Since there are multiple glibc packages currently, I'm seeing this behaviour
> with cl-posix-mqueue and ecl-cl-posix-mqueue, occasionally they'll use the
> hurd glibc variant.
>
> * guix/build-system/asdf.scm (package-with-build-system): Use the original
> input packages unless the new-name differs.
>
> Change-Id: I08a1f3ad1290689b5497d31950ada4dc0bfa3a3a
> ---
>  guix/build-system/asdf.scm | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
> index 26b5a5008a..ad0fb993f6 100644
> --- a/guix/build-system/asdf.scm
> +++ b/guix/build-system/asdf.scm
> @@ -155,9 +155,13 @@ (define* (package-with-build-system from-build-system to-build-system
>  
>    (define (find-input-package pkg)
>      (let* ((name (package-name pkg))
> -           (new-name (transform-package-name name))
> -           (pkgs (find-packages-by-name new-name)))
> -      (if (null? pkgs) #f (list-ref pkgs 0))))
> +           (new-name (transform-package-name name)))
> +      (if (string=? name new-name)
> +          pkg
> +          (let ((pkgs (find-packages-by-name new-name)))
> +            (if (null? pkgs)
> +                #f
> +                (list-ref pkgs 0))))))
>  
>    (define transform
>      (mlambda (pkg)
>
> base-commit: 90ee330bafc5a95493f9cdae2e32ddf740104ebc

Yes, that seems logical. I have not yet tried recompiling packages with
this patch, but visually it looks good to me.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Mon, 03 Mar 2025 14:34:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Mon, 03 Mar 2025 14:34:02 GMT) Full text and rfc822 format available.

Message #13 received at 76582-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 76582-done <at> debbugs.gnu.org
Subject: Re: [bug#76582] [PATCH] build-system: asdf: Don't search and
 replace inputs when unnecessary.
Date: Mon, 03 Mar 2025 14:33:23 +0000
[Message part 1 (text/plain, inline)]
Guillaume Le Vaillant <glv <at> posteo.net> writes:

> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> If the new-name matches the original name, just use the original package.
>> This avoids situations where there are several packages matching the name and
>> the behaviour will be inconsistent, occasionally picking different packages.
>>
>> Since there are multiple glibc packages currently, I'm seeing this behaviour
>> with cl-posix-mqueue and ecl-cl-posix-mqueue, occasionally they'll use the
>> hurd glibc variant.
>>
>> * guix/build-system/asdf.scm (package-with-build-system): Use the original
>> input packages unless the new-name differs.
>>
>> Change-Id: I08a1f3ad1290689b5497d31950ada4dc0bfa3a3a
>> ---
>>  guix/build-system/asdf.scm | 10 +++++++---
>>  1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
>> index 26b5a5008a..ad0fb993f6 100644
>> --- a/guix/build-system/asdf.scm
>> +++ b/guix/build-system/asdf.scm
>> @@ -155,9 +155,13 @@ (define* (package-with-build-system from-build-system to-build-system
>>  
>>    (define (find-input-package pkg)
>>      (let* ((name (package-name pkg))
>> -           (new-name (transform-package-name name))
>> -           (pkgs (find-packages-by-name new-name)))
>> -      (if (null? pkgs) #f (list-ref pkgs 0))))
>> +           (new-name (transform-package-name name)))
>> +      (if (string=? name new-name)
>> +          pkg
>> +          (let ((pkgs (find-packages-by-name new-name)))
>> +            (if (null? pkgs)
>> +                #f
>> +                (list-ref pkgs 0))))))
>>  
>>    (define transform
>>      (mlambda (pkg)
>>
>> base-commit: 90ee330bafc5a95493f9cdae2e32ddf740104ebc
>
> Yes, that seems logical. I have not yet tried recompiling packages with
> this patch, but visually it looks good to me.

Thanks for taking a look, with the minimal testing I've done locally it
seems OK, so I've pushed this as
15615db61b106c6e77cfabe042edb9e77d578c95.

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 01 Apr 2025 11:25:28 GMT) Full text and rfc822 format available.

This bug report was last modified 80 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.