diff options
author | jbj <devnull@localhost> | 1999-12-12 21:14:05 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-12-12 21:14:05 +0000 |
commit | 8f481702d8203c95d390f6eac93434019cf8d797 (patch) | |
tree | 16bb1c1650660851f355779a70727e934f26fc9d /build | |
parent | 292b9f10befbeb1044d2db98f62de0e65aff3317 (diff) | |
download | librpm-tizen-8f481702d8203c95d390f6eac93434019cf8d797.tar.gz librpm-tizen-8f481702d8203c95d390f6eac93434019cf8d797.tar.bz2 librpm-tizen-8f481702d8203c95d390f6eac93434019cf8d797.zip |
reload macros from cmd line when re-reading config files.
CVS patchset: 3479
CVS date: 1999/12/12 21:14:05
Diffstat (limited to 'build')
-rw-r--r-- | build/files.c | 57 | ||||
-rw-r--r-- | build/spec.c | 4 |
2 files changed, 4 insertions, 57 deletions
diff --git a/build/files.c b/build/files.c index 4d26a0d43..b31b54b7c 100644 --- a/build/files.c +++ b/build/files.c @@ -1100,62 +1100,10 @@ fprintf(stderr, "*** PBF fileURL %s\n", fileURL); diskURL = rpmGenPath(fl->buildRootURL, NULL, fileURL); if (doGlob) { + const char ** argv = NULL; + int argc = 0; int i; -#ifdef DYING - const char * diskRoot; - const char * globURL; - char * globRoot = NULL; - glob_t glob_result; - size_t maxb, nb; - int ut; - - glob_result.gl_pathc = 0; - glob_result.gl_pathv = NULL; - if (Glob(diskURL, 0, glob_error, &glob_result) || - (glob_result.gl_pathc < 1)) { - rpmError(RPMERR_BADSPEC, _("File not found by glob: %s"), diskURL); - rc = 1; - } - /* XXX Prepend the diskURL leader for globs that have stripped it off */ - maxb = 0; - for (i = 0; i < glob_result.gl_pathc; i++) { - if ((nb = strlen(&(glob_result.gl_pathv[i][0]))) > maxb) - maxb = nb; - } - - ut = urlPath(diskURL, &diskRoot); - nb = ((ut > URL_IS_DASH) ? (diskRoot - diskURL) : 0); - maxb += nb; - maxb += 1; - globURL = globRoot = alloca(maxb); - - switch (ut) { - case URL_IS_HTTP: - case URL_IS_FTP: - case URL_IS_PATH: - case URL_IS_DASH: - strncpy(globRoot, diskURL, nb); - break; - case URL_IS_UNKNOWN: - break; - } - globRoot += nb; - *globRoot = '\0'; -if (_debug) -fprintf(stderr, "*** GLOB maxb %d diskURL %d %*s globURL %p %s\n", maxb, nb, nb, diskURL, globURL, globURL); - - for (i = 0; rc == 0 && i < glob_result.gl_pathc; i++) { - const char * globFile = &(glob_result.gl_pathv[i][0]); - if (globRoot > globURL && globRoot[-1] == '/') - while (*globFile == '/') globFile++; - strcpy(globRoot, globFile); - rc = addFile(fl, globURL, NULL); - } - Globfree(&glob_result); -#else - int argc = 0; - const char ** argv = NULL; rc = rpmGlob(diskURL, &argc, &argv); if (rc == 0) { for (i = 0; i < argc; i++) { @@ -1164,7 +1112,6 @@ fprintf(stderr, "*** GLOB maxb %d diskURL %d %*s globURL %p %s\n", maxb, nb, nb, } xfree(argv); } -#endif /* DYING */ } else { rc = addFile(fl, diskURL, NULL); } diff --git a/build/spec.c b/build/spec.c index 4a4a611ec..54625124d 100644 --- a/build/spec.c +++ b/build/spec.c @@ -4,7 +4,7 @@ #include "buildio.h" extern char *specedit; -extern MacroContext globalMacroContext; +extern MacroContext rpmGlobalMacroContext; #define SKIPWHITE(_x) {while(*(_x) && (isspace(*_x) || *(_x) == ',')) (_x)++;} #define SKIPNONWHITE(_x){while(*(_x) &&!(isspace(*_x) || *(_x) == ',')) (_x)++;} @@ -446,7 +446,7 @@ Spec newSpec(void) spec->force = 0; spec->anyarch = 0; - spec->macros = &globalMacroContext; + spec->macros = &rpmGlobalMacroContext; return spec; } |