summaryrefslogtreecommitdiffstats
path: root/perl-install/c/stuff.xs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-02-20 12:42:30 +0000
committerFrancois Pons <fpons@mandriva.com>2001-02-20 12:42:30 +0000
commit6f9977f301789392bece6f37251d54e3ffd6bad0 (patch)
tree94ace4db419d6551a99c1fa724d879827ff398e0 /perl-install/c/stuff.xs.pm
parent1d27dbf5e28c61be9eeb078c44f2481fb25e7195 (diff)
downloaddrakx-backup-do-not-use-6f9977f301789392bece6f37251d54e3ffd6bad0.tar
drakx-backup-do-not-use-6f9977f301789392bece6f37251d54e3ffd6bad0.tar.gz
drakx-backup-do-not-use-6f9977f301789392bece6f37251d54e3ffd6bad0.tar.bz2
drakx-backup-do-not-use-6f9977f301789392bece6f37251d54e3ffd6bad0.tar.xz
drakx-backup-do-not-use-6f9977f301789392bece6f37251d54e3ffd6bad0.zip
added RPMRC_FILE env variable to choose rpmrc file for rpmlib used
by DrakX, neccessary for live update from a 7.2 or older. Check that if something goes wrong with rebuilddb, avoid removing old rpm-3 db files. Make sure live_install can start from top directory too.
Diffstat (limited to 'perl-install/c/stuff.xs.pm')
-rw-r--r--perl-install/c/stuff.xs.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index 8a2890f9e..94f19ac63 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -7,6 +7,7 @@ print '
#define dev_t dev_t
#include <ctype.h>
+#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
#include <fcntl.h>
@@ -454,7 +455,9 @@ $ENV{C_RPM} and print '
int
rpmReadConfigFiles()
CODE:
- RETVAL = rpmReadConfigFiles(NULL, NULL) == 0;
+ char *rpmrc = getenv("RPMRC_FILE");
+ if (rpmrc != NULL && !*rpmrc) rpmrc = NULL;
+ RETVAL = rpmReadConfigFiles(rpmrc, NULL) == 0;
OUTPUT:
RETVAL