Bug 1689169 - Running dnf swidtags regen fails with traceback
Summary: Running dnf swidtags regen fails with traceback
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: swid-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-15 10:49 UTC by Jan Pazdziora
Modified: 2019-03-19 19:38 UTC (History)
2 users (show)

Fixed In Version: swid-tools-0.7.3-1.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-19 19:38:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2019-03-15 10:49:00 UTC
Description of problem:

Running dnf swidtags regen fails with traceback.

Version-Release number of selected component (if applicable):

dnf-plugin-swidtags-0.7.2-1.fc31.noarch
python3-libdnf-0.28.0-1.fc31.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. Execute dnf swidtags regen

Actual results:

# dnf swidtags regen
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/dnf/plugin.py", line 104, in _caller
    getattr(plugin, method)()
  File "/usr/lib/python3.7/site-packages/dnf-plugins/swidtags.py", line 136, in config
    self.conf.data[s][o] = DEFAULTS[s][o]
  File "/usr/lib64/python3.7/site-packages/libdnf/conf.py", line 1826, in <lambda>
    __getattr__ = lambda self, name: _swig_getattr(self, ConfigParser, name)
  File "/usr/lib64/python3.7/site-packages/libdnf/conf.py", line 80, in _swig_getattr
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
AttributeError: 'ConfigParser' object has no attribute 'data'

Last metadata expiration check: 0:01:55 ago on Fri 15 Mar 2019 10:41:20 AM UTC.
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 192, in user_main
    errcode = main(args)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 1128, in run
    return self.command.run()
  File "/usr/lib/python3.7/site-packages/dnf-plugins/swidtags.py", line 95, in run
    if self.plugin.run_rpm2swidtag_for(p_names) == 0:
  File "/usr/lib/python3.7/site-packages/dnf-plugins/swidtags.py", line 270, in run_rpm2swidtag_for
    rpm2swidtag_command = self.conf.get("main", "rpm2swidtag_command")
  File "/usr/lib64/python3.7/site-packages/libdnf/conf.py", line 1942, in ConfigParser__get
    return self.getSubstitutedValue(section, option)
  File "/usr/lib64/python3.7/site-packages/libdnf/conf.py", line 1870, in getSubstitutedValue
    return _conf.ConfigParser_getSubstitutedValue(self, section, key)
IndexError: OptionReader::getValue(): Missing option rpm2swidtag_command in section main

Expected results:

No error, SWID tags generated.

Additional info:

Comment 1 Jan Pazdziora 2019-03-15 10:51:08 UTC
The same regression is seen on Fedora 30 with python3-libdnf-0.28.0-1.fc30.x86_64 from updates-testing.

Comment 2 Jan Pazdziora 2019-03-15 11:09:48 UTC
Issue discovered by https://travis-ci.org/swidtags/rpm2swidtag/builds/506452695.

Comment 4 Jan Pazdziora 2019-03-15 12:37:56 UTC
Fixed in swid-tools-0.7.3-1.fc31 and swid-tools-0.7.3-1.fc30.

Comment 5 Fedora Update System 2019-03-15 13:01:32 UTC
createrepo_c-0.12.2-1.fc30 dnf-4.2.1-1.fc30 dnf-plugins-core-4.0.6-1.fc30 dnf-plugins-extras-4.0.4-1.fc30 libcomps-0.1.11-1.fc30 libdnf-0.28.0-1.fc30 librepo-1.9.5-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-bc9607a8dc

Comment 6 Fedora Update System 2019-03-15 13:09:44 UTC
createrepo_c-0.12.2-1.fc30 dnf-4.2.1-1.fc30 dnf-plugins-core-4.0.6-1.fc30 dnf-plugins-extras-4.0.4-1.fc30 libcomps-0.1.11-1.fc30 libdnf-0.28.0-1.fc30 librepo-1.9.5-1.fc30 swid-tools-0.7.3-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-bc9607a8dc

Comment 7 Fedora Update System 2019-03-15 13:09:53 UTC
createrepo_c-0.12.2-1.fc30 dnf-4.2.1-1.fc30 dnf-plugins-core-4.0.6-1.fc30 dnf-plugins-extras-4.0.4-1.fc30 libcomps-0.1.11-1.fc30 libdnf-0.28.0-1.fc30 librepo-1.9.5-1.fc30 swid-tools-0.7.3-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-bc9607a8dc

Comment 8 Fedora Update System 2019-03-16 20:17:38 UTC
createrepo_c-0.12.2-1.fc30, dnf-4.2.1-1.fc30, dnf-plugins-core-4.0.6-1.fc30, dnf-plugins-extras-4.0.4-1.fc30, libcomps-0.1.11-1.fc30, libdnf-0.28.0-1.fc30, librepo-1.9.5-1.fc30, swid-tools-0.7.3-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-bc9607a8dc

Comment 9 Stephen Tweedie 2019-03-18 14:52:01 UTC
Looks good to me, left bodhi feedback.

Comment 10 Fedora Update System 2019-03-19 19:38:48 UTC
createrepo_c-0.12.2-1.fc30, dnf-4.2.1-1.fc30, dnf-plugins-core-4.0.6-1.fc30, dnf-plugins-extras-4.0.4-1.fc30, libcomps-0.1.11-1.fc30, libdnf-0.28.0-1.fc30, librepo-1.9.5-1.fc30, swid-tools-0.7.3-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, 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.