all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Simon Tournier <zimon.toutoune@gmail.com>
Cc: 66704-done@debbugs.gnu.org,
	Vagrant Cascadian <vagrant@debian.org>,
	Efraim Flashner <efraim@flashner.co.il>
Subject: bug#66704: [PATCH v2] gnu: patman: Wrap program with git.
Date: Sat, 14 Sep 2024 22:01:33 +0900	[thread overview]
Message-ID: <87bk0qtmmq.fsf@gmail.com> (raw)
In-Reply-To: <3b43a54f344bbe0824d351915fdb4db979b10a00.1721757000.git.zimon.toutoune@gmail.com> (Simon Tournier's message of "Tue, 23 Jul 2024 19:59:18 +0200")

Hi Simon,

Simon Tournier <zimon.toutoune@gmail.com> writes:

> * gnu/packages/bootloaders.scm (patman): Replace by 'package/inherit'.

I don't think package/inherit is appropriate here; patman is not a
variant of u-boot (doesn't share any of its inputs) -- it jut happens to
have its source part of the u-boot sources.

I've dropped it.

> [arguments]: Add 'wrap-program' that uses git dependency.
> [inputs]: Add git and git:send-email.
>
> Change-Id: Id4ebadd518f271baa087161b10455ec03d6f959b
> ---
>  gnu/packages/bootloaders.scm | 22 ++++++++++++++++++----
>  1 file changed, 18 insertions(+), 4 deletions(-)
>
> Hi,
>
> On Mon, 23 Oct 2023 at 21:05, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>
>> I see 'git send-email' in the above
>
> Good catch!  Added.  However, I am not happy with the mix of “styles”.  And I
> suspect a “bug” or something lacking for packages with multiple outputs; I am
> going to open a report about that.  Another story and not blocking, IMHO.
>
>
>>                        Did you test that this suffices to get a fully
>> self-contained working patman?  Maybe you can send a v2 with patman.

[...]

>                (substitute* "pyproject.toml"
>                  (("patman.__main__:run_patman")
> -                 "patman.__main__")))))))
> -    (inputs (list python-pygit2 python-requests python-u-boot-pylib))
> +                 "patman.__main__"))))
> +          (add-after 'install 'wrap-program
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              (let ((git:send-email (assoc-ref inputs "git:send-email")))
> +                (wrap-program (string-append #$output "/bin/patman")
> +                  `("PATH" ":" prefix
> +                    (,(string-append #$(this-package-input "git") "/bin")))
> +                  `("GIT_EXEC_PATH" ":" prefix
> +                    (,(string-append #$(this-package-input "git") "/libexec/git-core")
> +                     ,(string-append git:send-email "/libexec/git-core"))))))))))

I think 'search-input-file' would be better here. It should be preferred
to gexps in general, as it is more lazy and works better with
inheritance.

> +    (inputs `(("git" ,git)
> +              ("git:send-email" ,git "send-email")
> +              ("python-pygit2" ,python-pygit2)
> +              ("python-requests" ,python-requests)
> +              ("python-u-boot-pylib" ,python-u-boot-pylib)))
>      (synopsis "Patch automation tool")
>      (description "Patman is a patch automation script which:
>  @itemize

I modified this to avoid adding labels, which was not necessary.  I've
also used wrap-script, which inserts the wrapping in the Python script
directly instead of creating a .patman-real wrapper, which uglifies the
process name in top, for example.

You'll find the result in commit 4c99ef43f0.

Thanks for kicking the ball.

-- 
Thanks,
Maxim




      reply	other threads:[~2024-09-14 13:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 16:07 [bug#66704] [PATCH 0/1] patman depends on Git Simon Tournier
2023-10-23 16:26 ` [bug#66704] [PATCH 1/1] gnu: patman: Wrap program with git Simon Tournier
2023-10-24  1:05 ` [bug#66704] [PATCH 0/1] patman depends on Git Maxim Cournoyer
2024-07-23 17:59 ` [bug#66704] [PATCH v2] gnu: patman: Wrap program with git Simon Tournier
2024-09-14 13:01   ` Maxim Cournoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bk0qtmmq.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=66704-done@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=vagrant@debian.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.