From c37e180e0085365b35938d2dafc17abcd4b305c1 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 14 Jan 2026 19:28:44 +0100 Subject: [PATCH] fixup! build.cmds.CmdListRepos: Support local repos Signed-off-by: Jan Lindemann --- make/project.conf | 2 +- src/python/jw/pkg/build/cmds/CmdListRepos.py | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/make/project.conf b/make/project.conf index 42932e4a..0b671c34 100644 --- a/make/project.conf +++ b/make/project.conf @@ -35,7 +35,7 @@ build = realpath build = realpath [pkg.requires.suse] -run = python3, python3-GitPython +run = python3 release = rpmbuild, pkg-config, python3-base [pkg.requires.debian] diff --git a/src/python/jw/pkg/build/cmds/CmdListRepos.py b/src/python/jw/pkg/build/cmds/CmdListRepos.py index fec9f564..0c85f4e2 100644 --- a/src/python/jw/pkg/build/cmds/CmdListRepos.py +++ b/src/python/jw/pkg/build/cmds/CmdListRepos.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -import re, git, os +import re, os from argparse import Namespace, ArgumentParser from ..Cmd import Cmd @@ -79,11 +79,8 @@ class CmdListRepos(Cmd): # export out = [] for entry in os.scandir(args.base_url + "/" + subdir): path = entry.path - try: - _ = git.Repo(path).git_dir - except: - continue - out.append(path) + if os.path.isdir(path + "/.git") or os.path.exists(path + "/HEAD"): + out.append(path) if out: print('\n'.join(out)) break