diff options
author | Francois Pons <fpons@mandriva.com> | 2001-02-20 12:42:30 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-02-20 12:42:30 +0000 |
commit | 6f9977f301789392bece6f37251d54e3ffd6bad0 (patch) | |
tree | 94ace4db419d6551a99c1fa724d879827ff398e0 /perl-install/c/stuff.xs.pm | |
parent | 1d27dbf5e28c61be9eeb078c44f2481fb25e7195 (diff) | |
download | drakx-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.pm | 5 |
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 |