GNU logs - #66704, boring messages


Message sent to maxim.cournoyer@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#66704] [PATCH 0/1] patman depends on Git
Resent-From: Simon Tournier <zimon.toutoune@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: maxim.cournoyer@HIDDEN, guix-patches@HIDDEN
Resent-Date: Mon, 23 Oct 2023 16:09:02 +0000
Resent-Message-ID: <handler.66704.B.16980773349524 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 66704
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 66704 <at> debbugs.gnu.org
Cc: Simon Tournier <zimon.toutoune@HIDDEN>, maxim.cournoyer@HIDDEN
X-Debbugs-Original-To: guix-patches@HIDDEN
X-Debbugs-Original-Xcc: maxim.cournoyer@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.16980773349524
          (code B ref -1); Mon, 23 Oct 2023 16:09:02 +0000
Received: (at submit) by debbugs.gnu.org; 23 Oct 2023 16:08:54 +0000
Received: from localhost ([127.0.0.1]:51408 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1quxU5-0002TX-TF
	for submit <at> debbugs.gnu.org; Mon, 23 Oct 2023 12:08:54 -0400
Received: from lists.gnu.org ([2001:470:142::17]:45170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1quxU4-0002TL-2S
 for submit <at> debbugs.gnu.org; Mon, 23 Oct 2023 12:08:52 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@HIDDEN>)
 id 1quxTT-0006sY-PJ
 for guix-patches@HIDDEN; Mon, 23 Oct 2023 12:08:15 -0400
Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@HIDDEN>)
 id 1quxTR-0000mE-PV
 for guix-patches@HIDDEN; Mon, 23 Oct 2023 12:08:15 -0400
Received: by mail-wm1-x331.google.com with SMTP id
 5b1f17b1804b1-408cd9660b8so4921115e9.1
 for <guix-patches@HIDDEN>; Mon, 23 Oct 2023 09:08:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1698077292; x=1698682092; darn=gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=TDJZQFU371sST6qREgSQ3LFRiSX21fXmJXux55jFOag=;
 b=EPpMIJYoE/gRQW8cF4HeQRFzcg1zqGzv5EhXffg6pOg+QGZ9JnZfgElkwxTQvpW2sx
 oBOz1sE44qYtV64YiDpSbodEW4KmvmYSQhnA74Zse1ZKFC1RcomBB7LVg/z3qhY82vx9
 WjoTcYpUm3dh5B0yIb9glrRnD86sY4bN04H/xy6llL7syTwRccUaXC7b93wInelUYp8t
 5mz1N8lymqq3xSX7WU0OdYf2iljj0WJkEYdJP0KOg3H5ouEHa27ktYiiurD8/C+sEXu7
 UMJfGdzAK89pu0LYbYOeNhStpbsMcZ8IUQASQMCzZajWvw4Hc1SH50WExIVdPKT12gNa
 cxxg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1698077292; x=1698682092;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=TDJZQFU371sST6qREgSQ3LFRiSX21fXmJXux55jFOag=;
 b=MetpifuU0jYP3cl3mspzB7qVhxLjqRNHrT1aeoq4E/P5K7P0IG1V3Nxz36pVIeSuDI
 RSVBsaMfs5Cu/RBQORoDdMubmJlWA+e9e2tDt7UeWUMRQXBCaAcIr5E1E1PtE520VRZP
 Ei3iX4xeCr7WQ87ruX8QvS/mBamFMmsymvqH51hwqSxFWkVVsW6J1zuCphTQbLtqu4j0
 Ka3Q65ZcCDwtk10VFNArsaMTfake9Hd5miU1zqcoA8KpcCQchWOFWnqNaHRflBYrmQft
 YmhAunNSdaV8IB5M86xLXiE4s82+PLXqaS6wYFEKDb/DzZc308tTl1qSouhznkpSbYZJ
 75Mw==
X-Gm-Message-State: AOJu0YxsQPZlmfFaUSVVTVbtJ8nehi6dV8gFbx8qU91syE6x/q48KBFN
 8DKxHBoGoqi9vjlgK6ngvU8v+QiIRSQ=
X-Google-Smtp-Source: AGHT+IEKYL5GTzvWSZ+jcc3dVtIZX7XRHn2tzxorqJIKZlw9h5Cvjv6uMvVdheALOiiJiLXEsEybpw==
X-Received: by 2002:a05:600c:450a:b0:406:513d:738f with SMTP id
 t10-20020a05600c450a00b00406513d738fmr7345693wmo.2.1698077291700; 
 Mon, 23 Oct 2023 09:08:11 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 bg34-20020a05600c3ca200b00402f713c56esm9919031wmb.2.2023.10.23.09.08.11
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 23 Oct 2023 09:08:11 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
Date: Mon, 23 Oct 2023 18:07:56 +0200
Message-Id: <cover.1698076987.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2a00:1450:4864:20::331;
 envelope-from=zimon.toutoune@HIDDEN; helo=mail-wm1-x331.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi,

Assume, I am running in some Git repository, e.g.,

  $ git config --get branch.tmp.remote
  origin

Then, I get this error:

--8<---------------cut here---------------start------------->8---
$ guix shell -C patman -- patman -h
Traceback (most recent call last):
  File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2023.07.02/lib/python3.10/site-packages/u_boot_pylib/command.py", line 95, in run_pipe
    last_pipe = cros_subprocess.Popen(cmd, cwd=cwd, **kwargs)
  File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2023.07.02/lib/python3.10/site-packages/u_boot_pylib/cros_subprocess.py", line 83, in __init__
    super(Popen, self).__init__(args, stdin=stdin,
  File "/gnu/store/p4x29pa0qjb3r76v2bl0jvhld42l0lkq-python-3.10.7/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/gnu/store/p4x29pa0qjb3r76v2bl0jvhld42l0lkq-python-3.10.7/lib/python3.10/subprocess.py", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/gnu/store/znq8klrhn3wwgfvrq0kqm8krx5xi7fpq-patman-2023.07.02/bin/.patman-real", line 47, in <module>
    parser.add_argument('-p', '--project', default=project.detect_project(),
  File "/gnu/store/znq8klrhn3wwgfvrq0kqm8krx5xi7fpq-patman-2023.07.02/lib/python3.10/site-packages/patman/project.py", line 19, in detect_project
    top_level = gitutil.get_top_level()
  File "/gnu/store/znq8klrhn3wwgfvrq0kqm8krx5xi7fpq-patman-2023.07.02/lib/python3.10/site-packages/patman/gitutil.py", line 627, in get_top_level
    return command.output_one_line('git', 'rev-parse', '--show-toplevel')
  File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2023.07.02/lib/python3.10/site-packages/u_boot_pylib/command.py", line 128, in output_one_line
    result = run_pipe([cmd], capture=True, oneline=True,
  File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2023.07.02/lib/python3.10/site-packages/u_boot_pylib/command.py", line 99, in run_pipe
    raise Exception("Error running '%s': %s" % (user_pipestr, str))
Exception: Error running 'git rev-parse --show-toplevel': <class 'str'>
--8<---------------cut here---------------end--------------->8---

That’s because ’patman’ runs ’git’ via the file gitutils.py, see:

--8<---------------cut here---------------start------------->8---
-*- mode:grep; default-directory: "/tmp/u-boot-2023.07.02/tools/patman/" -*-

20 candidates:
./gitutil.py:29:    cmd = ['git']
./gitutil.py:87:    pipe = ['git', 'name-rev', commit_hash]
./gitutil.py:139:        remote = command.output_one_line('git', '--git-dir', git_dir, 'config',
./gitutil.py:141:        merge = command.output_one_line('git', '--git-dir', git_dir, 'config',
./gitutil.py:231:    pipe = ['git']
./gitutil.py:252:    pipe = ['git', 'clone', git_dir, '.']
./gitutil.py:265:    pipe = ['git']
./gitutil.py:285:    pipe = ['git', '--git-dir', git_dir, 'worktree', 'list']
./gitutil.py:300:    pipe = ['git', '--git-dir', git_dir, 'worktree', 'add', '.', '--detach']
./gitutil.py:315:    pipe = ['git', '--git-dir', git_dir, 'worktree', 'prune']
./gitutil.py:337:    cmd = ['git', 'format-patch', '-M']
./gitutil.py:414:        'git', 'config', 'sendemail.suppresscc', raise_on_error=False)
./gitutil.py:496:        git_config_to = command.output('git', 'config', 'sendemail.to',
./gitutil.py:511:    cmd = ['git', 'send-email', '--annotate']
./gitutil.py:627:    return command.output_one_line('git', 'rev-parse', '--show-toplevel')
./gitutil.py:636:    fname = command.output_one_line('git', 'config', 'sendemail.aliasesfile',
./gitutil.py:654:    uname = command.output_one_line('git', 'config', '--global', 'user.name')
./gitutil.py:664:    uemail = command.output_one_line('git', 'config', '--global', 'user.email')
./gitutil.py:675:        'git', 'config', 'format.subjectprefix', raise_on_error=False)
./gitutil.py:699:    return command.output_one_line('git', 'show', '-s', '--pretty=format:%H')
--8<---------------cut here---------------end--------------->8---

I propose to wrap ’patman’ with ’git’, see patch.

WDYT?

Cheers,
simon


Simon Tournier (1):
  gnu: patman: Wrap program with git.

 gnu/packages/bootloaders.scm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)


base-commit: a25a492f2b8604de4ebc21298f24891a1a245161
-- 
2.38.1





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Simon Tournier <zimon.toutoune@HIDDEN>
Subject: bug#66704: Acknowledgement ([PATCH 0/1] patman depends on Git)
Message-ID: <handler.66704.B.16980773349524.ack <at> debbugs.gnu.org>
References: <cover.1698076987.git.zimon.toutoune@HIDDEN>
X-Gnu-PR-Message: ack 66704
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 66704 <at> debbugs.gnu.org
Date: Mon, 23 Oct 2023 16:09:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  maxim.cournoyer@HIDDEN
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 66704 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
66704: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D66704
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#66704] [PATCH 1/1] gnu: patman: Wrap program with git.
Resent-From: Simon Tournier <zimon.toutoune@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 23 Oct 2023 16:27:02 +0000
Resent-Message-ID: <handler.66704.B66704.169807840711186 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 66704
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 66704 <at> debbugs.gnu.org
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
Received: via spool by 66704-submit <at> debbugs.gnu.org id=B66704.169807840711186
          (code B ref 66704); Mon, 23 Oct 2023 16:27:02 +0000
Received: (at 66704) by debbugs.gnu.org; 23 Oct 2023 16:26:47 +0000
Received: from localhost ([127.0.0.1]:51426 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1quxlP-0002uM-EC
	for submit <at> debbugs.gnu.org; Mon, 23 Oct 2023 12:26:47 -0400
Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:40979)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1quxlL-0002u2-O4
 for 66704 <at> debbugs.gnu.org; Mon, 23 Oct 2023 12:26:45 -0400
Received: by mail-wm1-x331.google.com with SMTP id
 5b1f17b1804b1-408363c2918so3914895e9.0
 for <66704 <at> debbugs.gnu.org>; Mon, 23 Oct 2023 09:26:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1698078368; x=1698683168; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=7JycLcK8tBW5BNuYbrhsDT2STagGUQtbc/SKoJRf3lo=;
 b=j64kuwBe8g5Us7716nM9riQG5zA5itPPrWMsRz/1YjyAppCmnpUqDfC+Qh3wlww0F/
 ax9H+aW5eJBZeXdQ+TSiy+SCGyXmBk1O1RjlMAaoOUGBS1yuSjfDUv9dwveCHNRwtp1F
 5tbu9rV7GEH3KECjoO6MInp9qwd7J+Ylm2ZmWI/OJKfYiCPsa/n+yTDjGBEI9J+NyLm5
 UZms2iUPfSE/UvJCxTwQUM2jPvXBgWGiDUen4WAa4da8bDOPJYfqR1XILlSmccJnwnBT
 HWLMxH5rG3LkgGEw5WwHhPQZ0NyeYel06hbbOtgYteb2xoehkOcgyD4pB7WAL17HI6ZW
 zVpg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1698078368; x=1698683168;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=7JycLcK8tBW5BNuYbrhsDT2STagGUQtbc/SKoJRf3lo=;
 b=ObjenjMDr3eIlnFicixy6TUHqkA6ifKRKLWKkLD0jB+aAwi9it8zGl/dmHGi4EvbWQ
 Snyqlhhl9+S01cu25xicT00TY9gqdS7evAc71CXZeWyMvzInjs/h+JXMSv0Xb0LWKo2T
 PGNwX8FtT/j7mpfEHQIJNj/0UNAUGMzopthfbkqRd9wpRzAiVhDBsNQd0/NPwyGVzBtQ
 71sbs4D0bdWHQ7349gSdpPTclITJltKfiK7d9LCXD4hrdB0yJDcwmSMWKz/61MIEBf93
 TjgPQQ6qOkroLOebfTfLAsdJmH1+xKzAKeVwnpIKKyugdFQ9m8MnsZ8ZQmo3OT1+i1h1
 W+1g==
X-Gm-Message-State: AOJu0Yxi0RcO+58XYpWZtWYGmjIR/u0e6AmcjmCwxBBNTdDvCUPBiofh
 p1FLMNHv21eP8q/b76HOzOmGi8y+WU0=
X-Google-Smtp-Source: AGHT+IF3D4Ode4LoUDdpTzDDt+b3jkkUHUKJ5lXRHb+7pjnqvB2klZaTrxIHVGbLtg5Unb+DZBCE0Q==
X-Received: by 2002:a05:600c:1c06:b0:405:4721:800 with SMTP id
 j6-20020a05600c1c0600b0040547210800mr7140624wms.1.1698078368427; 
 Mon, 23 Oct 2023 09:26:08 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 v19-20020a05600c471300b00405959bbf4fsm9919415wmo.19.2023.10.23.09.26.08
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 23 Oct 2023 09:26:08 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
Date: Mon, 23 Oct 2023 18:26:00 +0200
Message-Id: <377171f13a5d00cc460c394a6e0226f6cdcf217a.1698076987.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <cover.1698076987.git.zimon.toutoune@HIDDEN>
References: <cover.1698076987.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/bootloaders.scm (patman): Replace by 'package/inherit'.
[arguments]: Add 'wrap-program' that uses git-minimal dependency.
[inputs]: Add git-minimal.

Change-Id: Id4ebadd518f271baa087161b10455ec03d6f959b
---
 gnu/packages/bootloaders.scm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index fb20ba0efa..cdc26a0c9e 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
 ;;; Copyright © 2021 Stefan <stefan-guix@HIDDEN>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
+;;; Copyright © 2023 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -65,6 +66,7 @@ (define-module (gnu packages bootloaders)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages valgrind)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages virtualization)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages python-web)
@@ -864,8 +866,7 @@ (define-public python-u-boot-pylib
 ;;; This is packaged separately, as it can be used in other contexts than for
 ;;; U-Boot development.
 (define-public patman
-  (package
-    (inherit u-boot)
+  (package/inherit u-boot
     (name "patman")
     (build-system pyproject-build-system)
     (arguments
@@ -890,8 +891,17 @@ (define-public patman
             (lambda _
               (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 _
+              (wrap-program (string-append #$output "/bin/patman")
+                `("PATH" ":" suffix
+                  (,(string-append
+                     #$(this-package-input "git-minimal") "/bin")))))))))
+    (inputs (list git-minimal
+                  python-pygit2
+                  python-requests
+                  python-u-boot-pylib))
     (synopsis "Patch automation tool")
     (description "Patman is a patch automation script which:
 @itemize
-- 
2.38.1





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#66704] [PATCH 0/1] patman depends on Git
Resent-From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Tue, 24 Oct 2023 01:07:01 +0000
Resent-Message-ID: <handler.66704.B66704.169810959120786 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 66704
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Simon Tournier <zimon.toutoune@HIDDEN>
Cc: 66704 <at> debbugs.gnu.org
Received: via spool by 66704-submit <at> debbugs.gnu.org id=B66704.169810959120786
          (code B ref 66704); Tue, 24 Oct 2023 01:07:01 +0000
Received: (at 66704) by debbugs.gnu.org; 24 Oct 2023 01:06:31 +0000
Received: from localhost ([127.0.0.1]:52603 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qv5sM-0005PC-7u
	for submit <at> debbugs.gnu.org; Mon, 23 Oct 2023 21:06:30 -0400
Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:54444)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1qv5sJ-0005Os-2Q
 for 66704 <at> debbugs.gnu.org; Mon, 23 Oct 2023 21:06:28 -0400
Received: by mail-qk1-x72e.google.com with SMTP id
 af79cd13be357-7789a4c01easo257411185a.0
 for <66704 <at> debbugs.gnu.org>; Mon, 23 Oct 2023 18:05:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1698109552; x=1698714352; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=K6P3xRACR7PYKCD3SfUzyQRJq065QdZb/tqPFK/bNLA=;
 b=CW3F/P4556OqQi8hpzlzSbv+xgxGT93zkccRCzhyTCs+ThyzfvW7NqPaeAIDBVvIBB
 d39MPBGXJzhTZXiwr8oIRvN8K1GePtYfw9UV+1fH6uY7xuJruAaCLaf1CgWdR0nb6BsS
 yRpnmVKNDAhLpgdnIxugPfNvQES9yhduTyNDVBSGcFidKYeD9LIxwUze8RlGMcEiuEb4
 4dSBUBvG1Je382Z19B6F2QSWb9W0j3JRppKx96+xEQ0wrn405eovEBizsupDE+GMCdg0
 gEmefInEDRFUNh9TdHQfqAPOg6SoCCNCwBBqijpYSZkfM2cDwmmqcXKfggGJ1YF1DHod
 tNxg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1698109552; x=1698714352;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=K6P3xRACR7PYKCD3SfUzyQRJq065QdZb/tqPFK/bNLA=;
 b=QoujAMxISfArbJUoN9qgU5SsGF6RlEi/BBqS/cecIUKAy6UE0S0EtxmC5XDW/4NL9G
 yD36TKdVkECzH2c6kP7owwHNLpZY2RvRWSEe/vUfeHBVS4oJlhcRoCSuatZSXRBmt0c6
 We5qcSsOQBCeZvqBuomYR5sRYNPxZCVChDFz/dA//BL+lGBKtj9kRiwLpdlqdXV8odI5
 afoeZB9CudI9iTMYwCB+h6cUlrtUC5FJRM8StcUUSyOTmDNMlwC4yRjpugO7Nr7ZMC+C
 6GQMK+lfEcLvHflRSEq7T0imo8ZWrJ5TEYkSdowLuGxlO9YJgH8FMoG2zjzitk/NEw7m
 LIYQ==
X-Gm-Message-State: AOJu0YyE+bmoPWRTTJsYV/8khxTtZsL2kHsFRYud+B4+KhiB7obdajDO
 BMGSztwnQkx6US8639Ix5MtkhjhKyJ7TTQ==
X-Google-Smtp-Source: AGHT+IH0d4IhfCUn4/7NqeF1k4vQwHv5ch0EJfx7qj7sWTFHkpwG3WfN8IBoeZTGaEwBoDoPa/yXWA==
X-Received: by 2002:a05:620a:40d6:b0:778:b559:4744 with SMTP id
 g22-20020a05620a40d600b00778b5594744mr9232816qko.58.1698109551997; 
 Mon, 23 Oct 2023 18:05:51 -0700 (PDT)
Received: from hurd (dsl-10-148-194.b2b2c.ca. [72.10.148.194])
 by smtp.gmail.com with ESMTPSA id
 qs21-20020a05620a395500b007671cfe8a18sm3109231qkn.13.2023.10.23.18.05.51
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 23 Oct 2023 18:05:51 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
In-Reply-To: <cover.1698076987.git.zimon.toutoune@HIDDEN> (Simon Tournier's
 message of "Mon, 23 Oct 2023 18:07:56 +0200")
References: <cover.1698076987.git.zimon.toutoune@HIDDEN>
Date: Mon, 23 Oct 2023 21:05:50 -0400
Message-ID: <87jzrc6d8x.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Simon,

Simon Tournier <zimon.toutoune@HIDDEN> writes:

> Hi,
>
> Assume, I am running in some Git repository, e.g.,
>
>   $ git config --get branch.tmp.remote
>   origin
>
> Then, I get this error:
>
> $ guix shell -C patman -- patman -h
> Traceback (most recent call last):
>   File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2=
023.07.02/lib/python3.10/site-packages/u_boot_pylib/command.py", line 95, i=
n run_pipe
>     last_pipe =3D cros_subprocess.Popen(cmd, cwd=3Dcwd, **kwargs)
>   File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2=
023.07.02/lib/python3.10/site-packages/u_boot_pylib/cros_subprocess.py", li=
ne 83, in __init__
>     super(Popen, self).__init__(args, stdin=3Dstdin,
>   File "/gnu/store/p4x29pa0qjb3r76v2bl0jvhld42l0lkq-python-3.10.7/lib/pyt=
hon3.10/subprocess.py", line 969, in __init__
>     self._execute_child(args, executable, preexec_fn, close_fds,
>   File "/gnu/store/p4x29pa0qjb3r76v2bl0jvhld42l0lkq-python-3.10.7/lib/pyt=
hon3.10/subprocess.py", line 1845, in _execute_child
>     raise child_exception_type(errno_num, err_msg, err_filename)
> FileNotFoundError: [Errno 2] No such file or directory: 'git'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/gnu/store/znq8klrhn3wwgfvrq0kqm8krx5xi7fpq-patman-2023.07.02/bin=
/.patman-real", line 47, in <module>
>     parser.add_argument('-p', '--project', default=3Dproject.detect_proje=
ct(),
>   File "/gnu/store/znq8klrhn3wwgfvrq0kqm8krx5xi7fpq-patman-2023.07.02/lib=
/python3.10/site-packages/patman/project.py", line 19, in detect_project
>     top_level =3D gitutil.get_top_level()
>   File "/gnu/store/znq8klrhn3wwgfvrq0kqm8krx5xi7fpq-patman-2023.07.02/lib=
/python3.10/site-packages/patman/gitutil.py", line 627, in get_top_level
>     return command.output_one_line('git', 'rev-parse', '--show-toplevel')
>   File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2=
023.07.02/lib/python3.10/site-packages/u_boot_pylib/command.py", line 128, =
in output_one_line
>     result =3D run_pipe([cmd], capture=3DTrue, oneline=3DTrue,
>   File "/gnu/store/50q6yz9s0ddfxbwd31sf6lq15hsy97gs-python-u-boot-pylib-2=
023.07.02/lib/python3.10/site-packages/u_boot_pylib/command.py", line 99, i=
n run_pipe
>     raise Exception("Error running '%s': %s" % (user_pipestr, str))
> Exception: Error running 'git rev-parse --show-toplevel': <class 'str'>
>
>
> That=E2=80=99s because =E2=80=99patman=E2=80=99 runs =E2=80=99git=E2=80=
=99 via the file gitutils.py, see:
>
> -*- mode:grep; default-directory: "/tmp/u-boot-2023.07.02/tools/patman/" =
-*-
>
> 20 candidates:
> ./gitutil.py:29:    cmd =3D ['git']
> ./gitutil.py:87:    pipe =3D ['git', 'name-rev', commit_hash]
> ./gitutil.py:139:        remote =3D command.output_one_line('git', '--git=
-dir', git_dir, 'config',
> ./gitutil.py:141:        merge =3D command.output_one_line('git', '--git-=
dir', git_dir, 'config',
> ./gitutil.py:231:    pipe =3D ['git']
> ./gitutil.py:252:    pipe =3D ['git', 'clone', git_dir, '.']
> ./gitutil.py:265:    pipe =3D ['git']
> ./gitutil.py:285:    pipe =3D ['git', '--git-dir', git_dir, 'worktree', '=
list']
> ./gitutil.py:300:    pipe =3D ['git', '--git-dir', git_dir, 'worktree', '=
add', '.', '--detach']
> ./gitutil.py:315:    pipe =3D ['git', '--git-dir', git_dir, 'worktree', '=
prune']
> ./gitutil.py:337:    cmd =3D ['git', 'format-patch', '-M']
> ./gitutil.py:414:        'git', 'config', 'sendemail.suppresscc', raise_o=
n_error=3DFalse)
> ./gitutil.py:496:        git_config_to =3D command.output('git', 'config'=
, 'sendemail.to',
> ./gitutil.py:511:    cmd =3D ['git', 'send-email', '--annotate']
> ./gitutil.py:627:    return command.output_one_line('git', 'rev-parse', '=
--show-toplevel')
> ./gitutil.py:636:    fname =3D command.output_one_line('git', 'config', '=
sendemail.aliasesfile',
> ./gitutil.py:654:    uname =3D command.output_one_line('git', 'config', '=
--global', 'user.name')
> ./gitutil.py:664:    uemail =3D command.output_one_line('git', 'config', =
'--global', 'user.email')
> ./gitutil.py:675:        'git', 'config', 'format.subjectprefix', raise_o=
n_error=3DFalse)
> ./gitutil.py:699:    return command.output_one_line('git', 'show', '-s', =
'--pretty=3Dformat:%H')
>
> I propose to wrap =E2=80=99patman=E2=80=99 with =E2=80=99git=E2=80=99, se=
e patch.

I see 'git send-email' in the above, so you'll also want to wrap with
`(,git "send-email").  Did you test that this suffices to get a fully
self-contained working patman?  Maybe you can send a v2 with patman.

You can add these 'Series-*' git trailers to your commit:

--8<---------------cut here---------------start------------->8---
Change-Id: xxxxxxx
[...]
Series-to: 66704 <at> debbugs.gnu.org
Series-version: 2
Series-changes: 2
 - Also add 'send-email' output of git to wrapper

--8<---------------cut here---------------end--------------->8---

Then to send, you simply do:

$ patman

And it'll annotate the patch for you and you don't need to remember
tracking the '--to' value.

--=20
Thanks,
Maxim




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 16 Apr 2024 08:47:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 04:47:29 2024
Received: from localhost ([127.0.0.1]:42591 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rweTR-0000PA-MX
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2024 04:47:29 -0400
Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]:34734)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <steve@HIDDEN>) id 1rweTP-0000OO-OE
 for control <at> debbugs.gnu.org; Tue, 16 Apr 2024 04:47:29 -0400
Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com)
 by mailtransmit04.runbox.com with esmtps (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93)
 (envelope-from <steve@HIDDEN>) id 1rweT5-00EFHd-8Q
 for control <at> debbugs.gnu.org; Tue, 16 Apr 2024 10:47:07 +0200
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=futurile.net; s=selector1; h=Content-Type:MIME-Version:Message-ID:Subject:
 To:From:Date; bh=zUJ8w6BFEuDMjOTMHU7qrHATD9RA58nxWLsEigmAoN8=; b=HX2nXwyH/TYD
 42uNL4wfJmSXvbIiRHHv32ZshULd1AZjzdhJQIwNHUi4Crrbsi3izKRKMowbI1oUooHnRE0h1Prgr
 ynJ7vhbMVN/eZu31g2FI9v4eb9hDAUrp+XUlHWA54/Bz++MyeOgk3OggdbYOQmRgBSaeDSNRDViGX
 n1DYD0oUO/L/M58QRY9AcIr2dJecOlwn1ir1anE5hHS9wB0Ny4aa5ihkKe0+YzlhNQ/0KFBUOAh19
 HDqSzewtEYdPlsLMLGFquZfgj8htUe/h/dMOAwQDzdjLeohOA8sBswraCGZRdmDDJjhncMHlQrPu5
 ZRGsqTWFpJTSI0O/Vf7VpA==;
Received: from [10.9.9.74] (helo=submission03.runbox)
 by mailtransmit02.runbox with esmtp (Exim 4.86_2)
 (envelope-from <steve@HIDDEN>) id 1rweT4-0007ov-TQ
 for control <at> debbugs.gnu.org; Tue, 16 Apr 2024 10:47:07 +0200
Received: by submission03.runbox with esmtpsa [Authenticated ID (641962)]
 (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93)
 id 1rweT2-00BXNZ-M5
 for control <at> debbugs.gnu.org; Tue, 16 Apr 2024 10:47:04 +0200
Date: Tue, 16 Apr 2024 09:47:03 +0100
From: Steve George <steve@HIDDEN>
To: control <at> debbugs.gnu.org
Subject: owner 66704
Message-ID: <1713257218-3273-bts-steve@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
User-Agent: devscripts bts/2.22.1ubuntu1
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

owner 66704 !
thanks






Last modified: Tue, 16 Apr 2024 09:00:09 UTC

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