diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-08-30 17:06:23 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-08-30 17:06:23 +0300 |
commit | a1c4d36d55f00b5484f9030328fb9491aec9207d (patch) | |
tree | 97c5e83faeedaf18132a4424c206328f3e9005d6 /lib | |
parent | 431a6bc687af4daa00dec976659c68e0b2a7722c (diff) | |
parent | 10a20f377bea041c9ad2bd337e231bd725612e4b (diff) | |
download | librpm-tizen-a1c4d36d55f00b5484f9030328fb9491aec9207d.tar.gz librpm-tizen-a1c4d36d55f00b5484f9030328fb9491aec9207d.tar.bz2 librpm-tizen-a1c4d36d55f00b5484f9030328fb9491aec9207d.zip |
Automated merge with file:/home/pmatilai/repos/rpm-cli
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rpmrc.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/lib/rpmrc.c b/lib/rpmrc.c index beca93769..2c6777f20 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -679,16 +679,6 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn) if (rc) return rc; continue; /* XXX don't save include value as var/macro */ } /*@notreached@*/ /*@switchbreak@*/ break; - case RPMVAR_MACROFILES: - fn = rpmGetPath(se, NULL); - if (fn == NULL || *fn == '\0') { - rpmError(RPMERR_RPMRC, _("%s expansion failed at %s:%d \"%s\"\n"), - option->name, urlfn, linenum, fn); - fn = _free(fn); - return 1; - } - se = (char *)fn; - /*@switchbreak@*/ break; case RPMVAR_PROVIDES: { char *t; s = rpmGetVar(RPMVAR_PROVIDES); @@ -1850,16 +1840,6 @@ static int rpmReadRC(/*@null@*/ const char * rcfiles) rpmSetMachine(NULL, NULL); /* XXX WTFO? Why bother? */ - { const char *mfpath; - /*@-branchstate@*/ - if ((mfpath = rpmGetVar(RPMVAR_MACROFILES)) != NULL) { - mfpath = xstrdup(mfpath); - rpmInitMacros(NULL, mfpath); - mfpath = _free(mfpath); - } - /*@=branchstate@*/ - } - return rc; } @@ -1873,6 +1853,12 @@ int rpmReadConfigFiles(const char * file, const char * target) /* Read the files */ if (rpmReadRC(file)) return -1; + if (macrofiles != NULL) { + const char *mf = rpmGetPath(macrofiles, NULL); + rpmInitMacros(NULL, mf); + _free(mf); + } + /* Reset target macros */ rpmRebuildTargetVars(&target, NULL); /*@=nullstate@*/ |