Bug 480664 - rpmlint -a crashes
rpmlint -a crashes
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: rpmlint (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
: 489407 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-19 13:41 EST by Mamoru TASAKA
Modified: 2009-04-09 12:18 EDT (History)
5 users (show)

See Also:
Fixed In Version: 0.87-1.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-06 16:25:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Use ts.dbMatch() for iterating over rpmdb contents (669 bytes, patch)
2009-01-20 02:09 EST, Panu Matilainen
no flags Details | Diff

  None (edit)
Description Mamoru TASAKA 2009-01-19 13:41:33 EST
Description of problem:

Today I learned that rpmlint has "-a" option and also
was told that currently this option crashes.

Version-Release number of selected component (if applicable):
rpmlint-0.85-3.fc11.noarch
rpm-4.6.0-0.rc3.2.fc11.i386
python-2.6-4.fc11.i386

How reproducible:
100%

Steps to Reproduce:
1. $ rpmlint -a
2.
3.
  
Actual results:
[root@localhost ~]# rpmlint -a
/usr/share/rpmlint/Pkg.py:16: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
  import popen2
0 packages and 0 specfiles checked; 0 errors, 0 warnings.
Traceback (most recent call last):
  File "/usr/share/rpmlint/rpmlint.py", line 295, in <module>
    main()
  File "/usr/share/rpmlint/rpmlint.py", line 139, in main
    for item in ts.IDTXload():
AttributeError: 'rpm.ts' object has no attribute 'IDTXload'

Expected results:
Output some useful information
Comment 1 Ville Skyttä 2009-01-19 15:29:34 EST
Looks like ts.IDTXload() has disappeared from rpm-python 4.6.0 (I'm still on F-9 and it is present and works there).  I can't find anything about its removal in rpm's change logs or git commit messages - Panu, could you shed some light on this?

Will take a look at muting the popen2 deprecation warning (can't be just bluntly changed to use subprocess because rpmlint should work with python 2.3 and subprocess is not available in it).
Comment 2 Panu Matilainen 2009-01-20 02:09:11 EST
Created attachment 329436 [details]
Use ts.dbMatch() for iterating over rpmdb contents

ts.IDTXload() was indeed removed in rpm 4.6.0 among the other rollback related functionality. Yes, rollback related - using ts.IDTXload() to iterate over rpmdb contents is, hmm, creative :)

Attached patch makes it use ts.dbMatch() which will work on any rpm version >= 4.1.
Comment 3 Ville Skyttä 2009-01-20 12:58:08 EST
Ooh, based on rpmlint.py logs, credit for that creativity goes to... yours truly, from 2003.  I've no idea where I got that from (and that I did it in the first place), but it's safe to say that at that time I was even more clueless with python and rpm bindings than these days ;)

Applied upstream, will be in the next rpmlint package revision.  Thanks!
Comment 4 Ville Skyttä 2009-03-09 17:50:11 EDT
*** Bug 489407 has been marked as a duplicate of this bug. ***
Comment 5 Fedora Update System 2009-03-19 19:29:22 EDT
rpmlint-0.87-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/rpmlint-0.87-1.fc10
Comment 6 Fedora Update System 2009-03-19 19:30:49 EDT
rpmlint-0.87-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/rpmlint-0.87-1.fc9
Comment 7 Fedora Update System 2009-03-23 11:56:17 EDT
rpmlint-0.87-1.fc10 has been pushed to the Fedora 10 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 'yum --enablerepo=updates-testing update rpmlint'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-2946
Comment 8 Fedora Update System 2009-04-06 16:25:25 EDT
rpmlint-0.87-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2009-04-09 12:18:20 EDT
rpmlint-0.87-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.