Bug 2217496 - Unknown argument "-C" for command "repoquery".
Summary: Unknown argument "-C" for command "repoquery".
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-review
Version: 38
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2119984 2221319 2221320
TreeView+ depends on / blocked
 
Reported: 2023-06-26 12:56 UTC by Richard W.M. Jones
Modified: 2023-07-24 16:33 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-20 10:56:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2023-06-26 12:56:50 UTC
Fedora-review fails with this error:

INFO: Build completed
INFO: Installing built package(s)
INFO: Active plugins: Shell-api, Generic, Ocaml, C/C++
Unknown argument "-C" for command "repoquery". Add "--help" for more information about the arguments.
ERROR: Exception down the road... (logs in /home/rjones/.cache/fedora-review.log)

(The error log isn't very interesting, the error is on the previous line)

Reproducible: Always

Steps to Reproduce:
1. Run fedora-review on a bug (-b option).

Actual Results:  
See above.


fedora-review-0.9.0-2.fc38.noarch
dnf-4.16.1-1.fc38.noarch
mock-4.1-1.fc38.noarch

The problem seems to come from the file
/usr/lib/python3.11/site-packages/FedoraReview/deps.py
which is part of fedora-review.  However I think the issue may be related
to Rawhide which recently switched to dnf5.  This version of dnf5 is much
less featureful than the old version and lacks many of the old command
line parameters.

https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5

Comment 1 Richard W.M. Jones 2023-06-26 13:03:59 UTC
If you hit this bug, the workaround is to use either a copr build or to
use an older (pre-dnf5) version of Fedora in mock:

fedora-review -b 123123 -m fedora-38-x86_64

Comment 2 Richard W.M. Jones 2023-06-26 13:06:26 UTC
While you're at it, egrep has started printed this entirely nonsensical warning:

egrep: warning: egrep is obsolescent; using grep -E

Comment 3 Ben Beasley 2023-06-28 17:24:02 UTC
Should be fixed upstream in dnf5 in 5.0.14: https://github.com/rpm-software-management/dnf5/issues/635

Specifically: https://github.com/rpm-software-management/dnf5/issues/227

That version of dnf5 already appears to be in a Rawhide compose, but I’m still encountering the bug when running “fedora-review -n foobar” from F38 using the default Rawhide chroot. F38 is still on dnf5-5.0.13, but it doesn’t seem like that should be the version that matters.

Comment 4 Michal Josef Spacek 2023-07-03 15:22:24 UTC
I have similar issue in Fedora f38 with result:

INFO: Active plugins: Shell-api, Perl, Generic
Unknown argument "-l" for command "repoquery". Add "--help" for more information about the arguments.
ERROR: Exception down the road...

Command is "mock -r fedora-rawhide-x86_64 --no-cleanup-after --no-clean -qn --enable-network shell dnf repoquery -C -l filesystem"

Comment 5 Richard W.M. Jones 2023-07-13 15:27:21 UTC
(In reply to Michal Josef Spacek from comment #4)
> I have similar issue in Fedora f38 with result:
> 
> INFO: Active plugins: Shell-api, Perl, Generic
> Unknown argument "-l" for command "repoquery". Add "--help" for more
> information about the arguments.
> ERROR: Exception down the road...
> 
> Command is "mock -r fedora-rawhide-x86_64 --no-cleanup-after --no-clean -qn
> --enable-network shell dnf repoquery -C -l filesystem"

This one was fixed already in dnf5:

https://github.com/rpm-software-management/dnf5/pull/707

However I guess that has not made it into Fedora yet because I just saw the
same error locally with a completely up to date Rawhide.

Comment 6 Jaroslav Mracek 2023-07-18 10:42:16 UTC
The issue is already fixed in rawhide (support of `dnf5 repoquery -C`). The feature is present in dnf5-5.0.15 (dnf5-0:5.0.15-4.fc39).

Comment 7 Michal Josef Spacek 2023-07-19 12:03:50 UTC
I have this issue with dnf5-5.0.15 (dnf5-0:5.0.15-4.fc39) still.
I am running fedora-review -b 2097813 in Fedora F38
Error:
Unknown argument "-l" for command "repoquery". Add "--help" for more information about the arguments.

Error log:
07-19 13:53 root         DEBUG    Running: mock -r fedora-rawhide-x86_64 --no-cleanup-after --no-clean -qn --enable-network shell dnf repoquery -C -l filesystem
07-19 13:53 root         DEBUG    Exception down the road...
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/FedoraReview/review_helper.py", line 236, in run
    self._do_run(outfile)
  File "/usr/lib/python3.11/site-packages/FedoraReview/review_helper.py", line 226, in _do_run
    self._do_report(outfile)
  File "/usr/lib/python3.11/site-packages/FedoraReview/review_helper.py", line 99, in _do_report
    self._run_checks(self.bug.spec_file, self.bug.srpm_file, outfile)
  File "/usr/lib/python3.11/site-packages/FedoraReview/review_helper.py", line 117, in _run_checks
    self.checks.run_checks(output=output, writedown=not Settings.no_report)
  File "/usr/lib/python3.11/site-packages/FedoraReview/checks.py", line 381, in run_checks
    run_check(name)
  File "/usr/lib/python3.11/site-packages/FedoraReview/checks.py", line 356, in run_check
    check.run()
  File "/usr/lib/python3.11/site-packages/FedoraReview/check_base.py", line 266, in run
    self.run_on_applicable()
  File "/usr/lib/python3.11/site-packages/FedoraReview/plugins/generic.py", line 477, in run_on_applicable
    filesys_dirs = set(deps.list_paths("filesystem"))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/FedoraReview/deps.py", line 291, in list_paths
    paths = check_output(cmd, universal_newlines=True)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mock', '-r', 'fedora-rawhide-x86_64', '--no-cleanup-after', '--no-clean', '-qn', '--enable-network', 'shell', 'dnf repoquery -C -l filesystem']' returned non-zero exit status 2.
07-19 13:53 root         ERROR    Exception down the road... (logs in /home/skim/.cache/fedora-review.log)

[skim@man ~]$ mock -r fedora-rawhide-x86_64 --no-cleanup-after --no-clean -qn --enable-network shell 'rpm -qi dnf5'
Name        : dnf5
Version     : 5.0.15
Release     : 4.fc39
Architecture: x86_64
Install Date: Wed Jul 19 13:52:49 2023
Group       : Unspecified
Size        : 1200894
License     : GPL-2.0-or-later
Signature   : RSA/SHA256, Tue Jul 11 20:06:56 2023, Key ID 75cf5ac418b8e74c
Source RPM  : dnf5-5.0.15-4.fc39.src.rpm
Build Date  : Tue Jul 11 19:40:15 2023
Build Host  : buildvm-x86-29.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://github.com/rpm-software-management/dnf5
Bug URL     : https://bugz.fedoraproject.org/dnf5
Summary     : Command-line package manager
Description :
DNF5 is a command-line package manager that automates the process of installing,
upgrading, configuring, and removing computer programs in a consistent manner.
It supports RPM packages, modulemd modules, and comps groups & environments.

Comment 8 Jaroslav Mracek 2023-07-20 10:56:39 UTC
The issue is fixed in rawhide, therefore I am closing the issue as nextrelease. The patch should be also available soon in Fedora 38.

Comment 9 jiri vanek 2023-07-24 10:24:02 UTC
Just note, this was spotted also on f37, do you plan to do f37 release?

Comment 10 Michal Josef Spacek 2023-07-24 10:58:00 UTC
That's funny. This error goes away, but there is another one.
https://bugzilla.redhat.com/show_bug.cgi?id=2224258

Comment 11 Michal Josef Spacek 2023-07-24 16:33:39 UTC
@jvanek
I think that your issue is same as my ^, issue on Fedora rawhide in mock.


Note You need to log in before you can comment on or make changes to this bug.