Jeff Johnson wrote:
> My personal preference (today expect quixotic behavior) would be to
> replace
> the test-harness driver with devtool, and add some additional stanzas
> to generate
> test manifests using the globs from trpm.
>
> But I'd like to see any harness rather than none.
I found some basic bugs with "rpm --version", "rpmbuild -ba zlib.spec",
and by running the two scripts that I call "rpmqa.py" and "rpmqa.pl":
#!/usr/bin/perl
use RPM;
my $ts = RPM::Transaction->new();
my $it = $ts->packageiterator();
while (my $pkg = $it->next() ) {
print $pkg->tag('name') . "-" . $pkg->tag('version') . "-" .
$pkg->tag('release') . "\n";
}
$ts->closedb();
undef $ts;
#!/usr/bin/python
import rpm
ts = rpm.TransactionSet()
mi = ts.dbMatch()
for h in mi:
print "%s-%s-%s" % (h['name'], h['version'], h['release'])
And a similar thing using the C API called "rpmqa.c" which is much
too long and boring to quote here, but looks pretty much the same.
--anders
Received on Fri Aug 31 16:57:36 2007