GNU bug report logs - #77266
[PATCH] gnu: Merge xorg configurations when extending.

Previous Next

Package: guix-patches;

Reported by: Ian Eure <ian <at> retrospec.tv>

Date: Wed, 26 Mar 2025 04:25:02 UTC

Severity: normal

Tags: patch

Done: Ian Eure <ian <at> retrospec.tv>

Bug is archived. No further changes may be made.

Full log


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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ian Eure <ian <at> retrospec.tv>
Cc: 77266 <at> debbugs.gnu.org
Subject: Re: [bug#77266] [PATCH v4 1/2] gnu: Merge xorg configurations when
 extending.
Date: Sun, 18 May 2025 11:30:59 +0200
Hello,

Ian Eure <ian <at> retrospec.tv> writes:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Hi Ian,
>>
>> Ian Eure <ian <at> retrospec.tv> writes:
>>
>>> +(define (merge-xorg-configurations a b)
>>> +  (let ((configs (list b a)))           ; Prefer later
>>> configurations.
>>> +    (xorg-configuration
>>> +     (modules
>>> +      (delete-duplicates (append-map xorg-configuration-modules
>>> configs)))
>>> +     (fonts
>>> +      (delete-duplicates (append-map xorg-configuration-fonts
>>> configs)))
>>> +     (drivers
>>> +      (delete-duplicates (append-map xorg-configuration-drivers
>>> configs)))
>>> +     (resolutions
>>> +      (delete-duplicates (append-map
>>> xorg-configuration-resolutions configs)))
>>
>> As I mentioned before, since ‘equal?’ cannot be meaningfully applied
>> here on file-like objects in general, all these ‘delete-duplicates’
>> calls should be removed.
>
> Hmm, I thought your previous comment was about the `extra-config'
> field specifically, and I did update that one.

My point is that ‘delete-duplicates’ cannot be applied on file-like
objects, as is the case for ‘modules’, ‘fonts’, and ‘drivers’ in the
excerpt above.  That’s why I said in this case ‘delete-duplicates’
should be moved to the “build side”.

> Can’t `extra-config' be a file-like?

The doc says:

     ‘extra-config’ (default: ‘'()’)
          This is a list of strings or objects appended to the
          configuration file.  It is used to pass extra text to be added
          verbatim to the configuration file.

Ludo’.




This bug report was last modified 48 days ago.

Previous Next


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