diff options
author | jbj <devnull@localhost> | 1999-04-01 22:26:44 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-04-01 22:26:44 +0000 |
commit | 6266b08a66354fc2ec731bc642e2cbbd8bc2de84 (patch) | |
tree | 4f71fcb45ed8c84d29a9170fa00f29746eebf74b /build | |
parent | 9bcdba42f2849957f59d93a5fd2aa861742f115b (diff) | |
download | librpm-tizen-6266b08a66354fc2ec731bc642e2cbbd8bc2de84.tar.gz librpm-tizen-6266b08a66354fc2ec731bc642e2cbbd8bc2de84.tar.bz2 librpm-tizen-6266b08a66354fc2ec731bc642e2cbbd8bc2de84.zip |
add per-target macrofiles to search path.
take globalMacroContext out of macro api.
fix: flush all macros between builds.
CVS patchset: 2936
CVS date: 1999/04/01 22:26:44
Diffstat (limited to 'build')
-rw-r--r-- | build/build.c | 4 | ||||
-rw-r--r-- | build/files.c | 24 | ||||
-rw-r--r-- | build/parseChangelog.c | 6 | ||||
-rw-r--r-- | build/parsePreamble.c | 17 | ||||
-rw-r--r-- | build/parsePrep.c | 9 | ||||
-rw-r--r-- | build/parseScript.c | 66 | ||||
-rw-r--r-- | build/parseSpec.c | 6 | ||||
-rw-r--r-- | build/spec.c | 10 |
8 files changed, 36 insertions, 106 deletions
diff --git a/build/build.c b/build/build.c index 998493a3e..544f22981 100644 --- a/build/build.c +++ b/build/build.c @@ -2,10 +2,6 @@ #include "rpmbuild.h" -#ifdef DYING -static void doRmSource(Spec spec); -#endif - static void doRmSource(Spec spec) { struct Source *p; diff --git a/build/files.c b/build/files.c index b21e821c0..d47b5873b 100644 --- a/build/files.c +++ b/build/files.c @@ -76,30 +76,6 @@ struct FileList { int fileListRecsUsed; }; -#ifdef DYING -static int processPackageFiles(Spec spec, Package pkg, - int installSpecialDoc, int test); -static void freeFileList(FileListRec *fileList, int count); -static int compareFileListRecs(const void *ap, const void *bp); -static int isDoc(struct FileList *fl, const char *fileName); -static int processBinaryFile(Package pkg, struct FileList *fl, const char *fileName); -static int addFile(struct FileList *fl, const char *name, struct stat *statp); -static int parseForSimple(Spec spec, Package pkg, char *buf, - struct FileList *fl, const char **fileName); -static int parseForVerify(char *buf, struct FileList *fl); -static int parseForLang(char *buf, struct FileList *fl); -static int parseForAttr(char *buf, struct FileList *fl); -static int parseForConfig(char *buf, struct FileList *fl); -static int parseForRegexLang(const char *fileName, char **lang); -static int myGlobPatternP(const char *pattern); -static int glob_error(const char *foo, int bar); -static void timeCheck(int tc, Header h); -static void genCpioListAndHeader(struct FileList *fl, - struct cpioFileMapping **cpioList, - int *cpioCount, Header h, int isSrc); -static char *strtokWithQuotes(char *s, char *delim); -#endif - static void freeAttrRec(AttrRec *ar) { FREE(ar->ar_fmodestr); FREE(ar->ar_dmodestr); diff --git a/build/parseChangelog.c b/build/parseChangelog.c index 10658255d..276bae5be 100644 --- a/build/parseChangelog.c +++ b/build/parseChangelog.c @@ -2,12 +2,6 @@ #include "rpmbuild.h" -#ifdef DYING -static void addChangelogEntry(Header h, int time, char *name, char *text); -static int addChangelog(Header h, StringBuf sb); -static int dateToTimet(const char * datestr, time_t * secs); -#endif - static void addChangelogEntry(Header h, int time, char *name, char *text) { if (headerIsEntry(h, RPMTAG_CHANGELOGTIME)) { diff --git a/build/parsePreamble.c b/build/parsePreamble.c index da497f887..7416a4d83 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -36,19 +36,6 @@ static int requiredTags[] = { 0 }; -#ifdef DYING -static int handlePreambleTag(Spec spec, Package pkg, int tag, char *macro, - char *lang); -static void initPreambleList(void); -static int findPreambleTag(Spec spec, int *tag, char **macro, char *lang); -static int checkForRequired(Header h, char *name); -static int checkForDuplicates(Header h, char *name); -static void fillOutMainPackage(Header h); -static int checkForValidArchitectures(Spec spec); -static int isMemberInEntry(Header header, char *name, int tag); -static int readIcon(Header h, char *file); -#endif /* DYING */ - static void addOrAppendListEntry(Header h, int_32 tag, char *line) { int argc; @@ -462,8 +449,8 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, char *macro, return RPMERR_BADSPEC; } macro = NULL; - delMacro(&globalMacroContext, "_docdir"); - addMacro(&globalMacroContext, "_docdir", NULL, field, RMIL_SPEC); + delMacro(NULL, "_docdir"); + addMacro(NULL, "_docdir", NULL, field, RMIL_SPEC); break; case RPMTAG_EPOCH: SINGLE_TOKEN_ONLY; diff --git a/build/parsePrep.c b/build/parsePrep.c index af7f69d8d..fa2275b35 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -19,15 +19,6 @@ { 0, 0, 0, 0, 0, NULL, NULL} }; -#ifdef DYING -static int doSetupMacro(Spec spec, char *line); -static int doPatchMacro(Spec spec, char *line); -static char *doPatch(Spec spec, int c, int strip, char *db, - int reverse, int removeEmpties); -static int checkOwners(const char *file); -static char *doUntar(Spec spec, int c, int quietly); -#endif - static int checkOwners(const char *file) { struct stat sb; diff --git a/build/parseScript.c b/build/parseScript.c index 03670d4e0..d80339a13 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -4,7 +4,38 @@ #include "popt/popt.h" -static int addTriggerIndex(Package pkg, char *file, char *script, char *prog); +static int addTriggerIndex(Package pkg, char *file, char *script, char *prog) +{ + struct TriggerFileEntry *new; + struct TriggerFileEntry *list = pkg->triggerFiles; + struct TriggerFileEntry *last = NULL; + int index = 0; + + while (list) { + last = list; + list = list->next; + } + + if (last) { + index = last->index + 1; + } + + new = malloc(sizeof(*new)); + + new->fileName = (file) ? strdup(file) : NULL; + new->script = (*script) ? strdup(script) : NULL; + new->prog = strdup(prog); + new->index = index; + new->next = NULL; + + if (last) { + last->next = new; + } else { + pkg->triggerFiles = new; + } + + return index; +} /* these have to be global because of stupid compilers */ static char *name; @@ -255,36 +286,3 @@ int parseScript(Spec spec, int parsePart) return nextPart; } - -static int addTriggerIndex(Package pkg, char *file, char *script, char *prog) -{ - struct TriggerFileEntry *new; - struct TriggerFileEntry *list = pkg->triggerFiles; - struct TriggerFileEntry *last = NULL; - int index = 0; - - while (list) { - last = list; - list = list->next; - } - - if (last) { - index = last->index + 1; - } - - new = malloc(sizeof(*new)); - - new->fileName = (file) ? strdup(file) : NULL; - new->script = (*script) ? strdup(script) : NULL; - new->prog = strdup(prog); - new->index = index; - new->next = NULL; - - if (last) { - last->next = new; - } else { - pkg->triggerFiles = new; - } - - return index; -} diff --git a/build/parseSpec.c b/build/parseSpec.c index f29dc8ce4..5278973af 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -63,10 +63,6 @@ int isPart(char *line) } } -#ifdef DYING -static int matchTok(char *token, char *line); -#endif - static int matchTok(char *token, char *line) { char buf[BUFSIZ], *bp, *tok; @@ -308,7 +304,7 @@ int parseSpec(Spec *specp, const char *specFile, const char *buildRoot, spec->gotBuildRoot = 1; spec->buildRoot = strdup(buildRoot); } - addMacro(&globalMacroContext, "_docdir", NULL, "%{_defaultdocdir}", RMIL_SPEC); + addMacro(NULL, "_docdir", NULL, "%{_defaultdocdir}", RMIL_SPEC); spec->inBuildArchitectures = inBuildArch; spec->anyarch = anyarch; spec->force = force; diff --git a/build/spec.c b/build/spec.c index fb81bfa23..55074ddbb 100644 --- a/build/spec.c +++ b/build/spec.c @@ -4,11 +4,8 @@ #include "buildio.h" extern int specedit; +extern MacroContext globalMacroContext; -#ifdef DYING -static void freeTriggerFiles(struct TriggerFileEntry *p); -#endif - static inline void freeTriggerFiles(/*@only@*/ struct TriggerFileEntry *p) { struct TriggerFileEntry *o, *q = p; @@ -172,11 +169,6 @@ void freePackages(Spec spec) } } -#ifdef DYING -static char *getSourceAux(Spec spec, int num, int flag, int full); -static struct Source *findSource(Spec spec, int num, int flag); -#endif - static inline /*@owned@*/ struct Source *findSource(Spec spec, int num, int flag) { struct Source *p; |