diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-10-09 14:06:06 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-10-09 14:06:06 +0300 |
commit | d709195c3a51522629443cddea042513f47c5ad3 (patch) | |
tree | 2d0f91f22a13179bb56331ae9f7d13ed38159cee /build | |
parent | 46921b2334ddde2cad8f3546c6f9b6124adbb3a2 (diff) | |
download | rpm-d709195c3a51522629443cddea042513f47c5ad3.tar.gz rpm-d709195c3a51522629443cddea042513f47c5ad3.tar.bz2 rpm-d709195c3a51522629443cddea042513f47c5ad3.zip |
Replace all rpmError() uses with rpmlog()
Diffstat (limited to 'build')
-rw-r--r-- | build/build.c | 6 | ||||
-rw-r--r-- | build/expression.c | 32 | ||||
-rw-r--r-- | build/files.c | 70 | ||||
-rw-r--r-- | build/pack.c | 68 | ||||
-rw-r--r-- | build/parseBuildInstallClean.c | 2 | ||||
-rw-r--r-- | build/parseChangelog.c | 14 | ||||
-rw-r--r-- | build/parseDescription.c | 10 | ||||
-rw-r--r-- | build/parseFiles.c | 10 | ||||
-rw-r--r-- | build/parsePreamble.c | 54 | ||||
-rw-r--r-- | build/parsePrep.c | 32 | ||||
-rw-r--r-- | build/parseReqs.c | 6 | ||||
-rw-r--r-- | build/parseScript.c | 20 | ||||
-rw-r--r-- | build/parseSpec.c | 22 | ||||
-rw-r--r-- | build/poptBT.c | 2 | ||||
-rw-r--r-- | build/rpmfc.c | 18 | ||||
-rw-r--r-- | build/spec.c | 10 |
16 files changed, 188 insertions, 188 deletions
diff --git a/build/build.c b/build/build.c index b654f43f7..abd631dab 100644 --- a/build/build.c +++ b/build/build.c @@ -129,7 +129,7 @@ int doScript(rpmSpec spec, int what, const char *name, StringBuf sb, int test) } if (makeTempFile(rootURL, &scriptName, &fd) || fd == NULL || Ferror(fd)) { - rpmError(RPMERR_SCRIPT, _("Unable to open temp file.\n")); + rpmlog(RPMERR_SCRIPT, _("Unable to open temp file.\n")); rc = RPMERR_SCRIPT; goto exit; } @@ -221,7 +221,7 @@ fprintf(stderr, "*** addMacros\n"); errno = 0; (void) execvp(argv[0], (char *const *)argv); - rpmError(RPMERR_SCRIPT, _("Exec of %s failed (%s): %s\n"), + rpmlog(RPMERR_SCRIPT, _("Exec of %s failed (%s): %s\n"), scriptName, name, strerror(errno)); _exit(-1); @@ -230,7 +230,7 @@ fprintf(stderr, "*** addMacros\n"); rc = waitpid(child, &status, 0); if (!WIFEXITED(status) || WEXITSTATUS(status)) { - rpmError(RPMERR_SCRIPT, _("Bad exit status from %s (%s)\n"), + rpmlog(RPMERR_SCRIPT, _("Bad exit status from %s (%s)\n"), scriptName, name); rc = RPMERR_SCRIPT; } else diff --git a/build/expression.c b/build/expression.c index 970722b4e..db0415b29 100644 --- a/build/expression.c +++ b/build/expression.c @@ -211,7 +211,7 @@ static int rdToken(ParseState state) token = TOK_EQ; p++; } else { - rpmError(RPMERR_BADSPEC, _("syntax error while parsing ==\n")); + rpmlog(RPMERR_BADSPEC, _("syntax error while parsing ==\n")); return -1; } break; @@ -241,7 +241,7 @@ static int rdToken(ParseState state) token = TOK_LOGICAL_AND; p++; } else { - rpmError(RPMERR_BADSPEC, _("syntax error while parsing &&\n")); + rpmlog(RPMERR_BADSPEC, _("syntax error while parsing &&\n")); return -1; } break; @@ -250,7 +250,7 @@ static int rdToken(ParseState state) token = TOK_LOGICAL_OR; p++; } else { - rpmError(RPMERR_BADSPEC, _("syntax error while parsing ||\n")); + rpmlog(RPMERR_BADSPEC, _("syntax error while parsing ||\n")); return -1; } break; @@ -293,7 +293,7 @@ static int rdToken(ParseState state) v = valueMakeString( rpmExpand(temp, NULL) ); } else { - rpmError(RPMERR_BADSPEC, _("parse error in expression\n")); + rpmlog(RPMERR_BADSPEC, _("parse error in expression\n")); return -1; } } @@ -325,7 +325,7 @@ static Value doPrimary(ParseState state) return NULL; v = doLogical(state); if (state->nextToken != TOK_CLOSE_P) { - rpmError(RPMERR_BADSPEC, _("unmatched (\n")); + rpmlog(RPMERR_BADSPEC, _("unmatched (\n")); return NULL; } if (rdToken(state)) @@ -357,7 +357,7 @@ static Value doPrimary(ParseState state) return NULL; if (! valueIsInteger(v)) { - rpmError(RPMERR_BADSPEC, _("- only on numbers\n")); + rpmlog(RPMERR_BADSPEC, _("- only on numbers\n")); return NULL; } @@ -373,7 +373,7 @@ static Value doPrimary(ParseState state) return NULL; if (! valueIsInteger(v)) { - rpmError(RPMERR_BADSPEC, _("! only on numbers\n")); + rpmlog(RPMERR_BADSPEC, _("! only on numbers\n")); return NULL; } @@ -415,7 +415,7 @@ static Value doMultiplyDivide(ParseState state) return NULL; if (! valueSameType(v1, v2)) { - rpmError(RPMERR_BADSPEC, _("types must match\n")); + rpmlog(RPMERR_BADSPEC, _("types must match\n")); return NULL; } @@ -428,7 +428,7 @@ static Value doMultiplyDivide(ParseState state) else v1 = valueMakeInteger(i1 / i2); } else { - rpmError(RPMERR_BADSPEC, _("* / not suported for strings\n")); + rpmlog(RPMERR_BADSPEC, _("* / not suported for strings\n")); return NULL; } } @@ -463,7 +463,7 @@ static Value doAddSubtract(ParseState state) return NULL; if (! valueSameType(v1, v2)) { - rpmError(RPMERR_BADSPEC, _("types must match\n")); + rpmlog(RPMERR_BADSPEC, _("types must match\n")); return NULL; } @@ -479,7 +479,7 @@ static Value doAddSubtract(ParseState state) char *copy; if (op == TOK_MINUS) { - rpmError(RPMERR_BADSPEC, _("- not suported for strings\n")); + rpmlog(RPMERR_BADSPEC, _("- not suported for strings\n")); return NULL; } @@ -521,7 +521,7 @@ static Value doRelational(ParseState state) return NULL; if (! valueSameType(v1, v2)) { - rpmError(RPMERR_BADSPEC, _("types must match\n")); + rpmlog(RPMERR_BADSPEC, _("types must match\n")); return NULL; } @@ -613,7 +613,7 @@ static Value doLogical(ParseState state) return NULL; if (! valueSameType(v1, v2)) { - rpmError(RPMERR_BADSPEC, _("types must match\n")); + rpmlog(RPMERR_BADSPEC, _("types must match\n")); return NULL; } @@ -626,7 +626,7 @@ static Value doLogical(ParseState state) else v1 = valueMakeInteger(i1 || i2); } else { - rpmError(RPMERR_BADSPEC, _("&& and || not suported for strings\n")); + rpmlog(RPMERR_BADSPEC, _("&& and || not suported for strings\n")); return NULL; } } @@ -659,7 +659,7 @@ int parseExpressionBoolean(rpmSpec spec, const char *expr) /* If the next token is not TOK_EOF, we have a syntax error. */ if (state.nextToken != TOK_EOF) { - rpmError(RPMERR_BADSPEC, _("syntax error in expression\n")); + rpmlog(RPMERR_BADSPEC, _("syntax error in expression\n")); state.str = _free(state.str); return -1; } @@ -706,7 +706,7 @@ char * parseExpressionString(rpmSpec spec, const char *expr) /* If the next token is not TOK_EOF, we have a syntax error. */ if (state.nextToken != TOK_EOF) { - rpmError(RPMERR_BADSPEC, _("syntax error in expression\n")); + rpmlog(RPMERR_BADSPEC, _("syntax error in expression\n")); state.str = _free(state.str); return NULL; } diff --git a/build/files.c b/build/files.c index b830b7756..f8ea9f9df 100644 --- a/build/files.c +++ b/build/files.c @@ -305,7 +305,7 @@ static int parseForVerify(char * buf, FileList fl) SKIPSPACE(pe); if (*pe != '(') { - rpmError(RPMERR_BADSPEC, _("Missing '(' in %s %s\n"), name, pe); + rpmlog(RPMERR_BADSPEC, _("Missing '(' in %s %s\n"), name, pe); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -316,7 +316,7 @@ static int parseForVerify(char * buf, FileList fl) {}; if (*pe == '\0') { - rpmError(RPMERR_BADSPEC, _("Missing ')' in %s(%s\n"), name, p); + rpmlog(RPMERR_BADSPEC, _("Missing ')' in %s(%s\n"), name, p); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -354,7 +354,7 @@ static int parseForVerify(char * buf, FileList fl) if (!strcmp(p, "not")) { negated ^= 1; } else { - rpmError(RPMERR_BADSPEC, _("Invalid %s token: %s\n"), name, p); + rpmlog(RPMERR_BADSPEC, _("Invalid %s token: %s\n"), name, p); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -458,7 +458,7 @@ static int parseForDev(char * buf, FileList fl) exit: if (rc) { - rpmError(RPMERR_BADSPEC, _("Missing %s in %s %s\n"), errstr, name, p); + rpmlog(RPMERR_BADSPEC, _("Missing %s in %s %s\n"), errstr, name, p); fl->processingFailed = 1; } return rc; @@ -494,7 +494,7 @@ static int parseForAttr(char * buf, FileList fl) SKIPSPACE(pe); if (*pe != '(') { - rpmError(RPMERR_BADSPEC, _("Missing '(' in %s %s\n"), name, pe); + rpmlog(RPMERR_BADSPEC, _("Missing '(' in %s %s\n"), name, pe); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -509,7 +509,7 @@ static int parseForAttr(char * buf, FileList fl) q++; SKIPSPACE(q); if (*q != '\0') { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("Non-white space follows %s(): %s\n"), name, q); fl->processingFailed = 1; return RPMERR_BADSPEC; @@ -548,7 +548,7 @@ static int parseForAttr(char * buf, FileList fl) } if (!(ar->ar_fmodestr && ar->ar_user && ar->ar_group) || *p != '\0') { - rpmError(RPMERR_BADSPEC, _("Bad syntax: %s(%s)\n"), name, q); + rpmlog(RPMERR_BADSPEC, _("Bad syntax: %s(%s)\n"), name, q); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -558,7 +558,7 @@ static int parseForAttr(char * buf, FileList fl) unsigned int ui; x = sscanf(ar->ar_fmodestr, "%o", &ui); if ((x == 0) || (ar->ar_fmode & ~MYALLPERMS)) { - rpmError(RPMERR_BADSPEC, _("Bad mode spec: %s(%s)\n"), name, q); + rpmlog(RPMERR_BADSPEC, _("Bad mode spec: %s(%s)\n"), name, q); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -570,7 +570,7 @@ static int parseForAttr(char * buf, FileList fl) unsigned int ui; x = sscanf(ar->ar_dmodestr, "%o", &ui); if ((x == 0) || (ar->ar_dmode & ~MYALLPERMS)) { - rpmError(RPMERR_BADSPEC, _("Bad dirmode spec: %s(%s)\n"), name, q); + rpmlog(RPMERR_BADSPEC, _("Bad dirmode spec: %s(%s)\n"), name, q); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -621,7 +621,7 @@ static int parseForConfig(char * buf, FileList fl) {}; if (*pe == '\0') { - rpmError(RPMERR_BADSPEC, _("Missing ')' in %s(%s\n"), name, p); + rpmlog(RPMERR_BADSPEC, _("Missing ')' in %s(%s\n"), name, p); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -646,7 +646,7 @@ static int parseForConfig(char * buf, FileList fl) } else if (!strcmp(p, "noreplace")) { fl->currentFlags |= RPMFILE_NOREPLACE; } else { - rpmError(RPMERR_BADSPEC, _("Invalid %s token: %s\n"), name, p); + rpmlog(RPMERR_BADSPEC, _("Invalid %s token: %s\n"), name, p); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -680,7 +680,7 @@ static int parseForLang(char * buf, FileList fl) SKIPSPACE(pe); if (*pe != '(') { - rpmError(RPMERR_BADSPEC, _("Missing '(' in %s %s\n"), name, pe); + rpmlog(RPMERR_BADSPEC, _("Missing '(' in %s %s\n"), name, pe); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -691,7 +691,7 @@ static int parseForLang(char * buf, FileList fl) {}; if (*pe == '\0') { - rpmError(RPMERR_BADSPEC, _("Missing ')' in %s(%s\n"), name, p); + rpmlog(RPMERR_BADSPEC, _("Missing ')' in %s(%s\n"), name, p); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -717,7 +717,7 @@ static int parseForLang(char * buf, FileList fl) /* Sanity check on locale lengths */ if (np < 1 || (np == 1 && *p != 'C') || np >= 32) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("Unusual locale length: \"%.*s\" in %%lang(%s)\n"), (int)np, p, q); fl->processingFailed = 1; @@ -729,7 +729,7 @@ static int parseForLang(char * buf, FileList fl) for (i = 0; i < fl->nLangs; i++) { if (strncmp(fl->currentLangs[i], p, np)) continue; - rpmError(RPMERR_BADSPEC, _("Duplicate locale %.*s in %%lang(%s)\n"), + rpmlog(RPMERR_BADSPEC, _("Duplicate locale %.*s in %%lang(%s)\n"), (int)np, p, q); fl->processingFailed = 1; return RPMERR_BADSPEC; @@ -844,7 +844,7 @@ static int parseForSimple(rpmSpec spec, Package pkg, char * buf, if (!strcmp(s, "%docdir")) { s = strtokWithQuotes(NULL, " \t\n"); if (fl->docDirCount == MAXDOCDIR) { - rpmError(RPMERR_INTERNAL, _("Hit limit for %%docdir\n")); + rpmlog(RPMERR_INTERNAL, _("Hit limit for %%docdir\n")); fl->processingFailed = 1; res = 1; } @@ -852,7 +852,7 @@ static int parseForSimple(rpmSpec spec, Package pkg, char * buf, if (s != NULL) fl->docDirs[fl->docDirCount++] = xstrdup(s); if (s == NULL || strtokWithQuotes(NULL, " \t\n")) { - rpmError(RPMERR_INTERNAL, _("Only one arg for %%docdir\n")); + rpmlog(RPMERR_INTERNAL, _("Only one arg for %%docdir\n")); fl->processingFailed = 1; res = 1; } @@ -883,7 +883,7 @@ static int parseForSimple(rpmSpec spec, Package pkg, char * buf, if (*fileName) { /* We already got a file -- error */ - rpmError(RPMERR_BADSPEC, _("Two files on one line: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Two files on one line: %s\n"), *fileName); fl->processingFailed = 1; res = 1; @@ -900,7 +900,7 @@ static int parseForSimple(rpmSpec spec, Package pkg, char * buf, *fileName = s; } else { /* not in %doc, does not begin with / -- error */ - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("File must begin with \"/\": %s\n"), s); fl->processingFailed = 1; res = 1; @@ -912,7 +912,7 @@ static int parseForSimple(rpmSpec spec, Package pkg, char * buf, if (specialDoc) { if (*fileName || (fl->currentFlags & ~(RPMFILE_DOC))) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("Can't mix special %%doc with other forms: %s\n"), (*fileName ? *fileName : "")); fl->processingFailed = 1; @@ -931,7 +931,7 @@ static int parseForSimple(rpmSpec spec, Package pkg, char * buf, } fmt = headerSprintf(pkg->header, _docdir_fmt, rpmTagTable, rpmHeaderFormats, &errstr); if (!fmt) { - rpmError(RPMERR_BADSPEC, _("illegal _docdir_fmt: %s\n"), errstr); + rpmlog(RPMERR_BADSPEC, _("illegal _docdir_fmt: %s\n"), errstr); fl->processingFailed = 1; res = 1; } @@ -1207,7 +1207,7 @@ static void genCpioListAndHeader(FileList fl, if (buf[0] == '/' && strcmp(buildRoot, "/") && !strncmp(buf, buildRoot, strlen(buildRoot))) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("Symlink points to BuildRoot: %s -> %s\n"), flp->fileURL, buf); fl->processingFailed = 1; @@ -1413,7 +1413,7 @@ static int addFile(FileList fl, const char * diskURL, prefixTest++; } if (*prefixPtr || (*prefixTest && *prefixTest != '/')) { - rpmError(RPMERR_BADSPEC, _("File doesn't match prefix (%s): %s\n"), + rpmlog(RPMERR_BADSPEC, _("File doesn't match prefix (%s): %s\n"), fl->prefix, fileURL); fl->processingFailed = 1; return RPMERR_BADSPEC; @@ -1437,7 +1437,7 @@ static int addFile(FileList fl, const char * diskURL, statp->st_mtime = now; statp->st_ctime = now; } else if (Lstat(diskURL, statp)) { - rpmError(RPMERR_BADSPEC, _("File not found: %s\n"), diskURL); + rpmlog(RPMERR_BADSPEC, _("File not found: %s\n"), diskURL); fl->processingFailed = 1; return RPMERR_BADSPEC; } @@ -1639,24 +1639,24 @@ static int processMetadataFile(Package pkg, FileList fl, const char * fileURL, switch (tag) { default: - rpmError(RPMERR_BADSPEC, _("%s: can't load unknown tag (%d).\n"), + rpmlog(RPMERR_BADSPEC, _("%s: can't load unknown tag (%d).\n"), fn, tag); goto exit; break; case RPMTAG_PUBKEYS: if ((rc = pgpReadPkts(fn, (const byte **)&pkt, (size_t *)&pktlen)) <= 0) { - rpmError(RPMERR_BADSPEC, _("%s: public key read failed.\n"), fn); + rpmlog(RPMERR_BADSPEC, _("%s: public key read failed.\n"), fn); goto exit; } if (rc != PGPARMOR_PUBKEY) { - rpmError(RPMERR_BADSPEC, _("%s: not an armored public key.\n"), fn); + rpmlog(RPMERR_BADSPEC, _("%s: not an armored public key.\n"), fn); goto exit; } apkt = pgpArmorWrap(PGPARMOR_PUBKEY, pkt, pktlen); break; case RPMTAG_POLICIES: if ((rc = rpmioSlurp(fn, &pkt, &pktlen)) != 0) { - rpmError(RPMERR_BADSPEC, _("%s: *.te policy read failed.\n"), fn); + rpmlog(RPMERR_BADSPEC, _("%s: *.te policy read failed.\n"), fn); goto exit; } apkt = (const char *) pkt; /* XXX unsigned char */ @@ -1703,7 +1703,7 @@ static int processBinaryFile(Package pkg, FileList fl, { const char * fileName; (void) urlPath(fileURL, &fileName); if (*fileName != '/') { - rpmError(RPMERR_BADSPEC, _("File needs leading \"/\": %s\n"), + rpmlog(RPMERR_BADSPEC, _("File needs leading \"/\": %s\n"), fileName); rc = 1; goto exit; @@ -1727,7 +1727,7 @@ static int processBinaryFile(Package pkg, FileList fl, /* XXX for %dev marker in file manifest only */ if (fl->noGlob) { - rpmError(RPMERR_BADSPEC, _("Glob not permitted: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Glob not permitted: %s\n"), diskURL); rc = 1; goto exit; @@ -1741,7 +1741,7 @@ static int processBinaryFile(Package pkg, FileList fl, } argv = _free(argv); } else { - rpmError(RPMERR_BADSPEC, _("File not found by glob: %s\n"), + rpmlog(RPMERR_BADSPEC, _("File not found by glob: %s\n"), diskURL); rc = 1; goto exit; @@ -1793,7 +1793,7 @@ static int processPackageFiles(rpmSpec spec, Package pkg, fd = Fopen(ffn, "r.fpio"); if (fd == NULL || Ferror(fd)) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Could not open %%files file %s: %s\n"), ffn, Fstrerror(fd)); return RPMERR_BADFILENAME; @@ -1805,7 +1805,7 @@ static int processPackageFiles(rpmSpec spec, Package pkg, while (fgets(buf, sizeof(buf), f)) { handleComments(buf); if (expandMacros(spec, spec->macros, buf, sizeof(buf))) { - rpmError(RPMERR_BADSPEC, _("line: %s\n"), buf); + rpmlog(RPMERR_BADSPEC, _("line: %s\n"), buf); return RPMERR_BADSPEC; } appendStringBuf(pkg->fileList, buf); @@ -2188,7 +2188,7 @@ int processSourceFiles(rpmSpec spec) flp->verifyFlags = RPMVERIFY_ALL; if (Stat(diskURL, &flp->fl_st)) { - rpmError(RPMERR_BADSPEC, _("Bad file: %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Bad file: %s: %s\n"), diskURL, strerror(errno)); fl.processingFailed = 1; } @@ -2212,7 +2212,7 @@ int processSourceFiles(rpmSpec spec) fl.totalFileSize += flp->fl_size; if (! (flp->uname && flp->gname)) { - rpmError(RPMERR_BADSPEC, _("Bad owner/group: %s\n"), diskURL); + rpmlog(RPMERR_BADSPEC, _("Bad owner/group: %s\n"), diskURL); fl.processingFailed = 1; } diff --git a/build/pack.c b/build/pack.c index 30d2855ee..ffd41b443 100644 --- a/build/pack.c +++ b/build/pack.c @@ -73,10 +73,10 @@ static int cpio_doio(FD_t fdo, Header h, CSA_t csa, if (rc) { if (failedFile) - rpmError(RPMERR_CPIO, _("create archive failed on file %s: %s\n"), + rpmlog(RPMERR_CPIO, _("create archive failed on file %s: %s\n"), failedFile, cpioStrerror(rc)); else - rpmError(RPMERR_CPIO, _("create archive failed: %s\n"), + rpmlog(RPMERR_CPIO, _("create archive failed: %s\n"), cpioStrerror(rc)); rc = 1; } @@ -96,14 +96,14 @@ static int cpio_copy(FD_t fdo, CSA_t csa) while((nb = Fread(buf, sizeof(buf[0]), sizeof(buf), csa->cpioFdIn)) > 0) { if (Fwrite(buf, sizeof(buf[0]), nb, fdo) != nb) { - rpmError(RPMERR_CPIO, _("cpio_copy write failed: %s\n"), + rpmlog(RPMERR_CPIO, _("cpio_copy write failed: %s\n"), Fstrerror(fdo)); return 1; } csa->cpioArchiveSize += nb; } if (Ferror(csa->cpioFdIn)) { - rpmError(RPMERR_CPIO, _("cpio_copy read failed: %s\n"), + rpmlog(RPMERR_CPIO, _("cpio_copy read failed: %s\n"), Fstrerror(csa->cpioFdIn)); return 1; } @@ -133,7 +133,7 @@ static StringBuf addFileToTagAux(rpmSpec spec, while (fgets(buf, sizeof(buf), f)) { /* XXX display fn in error msg */ if (expandMacros(spec, spec->macros, buf, sizeof(buf))) { - rpmError(RPMERR_BADSPEC, _("line: %s\n"), buf); + rpmlog(RPMERR_BADSPEC, _("line: %s\n"), buf); sb = freeStringBuf(sb); break; } @@ -191,42 +191,42 @@ static int processScriptFiles(rpmSpec spec, Package pkg) if (pkg->preInFile) { if (addFileToTag(spec, pkg->preInFile, pkg->header, RPMTAG_PREIN)) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Could not open PreIn file: %s\n"), pkg->preInFile); return RPMERR_BADFILENAME; } } if (pkg->preUnFile) { if (addFileToTag(spec, pkg->preUnFile, pkg->header, RPMTAG_PREUN)) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Could not open PreUn file: %s\n"), pkg->preUnFile); return RPMERR_BADFILENAME; } } if (pkg->preTransFile) { if (addFileToTag(spec, pkg->preTransFile, pkg->header, RPMTAG_PRETRANS)) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Could not open PreIn file: %s\n"), pkg->preTransFile); return RPMERR_BADFILENAME; } } if (pkg->postInFile) { if (addFileToTag(spec, pkg->postInFile, pkg->header, RPMTAG_POSTIN)) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Could not open PostIn file: %s\n"), pkg->postInFile); return RPMERR_BADFILENAME; } } if (pkg->postUnFile) { if (addFileToTag(spec, pkg->postUnFile, pkg->header, RPMTAG_POSTUN)) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Could not open PostUn file: %s\n"), pkg->postUnFile); return RPMERR_BADFILENAME; } } if (pkg->postTransFile) { if (addFileToTag(spec, pkg->postTransFile, pkg->header, RPMTAG_POSTTRANS)) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Could not open PostUn file: %s\n"), pkg->postTransFile); return RPMERR_BADFILENAME; } @@ -234,7 +234,7 @@ static int processScriptFiles(rpmSpec spec, Package pkg) if (pkg->verifyFile) { if (addFileToTag(spec, pkg->verifyFile, pkg->header, RPMTAG_VERIFYSCRIPT)) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Could not open VerifyScript file: %s\n"), pkg->verifyFile); return RPMERR_BADFILENAME; } @@ -249,7 +249,7 @@ static int processScriptFiles(rpmSpec spec, Package pkg) } else if (p->fileName) { if (addFileToArrayTag(spec, p->fileName, pkg->header, RPMTAG_TRIGGERSCRIPTS)) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Could not open Trigger script file: %s\n"), p->fileName); return RPMERR_BADFILENAME; @@ -278,7 +278,7 @@ int readRPM(const char *fileName, rpmSpec *specp, struct rpmlead *lead, : fdDup(STDIN_FILENO); if (fdi == NULL || Ferror(fdi)) { - rpmError(RPMERR_BADMAGIC, _("readRPM: open %s: %s\n"), + rpmlog(RPMERR_BADMAGIC, _("readRPM: open %s: %s\n"), (fileName ? fileName : "<stdin>"), Fstrerror(fdi)); if (fdi) (void) Fclose(fdi); @@ -287,7 +287,7 @@ int readRPM(const char *fileName, rpmSpec *specp, struct rpmlead *lead, /* Get copy of lead */ if ((rc = Fread(lead, sizeof(char), sizeof(*lead), fdi)) != sizeof(*lead)) { - rpmError(RPMERR_BADMAGIC, _("readRPM: read %s: %s\n"), + rpmlog(RPMERR_BADMAGIC, _("readRPM: read %s: %s\n"), (fileName ? fileName : "<stdin>"), Fstrerror(fdi)); return RPMERR_BADMAGIC; @@ -295,7 +295,7 @@ int readRPM(const char *fileName, rpmSpec *specp, struct rpmlead *lead, /* XXX FIXME: EPIPE on <stdin> */ if (Fseek(fdi, 0, SEEK_SET) == -1) { - rpmError(RPMERR_FSEEK, _("%s: Fseek failed: %s\n"), + rpmlog(RPMERR_FSEEK, _("%s: Fseek failed: %s\n"), (fileName ? fileName : "<stdin>"), Fstrerror(fdi)); return RPMERR_FSEEK; } @@ -326,12 +326,12 @@ int readRPM(const char *fileName, rpmSpec *specp, struct rpmlead *lead, case RPMRC_NOTTRUSTED: break; case RPMRC_NOTFOUND: - rpmError(RPMERR_BADMAGIC, _("readRPM: %s is not an RPM package\n"), + rpmlog(RPMERR_BADMAGIC, _("readRPM: %s is not an RPM package\n"), (fileName ? fileName : "<stdin>")); return RPMERR_BADMAGIC; case RPMRC_FAIL: default: - rpmError(RPMERR_BADMAGIC, _("readRPM: reading header from %s\n"), + rpmlog(RPMERR_BADMAGIC, _("readRPM: reading header from %s\n"), (fileName ? fileName : "<stdin>")); return RPMERR_BADMAGIC; break; @@ -455,7 +455,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, h = headerReload(h, RPMTAG_HEADERIMMUTABLE); if (h == NULL) { /* XXX can't happen */ rc = RPMERR_RELOAD; - rpmError(RPMERR_RELOAD, _("Unable to create immutable header region.\n")); + rpmlog(RPMERR_RELOAD, _("Unable to create immutable header region.\n")); goto exit; } /* Re-reference reallocated header. */ @@ -467,14 +467,14 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, */ if (makeTempFile(NULL, &sigtarget, &fd)) { rc = RPMERR_CREATE; - rpmError(RPMERR_CREATE, _("Unable to open temp file.\n")); + rpmlog(RPMERR_CREATE, _("Unable to open temp file.\n")); goto exit; } fdInitDigest(fd, PGPHASHALGO_SHA1, 0); if (headerWrite(fd, h, HEADER_MAGIC_YES)) { rc = RPMERR_NOSPACE; - rpmError(RPMERR_NOSPACE, _("Unable to write temp header\n")); + rpmlog(RPMERR_NOSPACE, _("Unable to write temp header\n")); } else { /* Write the archive and get the size */ (void) Fflush(fd); fdFiniDigest(fd, PGPHASHALGO_SHA1, (void **)&SHA1, NULL, 1); @@ -484,7 +484,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, rc = cpio_copy(fd, csa); } else { rc = RPMERR_BADARG; - rpmError(RPMERR_BADARG, _("Bad CSA data\n")); + rpmlog(RPMERR_BADARG, _("Bad CSA data\n")); } } rpmio_flags = _free(rpmio_flags); @@ -513,14 +513,14 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, (void) Fflush(fd); if (Fseek(fd, 0, SEEK_SET) == -1) { rc = RPMERR_FSEEK; - rpmError(RPMERR_FSEEK, _("%s: Fseek failed: %s\n"), + rpmlog(RPMERR_FSEEK, _("%s: Fseek failed: %s\n"), sigtarget, Fstrerror(fd)); } fdInitDigest(fd, PGPHASHALGO_SHA1, 0); if (headerWrite(fd, h, HEADER_MAGIC_YES)) { rc = RPMERR_NOSPACE; - rpmError(RPMERR_NOSPACE, _("Unable to write final header\n")); + rpmlog(RPMERR_NOSPACE, _("Unable to write final header\n")); } (void) Fflush(fd); fdFiniDigest(fd, PGPHASHALGO_SHA1, (void **)&SHA1, NULL, 1); @@ -558,7 +558,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, sig = headerReload(sig, RPMTAG_HEADERSIGNATURES); if (sig == NULL) { /* XXX can't happen */ rc = RPMERR_RELOAD; - rpmError(RPMERR_RELOAD, _("Unable to reload signature header.\n")); + rpmlog(RPMERR_RELOAD, _("Unable to reload signature header.\n")); goto exit; } @@ -566,7 +566,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, fd = Fopen(fileName, "w.ufdio"); if (fd == NULL || Ferror(fd)) { rc = RPMERR_CREATE; - rpmError(RPMERR_CREATE, _("Could not open %s: %s\n"), + rpmlog(RPMERR_CREATE, _("Could not open %s: %s\n"), fileName, Fstrerror(fd)); goto exit; } @@ -602,7 +602,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, if (writeLead(fd, &lead) != RPMRC_OK) { rc = RPMERR_NOSPACE; - rpmError(RPMERR_NOSPACE, _("Unable to write package: %s\n"), + rpmlog(RPMERR_NOSPACE, _("Unable to write package: %s\n"), Fstrerror(fd)); goto exit; } @@ -617,7 +617,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, ifd = Fopen(sigtarget, "r.ufdio"); if (ifd == NULL || Ferror(ifd)) { rc = RPMERR_READ; - rpmError(RPMERR_READ, _("Unable to open sigtarget %s: %s\n"), + rpmlog(RPMERR_READ, _("Unable to open sigtarget %s: %s\n"), sigtarget, Fstrerror(ifd)); goto exit; } @@ -628,7 +628,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, if (nh == NULL) { rc = RPMERR_READ; - rpmError(RPMERR_READ, _("Unable to read header from %s: %s\n"), + rpmlog(RPMERR_READ, _("Unable to read header from %s: %s\n"), sigtarget, Fstrerror(ifd)); goto exit; } @@ -642,7 +642,7 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, if (rc) { rc = RPMERR_NOSPACE; - rpmError(RPMERR_NOSPACE, _("Unable to write header to %s: %s\n"), + rpmlog(RPMERR_NOSPACE, _("Unable to write header to %s: %s\n"), fileName, Fstrerror(fd)); goto exit; } @@ -652,13 +652,13 @@ int writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName, while ((count = Fread(buf, sizeof(buf[0]), sizeof(buf), ifd)) > 0) { if (count == -1) { rc = RPMERR_READ; - rpmError(RPMERR_READ, _("Unable to read payload from %s: %s\n"), + rpmlog(RPMERR_READ, _("Unable to read payload from %s: %s\n"), sigtarget, Fstrerror(ifd)); goto exit; } if (Fwrite(buf, sizeof(buf[0]), count, fd) != count) { rc = RPMERR_NOSPACE; - rpmError(RPMERR_NOSPACE, _("Unable to write payload to %s: %s\n"), + rpmlog(RPMERR_NOSPACE, _("Unable to write payload to %s: %s\n"), fileName, Fstrerror(fd)); goto exit; } @@ -765,7 +765,7 @@ int packageBinaries(rpmSpec spec) if (binRpm == NULL) { const char *name; (void) headerNVR(pkg->header, &name, NULL, NULL); - rpmError(RPMERR_BADFILENAME, _("Could not generate output " + rpmlog(RPMERR_BADFILENAME, _("Could not generate output " "filename for package %s: %s\n"), name, errorString); return RPMERR_BADFILENAME; } @@ -781,7 +781,7 @@ int packageBinaries(rpmSpec spec) if (Mkdir(dn, 0755) == 0) break; default: - rpmError(RPMERR_BADFILENAME,_("cannot create %s: %s\n"), + rpmlog(RPMERR_BADFILENAME,_("cannot create %s: %s\n"), dn, strerror(errno)); break; } diff --git a/build/parseBuildInstallClean.c b/build/parseBuildInstallClean.c index e600fb26c..a43b7410c 100644 --- a/build/parseBuildInstallClean.c +++ b/build/parseBuildInstallClean.c @@ -29,7 +29,7 @@ int parseBuildInstallClean(rpmSpec spec, rpmParseState parsePart) } if (*sbp != NULL) { - rpmError(RPMERR_BADSPEC, _("line %d: second %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: second %s\n"), spec->lineNum, name); return RPMERR_BADSPEC; } diff --git a/build/parseChangelog.c b/build/parseChangelog.c index cc7d84629..6b3b65171 100644 --- a/build/parseChangelog.c +++ b/build/parseChangelog.c @@ -119,7 +119,7 @@ static int addChangelog(Header h, StringBuf sb) while (*s != '\0') { if (*s != '*') { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("%%changelog entries must start with *\n")); return RPMERR_BADSPEC; } @@ -128,7 +128,7 @@ static int addChangelog(Header h, StringBuf sb) date = s; while(*s && *s != '\n') s++; if (! *s) { - rpmError(RPMERR_BADSPEC, _("incomplete %%changelog entry\n")); + rpmlog(RPMERR_BADSPEC, _("incomplete %%changelog entry\n")); return RPMERR_BADSPEC; } *s = '\0'; @@ -143,11 +143,11 @@ static int addChangelog(Header h, StringBuf sb) } SKIPSPACE(date); if (dateToTimet(date, &time)) { - rpmError(RPMERR_BADSPEC, _("bad date in %%changelog: %s\n"), date); + rpmlog(RPMERR_BADSPEC, _("bad date in %%changelog: %s\n"), date); return RPMERR_BADSPEC; } if (lastTime && lastTime < time) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("%%changelog not in descending chronological order\n")); return RPMERR_BADSPEC; } @@ -156,7 +156,7 @@ static int addChangelog(Header h, StringBuf sb) /* skip space to the name */ SKIPSPACE(s); if (! *s) { - rpmError(RPMERR_BADSPEC, _("missing name in %%changelog\n")); + rpmlog(RPMERR_BADSPEC, _("missing name in %%changelog\n")); return RPMERR_BADSPEC; } @@ -167,14 +167,14 @@ static int addChangelog(Header h, StringBuf sb) *s-- = '\0'; } if (s == name) { - rpmError(RPMERR_BADSPEC, _("missing name in %%changelog\n")); + rpmlog(RPMERR_BADSPEC, _("missing name in %%changelog\n")); return RPMERR_BADSPEC; } /* text */ SKIPSPACE(text); if (! *text) { - rpmError(RPMERR_BADSPEC, _("no description in %%changelog\n")); + rpmlog(RPMERR_BADSPEC, _("no description in %%changelog\n")); return RPMERR_BADSPEC; } diff --git a/build/parseDescription.c b/build/parseDescription.c index dc7b17889..3d0308b9a 100644 --- a/build/parseDescription.c +++ b/build/parseDescription.c @@ -36,7 +36,7 @@ int parseDescription(rpmSpec spec) lang = RPMBUILD_DEFAULT_LANG; if ((rc = poptParseArgvString(spec->line, &argc, &argv))) { - rpmError(RPMERR_BADSPEC, _("line %d: Error parsing %%description: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Error parsing %%description: %s\n"), spec->lineNum, poptStrerror(rc)); return RPMERR_BADSPEC; } @@ -49,7 +49,7 @@ int parseDescription(rpmSpec spec) } if (arg < -1) { - rpmError(RPMERR_BADSPEC, _("line %d: Bad option %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Bad option %s: %s\n"), spec->lineNum, poptBadOption(optCon, POPT_BADOPTION_NOALIAS), spec->line); @@ -60,7 +60,7 @@ int parseDescription(rpmSpec spec) if (name == NULL) name = poptGetArg(optCon); if (poptPeekArg(optCon)) { - rpmError(RPMERR_BADSPEC, _("line %d: Too many names: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Too many names: %s\n"), spec->lineNum, spec->line); goto exit; @@ -68,7 +68,7 @@ int parseDescription(rpmSpec spec) } if (lookupPackage(spec, name, flag, &pkg)) { - rpmError(RPMERR_BADSPEC, _("line %d: Package does not exist: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Package does not exist: %s\n"), spec->lineNum, spec->line); goto exit; } @@ -78,7 +78,7 @@ int parseDescription(rpmSpec spec) #if 0 if (headerIsEntry(pkg->header, RPMTAG_DESCRIPTION)) { - rpmError(RPMERR_BADSPEC, _("line %d: Second description\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Second description\n"), spec->lineNum); goto exit; } diff --git a/build/parseFiles.c b/build/parseFiles.c index 4283253b5..bb40ac018 100644 --- a/build/parseFiles.c +++ b/build/parseFiles.c @@ -31,7 +31,7 @@ int parseFiles(rpmSpec spec) file = NULL; if ((rc = poptParseArgvString(spec->line, &argc, &argv))) { - rpmError(RPMERR_BADSPEC, _("line %d: Error parsing %%files: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Error parsing %%files: %s\n"), spec->lineNum, poptStrerror(rc)); rc = RPMERR_BADSPEC; goto exit; @@ -45,7 +45,7 @@ int parseFiles(rpmSpec spec) } if (arg < -1) { - rpmError(RPMERR_BADSPEC, _("line %d: Bad option %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Bad option %s: %s\n"), spec->lineNum, poptBadOption(optCon, POPT_BADOPTION_NOALIAS), spec->line); @@ -57,7 +57,7 @@ int parseFiles(rpmSpec spec) if (name == NULL) name = poptGetArg(optCon); if (poptPeekArg(optCon)) { - rpmError(RPMERR_BADSPEC, _("line %d: Too many names: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Too many names: %s\n"), spec->lineNum, spec->line); rc = RPMERR_BADSPEC; @@ -66,14 +66,14 @@ int parseFiles(rpmSpec spec) } if (lookupPackage(spec, name, flag, &pkg)) { - rpmError(RPMERR_BADSPEC, _("line %d: Package does not exist: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Package does not exist: %s\n"), spec->lineNum, spec->line); rc = RPMERR_BADSPEC; goto exit; } if (pkg->fileList != NULL) { - rpmError(RPMERR_BADSPEC, _("line %d: Second %%files list\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Second %%files list\n"), spec->lineNum); rc = RPMERR_BADSPEC; goto exit; diff --git a/build/parsePreamble.c b/build/parsePreamble.c index bda34a342..3009faaab 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -217,22 +217,22 @@ static int checkForValidArchitectures(rpmSpec spec) if (isMemberInEntry(spec->buildRestrictions, arch, RPMTAG_EXCLUDEARCH) == 1) { - rpmError(RPMERR_BADSPEC, _("Architecture is excluded: %s\n"), arch); + rpmlog(RPMERR_BADSPEC, _("Architecture is excluded: %s\n"), arch); return RPMERR_BADSPEC; } if (isMemberInEntry(spec->buildRestrictions, arch, RPMTAG_EXCLUSIVEARCH) == 0) { - rpmError(RPMERR_BADSPEC, _("Architecture is not included: %s\n"), arch); + rpmlog(RPMERR_BADSPEC, _("Architecture is not included: %s\n"), arch); return RPMERR_BADSPEC; } if (isMemberInEntry(spec->buildRestrictions, os, RPMTAG_EXCLUDEOS) == 1) { - rpmError(RPMERR_BADSPEC, _("OS is excluded: %s\n"), os); + rpmlog(RPMERR_BADSPEC, _("OS is excluded: %s\n"), os); return RPMERR_BADSPEC; } if (isMemberInEntry(spec->buildRestrictions, os, RPMTAG_EXCLUSIVEOS) == 0) { - rpmError(RPMERR_BADSPEC, _("OS is not included: %s\n"), os); + rpmlog(RPMERR_BADSPEC, _("OS is not included: %s\n"), os); return RPMERR_BADSPEC; } @@ -253,7 +253,7 @@ static int checkForRequired(Header h, const char * NVR) for (p = requiredTags; *p != 0; p++) { if (!headerIsEntry(h, *p)) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("%s field must be present in package: %s\n"), rpmTagGetName(*p), NVR); res = 1; @@ -281,7 +281,7 @@ static int checkForDuplicates(Header h, const char * NVR) { if (tag != lastTag) continue; - rpmError(RPMERR_BADSPEC, _("Duplicate %s entries in package: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Duplicate %s entries in package: %s\n"), rpmTagGetName(tag), NVR); res = 1; } @@ -335,7 +335,7 @@ static int readIcon(Header h, const char * file) fd = Fopen(fn, "r.ufdio"); if (fd == NULL || Ferror(fd)) { - rpmError(RPMERR_BADSPEC, _("Unable to open icon %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Unable to open icon %s: %s\n"), fn, Fstrerror(fd)); rc = RPMERR_BADSPEC; goto exit; @@ -353,7 +353,7 @@ static int readIcon(Header h, const char * file) nb = Fread(icon, sizeof(icon[0]), iconsize, fd); if (Ferror(fd) || (size >= 0 && nb != size)) { - rpmError(RPMERR_BADSPEC, _("Unable to read icon %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Unable to read icon %s: %s\n"), fn, Fstrerror(fd)); rc = RPMERR_BADSPEC; } @@ -366,7 +366,7 @@ static int readIcon(Header h, const char * file) } else if (! strncmp(icon, "/* XPM", sizeof("/* XPM")-1)) { (void) headerAddEntry(h, RPMTAG_XPM, RPM_BIN_TYPE, icon, iconsize); } else { - rpmError(RPMERR_BADSPEC, _("Unknown icon type: %s\n"), file); + rpmlog(RPMERR_BADSPEC, _("Unknown icon type: %s\n"), file); rc = RPMERR_BADSPEC; goto exit; } @@ -408,7 +408,7 @@ spectag stashSt(rpmSpec spec, Header h, int tag, const char * lang) #define SINGLE_TOKEN_ONLY \ if (multiToken) { \ - rpmError(RPMERR_BADSPEC, _("line %d: Tag takes single token only: %s\n"), \ + rpmlog(RPMERR_BADSPEC, _("line %d: Tag takes single token only: %s\n"), \ spec->lineNum, spec->line); \ return RPMERR_BADSPEC; \ } @@ -438,7 +438,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, while ((*field) && (*field != ':')) field++; if (*field != ':') { - rpmError(RPMERR_BADSPEC, _("line %d: Malformed tag: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Malformed tag: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; } @@ -446,7 +446,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, SKIPSPACE(field); if (!*field) { /* Empty field */ - rpmError(RPMERR_BADSPEC, _("line %d: Empty tag: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Empty tag: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; } @@ -471,14 +471,14 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, /* These macros are for backward compatibility */ if (tag == RPMTAG_VERSION) { if (strchr(field, '-') != NULL) { - rpmError(RPMERR_BADSPEC, _("line %d: Illegal char '-' in %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Illegal char '-' in %s: %s\n"), spec->lineNum, "version", spec->line); return RPMERR_BADSPEC; } addMacro(spec->macros, "PACKAGE_VERSION", NULL, field, RMIL_OLDSPEC); } else if (tag == RPMTAG_RELEASE) { if (strchr(field, '-') != NULL) { - rpmError(RPMERR_BADSPEC, _("line %d: Illegal char '-' in %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Illegal char '-' in %s: %s\n"), spec->lineNum, "release", spec->line); return RPMERR_BADSPEC; } @@ -533,7 +533,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, (void) urlPath(buildRootURL, &buildRoot); if (*buildRoot == '\0') buildRoot = "/"; if (!strcmp(buildRoot, "/")) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("BuildRoot can not be \"/\": %s\n"), spec->buildRootURL); buildRootURL = _free(buildRootURL); return RPMERR_BADSPEC; @@ -546,7 +546,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, while (num--) { len = strlen(array[num]); if (array[num][len - 1] == '/' && len > 1) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Prefixes must not end with \"/\": %s\n"), spec->lineNum, spec->line); array = hfd(array, type); @@ -558,7 +558,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, case RPMTAG_DOCDIR: SINGLE_TOKEN_ONLY; if (field[0] != '/') { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Docdir must begin with '/': %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; @@ -570,7 +570,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, case RPMTAG_EPOCH: SINGLE_TOKEN_ONLY; if (parseNum(field, &num)) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Epoch/Serial field must be a number: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; @@ -610,7 +610,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, case RPMTAG_BUILDPREREQ: case RPMTAG_BUILDREQUIRES: if ((rc = parseBits(lang, buildScriptBits, &tagflags))) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Bad %s: qualifiers: %s\n"), spec->lineNum, rpmTagGetName(tag), spec->line); return rc; @@ -621,7 +621,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, case RPMTAG_REQUIREFLAGS: case RPMTAG_PREREQ: if ((rc = parseBits(lang, installScriptBits, &tagflags))) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Bad %s: qualifiers: %s\n"), spec->lineNum, rpmTagGetName(tag), spec->line); return rc; @@ -647,7 +647,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, if ((rc = poptParseArgvString(field, &(spec->BACount), &(spec->BANames)))) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Bad BuildArchitecture format: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; @@ -657,7 +657,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, break; default: - rpmError(RPMERR_INTERNAL, _("Internal error: Bogus tag %d\n"), tag); + rpmlog(RPMERR_INTERNAL, _("Internal error: Bogus tag %d\n"), tag); return RPMERR_INTERNAL; } @@ -753,7 +753,7 @@ static int findPreambleTag(rpmSpec spec,rpmTag * tag, if (!(p->token && !xstrncasecmp(spec->line, p->token, p->len))) continue; if (p->obsolete) { - rpmError(RPMERR_BADSPEC, _("Legacy syntax is unsupported: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Legacy syntax is unsupported: %s\n"), p->token); p = NULL; } @@ -816,13 +816,13 @@ int parsePreamble(rpmSpec spec, int initialPackage) if (! initialPackage) { /* There is one option to %package: <pkg> or -n <pkg> */ if (parseSimplePart(spec->line, &name, &flag)) { - rpmError(RPMERR_BADSPEC, _("Bad package specification: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Bad package specification: %s\n"), spec->line); return RPMERR_BADSPEC; } if (!lookupPackage(spec, name, flag, NULL)) { - rpmError(RPMERR_BADSPEC, _("Package already exists: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Package already exists: %s\n"), spec->line); return RPMERR_BADSPEC; } @@ -851,7 +851,7 @@ int parsePreamble(rpmSpec spec, int initialPackage) SKIPSPACE(linep); if (*linep != '\0') { if (findPreambleTag(spec, &tag, ¯o, lang)) { - rpmError(RPMERR_BADSPEC, _("line %d: Unknown tag: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Unknown tag: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; } @@ -873,7 +873,7 @@ int parsePreamble(rpmSpec spec, int initialPackage) /* Do some final processing on the header */ if (!spec->gotBuildRootURL && spec->buildRootURL) { - rpmError(RPMERR_BADSPEC, _("Spec file can't use BuildRoot\n")); + rpmlog(RPMERR_BADSPEC, _("Spec file can't use BuildRoot\n")); return RPMERR_BADSPEC; } diff --git a/build/parsePrep.c b/build/parsePrep.c index 0e8b61156..3c39bb24b 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -35,12 +35,12 @@ static int checkOwners(const char * urlfn) struct stat sb; if (Lstat(urlfn, &sb)) { - rpmError(RPMERR_BADSPEC, _("Bad source: %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Bad source: %s: %s\n"), urlfn, strerror(errno)); return RPMERR_BADSPEC; } if (!getUname(sb.st_uid) || !getGname(sb.st_gid)) { - rpmError(RPMERR_BADSPEC, _("Bad owner/group: %s\n"), urlfn); + rpmlog(RPMERR_BADSPEC, _("Bad owner/group: %s\n"), urlfn); return RPMERR_BADSPEC; } @@ -75,7 +75,7 @@ static char *doPatch(rpmSpec spec, int c, int strip, const char *db, } } if (sp == NULL) { - rpmError(RPMERR_BADSPEC, _("No patch number %d\n"), c); + rpmlog(RPMERR_BADSPEC, _("No patch number %d\n"), c); return NULL; } @@ -170,7 +170,7 @@ static const char *doUntar(rpmSpec spec, int c, int quietly) } } if (sp == NULL) { - rpmError(RPMERR_BADSPEC, _("No source number %d\n"), c); + rpmlog(RPMERR_BADSPEC, _("No source number %d\n"), c); return NULL; } @@ -190,7 +190,7 @@ static const char *doUntar(rpmSpec spec, int c, int quietly) if (Lstat(urlfn, &st) != 0 && errno == ENOENT && urlIsUrl(sp->fullSource) != URL_IS_UNKNOWN) { if ((rc = urlGetFile(sp->fullSource, urlfn)) != 0) { - rpmError(RPMERR_BADFILENAME, + rpmlog(RPMERR_BADFILENAME, _("Couldn't download nosource %s: %s\n"), sp->fullSource, ftpStrerror(rc)); return NULL; @@ -292,7 +292,7 @@ static int doSetupMacro(rpmSpec spec, char *line) dirName = NULL; if ((rc = poptParseArgvString(line, &argc, &argv))) { - rpmError(RPMERR_BADSPEC, _("Error parsing %%setup: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Error parsing %%setup: %s\n"), poptStrerror(rc)); return RPMERR_BADSPEC; } @@ -307,7 +307,7 @@ static int doSetupMacro(rpmSpec spec, char *line) /* We only parse -a and -b here */ if (parseNum(optArg, &num)) { - rpmError(RPMERR_BADSPEC, _("line %d: Bad arg to %%setup: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Bad arg to %%setup: %s\n"), spec->lineNum, (optArg ? optArg : "???")); before = freeStringBuf(before); after = freeStringBuf(after); @@ -325,7 +325,7 @@ static int doSetupMacro(rpmSpec spec, char *line) } if (arg < -1) { - rpmError(RPMERR_BADSPEC, _("line %d: Bad %%setup option %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Bad %%setup option %s: %s\n"), spec->lineNum, poptBadOption(optCon, POPT_BADOPTION_NOALIAS), poptStrerror(arg)); @@ -459,7 +459,7 @@ static int doPatchMacro(rpmSpec spec, char *line) /* orig suffix */ opt_b = strtok(NULL, " \t\n"); if (! opt_b) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Need arg to %%patch -b: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; @@ -468,7 +468,7 @@ static int doPatchMacro(rpmSpec spec, char *line) /* orig suffix */ opt_b = strtok(NULL, " \t\n"); if (! opt_b) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Need arg to %%patch -z: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; @@ -485,7 +485,7 @@ static int doPatchMacro(rpmSpec spec, char *line) } opt_F = (fnum ? strtol(fnum, &end, 10) : 0); if (! opt_F || *end) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Bad arg to %%patch -F: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; @@ -497,14 +497,14 @@ static int doPatchMacro(rpmSpec spec, char *line) } else { s = strtok(NULL, " \t\n"); if (s == NULL) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Need arg to %%patch -p: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; } } if (parseNum(s, &opt_p)) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Bad arg to %%patch -p: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; @@ -512,11 +512,11 @@ static int doPatchMacro(rpmSpec spec, char *line) } else { /* Must be a patch num */ if (patch_index == 1024) { - rpmError(RPMERR_BADSPEC, _("Too many patches!\n")); + rpmlog(RPMERR_BADSPEC, _("Too many patches!\n")); return RPMERR_BADSPEC; } if (parseNum(s, &(patch_nums[patch_index]))) { - rpmError(RPMERR_BADSPEC, _("line %d: Bad arg to %%patch: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Bad arg to %%patch: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; } @@ -550,7 +550,7 @@ int parsePrep(rpmSpec spec) char **lines, **saveLines; if (spec->prep != NULL) { - rpmError(RPMERR_BADSPEC, _("line %d: second %%prep\n"), spec->lineNum); + rpmlog(RPMERR_BADSPEC, _("line %d: second %%prep\n"), spec->lineNum); return RPMERR_BADSPEC; } diff --git a/build/parseReqs.c b/build/parseReqs.c index 0693bf8a9..fac52a6f3 100644 --- a/build/parseReqs.c +++ b/build/parseReqs.c @@ -96,7 +96,7 @@ int parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN, /* Tokens must begin with alphanumeric, _, or / */ if (!(xisalnum(r[0]) || r[0] == '_' || r[0] == '/')) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Dependency tokens must begin with alpha-numeric, '_' or '/': %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; @@ -124,7 +124,7 @@ int parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN, continue; if (r[0] == '/') { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: Versioned file name not permitted: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; @@ -155,7 +155,7 @@ int parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN, if (Flags & RPMSENSE_SENSEMASK) { if (*v == '\0' || ve == v) { - rpmError(RPMERR_BADSPEC, _("line %d: Version required: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Version required: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; } diff --git a/build/parseScript.c b/build/parseScript.c index f8a178457..41e9e9247 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -164,7 +164,7 @@ int parseScript(rpmSpec spec, int parsePart) /* break line into two */ p = strstr(spec->line, "--"); if (!p) { - rpmError(RPMERR_BADSPEC, _("line %d: triggers must have --: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: triggers must have --: %s\n"), spec->lineNum, spec->line); return RPMERR_BADSPEC; } @@ -174,7 +174,7 @@ int parseScript(rpmSpec spec, int parsePart) } if ((rc = poptParseArgvString(spec->line, &argc, &argv))) { - rpmError(RPMERR_BADSPEC, _("line %d: Error parsing %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Error parsing %s: %s\n"), spec->lineNum, partname, poptStrerror(rc)); return RPMERR_BADSPEC; } @@ -185,14 +185,14 @@ int parseScript(rpmSpec spec, int parsePart) case 'p': if (prog[0] == '<') { if (prog[strlen(prog)-1] != '>') { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: internal script must end " "with \'>\': %s\n"), spec->lineNum, prog); rc = RPMERR_BADSPEC; goto exit; } } else if (prog[0] != '/') { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: script program must begin " "with \'/\': %s\n"), spec->lineNum, prog); rc = RPMERR_BADSPEC; @@ -206,7 +206,7 @@ int parseScript(rpmSpec spec, int parsePart) } if (arg < -1) { - rpmError(RPMERR_BADSPEC, _("line %d: Bad option %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Bad option %s: %s\n"), spec->lineNum, poptBadOption(optCon, POPT_BADOPTION_NOALIAS), spec->line); @@ -218,7 +218,7 @@ int parseScript(rpmSpec spec, int parsePart) if (name == NULL) name = poptGetArg(optCon); if (poptPeekArg(optCon)) { - rpmError(RPMERR_BADSPEC, _("line %d: Too many names: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Too many names: %s\n"), spec->lineNum, spec->line); rc = RPMERR_BADSPEC; @@ -227,7 +227,7 @@ int parseScript(rpmSpec spec, int parsePart) } if (lookupPackage(spec, name, flag, &pkg)) { - rpmError(RPMERR_BADSPEC, _("line %d: Package does not exist: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Package does not exist: %s\n"), spec->lineNum, spec->line); rc = RPMERR_BADSPEC; goto exit; @@ -235,7 +235,7 @@ int parseScript(rpmSpec spec, int parsePart) if (tag != RPMTAG_TRIGGERSCRIPTS) { if (headerIsEntry(pkg->header, progtag)) { - rpmError(RPMERR_BADSPEC, _("line %d: Second %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Second %s\n"), spec->lineNum, partname); rc = RPMERR_BADSPEC; goto exit; @@ -243,7 +243,7 @@ int parseScript(rpmSpec spec, int parsePart) } if ((rc = poptParseArgvString(prog, &progArgc, &progArgv))) { - rpmError(RPMERR_BADSPEC, _("line %d: Error parsing %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Error parsing %s: %s\n"), spec->lineNum, partname, poptStrerror(rc)); rc = RPMERR_BADSPEC; goto exit; @@ -280,7 +280,7 @@ int parseScript(rpmSpec spec, int parsePart) } else #endif if (progArgv[0][0] == '<') { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("line %d: unsupported internal script: %s\n"), spec->lineNum, progArgv[0]); rc = RPMERR_BADSPEC; diff --git a/build/parseSpec.c b/build/parseSpec.c index 1251cbe2c..5506f7a2d 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -171,7 +171,7 @@ static int copyNextLine(rpmSpec spec, OFI_t *ofi, int strip) /* Don't expand macros (eg. %define) in false branch of %if clause */ if (spec->readStack->reading && expandMacros(spec, spec->macros, spec->lbuf, sizeof(spec->lbuf))) { - rpmError(RPMERR_BADSPEC, _("line %d: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: %s\n"), spec->lineNum, spec->lbuf); return RPMERR_BADSPEC; } @@ -220,7 +220,7 @@ retry: ofi->fd = Fopen(ofi->fileName, "r.fpio"); if (ofi->fd == NULL || Ferror(ofi->fd)) { /* XXX Fstrerror */ - rpmError(RPMERR_BADSPEC, _("Unable to open %s: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Unable to open %s: %s\n"), ofi->fileName, Fstrerror(ofi->fd)); return RPMERR_BADSPEC; } @@ -234,7 +234,7 @@ retry: if (f == NULL || !fgets(ofi->readBuf, BUFSIZ, f)) { /* EOF */ if (spec->readStack->next) { - rpmError(RPMERR_UNMATCHEDIF, _("Unclosed %%if\n")); + rpmlog(RPMERR_UNMATCHEDIF, _("Unclosed %%if\n")); return RPMERR_UNMATCHEDIF; } @@ -310,7 +310,7 @@ retry: s += 3; match = parseExpressionBoolean(spec, s); if (match < 0) { - rpmError(RPMERR_UNMATCHEDIF, + rpmlog(RPMERR_UNMATCHEDIF, _("%s:%d: parseExpressionBoolean returns %d\n"), ofi->fileName, ofi->lineNum, match); return RPMERR_BADSPEC; @@ -319,7 +319,7 @@ retry: s += 5; if (! spec->readStack->next) { /* Got an else with no %if ! */ - rpmError(RPMERR_UNMATCHEDIF, + rpmlog(RPMERR_UNMATCHEDIF, _("%s:%d: Got a %%else with no %%if\n"), ofi->fileName, ofi->lineNum); return RPMERR_UNMATCHEDIF; @@ -331,7 +331,7 @@ retry: s += 6; if (! spec->readStack->next) { /* Got an end with no %if ! */ - rpmError(RPMERR_UNMATCHEDIF, + rpmlog(RPMERR_UNMATCHEDIF, _("%s:%d: Got a %%endif with no %%if\n"), ofi->fileName, ofi->lineNum); return RPMERR_UNMATCHEDIF; @@ -346,7 +346,7 @@ retry: s += 8; fileName = s; if (! xisspace(*fileName)) { - rpmError(RPMERR_BADSPEC, _("malformed %%include statement\n")); + rpmlog(RPMERR_BADSPEC, _("malformed %%include statement\n")); return RPMERR_BADSPEC; } SKIPSPACE(fileName); @@ -355,7 +355,7 @@ retry: p = endFileName; SKIPSPACE(p); if (*p != '\0') { - rpmError(RPMERR_BADSPEC, _("malformed %%include statement\n")); + rpmlog(RPMERR_BADSPEC, _("malformed %%include statement\n")); return RPMERR_BADSPEC; } *endFileName = '\0'; @@ -427,7 +427,7 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL, (void) urlPath(buildRootURL, &buildRoot); if (*buildRoot == '\0') buildRoot = "/"; if (!strcmp(buildRoot, "/")) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("BuildRoot can not be \"/\": %s\n"), buildRootURL); return RPMERR_BADSPEC; } @@ -546,7 +546,7 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL, spec->BACount = index; if (! index) { - rpmError(RPMERR_BADSPEC, + rpmlog(RPMERR_BADSPEC, _("No compatible architectures found for build\n")); spec = freeSpec(spec); return RPMERR_BADSPEC; @@ -604,7 +604,7 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootURL, if (!headerIsEntry(pkg->header, RPMTAG_DESCRIPTION)) { const char * name; (void) headerNVR(pkg->header, &name, NULL, NULL); - rpmError(RPMERR_BADSPEC, _("Package has no %%description: %s\n"), + rpmlog(RPMERR_BADSPEC, _("Package has no %%description: %s\n"), name); spec = freeSpec(spec); return RPMERR_BADSPEC; diff --git a/build/poptBT.c b/build/poptBT.c index df266e88e..0cedba01a 100644 --- a/build/poptBT.c +++ b/build/poptBT.c @@ -94,7 +94,7 @@ static void buildArgCallback( poptContext con, case POPT_RMBUILD: rba->buildAmount |= RPMBUILD_RMBUILD; break; case POPT_BUILDROOT: if (rba->buildRootOverride) { - rpmError(RPMERR_BUILDROOT, _("buildroot already specified, ignoring %s\n"), arg); + rpmlog(RPMERR_BUILDROOT, _("buildroot already specified, ignoring %s\n"), arg); break; } rba->buildRootOverride = xstrdup(arg); diff --git a/build/rpmfc.c b/build/rpmfc.c index 944bb9dae..625913f4f 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -119,12 +119,12 @@ static StringBuf getOutputFrom(const char * dir, ARGV_t argv, unsetenv("MALLOC_CHECK_"); (void) execvp(argv[0], (char *const *)argv); /* XXX this error message is probably not seen. */ - rpmError(RPMERR_EXEC, _("Couldn't exec %s: %s\n"), + rpmlog(RPMERR_EXEC, _("Couldn't exec %s: %s\n"), argv[0], strerror(errno)); _exit(RPMERR_EXEC); } if (child < 0) { - rpmError(RPMERR_FORK, _("Couldn't fork %s: %s\n"), + rpmlog(RPMERR_FORK, _("Couldn't fork %s: %s\n"), argv[0], strerror(errno)); return NULL; } @@ -210,11 +210,11 @@ top: (unsigned)child, (unsigned)reaped, status); if (failNonZero && (!WIFEXITED(status) || WEXITSTATUS(status))) { - rpmError(RPMERR_EXEC, _("%s failed\n"), argv[0]); + rpmlog(RPMERR_EXEC, _("%s failed\n"), argv[0]); return NULL; } if (writeBytesLeft) { - rpmError(RPMERR_EXEC, _("failed to write all data to %s\n"), argv[0]); + rpmlog(RPMERR_EXEC, _("failed to write all data to %s\n"), argv[0]); return NULL; } return readBuff; @@ -1233,7 +1233,7 @@ int rpmfcClassify(rpmfc fc, ARGV_t argv, int_16 * fmode) ms = magic_open(msflags); if (ms == NULL) { xx = RPMERR_EXEC; - rpmError(xx, _("magic_open(0x%x) failed: %s\n"), + rpmlog(xx, _("magic_open(0x%x) failed: %s\n"), msflags, strerror(errno)); assert(ms != NULL); /* XXX figger a proper return path. */ } @@ -1241,7 +1241,7 @@ assert(ms != NULL); /* XXX figger a proper return path. */ xx = magic_load(ms, NULL); if (xx == -1) { xx = RPMERR_EXEC; - rpmError(xx, _("magic_load failed: %s\n"), magic_error(ms)); + rpmlog(xx, _("magic_load failed: %s\n"), magic_error(ms)); assert(xx != -1); /* XXX figger a proper return path. */ } @@ -1285,7 +1285,7 @@ assert(s != NULL); if (ftype == NULL) { xx = RPMERR_EXEC; - rpmError(xx, _("magic_file(ms, \"%s\") failed: mode %06o %s\n"), + rpmlog(xx, _("magic_file(ms, \"%s\") failed: mode %06o %s\n"), s, mode, magic_error(ms)); assert(ftype != NULL); /* XXX figger a proper return path. */ } @@ -1499,7 +1499,7 @@ static int rpmfcGenerateDependsHelper(const rpmSpec spec, Package pkg, rpmfi fi) if (sb_stdout == NULL) { rc = RPMERR_EXEC; - rpmError(rc, _("Failed to find %s:\n"), dm->msg); + rpmlog(rc, _("Failed to find %s:\n"), dm->msg); break; } @@ -1508,7 +1508,7 @@ static int rpmfcGenerateDependsHelper(const rpmSpec spec, Package pkg, rpmfi fi) sb_stdout = freeStringBuf(sb_stdout); if (rc) { - rpmError(rc, _("Failed to find %s:\n"), dm->msg); + rpmlog(rc, _("Failed to find %s:\n"), dm->msg); break; } } diff --git a/build/spec.c b/build/spec.c index 21dfdf426..d8765e939 100644 --- a/build/spec.c +++ b/build/spec.c @@ -221,13 +221,13 @@ int parseNoSource(rpmSpec spec, const char * field, int tag) if (*fe != '\0') fe++; if (parseNum(f, &num)) { - rpmError(RPMERR_BADSPEC, _("line %d: Bad number: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Bad number: %s\n"), spec->lineNum, f); return RPMERR_BADSPEC; } if (! (p = findSource(spec, num, flag))) { - rpmError(RPMERR_BADSPEC, _("line %d: Bad no%s number: %d\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Bad no%s number: %d\n"), spec->lineNum, name, num); return RPMERR_BADSPEC; } @@ -286,7 +286,7 @@ int addSource(rpmSpec spec, Package pkg, const char *field, int tag) num = 0; } else { if (parseNum(buf, &num)) { - rpmError(RPMERR_BADSPEC, _("line %d: Bad %s number: %s\n"), + rpmlog(RPMERR_BADSPEC, _("line %d: Bad %s number: %s\n"), spec->lineNum, name, spec->line); return RPMERR_BADSPEC; } @@ -587,7 +587,7 @@ printNewSpecfile(rpmSpec spec) /* XXX this should use queryHeader(), but prints out tn as well. */ msgstr = headerSprintf(h, fmt, rpmTagTable, rpmHeaderFormats, &errstr); if (msgstr == NULL) { - rpmError(RPMERR_QFMT, _("can't query %s: %s\n"), tn, errstr); + rpmlog(RPMERR_QFMT, _("can't query %s: %s\n"), tn, errstr); return; } @@ -652,7 +652,7 @@ int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg) cookie, anyarch, force) || (spec = rpmtsSetSpec(ts, NULL)) == NULL) { - rpmError(RPMERR_QUERY, + rpmlog(RPMERR_QUERY, _("query of specfile %s failed, can't parse\n"), arg); goto exit; } |