URPM
view release on metacpan or search on metacpan
- added rate and rflags tags to URPM::Package.
- added URPM::DB::rebuild.
- fixed build of hdlist with non standard rpm filename.
Version 0.05-2mdk - Jul 1 2002, by François Pons <fpons@mandrakesoft.com>
- fixed selection of obsoleted package already installed but
present in depslist.
Version 0.05 - Jun 28 2002, by François Pons <fpons@mandrakesoft.com>
- fixed ask_remove not to contains arch.
- removed relocate_depslist (obsoleted).
Version 0.04-6mdk - Jun 26 2002, by François Pons <fpons@mandrakesoft.com>
- fixed work around of rpmlib where provides should be at
left position of rpmRangesOverlap.
Version 0.04-5mdk - Jun 18 2002, by François Pons <fpons@mandrakesoft.com>
- fixed wrong range overlap evaluation (libgcc >= 3.1 and libgcc.so.1).
Version 0.04-4mdk - Jun 13 2002, by François Pons <fpons@mandrakesoft.com>
- fixed too many package selected on --auto-select.
case RPMPROB_BADARCH:
sv = newSVpvf("badarch@%s", pkgNEVR); break;
case RPMPROB_BADOS:
sv = newSVpvf("bados@%s", pkgNEVR); break;
case RPMPROB_PKG_INSTALLED:
sv = newSVpvf("installed@%s", pkgNEVR); break;
case RPMPROB_BADRELOCATE:
sv = newSVpvf("badrelocate@%s@%s", pkgNEVR, s); break;
case RPMPROB_NEW_FILE_CONFLICT:
case RPMPROB_FILE_CONFLICT:
sv = newSVpvf("conflicts@%s@%s@%s", pkgNEVR, altNEVR, s); break;
case RPMPROB_OLDPACKAGE:
sv = newSVpvf("installed@%s@%s", pkgNEVR, altNEVR); break;
case RPMPROB_DISKSPACE:
sv = newSVpvf("diskspace@%s@%s@%lld", pkgNEVR, s, (long long)rpmProblemGetDiskNeed(p)); break;
CODE:
rpmtsSetScriptFd(trans->ts, fdDup(fdno));
int
Trans_add(trans, pkg, ...)
URPM::Transaction trans
URPM::Package pkg
CODE:
if ((pkg->flag & FLAG_ID_MASK) <= FLAG_ID_MAX && pkg->h != NULL) {
int update = 0;
rpmRelocation *relocations = NULL;
if (items > 3) {
int i;
for (i = 2; i < items-1; i+=2) {
STRLEN len;
char *s = SvPV(ST(i), len);
if (len == 6 && !memcmp(s, "update", 6))
update = SvIV(ST(i+1));
else if (len == 11 && !memcmp(s, "excludepath", 11)) {
if (SvROK(ST(i+1)) && SvTYPE(SvRV(ST(i+1))) == SVt_PVAV) {
AV *excludepath = (AV*)SvRV(ST(i+1));
I32 j = 1 + av_len(excludepath);
if (relocations) free(relocations);
relocations = calloc(j + 1, sizeof(rpmRelocation));
while (--j >= 0) {
SV **e = av_fetch(excludepath, j, 0);
if (e != NULL && *e != NULL)
relocations[j].oldPath = SvPV_nolen(*e);
}
}
}
}
}
RETVAL = rpmtsAddInstallElement(trans->ts, pkg->h, (fnpyKey)(1+(long)(pkg->flag & FLAG_ID_MASK)), update, relocations) == 0;
/* free allocated memory, check rpm is copying it just above, at least in 4.0.4 */
free(relocations);
} else RETVAL = 0;
OUTPUT:
RETVAL
#ifdef RPM4_12_0
int
Trans_addReinstall(trans, pkg)
URPM::Transaction trans
URPM::Package pkg
CODE:
URPM/Build.pm view on Meta::CPAN
$options{callback} and $options{callback}->($urpm, $id, %options);
}
defined $id ? ($start, $id) : @{[]};
}
# DEPRECATED. ONLY USED BY MKCD
#- compute dependencies, result in stored in info values of urpm.
#- operations are incremental, it is possible to read just one hdlist, compute
#- dependencies and read another hdlist, and again.
#- parameters are :
#- callback : callback to relocate reference to package id.
sub compute_deps {
my ($urpm, %options) = @_;
my %propagated_weight = (
basesystem => 10000,
msec => 20000,
filesystem => 50000,
);
my ($locales_weight, $step_weight, $fixed_weight) = (-5000, 10000, $propagated_weight{basesystem});
#- avoid recomputing already present infos, take care not to modify
( run in 1.588 second using v1.01-cache-2.11-cpan-71847e10f99 )