Skip to content

Commit 79627ac

Browse files
committed
Fix flags for dnf 5
Signed-off-by: Gaëtan Lehmann <[email protected]>
1 parent 4f22c9c commit 79627ac

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/repo_status/repoquery.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828
assert dnf_version is not None
2929
if int(dnf_version[1]) >= 5:
3030
QFNL = "\n"
31+
REQUIRES_FLAGS = ["--providers-of=requires"]
3132
else:
3233
QFNL = ""
34+
REQUIRES_FLAGS = ["--resolve", "--requires"]
3335

3436
def setup_xcpng_yum_repos(*, yum_repo_d: str, sections: Iterable[str],
3537
bin_arch: str | None, version: str) -> None:
@@ -155,17 +157,17 @@ def rpm_requires(rpmname: str) -> Sequence[str]:
155157
args = [
156158
'--disablerepo=*-src', # else requires of same-name SRPM are included
157159
'--qf=%{name}-%{evr}' + QFNL, # to avoid getting the arch and explicit zero epoch
158-
'--resolve',
159-
'--requires', rpmname,
160+
] + REQUIRES_FLAGS + [
161+
rpmname,
160162
]
161163
ret = run_repoquery(args)
162164
return ret
163165

164166
def srpm_requires(srpmname: str) -> set[str]:
165167
args = [
166168
'--qf=%{name}-%{evr}' + QFNL, # to avoid getting the arch
167-
'--resolve',
168-
'--requires', f"{srpmname}.src",
169+
] + REQUIRES_FLAGS + [
170+
f"{srpmname}.src",
169171
]
170172
ret = set(run_repoquery(args))
171173
return ret

0 commit comments

Comments
 (0)