[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: A question about --queryformat

I'd like to be able to manipulate/modify the rpms with perl as well. However, I can only find a RPM module for perl, not RPM2. The RPM module on CPAN doesn't provide package handling functionality, does the RPM2 module provide this?

-----Original Message-----
From: rpm-list-admin@redhat.com [mailto:rpm-list-admin@redhat.com] On Behalf Of Paul Nasrat
Sent: Wednesday, December 31, 2003 5:40 AM
To: rpm-list@redhat.com
Subject: Re: A question about --queryformat

On Tue, Dec 30, 2003 at 06:24:56PM -0500, Tom Diehl wrote:
> On Tue, 30 Dec 2003, Paul Nasrat wrote:
> > On Tue, Dec 30, 2003 at 12:12:55PM -0500, Tom Diehl wrote:

> Thanks for the info but I should have given some more details as to 
> what I was actually trying to do. I knew I could do this in the shell 
> but I am playing with perl and so far I have not found a way to make 
> it do what I want. I am trying to do something like the following:

> open(CKFILE,"rpm -qf $path |");

Hmm, you might be better off with RPM2 module:

use RPM2;
my $db = RPM2->open_rpm_db();
my $i = $db->find_by_file_iter("/etc/auto.master");

then iterate over the iterator, see the perldoc for more info.

Or if you are feeling sick

use Inline::Python :)


Rpm-list mailing list
Rpm-list@redhat.com https://www.redhat.com/mailman/listinfo/rpm-list

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]