Bug 1186710

Summary: dnf --setopt exclude=XXX adds garbage to excludes
Product: [Fedora] Fedora Reporter: Michael Mráka <mmraka>
Component: dnfAssignee: Honza Silhan <jsilhan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: akozumpl, jsilhan, mluscon, pnemade, rholy, tla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-plugins-core-0.1.5-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-06 18:49:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Michael Mráka 2015-01-28 11:02:44 UTC
Description of problem:
dnf --setopt exclude=XXX adds garbage to excludes; e.g.
dnf update  --setopt exclude='kernel glibc' has [u'kernel', u'glibc', u'k', u'e', u'r', u'n', u'e', u'l', u'g', u'l', u'i', u'b', u'c'] excluded

Version-Release number of selected component (if applicable):
dnf-0.6.3-2.fc21.noarch

How reproducible:
always

Steps to Reproduce:
1. cat <<EOF >>/usr/lib/python2.7/site-packages/dnf-plugins/excludebug.py
from __future__ import absolute_import
from __future__ import unicode_literals

import dnf

class excludebug(dnf.Plugin):
    name = 'repooptionbug'
    def __init__(self, base, cli):
        self.base = base
    def config(self):
        print "self.base.conf.exclude: " , self.base.conf.exclude
EOF

2. dnf update  --setopt exclude='kernel glibc' 
self.base.conf.exclude:  [u'kernel', u'glibc', u'k', u'e', u'r', u'n', u'e', u'l', u'g', u'l', u'i', u'b', u'c']
...


Actual results:
# dnf update  --setopt exclude='kernel glibc' 
self.base.conf.exclude:  [u'kernel', u'glibc', u'k', u'e', u'r', u'n', u'e', u'l', u'g', u'l', u'i', u'b', u'c']
...

Expected results:
# dnf update  --setopt exclude='kernel glibc' 
self.base.conf.exclude:  [u'kernel', u'glibc']


Additional info:
--exclude option seems to be correct:
dnf update  --exclude='kernel glibc' 
self.base.conf.exclude:  [u'kernel', u'glibc']
...

Comment 1 Honza Silhan 2015-02-02 21:28:25 UTC
Thanks for the report.
PR: https://github.com/rpm-software-management/dnf/pull/214

Comment 2 Fedora Update System 2015-03-31 18:18:11 UTC
hawkey-0.5.4-1.fc22,dnf-0.6.5-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/hawkey-0.5.4-1.fc22,dnf-0.6.5-1.fc22

Comment 3 Fedora Update System 2015-04-02 01:44:27 UTC
Package hawkey-0.5.4-1.fc22, dnf-0.6.5-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hawkey-0.5.4-1.fc22 dnf-0.6.5-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-5337/hawkey-0.5.4-1.fc22,dnf-0.6.5-1.fc22
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2015-04-03 11:39:14 UTC
dnf-plugins-extras-0.0.6-2.fc22,yum-utils-1.1.31-505.fc22,yum-3.4.3-505.fc22,hawkey-0.5.4-1.fc22,dnf-0.6.5-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/dnf-plugins-extras-0.0.6-2.fc22,yum-utils-1.1.31-505.fc22,yum-3.4.3-505.fc22,hawkey-0.5.4-1.fc22,dnf-0.6.5-1.fc22

Comment 5 Fedora Update System 2015-04-06 18:49:02 UTC
dnf-plugins-extras-0.0.6-2.fc22, yum-3.4.3-505.fc22, dnf-0.6.5-1.fc22, yum-utils-1.1.31-505.fc22, hawkey-0.5.4-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 6 Fedora Update System 2015-04-16 09:04:53 UTC
dnf-plugins-core-0.1.5-2.fc21,dnf-0.6.4-5.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.5-2.fc21,dnf-0.6.4-5.fc21

Comment 7 Fedora Update System 2015-05-08 07:32:51 UTC
dnf-plugins-core-0.1.5-2.fc21, dnf-0.6.4-5.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.