GNU bug report logs - #78428
[PATCH] gnu: elogind: Adjust patch for pkttyagent path.

Previous Next

Package: guix-patches;

Reported by: Sergey Trofimov <sarg <at> sarg.org.ru>

Date: Wed, 14 May 2025 17:51:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sergey Trofimov <sarg <at> sarg.org.ru>
Cc: 78428-done <at> debbugs.gnu.org
Subject: Re: bug#78428: [PATCH] gnu: elogind: Adjust patch for pkttyagent path.
Date: Wed, 21 May 2025 08:14:43 +0900
Hi,

Sergey Trofimov <sarg <at> sarg.org.ru> writes:

> * gnu/packages/freedesktop.scm (elogind/fixed): New variable.
> [#:phases]<fix-pkttyagent-path>: Adjust the regexp to work with source
> version 255.17.
>
> * gnu/packages/freedesktop.scm (elogind): Replace with elogind/fixed.
>
> Change-Id: I9c474291816aee7464db5cbe9398b589479e79cf
> ---
>  gnu/packages/freedesktop.scm | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
> index de8fb975bc..bcddb6fd0c 100644
> --- a/gnu/packages/freedesktop.scm
> +++ b/gnu/packages/freedesktop.scm
> @@ -879,6 +879,7 @@ (define-public elogind
>    (package
>      (name "elogind")
>      (version "255.17")
> +    (replacement elogind/fixed)
>      (source (origin
>                (method git-fetch)
>                (uri (git-reference
> @@ -1065,6 +1066,21 @@ (define-public elogind
>  of a the system to know what users are logged in, and where.")
>      (license license:lgpl2.1+)))
>  
> +(define-public elogind/fixed
> +  (hidden-package
> +   (package
> +     (inherit elogind)
> +     (replacement elogind/fixed)
> +     (arguments
> +      (substitute-keyword-arguments (package-arguments elogind)
> +        ((#:phases phases)
> +         `(modify-phases ,phases
> +           (replace 'fix-pkttyagent-path
> +             (lambda _
> +               (substitute* "meson.build"
> +                 (("bindir / 'pkttyagent'")
> +                  "'/run/current-system/profile/bin/pkttyagent'")))))))))))
> +

Modified like this:

--8<---------------cut here---------------start------------->8---
modified   gnu/packages/freedesktop.scm
@@ -1070,16 +1070,15 @@ (define-public elogind/fixed
   (hidden-package
    (package
      (inherit elogind)
-     (replacement elogind/fixed)
      (arguments
       (substitute-keyword-arguments (package-arguments elogind)
         ((#:phases phases)
-         `(modify-phases ,phases
-           (replace 'fix-pkttyagent-path
-             (lambda _
-               (substitute* "meson.build"
-                 (("bindir / 'pkttyagent'")
-                  "'/run/current-system/profile/bin/pkttyagent'")))))))))))
+         #~(modify-phases #$phases
+             (replace 'fix-pkttyagent-path
+               (lambda _
+                 (substitute* "meson.build"
+                   (("bindir / 'pkttyagent'")
+                    "'/run/current-system/profile/bin/pkttyagent'")))))))))))
 
 (define-public basu
   (package
--8<---------------cut here---------------end--------------->8---

(the most important part is that 'replacement' field should be on the
package *being* replaced only, not onthe replacement package itself).

And pushed!

-- 
Thanks,
Maxim




This bug report was last modified 55 days ago.

Previous Next


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