Bug 1266031

Summary: [abrt] dnf: system_upgrade.py:206:error:AttributeError: unrecognized arguments: --releaseversion rawhide
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: dnf-plugin-system-upgradeAssignee: Will Woods <wwoods>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: hlopes, jsilhan, jzeleny, mluscon, packaging-team-maint, pnemade, tim.lauridsen, vmukhame, wwoods, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/a6f147fcdd3ca2aa2300ae6211f241f2a87194ae
Whiteboard: abrt_hash:185373b7509bccc519e5a50ceb0b24738f47a705;
Fixed In Version: dnf-plugin-system-upgrade-0.7.0-1.fc23 dnf-plugin-system-upgrade-0.7.0-1.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-02 18:52:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: dso_list
none
File: environ none

Description Vít Ondruch 2015-09-24 10:52:40 UTC
Description of problem:
--releaseversion is probably unsupported, but it should be handled gracefully, i.e. withoug throwing and exception.

Version-Release number of selected component:
dnf-1.1.1-2.fc22

Additional info:
reporter:       libreport-2.6.2
cmdline:        /usr/bin/python -OO /bin/dnf system-upgrade upgrade --allowerasing --best --releaseversion rawhide --distro-sync
executable:     /bin/dnf
kernel:         4.1.7-200.fc22.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
system_upgrade.py:206:error:AttributeError: unrecognized arguments: --releaseversion rawhide

Traceback (most recent call last):
  File "/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 198, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 117, in _main
    cli.configure(map(ucd, args))
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1029, in configure
    self.command.configure(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/system_upgrade.py", line 263, in configure
    self.opts = self.parse_args(args)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/system_upgrade.py", line 254, in parse_args
    opts = p.parse_args(extargs)
  File "/usr/lib64/python2.7/argparse.py", line 1704, in parse_args
    self.error(msg % ' '.join(argv))
  File "/usr/lib/python2.7/site-packages/dnf-plugins/system_upgrade.py", line 206, in error
    raise AttributeError(message)
AttributeError: unrecognized arguments: --releaseversion rawhide

Local variables in innermost frame:
message: u'unrecognized arguments: --releaseversion rawhide'
self: PluginArgumentParser(prog='dnf system-upgrade', usage=None, description=None, version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False)

Comment 1 Vít Ondruch 2015-09-24 10:52:45 UTC
Created attachment 1076461 [details]
File: backtrace

Comment 2 Vít Ondruch 2015-09-24 10:52:47 UTC
Created attachment 1076462 [details]
File: dso_list

Comment 3 Vít Ondruch 2015-09-24 10:52:48 UTC
Created attachment 1076463 [details]
File: environ

Comment 4 Will Woods 2015-09-24 18:25:53 UTC
Yup, the plugin's argument parser was at fault here.

Should be fixed by commit 509ce20:
  https://github.com/rpm-software-management/dnf-plugin-system-upgrade/commit/509ce20539117f18584c39bf8e4facb8ff5e12e9

I've also added a few test cases to make sure this doesn't happen again:
  https://github.com/rpm-software-management/dnf-plugin-system-upgrade/commit/51a76c9703d9376f6d70864fe522f41ce359e76c

Should be fixed in the next plugin build.

Comment 5 Fedora Update System 2015-10-28 16:05:32 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-e00b75e39f

Comment 6 Fedora Update System 2015-10-28 16:05:33 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-69bef6b9ed

Comment 7 Fedora Update System 2015-11-01 06:58:50 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dnf-plugin-system-upgrade'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-69bef6b9ed

Comment 8 Fedora Update System 2015-11-02 00:27:21 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dnf-plugin-system-upgrade'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-e00b75e39f

Comment 9 Fedora Update System 2015-11-02 18:52:09 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-11-03 05:51:44 UTC
dnf-plugin-system-upgrade-0.7.0-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Will Woods 2015-11-09 19:48:14 UTC
*** Bug 1277964 has been marked as a duplicate of this bug. ***