From 957fd74e4e5f5b58c7ff6cc6ed64ad200db6e6bb Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 19 Jun 2001 12:01:07 +0000 Subject: switch to rpm 4.0.3 --- perl-install/c/Makefile.PL | 2 +- perl-install/c/stuff.xs.pm | 53 ++++++++++++---------------------------------- 2 files changed, 15 insertions(+), 40 deletions(-) (limited to 'perl-install/c') diff --git a/perl-install/c/Makefile.PL b/perl-install/c/Makefile.PL index fbcb16914..6b323807c 100644 --- a/perl-install/c/Makefile.PL +++ b/perl-install/c/Makefile.PL @@ -5,7 +5,7 @@ use Config; my $libs = '-lldetect'; $libs .= ' -L/usr/X11R6/lib -lX11 -lgdk -lXxf86misc' if $ENV{C_DRAKX}; -$libs .= ' -lrpm -lrpmio -lz' if $ENV{C_RPM}; +$libs .= ' -lrpm -lrpmdb -lrpmio -lz' if $ENV{C_RPM}; my $pcmcia_dir = $ENV{C_DRAKX} && $Config{archname} =~ /i.86/ ? '../../mdk-stage1/pcmcia' : ''; diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm index 475da7664..2b5509e1a 100644 --- a/perl-install/c/stuff.xs.pm +++ b/perl-install/c/stuff.xs.pm @@ -39,6 +39,17 @@ print ' #undef max_colors #define SECTORSIZE 512 + +char *prom_getopt(); +void prom_setopt(); +char *prom_getproperty(); +char *disk2PromPath(); +char *promRootName(); + +'; + +$ENV{C_DRAKX} && $Config{archname} =~ /i.86/ and print ' +char *pcmcia_probe(void); '; $ENV{C_RPM} and print ' @@ -50,6 +61,7 @@ $ENV{C_RPM} and print ' #undef Mkdir #undef Stat #include +#include void rpmError_callback_empty(void) {} @@ -657,43 +669,6 @@ rpmdepOrder(order) OUTPUT: RETVAL -void -rpmdepCheck(rpmdep) - void *rpmdep - PPCODE: - struct rpmDependencyConflict * conflicts; - int numConflicts, i; - rpmdepCheck(rpmdep, &conflicts, &numConflicts); - if (numConflicts) { - EXTEND(SP, numConflicts); - for (i = 0; i < numConflicts; i++) - if (conflicts[i].sense == RPMDEP_SENSE_CONFLICTS) { - fprintf(stderr, "%s conflicts with %s\n", conflicts[i].byName, conflicts[i].needsName); - } else { - if (conflicts[i].suggestedPackage) - PUSHs(sv_2mortal(newSVpv((char *) conflicts[i].suggestedPackage, 0))); - else { - char *p = malloc(100 + strlen(conflicts[i].needsName) + strlen(conflicts[i].byName)); - sprintf(p, "%s needed but nothing provide it (%s)", conflicts[i].needsName, conflicts[i].byName); - PUSHs(sv_2mortal(newSVpv(p, 0))); - free(p); - } - } - } - -void -rpmdepCheckFrom(rpmdep) - void *rpmdep - PPCODE: - struct rpmDependencyConflict * conflicts; - int numConflicts, i; - rpmdepCheck(rpmdep, &conflicts, &numConflicts); - if (numConflicts) { - EXTEND(SP, numConflicts); - for (i = 0; i < numConflicts; i++) - PUSHs(sv_2mortal(newSVpv(conflicts[i].byName, 0))); - } - int rpmdbRebuild(root) char *root @@ -743,7 +718,7 @@ rpmRunTransactions(trans, callbackOpen, callbackClose, callbackMessage, force) int force PPCODE: rpmProblemSet probs; - void *rpmRunTransactions_callback(const Header h, const rpmCallbackType what, const unsigned long amount, const unsigned long total, const void * pkgKey, void * data) { + void *rpmRunTransactions_callback(const void *h, const rpmCallbackType what, const unsigned long amount, const unsigned long total, const void * pkgKey, void * data) { static int last_amount; static FD_t fd = NULL; char *msg = NULL; @@ -864,7 +839,7 @@ rpmRunTransactions(trans, callbackOpen, callbackClose, callbackMessage, force) /* printf("rpmRunTransactions finished, errors occured %d\n", probs->numProblems); fflush(stdout); */ EXTEND(SP, probs->numProblems); for (i = 0; i < probs->numProblems; i++) { - PUSHs(sv_2mortal(newSVpv(rpmProblemString(probs->probs[i]), 0))); + PUSHs(sv_2mortal(newSVpv(rpmProblemString(&probs->probs[i]), 0))); } } -- cgit v1.2.1