summaryrefslogtreecommitdiffstats
path: root/perl-install/c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-06-19 12:01:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-06-19 12:01:07 +0000
commit957fd74e4e5f5b58c7ff6cc6ed64ad200db6e6bb (patch)
tree1ccf7ef5825a2b441d25aec19701f9178975a6a1 /perl-install/c
parent05af93739c271394aecd412de6dd4e2159fb249d (diff)
downloaddrakx-957fd74e4e5f5b58c7ff6cc6ed64ad200db6e6bb.tar
drakx-957fd74e4e5f5b58c7ff6cc6ed64ad200db6e6bb.tar.gz
drakx-957fd74e4e5f5b58c7ff6cc6ed64ad200db6e6bb.tar.bz2
drakx-957fd74e4e5f5b58c7ff6cc6ed64ad200db6e6bb.tar.xz
drakx-957fd74e4e5f5b58c7ff6cc6ed64ad200db6e6bb.zip
switch to rpm 4.0.3
Diffstat (limited to 'perl-install/c')
-rw-r--r--perl-install/c/Makefile.PL2
-rw-r--r--perl-install/c/stuff.xs.pm53
2 files changed, 15 insertions, 40 deletions
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 <rpm/rpmlib.h>
+#include <rpm/rpmio.h>
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)));
}
}