#131 Find out whether we can avoid local imports unless explicitly requested
Closed: Fixed None Opened 9 years ago by kparal.

Even though D117 was pushed and I updated bayeux and yamlish, I still see log duplication with both rpmlint and upgradepath:

$ runtask -i xchat-2.8.8-21.fc20 -t koji_build -a x86_64 task-rpmlint/rpmlint.yml
[libtaskotron:logger.py:65] 2014-06-04 17:01:31 DEBUG   doing stream logging
[libtaskotron:config.py:155] 2014-06-04 17:01:31 DEBUG   Trying to open configuration file: /etc/taskotron/taskotron.yaml
[libtaskotron:config.py:165] 2014-06-04 17:01:31 DEBUG   Trying to parse configuration file: /etc/taskotron/taskotron.yaml
[libtaskotron:config.py:63] 2014-06-04 17:01:31 DEBUG   Using config profile: development
[libtaskotron:config.py:243] 2014-06-04 17:01:31 WARNING Failed to create a required directory, please create it manually: [Errno 13] Permission denied: '/var/log/taskotron'
[libtaskotron:koji_directive.py:72] 2014-06-04 17:01:31 INFO    Getting RPMs for koji build xchat-2.8.8-21.fc20 (['x86_64', 'noarch']) and downloading to /var/tmp/taskotron/task-bjDsYG
[libtaskotron:koji_utils.py:42] 2014-06-04 17:01:31 INFO    Querying Koji for a list of RPMS for: xchat-2.8.8-21.fc20
[libtaskotron:koji_utils.py:85] 2014-06-04 17:01:32 INFO    Fetching RPMs for: xchat-2.8.8-21.fc20
[libtaskotron:koji_utils.py:87] 2014-06-04 17:01:32 INFO      fetching http://kojipkgs.fedoraproject.org/packages/xchat/2.8.8/21.fc20/x86_64/xchat-2.8.8-21.fc20.x86_64.rpm
[libtaskotron:file_utils.py:94] 2014-06-04 17:01:32 INFO    Downloading: http://kojipkgs.fedoraproject.org/packages/xchat/2.8.8/21.fc20/x86_64/xchat-2.8.8-21.fc20.x86_64.rpm
xchat-2.8.8-21.fc20.x86_64.rpm                                                                                                                                                              | 952 kB  00:00:01     
[libtaskotron:koji_utils.py:87] 2014-06-04 17:01:35 INFO      fetching http://kojipkgs.fedoraproject.org/packages/xchat/2.8.8/21.fc20/x86_64/xchat-tcl-2.8.8-21.fc20.x86_64.rpm
[libtaskotron:file_utils.py:94] 2014-06-04 17:01:35 INFO    Downloading: http://kojipkgs.fedoraproject.org/packages/xchat/2.8.8/21.fc20/x86_64/xchat-tcl-2.8.8-21.fc20.x86_64.rpm
xchat-tcl-2.8.8-21.fc20.x86_64.rpm                                                                                                                                                          |  48 kB  00:00:00     
[libtaskotron:resultsdb_directive.py:139] 2014-06-04 17:01:40 INFO    TAP is OK.
INFO:libtaskotron:TAP is OK.
[libtaskotron:resultsdb_directive.py:140] 2014-06-04 17:01:40 INFO    Reporting to ResultsDB is disabled.
INFO:libtaskotron:Reporting to ResultsDB is disabled.
[libtaskotron:resultsdb_directive.py:141] 2014-06-04 17:01:40 INFO    Once enabled, the following would be reported:
INFO:libtaskotron:Once enabled, the following would be reported:
[libtaskotron:resultsdb_directive.py:142] 2014-06-04 17:01:40 INFO    <CheckDetail: {'_outcome': 'PASSED',
 'item': 'xchat-2.8.8-21.fc20.x86_64.rpm',
 'keyvals': {},
 'output': '<stripped out>',
 'report_type': 'koji_build',
 'summary': 'RPMLINT PASSED for xchat-2.8.8-21.fc20.x86_64.rpm'}>
<CheckDetail: {'_outcome': 'PASSED',
 'item': 'xchat-tcl-2.8.8-21.fc20.x86_64.rpm',
 'keyvals': {},
 'output': '<stripped out>',
 'report_type': 'koji_build',
 'summary': 'RPMLINT PASSED for xchat-tcl-2.8.8-21.fc20.x86_64.rpm'}>
INFO:libtaskotron:<CheckDetail: {'_outcome': 'PASSED',
 'item': 'xchat-2.8.8-21.fc20.x86_64.rpm',
 'keyvals': {},
 'output': '<stripped out>',
 'report_type': 'koji_build',
 'summary': 'RPMLINT PASSED for xchat-2.8.8-21.fc20.x86_64.rpm'}>
<CheckDetail: {'_outcome': 'PASSED',
 'item': 'xchat-tcl-2.8.8-21.fc20.x86_64.rpm',
 'keyvals': {},
 'output': '<stripped out>',
 'report_type': 'koji_build',
 'summary': 'RPMLINT PASSED for xchat-tcl-2.8.8-21.fc20.x86_64.rpm'}>
[libtaskotron:runner.py:200] 2014-06-04 17:01:40 INFO    Check execution finished. Showing stored variables:
INFO:libtaskotron:Check execution finished. Showing stored variables:
[libtaskotron:runner.py:202] 2014-06-04 17:01:40 INFO    ${rpmlint_output}:
TAP version 13
1..2
ok - $CHECKNAME for Koji build xchat-2.8.8-21.fc20.x86_64.rpm
  ---
  details:
    output: |
      xchat.x86_64: W: file-not-utf8 /usr/share/doc/xchat/ChangeLog
      xchat.x86_64: W: non-conffile-in-etc /etc/gconf/schemas/apps_xchat_url_handler.schemas
      xchat.x86_64: W: no-manual-page-for-binary xchat
      1 packages and 0 specfiles checked; 0 errors, 3 warnings.
  item: xchat-2.8.8-21.fc20.x86_64.rpm
  outcome: PASSED
  summary: RPMLINT PASSED for xchat-2.8.8-21.fc20.x86_64.rpm
  type: koji_build
  ...
ok - $CHECKNAME for Koji build xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  ---
  details:
    output: |
      xchat-tcl.x86_64: W: no-documentation
      1 packages and 0 specfiles checked; 0 errors, 1 warnings.
  item: xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  outcome: PASSED
  summary: RPMLINT PASSED for xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  type: koji_build
  ...
INFO:libtaskotron:${rpmlint_output}:
TAP version 13
1..2
ok - $CHECKNAME for Koji build xchat-2.8.8-21.fc20.x86_64.rpm
  ---
  details:
    output: |
      xchat.x86_64: W: file-not-utf8 /usr/share/doc/xchat/ChangeLog
      xchat.x86_64: W: non-conffile-in-etc /etc/gconf/schemas/apps_xchat_url_handler.schemas
      xchat.x86_64: W: no-manual-page-for-binary xchat
      1 packages and 0 specfiles checked; 0 errors, 3 warnings.
  item: xchat-2.8.8-21.fc20.x86_64.rpm
  outcome: PASSED
  summary: RPMLINT PASSED for xchat-2.8.8-21.fc20.x86_64.rpm
  type: koji_build
  ...
ok - $CHECKNAME for Koji build xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  ---
  details:
    output: |
      xchat-tcl.x86_64: W: no-documentation
      1 packages and 0 specfiles checked; 0 errors, 1 warnings.
  item: xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  outcome: PASSED
  summary: RPMLINT PASSED for xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  type: koji_build
  ...

This ticket had assigned some Differential requests:
D121

The problem was that I had libtaskotron/tap.pyc remnant in my directory. And import tap imported this file instead of a library. It would be nice to prevent this in the future. Jan, please find out whether we can use Python 3's behavior - disable local imports unless they are explicitly requested.

Login to comment on this ticket.

Metadata