Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1903589 - fedora-review raises and exception when reviewing a package
Summary: fedora-review raises and exception when reviewing a package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-review
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-02 12:57 UTC by José Matos
Modified: 2020-12-30 01:39 UTC (History)
14 users (show)

Fixed In Version: fedora-review-0.7.6-2.fc33 fedora-review-0.7.6-2.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-26 01:37:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description José Matos 2020-12-02 12:57:58 UTC
While reviewing R-conflicted with fedora-review I get:

$ fedora-review -v -b 1897961
...
Finish: chroot init
Start: build phase for R-conflicted-1.0.4-1.fc32.src.rpm
Start: build setup for R-conflicted-1.0.4-1.fc32.src.rpm
Finish: build setup for R-conflicted-1.0.4-1.fc32.src.rpm
Start: Outputting list of installed packages
Finish: Outputting list of installed packages
Start: rpmbuild R-conflicted-1.0.4-1.fc32.src.rpm
Finish: rpmbuild R-conflicted-1.0.4-1.fc32.src.rpm
Finish: build phase for R-conflicted-1.0.4-1.fc32.src.rpm
INFO: Done(/home/jamatos/tmp/fedora/1897961-R-conflicted/srpm/R-conflicted-1.0.4-1.fc32.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 14 seconds
INFO: Results and/or logs in: /home/jamatos/tmp/fedora/1897961-R-conflicted/results
Finish: run
DEBUG: _topdir: /builddir/build
DEBUG: Exception down the road...
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/FedoraReview/review_helper.py", line 236, in run
    self._do_run(outfile)
  File "/usr/lib/python3.9/site-packages/FedoraReview/review_helper.py", line 226, in _do_run
    self._do_report(outfile)
  File "/usr/lib/python3.9/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.9/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.9/site-packages/FedoraReview/checks.py", line 382, in run_checks
    run_check(name)
  File "/usr/lib/python3.9/site-packages/FedoraReview/checks.py", line 357, in run_check
    check.run()
  File "/usr/lib/python3.9/site-packages/FedoraReview/plugins/generic_build.py", line 203, in run
    Mock.build(self.srpm.filename)
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 451, in build
    self.builddir_cleanup()
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 578, in builddir_cleanup
    paths = glob(os.path.join(self.get_builddir("BUILD"), "*"))
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 354, in get_builddir
    p = self._get_dir(os.path.join("root", self._topdir[1:]))
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 195, in _get_dir
    self._get_root()
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 180, in _get_root
    config_opts = mockbuild.util.load_config(mockdir, config, None, "unknown",  get_paths()['purelib'])
AttributeError: module 'mockbuild.util' has no attribute 'load_config'
ERROR: Exception down the road... (logs in /home/jamatos/.cache/fedora-review.log)
DEBUG: Report completed:  33.573 seconds

Comment 1 Jindrich Novy 2020-12-10 15:42:50 UTC
This also blocks bug 1905835.

Stanislav, can you please have a look?

Comment 2 Vladis Dronov 2020-12-11 22:19:14 UTC
it looks like mockbuild was refactored. the following "patch" has fixed the issue and let my fedora-review to run:

/usr/lib/python3.8/site-packages/FedoraReview/mock.py
...
 import mockbuild.util
+import mockbuild.config
...
-config_opts = mockbuild.util.load_config(mockdir, config, None, "unknown",  get_paths()['purelib'])
+config_opts = mockbuild.config.load_config(mockdir, config, None, "unknown",  get_paths()['purelib'])

Comment 3 José Matos 2020-12-12 12:42:55 UTC
(In reply to Vladis Dronov from comment #2)
> it looks like mockbuild was refactored. the following "patch" has fixed the
> issue and let my fedora-review to run:
> 
> /usr/lib/python3.8/site-packages/FedoraReview/mock.py
> ...
>  import mockbuild.util
> +import mockbuild.config
> ...
> -config_opts = mockbuild.util.load_config(mockdir, config, None, "unknown", 
> get_paths()['purelib'])
> +config_opts = mockbuild.config.load_config(mockdir, config, None,
> "unknown",  get_paths()['purelib'])

I confirm that with that change fedora-review works. Thank you. :-)

Comment 4 Vitaly Zaitsev 2020-12-13 15:10:46 UTC
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/FedoraReview/review_helper.py", line 236, in run
    self._do_run(outfile)
  File "/usr/lib/python3.9/site-packages/FedoraReview/review_helper.py", line 226, in _do_run
    self._do_report(outfile)
  File "/usr/lib/python3.9/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.9/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.9/site-packages/FedoraReview/checks.py", line 382, in run_checks
    run_check(name)
  File "/usr/lib/python3.9/site-packages/FedoraReview/checks.py", line 357, in run_check
    check.run()
  File "/usr/lib/python3.9/site-packages/FedoraReview/plugins/generic_build.py", line 203, in run
    Mock.build(self.srpm.filename)
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 451, in build
    self.builddir_cleanup()
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 578, in builddir_cleanup
    paths = glob(os.path.join(self.get_builddir("BUILD"), "*"))
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 354, in get_builddir
    p = self._get_dir(os.path.join("root", self._topdir[1:]))
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 195, in _get_dir
    self._get_root()
  File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 180, in _get_root
    config_opts = mockbuild.util.load_config(mockdir, config, None, "unknown",  get_paths()['purelib'])
AttributeError: module 'mockbuild.util' has no attribute 'load_config'

Comment 5 José Matos 2020-12-13 16:53:41 UTC
(In reply to Vitaly Zaitsev from comment #4)
> Traceback (most recent call last):
>   File "/usr/lib/python3.9/site-packages/FedoraReview/review_helper.py",
> line 236, in run
>     self._do_run(outfile)
>   File "/usr/lib/python3.9/site-packages/FedoraReview/review_helper.py",
> line 226, in _do_run
>     self._do_report(outfile)
>   File "/usr/lib/python3.9/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.9/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.9/site-packages/FedoraReview/checks.py", line 382,
> in run_checks
>     run_check(name)
>   File "/usr/lib/python3.9/site-packages/FedoraReview/checks.py", line 357,
> in run_check
>     check.run()
>   File
> "/usr/lib/python3.9/site-packages/FedoraReview/plugins/generic_build.py",
> line 203, in run
>     Mock.build(self.srpm.filename)
>   File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 451, in
> build
>     self.builddir_cleanup()
>   File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 578, in
> builddir_cleanup
>     paths = glob(os.path.join(self.get_builddir("BUILD"), "*"))
>   File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 354, in
> get_builddir
>     p = self._get_dir(os.path.join("root", self._topdir[1:]))
>   File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 195, in
> _get_dir
>     self._get_root()
>   File "/usr/lib/python3.9/site-packages/FedoraReview/mock.py", line 180, in
> _get_root
>     config_opts = mockbuild.util.load_config(mockdir, config, None,
> "unknown",  get_paths()['purelib'])
> AttributeError: module 'mockbuild.util' has no attribute 'load_config'

Hi Vitaly,
  did you try to apply the change described in comment #2 to the file where this occurs?

Instead of /usr/lib/python3.8/site-packages/FedoraReview/mock.py we need to fix
/usr/lib/python3.9/site-packages/FedoraReview/mock.py (python 3.8 is on Fedora 32 while 3.9 is on Fedora 33).

Comment 6 Vitaly Zaitsev 2020-12-13 18:19:26 UTC
> did you try to apply the change described in comment #2 to the file where this occurs?

Yes. The suggested patch works fine.

Comment 7 Ben Beasley 2020-12-15 21:24:38 UTC
I too have the same problem (fedora-review-0.7.6-1.fc33.noarch, mock-2.7-1.fc33.noarch), and I can also confirm the patch.

Comment 8 Stanislav Ochotnicky 2020-12-17 13:55:40 UTC
I really need to hand over FR to someone else. I can't remember last time I added a package to Fedora (or touched FR) and it's just not something I spend time on anymore.

I'll ask folks who have been active more recently to take over...

Comment 9 Fedora Admin user for bugzilla script actions 2020-12-18 02:53:36 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.

Comment 10 Josh Cogliati 2020-12-18 19:45:57 UTC
I had the same problem with fedora-review-0.7.5-1.fc32.noarch and the patch in comment #2 fixed it.

Comment 11 Qiyu Yan 2020-12-21 05:23:41 UTC
Encountered same problem with fedora-review-0.7.6-1.fc33, patch in comment #2 fixed that.

Comment 12 Fedora Update System 2020-12-21 22:16:20 UTC
FEDORA-2020-cb162a867d has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-cb162a867d

Comment 13 Fedora Update System 2020-12-22 02:11:16 UTC
FEDORA-2020-cb162a867d has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-cb162a867d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-cb162a867d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2020-12-22 02:19:04 UTC
FEDORA-2020-58c4aa6514 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-58c4aa6514`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-58c4aa6514

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2020-12-26 01:37:07 UTC
FEDORA-2020-58c4aa6514 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2020-12-30 01:39:29 UTC
FEDORA-2020-cb162a867d has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.


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