The following script works under RedHat 7.0. ---foo- #! /usr/bin/python import sys import os import rpm fd = os.open(sys.argv [1], 0) try: (h, isSource) = rpm.headerFromPackage(fd) print isSource print h except: pass os.close(fd) --- # ./foo ./foo zsh: 1801 segmentation fault ./foo ./foo
Here's what I see (hjl is script above): bash$ ./hjl /D/7.0/i386/time-1.7-12.i386.rpm 0 <header object at 80d9bf8> Please reopen with more info.
Ooops, got it now.
This looks better: Starting program: /usr/bin/python ./hjl ./hjl [New Thread 1024 (LWP 18326)] 0 None Fixed in CVS.