Bug 456657

Summary: --update --exclude=aaa gives me exceptions.TypeError
Product: Red Hat Enterprise Linux 4 Reporter: Jan Hutař <jhutar>
Component: up2dateAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED NOTABUG QA Contact: Fanny Augustin <fmoquete>
Severity: low Docs Contact:
Priority: low    
Version: 4.7   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-20 09:56:45 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:

Description Jan Hutař 2008-07-25 11:49:27 UTC
Description of problem:
When I try to update system with one package excluded, I get a 
exceptions.TypeError error.


Version-Release number of selected component (if applicable):
up2date-4.7.1-17.el4.i386


How reproducible:
always


Steps to Reproduce:
1. up2date --update --exclude=test-regular


Actual results:
# up2date --update --exclude=test-regular
An error has occurred:
exceptions.TypeError
See /var/log/up2date for more information
# tail -n 5 /var/log/up2date
[Fri Jul 25 11:45:04 2008] up2date   File "/usr/sbin/up2date", line 1312, in ?
    sys.exit(main() or 0)
   File "/usr/sbin/up2date", line 382, in main
    cfg['pkgSkipList'] = cfg['pkgSkipList'] + options.exclude


Expected results:
All packages, except 'test-regular' are updated


Additional info:
I'm using "dir" and "yum" repo, RHN disabled.

# up2date --showall
somepackage-0.2-2.i386
test-obsoleted-0.1-1.i386
test-obsoletes-0.2-2.i386
test-only-new-0.2-2.i386
test-regular-0.2-2.i386
test-required-0.2-2.i386
test-requires-0.2-2.i386

Comment 2 Jan Hutař 2008-07-29 14:08:42 UTC
Just a note: --channels works correctly with --install:

# cat /etc/sysconfig/rhn/sources
...
dir repo-OLD /tmp/repo-OLD
yum repo-NEW http://localhost/repo-NEW/
# up2date --show-channels
repo-OLD
repo-NEW
# up2date --showall --channel=repo-OLD
somepackage-0.1-1.x86_64
test-obsoleted-0.1-1.x86_64
test-regular-0.1-1.x86_64
# up2date --showall --channel=repo-NEW
somepackage-0.2-2.x86_64
test-obsoletes-0.2-2.x86_64
test-only-new-0.2-2.x86_64
test-regular-0.2-2.x86_64
test-required-0.2-2.x86_64
test-requires-0.2-2.x86_64
# up2date --install --channel=repo-OLD test-regular
...
Installing...
   1:test-regular           ########################################### [100%]
# rpm -q test-regular
test-regular-0.1-1.x86_64

Comment 3 Jan Hutař 2008-07-29 14:11:35 UTC
Err, sorry for a previous comment, shouldn't be here :-(

Comment 4 Jan Hutař 2008-07-29 14:24:23 UTC
Aah, got it.

I have this:

# grep ^pkgSkipList= /etc/sysconfig/rhn/up2date
pkgSkipList=

If I change it to the:

# grep ^pkgSkipList= /etc/sysconfig/rhn/up2date
pkgSkipList=;

it works OK.

Is this still a bug, or is this a problem with configuration?

Comment 5 Jan Hutař 2009-03-06 11:06:46 UTC
Ping?

Is this still a bug, or is this a problem with configuration?

Comment 6 Pradeep Kilambi 2009-03-06 13:25:05 UTC
hrm the config options should end with a ; since the config parser looks for that delimiter and extracts the elements to a list. So ; is necessary syntax in our up2dtae config file. So I consider this as not a bug.

~ Prad

Comment 7 Jan Hutař 2009-04-20 09:56:45 UTC
Thank you for an explanation.