Bug 221166

Summary: yum-changelog: "invalid literal for int()"
Product: [Fedora] Fedora Reporter: Need Real Name <bugzilla>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 6CC: balay, djuran, farrellj, pmatilai, rhbugs, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-02-14 13:54:11 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 Need Real Name 2007-01-02 17:30:08 UTC
Description of problem:
New problem popped up today for the first time after having run "yum update
--changelog" several dozen times previously without errors. Presumably, there is
something different in one of the latest rpms to be updated.

Specifically, yum crashes with the following error message:

kernel-devel - 2.6.18-1.2869.fc6.i686, kernel-doc - 2.6.18-1.2869.fc6.noarch,
kernel - 2.6.18-1.2869.fc6.i686, kernel - 2.6.18-1.2849.fc6.i686, kernel-headers
- 2.6.18-1.2869.fc6.i386
* Wed Dec 20 17:00:00 2006 Dave Jones <davej>
- Update to 2.6.18.6 final (no changes since rc2)
- Reenable squashfs (#220293)


kmod-ntfs - 2.1.27-2.2.6.18_1.2849.fc6.i686, kmod-ntfs -
2.1.27-2.2.6.18_1.2869.fc6.i686
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 143, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 442, in
buildTransaction
    self.plugins.run('postresolve', rescode=rescode, restring=restring)
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 153, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/changelog.py", line 99, in postresolve_hook
    show_changes(conduit, 'Changes in packages about to be updated:')
  File "/usr/lib/yum-plugins/changelog.py", line 61, in show_changes
    for line in changelog_delta(srpms[name][0], origpkgs[name]):
  File "/usr/lib/yum-plugins/changelog.py", line 34, in changelog_delta
    if int(date) > olddate:
ValueError: invalid literal for int(): Thorsten Leemhuis
<fedora[AT]leemhuis[DOT]info> - 2.1.27-2


Presumably yum-changelog does not like something in the formatting of the
changelog for the latest kmod-ntfs rpm. Either there is an error in the
fomatting used in the rpm itself or yum-changelog doesn't properly recognize a
valid format.

Even if technically the problem is due to invalid formatting of the changelog, I
would think that yum should just ignore the error rather than dying so painfully.

Comment 1 Panu Matilainen 2007-01-11 19:43:36 UTC
Whoa, something has put the author entry into the date field... this is
basically either sqlite cache corruption or a createrepo screwup. Based on a
quick look at the other.xml.gz from livna, that seems to be sane, 

Take a backup of /var/cache/yum/livna/*.* files (in case further debugging is
needed), do 'yum clean dbcache' and see if it still happens.

Comment 2 Jason Farrell 2007-01-31 13:58:10 UTC
I too have been doing my yum updates with --changelog without error for a long
time, but today I bumped into this same bug. The difference in my case seems to
be that the package that caused the error (beryl-dbus) was being
replaced/superceded by another (beryl-plugins), and thus the old package name
headers weren't available for the changelog info to be extracted.

***** without --changelog:
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 beryl-plugins           i386       0.1.99.2-3.fc6   extras            2.6 M
     replacing  beryl-dbus.i386 0.1.4-2.fc6


***** with --changelog:
beryl-dbus - 0.1.4-2.fc6.i386
Traceback (most recent call last):
...
  File "/usr/lib/yum-plugins/changelog.py", line 34, in changelog_delta
    if int(date) > olddate:
ValueError: invalid literal for int(): Jarod Wilson <jwilson> 0.1.4-3

Comment 3 Johan Kok 2007-02-05 10:14:09 UTC
*** Bug 220146 has been marked as a duplicate of this bug. ***

Comment 4 Johan Kok 2007-02-05 10:15:37 UTC
*** Bug 220129 has been marked as a duplicate of this bug. ***

Comment 5 Need Real Name 2007-02-11 15:32:18 UTC
THIS BUG REALLY NEEDS TO BE FIXED.
Today, I tried doing an update and due to the larger number of updated packages,
it took my system about 15 minutes to churn through all the changes. Then, at
the last step, the update CRASHED due presumably to a misconfigured changelog.

This is BAD BEHAVIOR to crash an entire update just because of a mis-typed
changelog.

Here is the error messages that I got today:
------------------------------------
mencoder - 1.0-0.34.rc1try2.fc6.i386, mplayer - 4:1.0-58_r21812.fc6.at.i386
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 135, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 442, in
buildTransaction
    self.plugins.run('postresolve', rescode=rescode, restring=restring)
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 153, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/changelog.py", line 99, in postresolve_hook
    show_changes(conduit, 'Changes in packages about to be updated:')
  File "/usr/lib/yum-plugins/changelog.py", line 61, in show_changes
    for line in changelog_delta(srpms[name][0], origpkgs[name]):
  File "/usr/lib/yum-plugins/changelog.py", line 34, in changelog_delta
    if int(date) > olddate:
ValueError: invalid literal for int(): Matthias Saou <http://freshrpms.net/>
1.0-0.34.rc1try2


Comment 6 Panu Matilainen 2007-02-12 06:41:28 UTC
Annoying as it might be, this is just a plain old ordinary bug, it doesn't eat
your home directory for breakfast and is extremely easy to avoid: just disable
or uninstall the changelog plugin. In the meanwhile, yelling isn't going to get
it fixed any faster.

Comment 7 Panu Matilainen 2007-02-13 20:07:36 UTC
Found it - this is a bug in yum itself, in changelog handling code that nothing
besides changelog uses really. Additionally at least in the default
"pre-transaction" changelog viewer mode it additionally requires erasures
(either via obsoletes or otherwise) to be present in the transaction to trigger.

Fixed in yum cvs for HEAD and 3.x branch.