[PATCH] build-system: asdf: Don't search and replace inputs when unnecessary.

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 2 weeks ago
(address . guix-patches@gnu.org)
0f2dc8c640c7b1709729d1d16911206fd9aff98f.1740566310.git.mail@cbaines.net
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(-)

Toggle diff (25 lines)
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
Guillaume Le Vaillant wrote 2 weeks ago
(name . Christopher Baines)(address . mail@cbaines.net)(address . 76582@debbugs.gnu.org)
87ldtsygeb.fsf@kitej
Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (40 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCZ78ZfA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+FpgD/efSaIqUjmN73KDXfjFX/71yKNODS2BHWn0yD
/zEKMdMA/0PpYk0qB0tk4XFQL27YbSUdWYj3JGU4zdMGxgSUeIms
=Sa1V
-----END PGP SIGNATURE-----

Christopher Baines wrote 1 weeks ago
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 76582-done@debbugs.gnu.org)
87eczew5e4.fsf@cbaines.net
Guillaume Le Vaillant <glv@posteo.net> writes:

Toggle quote (45 lines)
> Christopher Baines <mail@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
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmfFvbNfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XenyBAAj9edYNHqKZ9nvmJzY97deiz8vSN6Wcf3
pn8wKCVR604VRC2c5iPx6dj0G4uYZpu3MmwBIwbT0Kpjx+ZRtmleV6+xs93cEJPD
q0ttA2iDSPtVj2UTG8hubiAbrMZX8ZzHipnj9a+9Vs38iPHCrhC48q8/wcIuPphK
8+Asaj2G2UyVdajmYwzn2ZFhTnKKSqH3VL2+XW0hTGI1yseh/vIRiKX/63JlHTLz
ksuEBdEbPSnHhrO63vquan+NSLmg1aEVqr6EL8GIO4OTymlb74Wh6jNORqJE+obd
ewzna+TgTLizlX5Ec7O7YDF7k+GZ5VQwoBfMq0q2HIUvYDZ+JOkGFJdkdzT3SY3Z
oRQfUIP382kyLvFyl1Lp0BHP//8Xo3c/gPJ1BY3CO7Dd6drDQukGAmBhdiEfvDc8
6QzugeW0PvWAGN6+pSSH7RQ1bYbtoQjurfW1QV6A7W3PZ3o+JlYSb1aN/AmMnUYF
a8dbBTdMQkBbLrDyEa3wFQBfjRIeOL2QSiM+1d/KnOhSs9fZcXfXpUd3DMqmCmv/
7csDFiw9qKq/kF2FG1JyUxwHEqBJyWp3vRcoSNlVqr/ofxQS9Ws5c0Zkfiptkz/R
Ycx1YAc9BWPEJTiejHk7Z2fdH9LavFiSSpBHECDkB4Zrtxuiec1X8/D+oCtUIwtM
bpTxazH0iwA=
=YqDS
-----END PGP SIGNATURE-----

Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76582@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76582
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help