RE: A question about --queryformat

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

 



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?

Thanks,
Walter
-----Original Message-----
From: rpm-list-admin@xxxxxxxxxx [mailto:rpm-list-admin@xxxxxxxxxx] On Behalf Of Paul Nasrat
Sent: Wednesday, December 31, 2003 5:40 AM
To: rpm-list@xxxxxxxxxx
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 :)

Paul


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


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

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux