Description of problem: echo "Checking Virt SIG 4.2 candidate ppc64le" dnf --quiet --refresh repoclosure --arch ppc64le \ --repofrompath=42candidate_ppc,https://cbs.centos.org/repos/virt7-ovirt-42-candidate/ppc64le/os/ --check=42candidate_ppc \ --repofrompath=common_candidate_ppc,https://cbs.centos.org/repos/virt7-ovirt-common-candidate/ppc64le/os --check=common_candidate_ppc \ --repofrompath=base_ppc,http://mirror.centos.org/altarch/7/os/ppc64le/ --repo=base_ppc \ --repofrompath=extra_ppc,http://mirror.centos.org/altarch/7/extras/ppc64le/ --repo=extra_ppc \ --repofrompath=c7updates_ppc,http://mirror.centos.org/altarch/7/updates/ppc64le/ --repo=c7updates_ppc \ --repofrompath=qemu_ppc,https://cbs.centos.org/repos/virt7-kvm-common-candidate/ppc64le/os/ --check=qemu_ppc \ --repofrompath=fluent_ppc,https://cbs.centos.org/repos/opstools7-fluentd-012-candidate/ppc64le/os/ --repo=fluent_ppc \ --repofrompath=gluster_ppc,https://cbs.centos.org/repos/storage7-gluster-310-candidate/ppc64le/os/ --repo=gluster_ppc \ --repofrompath=collectd_ppc,https://cbs.centos.org/repos/opstools7-perfmon-common-candidate/ppc64le/os/ --repo=collectd_ppc Version-Release number of selected component: dnf-2.6.3-1.fc26 Additional info: reporter: libreport-2.9.1 cmdline: /usr/libexec/system-python /usr/bin/dnf --quiet --refresh repoclosure --arch ppc64le --repofrompath=42candidate_ppc,https://cbs.centos.org/repos/virt7-ovirt-42-candidate/ppc64le/os/ --check=42candidate_ppc --repofrompath=common_candidate_ppc,https://cbs.centos.org/repos/virt7-ovirt-common-candidate/ppc64le/os --check=common_candidate_ppc --repofrompath=base_ppc,http://mirror.centos.org/altarch/7/os/ppc64le/ --repo=base_ppc --repofrompath=extra_ppc,http://mirror.centos.org/altarch/7/extras/ppc64le/ --repo=extra_ppc --repofrompath=c7updates_ppc,http://mirror.centos.org/altarch/7/updates/ppc64le/ --repo=c7updates_ppc --repofrompath=qemu_ppc,https://cbs.centos.org/repos/virt7-kvm-common-candidate/ppc64le/os/ --check=qemu_ppc --repofrompath=fluent_ppc,https://cbs.centos.org/repos/opstools7-fluentd-012-candidate/ppc64le/os/ --repo=fluent_ppc --repofrompath=gluster_ppc,https://cbs.centos.org/repos/storage7-gluster-310-candidate/ppc64le/os/ --repo=gluster_ppc --repofrompath=collectd_ppc,https://cbs.centos.org/repos/opstools7-perfmon-common-candidate/ppc64le/os/ --repo=collectd_ppc crash_function: arch dnf-makecache.log: -- No entries -- exception_type: TypeError executable: /usr/bin/dnf kernel: 4.12.9-300.fc26.x86_64 runlevel: N 5 type: Python3 uid: 1000 Truncated backtrace: config.py:907:arch:TypeError: unhashable type: 'list' 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.6/site-packages/dnf/cli/main.py", line 179, in user_main errcode = main(args) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 95, in _main cli.configure(list(map(ucd, args)), option_parser()) File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 889, in configure self.base.conf._configure_from_options(opts) File "/usr/lib/python3.6/site-packages/dnf/conf/config.py", line 843, in _configure_from_options setattr(self, name, value) File "/usr/lib/python3.6/site-packages/dnf/conf/config.py", line 907, in arch if val not in dnf.rpm._BASEARCH_MAP.keys(): TypeError: unhashable type: 'list' Local variables in innermost frame: val: ['ppc64le'] self: <dnf.conf.config.MainConf object at 0x7fb0a858c390>
Created attachment 1323595 [details] File: _var_log_dnf.log
Created attachment 1323596 [details] File: _var_tmp_dnf-sbonazzo-u3ek1c9m_dnf.log
Created attachment 1323597 [details] File: _var_tmp_dnf-sbonazzo-u3ek1c9m_dnf.rpm.log
Created attachment 1323598 [details] File: _var_tmp_dnf-sbonazzo-u3ek1c9m_hawkey.log
Created attachment 1323599 [details] File: backtrace
Created attachment 1323600 [details] File: cgroup
Created attachment 1323601 [details] File: cpuinfo
Created attachment 1323602 [details] File: environ
Created attachment 1323603 [details] File: mountinfo
Created attachment 1323604 [details] File: namespaces
Created attachment 1323605 [details] File: open_fds
Created attachment 1323606 [details] File: _var_tmp_dnf-sbonazzo-u3ek1c9m_dnf.librepo.log
Minimal example for replication: dnf repoclosure --arch=x86_64 I can see it with these versions: $ rpm -qa | grep dnf libdnf-0.9.3-1.fc26.x86_64 python3-dnf-2.6.3-1.fc26.noarch dnf-conf-2.6.3-1.fc26.noarch python2-dnf-2.6.3-1.fc26.noarch dnf-2.6.3-1.fc26.noarch dnf-yum-2.6.3-1.fc26.noarch python3-dnf-plugins-core-2.1.3-1.fc26.noarch dnf-plugins-core-2.1.3-1.fc26.noarch
The problem should be fixed by commit https://github.com/rpm-software-management/dnf-plugins-core/commit/4e1a3b190c37c2b04db760d783387e2f37a7e6f4. The patch can be tested from our dnf-nightly repo (dnf copr enable rpmsoftwaremanagement/dnf-nightly) and will be part of next release. In our repo use dnf-plugins-core-0:2.1.3_1-10gb305b1d.fc26.noarch or proper version for your distro.
Similar problem has been detected: Testing ppc64le repoclosure on a x86_64 host with command: dnf --quiet --refresh repoclosure --arch=ppc64le \ --repofrompath=42testing_ppc,https://cbs.centos.org/repos/virt7-ovirt-42-testing/ppc64le/os/ --check=42testing_ppc \ --repofrompath=common_testing_ppc,https://cbs.centos.org/repos/virt7-ovirt-common-testing/ppc64le/os --check=common_testing_ppc \ --repofrompath=base_ppc,http://mirror.centos.org/altarch/7/os/ppc64le/ --repo=base_ppc \ --repofrompath=extra_ppc,http://mirror.centos.org/altarch/7/extras/ppc64le/ --repo=extra_ppc \ --repofrompath=c7updates_ppc,http://mirror.centos.org/altarch/7/updates/ppc64le/ --repo=c7updates_ppc \ --repofrompath=qemu_ppc,https://cbs.centos.org/repos/virt7-kvm-common-testing/ppc64le/os/ --check=qemu_ppc \ --repofrompath=fluent_ppc,https://cbs.centos.org/repos/opstools7-fluentd-012-testing/ppc64le/os/ --repo=fluent_ppc \ --repofrompath=gluster_ppc,https://cbs.centos.org/repos/storage7-gluster-310-testing/ppc64le/os/ --repo=gluster_ppc \ --repofrompath=collectd_ppc,https://cbs.centos.org/repos/opstools7-perfmon-common-testing/ppc64le/os/ --repo=collectd_ppc reporter: libreport-2.9.1 cmdline: /usr/libexec/system-python /usr/bin/dnf --quiet --refresh repoclosure --arch=ppc64le --repofrompath=42testing_ppc,https://cbs.centos.org/repos/virt7-ovirt-42-testing/ppc64le/os/ --check=42testing_ppc --repofrompath=common_testing_ppc,https://cbs.centos.org/repos/virt7-ovirt-common-testing/ppc64le/os --check=common_testing_ppc --repofrompath=base_ppc,http://mirror.centos.org/altarch/7/os/ppc64le/ --repo=base_ppc --repofrompath=extra_ppc,http://mirror.centos.org/altarch/7/extras/ppc64le/ --repo=extra_ppc --repofrompath=c7updates_ppc,http://mirror.centos.org/altarch/7/updates/ppc64le/ --repo=c7updates_ppc --repofrompath=qemu_ppc,https://cbs.centos.org/repos/virt7-kvm-common-testing/ppc64le/os/ --check=qemu_ppc --repofrompath=fluent_ppc,https://cbs.centos.org/repos/opstools7-fluentd-012-testing/ppc64le/os/ --repo=fluent_ppc --repofrompath=gluster_ppc,https://cbs.centos.org/repos/storage7-gluster-310-testing/ppc64le/os/ --repo=gluster_ppc --repofrompath=collectd_ppc,https://cbs.centos.org/repos/opstools7-perfmon-common-testing/ppc64le/os/ --repo=collectd_ppc crash_function: arch dnf-makecache.log: -- No entries -- exception_type: TypeError executable: /usr/bin/dnf kernel: 4.12.12-300.fc26.x86_64 package: dnf-2.6.3-11.fc26 reason: config.py:907:arch:TypeError: unhashable type: 'list' runlevel: N 5 type: Python3 uid: 1000
$ rpm -qa |grep dnf|sort -h dnf-2.6.4-0.51g5965627a.fc26.noarch dnf-conf-2.6.4-0.51g5965627a.fc26.noarch dnfdaemon-0.3.18-3.fc26.noarch dnfdaemon-selinux-0.3.18-3.fc26.noarch dnf-plugins-core-2.1.3_1-11ga4dcf6d.fc26.noarch dnf-yum-2.6.4-0.51g5965627a.fc26.noarch libdnf-0.9.4-0.5gb6cb054.fc26.x86_64 python2-dnf-2.6.4-0.51g5965627a.fc26.noarch python2-dnfdaemon-0.3.18-3.fc26.noarch python2-dnf-plugin-migrate-2.1.3_1-11ga4dcf6d.fc26.noarch python2-dnf-plugins-core-2.1.3_1-11ga4dcf6d.fc26.noarch python2-dnf-plugin-versionlock-2.1.3_1-11ga4dcf6d.fc26.noarch python3-dnf-2.6.4-0.51g5965627a.fc26.noarch python3-dnf-plugin-rpmconf-2.0.2-2g91da3d6.fc26.noarch python3-dnf-plugins-core-2.1.3_1-11ga4dcf6d.fc26.noarch python3-dnf-plugins-extras-common-2.0.2-2g91da3d6.fc26.noarch python3-dnf-plugin-system-upgrade-2.0.2-2g91da3d6.fc26.noarch python3-dnf-plugin-versionlock-2.1.3_1-11ga4dcf6d.fc26.noarch despite the command line is: dnf --quiet --refresh repoclosure --arch=ppc64le \ --repofrompath=42testing_ppc,https://cbs.centos.org/repos/virt7-ovirt-42-testing/ppc64le/os/ --check=42testing_ppc \ --repofrompath=common_testing_ppc,https://cbs.centos.org/repos/virt7-ovirt-common-testing/ppc64le/os --check=common_testing_ppc \ --repofrompath=base_ppc,http://mirror.centos.org/altarch/7/os/ppc64le/ --repo=base_ppc \ --repofrompath=extra_ppc,http://mirror.centos.org/altarch/7/extras/ppc64le/ --repo=extra_ppc \ --repofrompath=c7updates_ppc,http://mirror.centos.org/altarch/7/updates/ppc64le/ --repo=c7updates_ppc \ --repofrompath=qemu_ppc,https://cbs.centos.org/repos/virt7-kvm-common-testing/ppc64le/os/ --check=qemu_ppc \ --repofrompath=fluent_ppc,https://cbs.centos.org/repos/opstools7-fluentd-012-testing/ppc64le/os/ --repo=fluent_ppc \ --repofrompath=gluster_ppc,https://cbs.centos.org/repos/storage7-gluster-310-testing/ppc64le/os/ --repo=gluster_ppc \ --repofrompath=collectd_ppc,https://cbs.centos.org/repos/opstools7-perfmon-common-testing/ppc64le/os/ --repo=collectd_ppc arch used is now x86_64 instead of ppc64le when resolving dependencies. my local workaround to the version shipped in fedora: # diff -u /usr/lib/python3.6/site-packages/dnf/conf/config.py.orig /usr/lib/python3.6/site-packages/dnf/conf/config.py.fix --- /usr/lib/python3.6/site-packages/dnf/conf/config.py.orig 2017-09-15 15:32:20.290901981 +0200 +++ /usr/lib/python3.6/site-packages/dnf/conf/config.py.fix 2017-09-15 15:35:07.856009555 +0200 @@ -904,9 +904,16 @@ if val is None: self.substitutions.pop('arch', None) return - if val not in dnf.rpm._BASEARCH_MAP.keys(): - msg = _('Incorrect or unknown "{}": {}') - raise dnf.exceptions.Error(msg.format("arch", val)) + try: + if val not in dnf.rpm._BASEARCH_MAP.keys(): + msg = _('Incorrect or unknown "{}": {}') + raise dnf.exceptions.Error(msg.format("arch", val)) + except TypeError: + val = val[0] + if val not in dnf.rpm._BASEARCH_MAP.keys(): + msg = _('Incorrect or unknown "{}": {}') + raise dnf.exceptions.Error(msg.format("arch", val)) + self.substitutions['arch'] = val self.basearch = dnf.rpm.basearch(val)
I am sorry, I cannot reproduce the trace-back from bug description. My configuration is: rpm -qa |grep dnf|sort -h dnf-2.6.4-0.49g840bddb9.fc26.noarch dnf-automatic-2.6.4-0.49g840bddb9.fc26.noarch dnf-conf-2.6.4-0.49g840bddb9.fc26.noarch dnfdaemon-0.3.18-3.fc26.noarch dnfdaemon-selinux-0.3.18-3.fc26.noarch dnf-plugins-core-2.1.3_1-10gb305b1d.fc26.noarch dnf-yum-2.6.4-0.49g840bddb9.fc26.noarch libdnf-0.9.4-1.git.1549.2b1de6d.fc26.x86_64 libdnf-debuginfo-0.9.4-1.git.1549.2b1de6d.fc26.x86_64 libdnf-devel-0.9.4-1.git.1549.2b1de6d.fc26.x86_64 python2-dnf-2.6.4-0.49g840bddb9.fc26.noarch python2-dnf-plugins-core-2.1.3_1-10gb305b1d.fc26.noarch python2-dnf-plugins-extras-common-2.0.2-2g91da3d6.fc26.noarch python2-dnf-plugin-system-upgrade-2.0.2-2g91da3d6.fc26.noarch python3-dnf-2.6.4-0.49g840bddb9.fc26.noarch python3-dnfdaemon-0.3.18-3.fc26.noarch python3-dnf-plugins-core-2.1.3_1-10gb305b1d.fc26.noarch python3-dnf-plugins-extras-common-2.0.2-2g91da3d6.fc26.noarch python3-dnf-plugin-system-upgrade-2.0.2-2g91da3d6.fc26.noarch yumex-dnf-4.3.3-4.1.fc26.noarch Please try to install same version of python3-dnf-plugins-core like me and try to reproduce it again and report result. Thanks a lot
(In reply to Jaroslav Mracek from comment #17) > I am sorry, I cannot reproduce the trace-back from bug description. My > configuration is Sorry, I may have not been clear. The traceback is gone but the fix is not correct: the fix drop the traceback but ignore the specified arch, using x86_64 instead of ppc64le when running the command as in comment #16. So the fix is not correct and IMHO should be reverted.
Please can you confirm a version of dnf/dnf-plugins, where it works like you expect?
It works like I expect it to work with: diff -u /usr/lib/python3.6/site-packages/dnf/conf/config.py.orig /usr/lib/python3.6/site-packages/dnf/conf/config.py --- /usr/lib/python3.6/site-packages/dnf/conf/config.py.orig 2017-09-15 15:32:20.290901981 +0200 +++ /usr/lib/python3.6/site-packages/dnf/conf/config.py 2017-09-21 13:29:48.359098052 +0200 @@ -904,9 +904,16 @@ if val is None: self.substitutions.pop('arch', None) return - if val not in dnf.rpm._BASEARCH_MAP.keys(): - msg = _('Incorrect or unknown "{}": {}') - raise dnf.exceptions.Error(msg.format("arch", val)) + try: + if val not in dnf.rpm._BASEARCH_MAP.keys(): + msg = _('Incorrect or unknown "{}": {}') + raise dnf.exceptions.Error(msg.format("arch", val)) + except TypeError: + val = val[0] + if val not in dnf.rpm._BASEARCH_MAP.keys(): + msg = _('Incorrect or unknown "{}": {}') + raise dnf.exceptions.Error(msg.format("arch", val)) + self.substitutions['arch'] = val self.basearch = dnf.rpm.basearch(val) applied to # rpm -qf /usr/lib/python3.6/site-packages/dnf/conf/config.py python3-dnf-2.6.3-11.fc26.noarch
Please can you try latest dinf from out dnf-nightly (sudo dnf copr enable rpmsoftwaremanagement/dnf-nightly)? Then try to add to repoclosure command "--forcearch <basearch_of_system_that_you_want_to_use_for_depsolving>". Also keep --arch <arch> option in command. Your work around will not work in cases of multiple arch sets.
(In reply to Jaroslav Mracek from comment #21) > Please can you try latest dinf from out dnf-nightly (sudo dnf copr enable > rpmsoftwaremanagement/dnf-nightly)? Then try to add to repoclosure command > "--forcearch <basearch_of_system_that_you_want_to_use_for_depsolving>". Also > keep --arch <arch> option in command. > > Your work around will not work in cases of multiple arch sets. Thanks, I can confirm that with --forcearch=ppc64le the folloving version from dnf-nightly work as expected: $ rpm -qa|grep dnf|sort dnf-2.7.0-0.59gbdc4b08c.fc26.noarch dnf-conf-2.7.0-0.59gbdc4b08c.fc26.noarch dnfdaemon-0.3.18-3.fc26.noarch dnfdaemon-selinux-0.3.18-3.fc26.noarch dnf-plugins-core-2.1.3_1-15g178d357.fc26.noarch dnf-yum-2.7.0-0.59gbdc4b08c.fc26.noarch libdnf-0.10.0-0.8g76d72ab.fc26.x86_64 python2-dnf-2.7.0-0.59gbdc4b08c.fc26.noarch python2-dnfdaemon-0.3.18-3.fc26.noarch python2-dnf-plugin-migrate-2.1.3_1-15g178d357.fc26.noarch python2-dnf-plugins-core-2.1.3_1-15g178d357.fc26.noarch python2-dnf-plugin-versionlock-2.1.3_1-15g178d357.fc26.noarch python3-dnf-2.7.0-0.59gbdc4b08c.fc26.noarch python3-dnf-plugin-rpmconf-2.0.2-4gd9e817c.fc26.noarch python3-dnf-plugins-core-2.1.3_1-15g178d357.fc26.noarch python3-dnf-plugins-extras-common-2.0.2-4gd9e817c.fc26.noarch python3-dnf-plugin-system-upgrade-2.0.2-4gd9e817c.fc26.noarch python3-dnf-plugin-versionlock-2.1.3_1-15g178d357.fc26.noarch
I create a patch that enhance documentation of --arch option and provide a hint to use --forcearch option (https://github.com/rpm-software-management/dnf-plugins-core/pull/234).
Has the patch been included in one of the recent versions of dnf?
It will be part of next release (probably the version of next release will be dnf-3.0). The release is blocked by implementation of the new dnf database.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
The issue is solved by dnf-plugins-core-3.0.1-1 that was released into rawhide.