* b4: allow test run when source is not in git
@ 2023-02-12 12:41 Héctor Orón Martínez
2023-03-03 20:28 ` konstantin
2023-03-10 19:59 ` Konstantin Ryabitsev
0 siblings, 2 replies; 3+ messages in thread
From: Héctor Orón Martínez @ 2023-02-12 12:41 UTC (permalink / raw)
To: tools; +Cc: konstantin
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
Hello Konstantin,
I am maintaining the b4 Debian package and we got a build failure
when running the tests due to the use of git rev-parse.
https://bugs.debian.org/1031130
I have included the following local patch to remediate the immediate
issue, which I would like you to consider adding to the b4 source
tree.
With kind regards find patch attached,
--
Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-.
[-- Attachment #2: 0001-allow-test-run-when-source-is-not-in-git.patch --]
[-- Type: text/x-patch, Size: 1282 bytes --]
From c1f039a75378b804f9b8b14c0af947487b4f954a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9ctor=20Or=C3=B3n=20Mart=C3=ADnez?= <zumbi@debian.org>
Date: Sun, 12 Feb 2023 13:37:56 +0100
Subject: [PATCH] allow test run when source is not in git
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
---
b4/__init__.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/b4/__init__.py b/b4/__init__.py
index 4d5a6c9..9d203cc 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -2955,10 +2955,13 @@ def git_branch_contains(gitdir, commit_id):
def git_get_toplevel(path: Optional[str] = None) -> Optional[str]:
topdir = None
# Are we in a git tree and if so, what is our toplevel?
- gitargs = ['rev-parse', '--show-toplevel']
- lines = git_get_command_lines(path, gitargs)
- if len(lines) == 1:
- topdir = lines[0]
+ if git_get_command_lines(path, ['rev-parse', '--is-inside-work-tree']):
+ gitargs = ['rev-parse', '--show-toplevel']
+ lines = git_get_command_lines(path, gitargs)
+ if len(lines) == 1:
+ topdir = lines[0]
+ else:
+ topdir = os.getcwd()
return topdir
--
2.39.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: b4: allow test run when source is not in git
2023-02-12 12:41 b4: allow test run when source is not in git Héctor Orón Martínez
@ 2023-03-03 20:28 ` konstantin
2023-03-10 19:59 ` Konstantin Ryabitsev
1 sibling, 0 replies; 3+ messages in thread
From: konstantin @ 2023-03-03 20:28 UTC (permalink / raw)
To: Héctor Orón Martínez; +Cc: tools
On Sun, Feb 12, 2023 at 01:41:40PM +0100, Héctor Orón Martínez wrote:
> Hello Konstantin,
>
> I am maintaining the b4 Debian package and we got a build failure
> when running the tests due to the use of git rev-parse.
> https://bugs.debian.org/1031130
>
> I have included the following local patch to remediate the immediate
> issue, which I would like you to consider adding to the b4 source
> tree.
Thank you. I didn't take the patch, as it wasn't quite what was needed, but
there is a fix in place now that should allow running tests from tarball
sources.
I will backport it to 0.12-stable.
Thanks,
-K
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: b4: allow test run when source is not in git
2023-02-12 12:41 b4: allow test run when source is not in git Héctor Orón Martínez
2023-03-03 20:28 ` konstantin
@ 2023-03-10 19:59 ` Konstantin Ryabitsev
1 sibling, 0 replies; 3+ messages in thread
From: Konstantin Ryabitsev @ 2023-03-10 19:59 UTC (permalink / raw)
To: tools, Héctor Orón Martínez
On Sun, 12 Feb 2023 13:41:40 +0100, Héctor Orón Martínez wrote:
> From c1f039a75378b804f9b8b14c0af947487b4f954a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?H=C3=A9ctor=20Or=C3=B3n=20Mart=C3=ADnez?= <zumbi@debian.org>
> Date: Sun, 12 Feb 2023 13:37:56 +0100
> Subject: [PATCH] allow test run when source is not in git
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> [...]
Applied, thanks!
[1/1] b4: allow test run when source is not in git
commit: bd1bf7905f2f9c2340b75b5074285105a6fa35f3
Best regards,
--
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-10 19:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-12 12:41 b4: allow test run when source is not in git Héctor Orón Martínez
2023-03-03 20:28 ` konstantin
2023-03-10 19:59 ` Konstantin Ryabitsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).