RPM2
view release on metacpan or search on metacpan
lib/RPM2.pm view on Meta::CPAN
my $fn;
#
# Must have a header to add
return 0 if(!defined($h));
#
# Get filename
$fn = $h->filename();
# XXX: Need to add relocations at some point, but I think we live
# without this for now (until I need it (-;).
return RPM2::C::Transaction::_add_install($self->{'c_transaction'},
$h->{'c_header'}, $fn, $upgrade)
}
sub add_erase {
my $self = shift;
my $h = shift;
my $db_offset;
my $fn;
#
# Must have a header to add
return 0 if(!defined($h));
#
# Get record offset
$db_offset = $h->offset();
return 0 if(!defined($db_offset));
# XXX: Need to add relocations at some point, but I think we live
# without this for now (until I need it (-;).
return RPM2::C::Transaction::_add_delete($self->{'c_transaction'},
$h->{'c_header'}, $db_offset)
}
sub element_count {
my $self = shift;
return $self->{'c_transaction'}->_element_count();
}
lib/RPM2.xs view on Meta::CPAN
MODULE = RPM2 PACKAGE = RPM2::C::Transaction
void
DESTROY(t)
rpmts t
CODE:
t = rpmtsFree(t);
# XXX: Add relocations some day.
int
_add_install(t, h, fn, upgrade)
rpmts t
Header h
char * fn
int upgrade
PREINIT:
rpmRC rc = 0;
CODE:
rc = rpmtsAddInstallElement(t, h, (fnpyKey) fn, upgrade, NULL);
( run in 0.949 second using v1.01-cache-2.11-cpan-71847e10f99 )