blob: ea0320225f6673cd5bb676f33e8d8626d05ceb66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package c::stuff;
use strict;
use vars qw($VERSION @ISA);
require DynaLoader;
@ISA = qw(DynaLoader);
$VERSION = '0.01';
bootstrap c::stuff $VERSION;
sub headerGetEntry {
my ($h, $q) = @_;
$h or log::l("empty header in headerGetEntry"), return;
$q eq 'name' and return headerGetEntry_string($h, RPMTAG_NAME());
$q eq 'group' and return headerGetEntry_string($h, RPMTAG_GROUP());
$q eq 'version' and return headerGetEntry_string($h, RPMTAG_VERSION());
$q eq 'release' and return headerGetEntry_string($h, RPMTAG_RELEASE());
$q eq 'summary' and return headerGetEntry_string($h, RPMTAG_SUMMARY());
$q eq 'description' and return headerGetEntry_string($h, RPMTAG_DESCRIPTION());
$q eq 'arch' and return headerGetEntry_string($h, RPMTAG_ARCH());
$q eq 'size' and return headerGetEntry_int($h, RPMTAG_SIZE());
$q eq 'filenames' and return headerGetEntry_string_list($h, RPMTAG_FILENAMES());
$q eq 'obsoletes' and return headerGetEntry_string_list($h, RPMTAG_OBSOLETES());
}
1;
|