Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1696234 - Missing package error not catched
Summary: Missing package error not catched
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mock
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-04 11:49 UTC by Frank Büttner
Modified: 2019-04-04 11:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

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.


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