RPM bindings for perl

RPM bindings for perl

am 26.06.2010 16:59:48 von Alex

Hi,

I'm trying to search inside various RPMs using perl for information
such as name, version, vendor, etc, and wondered what the best
approach would be. I found perl-RPM from RJRAY at CPAN, but it's
dated, and doesn't compile against a distro with rpm-4.8.

I searched freshmeat for existing code to manipulate RPM information
and wasn't very successful.

What is the best approach to do this?

Thanks,
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: RPM bindings for perl - probable bug

am 27.06.2010 01:34:23 von Bruce Ferrell

On 06/26/2010 07:59 AM, Alex wrote:
> Hi,
>
> I'm trying to search inside various RPMs using perl for information
> such as name, version, vendor, etc, and wondered what the best
> approach would be. I found perl-RPM from RJRAY at CPAN, but it's
> dated, and doesn't compile against a distro with rpm-4.8.
>
> I searched freshmeat for existing code to manipulate RPM information
> and wasn't very successful.
>
> What is the best approach to do this?
>
> Thanks,
> Alex
> --
> To unsubscribe from this list: send the line "unsubscribe linux-admin=
" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
> =20

I just tried it (perl-rpm-1.51) on a SuSE 10. system with rpm 4.4. No
problemo.

it doesn't install on my 11.2 with rpm 4.7.1 with the following error:

perl Makefile.PL
Note (probably harmless): No library found for -lrpmdb
Local build detected. Generating Perl-RPM.spec...
Generating rpmrc...
Generating rpmmacros...
Writing Makefile for RPM

make
cc -c -I. -I/usr/include/rpm -D_REENTRANT -D_GNU_SOURCE
-DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -fomit-frame-pointer
-fmessage-length=3D0 -O2 -Wall -D_FORTIFY_SOURCE=3D2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe
-DVERSION=3D\"1.51\" -DXS_VERSION=3D\"1.51\" -fPIC
"-I/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE"
-DRPM_VERSION=3D0x040701 RPM/Database.c -o RPM/Database.o
RPM/Database.xs: In function =91rpmdb_TIEHASH=92:
RPM/Database.xs:46: warning: implicit declaration of function =91rpmErr=
or=92
RPM/Database.xs:46: error: =91RPMERR_BADARG=92 undeclared (first use in=
this
function)
RPM/Database.xs:46: error: (Each undeclared identifier is reported only=
once
RPM/Database.xs:46: error: for each function it appears in.)
RPM/Database.xs: In function =91XS_RPM__Database_STORE=92:
RPM/Database.xs:169: error: =91RPMERR_NOCREATEDB=92 undeclared (first u=
se in
this function)
RPM/Database.xs: In function =91XS_RPM__Database_DELETE=92:
RPM/Database.xs:182: error: =91RPMERR_NOCREATEDB=92 undeclared (first u=
se in
this function)
RPM/Database.xs: In function =91XS_RPM__Database_CLEAR=92:
RPM/Database.xs:194: error: =91RPMERR_NOCREATEDB=92 undeclared (first u=
se in
this function)
RPM/Database.xs: In function =91XS_RPM__Database_init=92:
RPM/Database.xs:264: error: =91RPMERR_BADARG=92 undeclared (first use i=
n
this function)
RPM/Database.xs: In function =91XS_RPM__Database_rebuild=92:
RPM/Database.xs:284: error: =91RPMERR_BADARG=92 undeclared (first use i=
n
this function)
RPM/Database.xs: In function =91XS_RPM__Database_find_by_file=92:
RPM/Database.xs:320: error: =91RPMERR_BADARG=92 undeclared (first use i=
n
this function)
make: *** [RPM/Database.o] Error 1



Guess I'll have to open a bug at:

rjray@blackperl.com

like the readme says

Bruce

--
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html