Bug 480664 - rpmlint -a crashes
Summary: rpmlint -a crashes
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmlint
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 489407 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-19 18:41 UTC by Mamoru TASAKA
Modified: 2009-04-09 16:18 UTC (History)
5 users (show)

Fixed In Version: 0.87-1.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-06 20:25:55 UTC


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

Description Mamoru TASAKA 2009-01-19 18:41:33 UTC
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 20:29:34 UTC
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 07:09:11 UTC
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 17:58:08 UTC
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 21:50:11 UTC
*** Bug 489407 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2009-03-19 23:29:22 UTC
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 23:30:49 UTC
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 15:56:17 UTC
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 20:25:25 UTC
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 16:18:20 UTC
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.