#509 ReviewError: 'Cannot find spec file in srpm'
Opened 4 months ago by frostyx. Modified 4 months ago

@farchord submitted a package with an incorrectly named spec file and we found this in the fedora-review.log:

01-26 19:44 root         INFO     Getting .spec and .srpm Urls from : Local files in /var/lib/copr-rpmbuild/results
01-26 19:44 root         INFO       --> SRPM url: file:///var/lib/copr-rpmbuild/results/qt6-qtgraphs-6.6.1-1.src.rpm
01-26 19:44 root         INFO     Using review directory: /var/lib/copr-rpmbuild/results/qt6-qtgraphs
01-26 19:44 root         DEBUG    ReviewError: 'Cannot find spec file in srpm'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/FedoraReview/abstract_bug.py", line 183, in _get_spec_from_srpm
    path = glob(os.path.join(ReviewDirs.srpm_unpacked, name + "*.spec"))[0]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

During handling of the above exception, another exception occurred:

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 83, in _do_report
    if not self.bug.find_urls():
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/FedoraReview/abstract_bug.py", line 202, in find_urls
    raise fre
  File "/usr/lib/python3.11/site-packages/FedoraReview/abstract_bug.py", line 197, in find_urls
    self._get_spec_from_srpm()
  File "/usr/lib/python3.11/site-packages/FedoraReview/abstract_bug.py", line 185, in _get_spec_from_srpm
    raise ReviewError("Cannot find spec file in srpm")
FedoraReview.review_error.ReviewError: 'Cannot find spec file in srpm'
01-26 19:44 root         ERROR    ERROR: 'Cannot find spec file in srpm' (logs in /var/lib/copr-rpmbuild/results/cache/fedora-review.log)

No review.txt was generated. It would be nice to catch the exception and explain the issue in review.txt.


Login to comment on this ticket.

Metadata