Bug 1696234

Summary: Missing package error not catched
Product: [Fedora] Fedora EPEL Reporter: Frank Büttner <bugzilla>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: jdisnard, jkeating, mebrown, msuchy, philip.wyett, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mock-1.4.15-1.fc30 mock-1.4.15-1.fc28 mock-1.4.15-1.fc29 mock-1.4.15-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-27 21:27:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frank Büttner 2019-04-04 11:49:43 UTC
Description of problem:
When an rpm package is missing, that will be needed for build, then an python exception will thrown.

Version-Release number of selected component (if applicable):
mock-1.4.14-2.el7.noarch

How reproducible:
Every time

Steps to Reproduce:
1. try to build rpm package where an dependency is missing.

Actual results:
This python stack trace will shown:
Error: No Package found for python36-tables >= 3.4.4
ERROR: Exception(python-ms2pipC-1.1.0-1.el7.src.rpm) Config(centos-7-prod-x86_64) 1 minutes 34 seconds
INFO: Results and/or logs in: /var/lib/mock/centos-7-prod-x86_64/result
INFO: unmounting tmpfs.
ERROR: global name 'FileNotFoundError' is not defined
Traceback (most recent call last):
  File "/usr/libexec/mock/mock", line 977, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 766, in main
    run_command(options, args, config_opts, commands, buildroot, state)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 861, in run_command
    do_rebuild(config_opts, commands, buildroot, options, args)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 541, in do_rebuild
    post=post_build, clean=clean)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 482, in rebuild_generic
    ret = cmd(item)
  File "/usr/libexec/mock/mock", line 522, in build
    check=config_opts['check'], spec=options.spec)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 275, in build
    self.installSrpmDeps(rebuilt_srpm)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 203, in installSrpmDeps
    self.buildroot.pkg_manager.builddep(*srpms, check=True)
  File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mockbuild/package_manager.py", line 162, in builddep
    except (FileNotFoundError) as error:
NameError: global name 'FileNotFoundError' is not defined



Expected results:
An clean error and no stack trace.

Comment 1 Miroslav Suchý 2019-04-19 18:02:00 UTC
Fixed in
  * 97e45d4 (HEAD -> devel) FileNotFoundError is not defined in Python 2 [RHBZ#1696234]

Comment 2 Miroslav Suchý 2019-04-22 17:11:55 UTC
*** Bug 1686107 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2019-04-22 19:13:27 UTC
mock-1.4.15-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7a7a12aff5

Comment 4 Fedora Update System 2019-04-22 19:13:33 UTC
mock-1.4.15-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-98a73907d3

Comment 5 Fedora Update System 2019-04-22 19:13:39 UTC
mock-1.4.15-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-9f8e99528d

Comment 6 Fedora Update System 2019-04-22 19:13:44 UTC
mock-1.4.15-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-0649a04cab

Comment 7 Fedora Update System 2019-04-23 14:55:49 UTC
mock-1.4.15-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-98a73907d3

Comment 8 Fedora Update System 2019-04-23 19:33:42 UTC
mock-1.4.15-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-0649a04cab

Comment 9 Fedora Update System 2019-04-23 21:15:56 UTC
mock-1.4.15-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-7a7a12aff5

Comment 10 Fedora Update System 2019-04-23 23:40:46 UTC
mock-1.4.15-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-9f8e99528d

Comment 11 Fedora Update System 2019-04-27 21:27:40 UTC
mock-1.4.15-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2019-04-30 01:40:31 UTC
mock-1.4.15-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2019-04-30 02:27:39 UTC
mock-1.4.15-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2019-05-03 03:02:46 UTC
mock-1.4.15-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.