diff options
66 files changed, 1322 insertions, 1106 deletions
@@ -1,7 +1,7 @@ -I. -I./build -I./lib -I./rpmdb -I./rpmio -I./beecrypt -I./popt -I/usr/lib/gcc-lib/i386-redhat-linux/2.96/include -DHAVE_CONFIG_H -D_GNU_SOURCE -D_REENTRANT -DHAVE_DEV_DSP -DHAVE_SYS_SOUNDCARD #+partial -#+forcehints ++forcehints -warnunixlib -warnposix @@ -26,7 +26,6 @@ -ifblock # tedious -incondefs # <bits/{ipc,pthreadtypes}.h> heartburn -matchfields # <bits/ipc.h> heartburn --mods # 281 occurences, errno will be a pita -namechecks # tedious ANSI compliance checks -numenummembers 1024 # RPMTAG has 138 members -numstructfields 256 # Java jni.h has 229 fields @@ -34,7 +33,6 @@ -strictops -strictusereleased -stringliterallen 4096 # redhat*PubKey's are big --usedef # 303 occurences, HGE_t needs work -whileblock # tedious # --- random anal-retentive parameters @@ -54,13 +52,12 @@ +enumint # 93 occurences -mustfree # 1612 occurences, _free and alloca are painful -predboolptr # 773 occurences +-usedef # 303 occurences, HGE_t needs work # --- not-yet at standard level -boolops # 1898 occurences -predboolint # 1248 occurences -#-type # 3019 occurences -+boolint -+charint -+ignorequals -+ignoresigns -+matchanyintegral ++boolint # 74 occurences ++charint # 529 occurences ++ignorequals # 138 occurences ++matchanyintegral # 225 occurences @@ -18,7 +18,7 @@ */ static int checkSpec(Header h) /*@globals rpmGlobalMacroContext, fileSystem @*/ - /*@modifies h, fileSystem @*/ + /*@modifies h, rpmGlobalMacroContext, fileSystem @*/ { const char * rootdir = NULL; rpmdb db = NULL; @@ -109,7 +109,7 @@ static int buildForTarget(const char * arg, BTA_t ba, const char * passPhrase, char * cookie) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/ + /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/ { int buildAmount = ba->buildAmount; const char * buildRootURL = NULL; @@ -7,9 +7,10 @@ extern "C" { int build(const char * arg, BTA_t ba, const char * passPhrase, char * cookie, /*@null@*/ const char * rcfile) - /*@globals rpmGlobalMacroContext, + /*@globals rpmGlobalMacroContext, rpmCLIMacroContext, fileSystem, internalState @*/ - /*@modifies ba->buildAmount, fileSystem, internalState @*/; + /*@modifies ba->buildAmount, rpmGlobalMacroContext, rpmCLIMacroContext, + fileSystem, internalState @*/; #ifdef __cplusplus } diff --git a/build/build.c b/build/build.c index a92541043..18d13b7a7 100644 --- a/build/build.c +++ b/build/build.c @@ -22,7 +22,7 @@ static int _build_debug = 0; static void doRmSource(Spec spec) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies fileSystem @*/ + /*@modifies rpmGlobalMacroContext, fileSystem @*/ { struct Source *p; Package pkg; @@ -211,7 +211,9 @@ fprintf(stderr, "*** addMacros\n"); rpmMessage(RPMMESS_NORMAL, _("Executing(%s): %s\n"), name, buildCmd); if (!(child = fork())) { + /*@-mods@*/ errno = 0; + /*@=mods@*/ (void) execvp(argv[0], (char *const *)argv); rpmError(RPMERR_SCRIPT, _("Exec of %s failed (%s): %s\n"), diff --git a/build/buildio.h b/build/buildio.h index a84da6c7d..e36ee7eb9 100644 --- a/build/buildio.h +++ b/build/buildio.h @@ -41,7 +41,7 @@ extern "C" { /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ /*@modifies *specp, *lead, *sigs, csa, csa->cpioFdIn, - fileSystem, internalState @*/; + rpmGlobalMacroContext, fileSystem, internalState @*/; /** * Write rpm package to file. @@ -66,7 +66,7 @@ int writeRPM(Header * hdrp, /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ /*@modifies *hdrp, *cookie, csa, csa->cpioArchiveSize, - fileSystem, internalState @*/; + rpmGlobalMacroContext, fileSystem, internalState @*/; #ifdef __cplusplus } diff --git a/build/expression.c b/build/expression.c index 817e4dc20..8921c3294 100644 --- a/build/expression.c +++ b/build/expression.c @@ -183,7 +183,8 @@ static const char *prToken(int val) */ static int rdToken(ParseState state) /*@globals rpmGlobalMacroContext @*/ - /*@modifies state->nextToken @*/ + /*@modifies state->nextToken, state->p, state->tokenValue, + rpmGlobalMacroContext @*/ { int token; Value v = NULL; @@ -319,14 +320,16 @@ static int rdToken(ParseState state) static Value doLogical(ParseState state) /*@globals rpmGlobalMacroContext @*/ - /*@modifies state->nextToken @*/; + /*@modifies state->nextToken, state->p, state->tokenValue, + rpmGlobalMacroContext @*/; /** * @param state expression parser state */ static Value doPrimary(ParseState state) /*@globals rpmGlobalMacroContext @*/ - /*@modifies state->nextToken @*/ + /*@modifies state->nextToken, state->p, state->tokenValue, + rpmGlobalMacroContext @*/ { Value v; @@ -406,7 +409,8 @@ static Value doPrimary(ParseState state) */ static Value doMultiplyDivide(ParseState state) /*@globals rpmGlobalMacroContext @*/ - /*@modifies state->nextToken @*/ + /*@modifies state->nextToken, state->p, state->tokenValue, + rpmGlobalMacroContext @*/ { Value v1, v2 = NULL; @@ -459,7 +463,8 @@ static Value doMultiplyDivide(ParseState state) */ static Value doAddSubtract(ParseState state) /*@globals rpmGlobalMacroContext @*/ - /*@modifies state->nextToken @*/ + /*@modifies state->nextToken, state->p, state->tokenValue, + rpmGlobalMacroContext @*/ { Value v1, v2 = NULL; @@ -521,7 +526,8 @@ static Value doAddSubtract(ParseState state) */ static Value doRelational(ParseState state) /*@globals rpmGlobalMacroContext @*/ - /*@modifies state->nextToken @*/ + /*@modifies state->nextToken, state->p, state->tokenValue, + rpmGlobalMacroContext @*/ { Value v1, v2 = NULL; @@ -616,7 +622,8 @@ static Value doRelational(ParseState state) */ static Value doLogical(ParseState state) /*@globals rpmGlobalMacroContext @*/ - /*@modifies state->nextToken, rpmGlobalMacroContext @*/ + /*@modifies state->nextToken, state->p, state->tokenValue, + rpmGlobalMacroContext @*/ { Value v1, v2 = NULL; diff --git a/build/files.c b/build/files.c index 2e45354b5..adbadf6b0 100644 --- a/build/files.c +++ b/build/files.c @@ -782,7 +782,7 @@ static int parseForLang(char * buf, FileList fl) */ static int parseForRegexLang(const char * fileName, /*@out@*/ char ** lang) /*@globals rpmGlobalMacroContext @*/ - /*@modifies *lang @*/ + /*@modifies *lang, rpmGlobalMacroContext @*/ { static int initialized = 0; static int hasRegex = 0; @@ -889,7 +889,7 @@ static int parseForSimple(/*@unused@*/Spec spec, Package pkg, char * buf, fl->currentFlags, fl->docDirs, fl->docDirCount, fl->isDir, fl->passedSpecialDoc, fl->isSpecialDoc, - pkg->specialDoc @*/ + pkg->specialDoc, rpmGlobalMacroContext @*/ { char *s, *t; int res, specialDoc = 0; @@ -1113,7 +1113,7 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl, /*@globals rpmGlobalMacroContext, fileSystem @*/ /*@modifies h, *cpioList, fl->processingFailed, fl->fileList, - fileSystem @*/ + rpmGlobalMacroContext, fileSystem @*/ { int _addDotSlash = !(isSrc || rpmExpandNumeric("%{_noPayloadPrefix}")); uint_32 multiLibMask = 0; @@ -1436,7 +1436,7 @@ static /*@null@*/ FileListRec freeFileList(/*@only@*/ FileListRec fileList, static int addFile(FileList fl, const char * diskURL, struct stat * statp) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies *statp, fl->processingFailed, + /*@modifies *statp, *fl, fl->processingFailed, fl->fileList, fl->fileListRecsAlloced, fl->fileListRecsUsed, fl->totalFileSize, fl->fileCount, fl->inFtw, fl->isDir, rpmGlobalMacroContext, fileSystem @*/ @@ -1652,10 +1652,10 @@ static int processBinaryFile(/*@unused@*/ Package pkg, FileList fl, const char * fileURL) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies fl->processingFailed, + /*@modifies *fl, fl->processingFailed, fl->fileList, fl->fileListRecsAlloced, fl->fileListRecsUsed, fl->totalFileSize, fl->fileCount, fl->inFtw, fl->isDir, - fileSystem @*/ + rpmGlobalMacroContext, fileSystem @*/ { int doGlob; const char *diskURL = NULL; @@ -1729,7 +1729,7 @@ static int processPackageFiles(Spec spec, Package pkg, fileSystem, internalState@*/ /*@modifies spec->macros, pkg->cpioList, pkg->fileList, pkg->specialDoc, pkg->header, - fileSystem, internalState @*/ + rpmGlobalMacroContext, fileSystem, internalState @*/ { HGE_t hge = (HGE_t)headerGetEntryMinMemory; struct FileList_s fl; @@ -2386,7 +2386,8 @@ DepMsg_t depMsgs[] = { static int generateDepends(Spec spec, Package pkg, TFI_t cpioList, int multiLib) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies cpioList, fileSystem, internalState @*/ + /*@modifies cpioList, rpmGlobalMacroContext, + fileSystem, internalState @*/ { TFI_t fi = cpioList; StringBuf writeBuf; diff --git a/build/myftw.c b/build/myftw.c index 73004217a..65199ac4f 100644 --- a/build/myftw.c +++ b/build/myftw.c @@ -57,8 +57,8 @@ myftw_dir (DIR **dirs, int level, int descriptors, char *dir, size_t len, myftwFunc func, void *fl) - /*@globals fileSystem@*/ - /*@modifies fileSystem@*/ + /*@globals errno, fileSystem @*/ + /*@modifies *dirs, *dir, errno, fileSystem @*/ { int got; struct dirent *entry; @@ -237,7 +237,9 @@ int myftw (const char *dir, save = errno; (void) Closedir (dirs[0]); + /*@-mods@*/ errno = save; + /*@=mods@*/ } } diff --git a/build/names.c b/build/names.c index bd4a14fae..d3a1c1d52 100644 --- a/build/names.c +++ b/build/names.c @@ -1,3 +1,4 @@ +/*@-mods@*/ /** \ingroup rpmbuild * \file build/names.c * Simple user/group name/id cache (plus hostname and buildtime) @@ -197,3 +198,4 @@ const char *const buildHost(void) } return(hostname); } +/*@=mods@*/ diff --git a/build/pack.c b/build/pack.c index fc238dd6c..e0b40c71f 100644 --- a/build/pack.c +++ b/build/pack.c @@ -50,7 +50,7 @@ static int cpio_doio(FD_t fdo, /*@unused@*/ Header h, CSA_t csa, const char * fmodeMacro) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies fdo, csa, fileSystem @*/ + /*@modifies fdo, csa, rpmGlobalMacroContext, fileSystem @*/ { const char * rootDir = "/"; rpmdb rpmdb = NULL; @@ -125,7 +125,7 @@ static /*@only@*/ /*@null@*/ StringBuf addFileToTagAux(Spec spec, const char * file, /*@only@*/ StringBuf sb) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies fileSystem @*/ + /*@modifies rpmGlobalMacroContext, fileSystem @*/ { char buf[BUFSIZ]; const char * fn = buf; @@ -163,7 +163,7 @@ static /*@only@*/ /*@null@*/ StringBuf addFileToTagAux(Spec spec, static int addFileToTag(Spec spec, const char * file, Header h, int tag) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies h, fileSystem @*/ + /*@modifies h, rpmGlobalMacroContext, fileSystem @*/ { HGE_t hge = (HGE_t)headerGetEntryMinMemory; StringBuf sb = newStringBuf(); @@ -188,7 +188,7 @@ static int addFileToTag(Spec spec, const char * file, Header h, int tag) static int addFileToArrayTag(Spec spec, const char *file, Header h, int tag) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies h, fileSystem @*/ + /*@modifies h, rpmGlobalMacroContext, fileSystem @*/ { StringBuf sb = newStringBuf(); char *s; @@ -208,7 +208,7 @@ static int addFileToArrayTag(Spec spec, const char *file, Header h, int tag) static int processScriptFiles(Spec spec, Package pkg) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies pkg->header, fileSystem @*/ + /*@modifies pkg->header, rpmGlobalMacroContext, fileSystem @*/ { struct TriggerFileEntry *p; @@ -363,8 +363,8 @@ static unsigned char header_magic[8] = { static int rpmpkg_version = -1; static int rpmLeadVersion(void) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies rpmGlobalMacroContext @*/ + /*@globals rpmpkg_version, rpmGlobalMacroContext @*/ + /*@modifies rpmpkg_version, rpmGlobalMacroContext @*/ { int rpmlead_version; diff --git a/build/parseDescription.c b/build/parseDescription.c index b27312695..bd0b37301 100644 --- a/build/parseDescription.c +++ b/build/parseDescription.c @@ -38,8 +38,10 @@ int parseDescription(Spec spec) poptContext optCon = NULL; spectag t = NULL; + /*@-mods@*/ name = NULL; lang = RPMBUILD_DEFAULT_LANG; + /*@=mods@*/ if ((rc = poptParseArgvString(spec->line, &argc, &argv))) { rpmError(RPMERR_BADSPEC, _("line %d: Error parsing %%description: %s\n"), @@ -65,8 +67,10 @@ int parseDescription(Spec spec) } if (poptPeekArg(optCon)) { + /*@-mods@*/ if (name == NULL) name = poptGetArg(optCon); + /*@=mods@*/ if (poptPeekArg(optCon)) { rpmError(RPMERR_BADSPEC, _("line %d: Too many names: %s\n"), spec->lineNum, diff --git a/build/parseFiles.c b/build/parseFiles.c index f6ee8c90c..759fc0ca6 100644 --- a/build/parseFiles.c +++ b/build/parseFiles.c @@ -33,7 +33,10 @@ int parseFiles(Spec spec) int flag = PART_SUBNAME; poptContext optCon = NULL; - name = file = NULL; + /*@-mods@*/ + name = NULL; + file = NULL; + /*@=mods@*/ if ((rc = poptParseArgvString(spec->line, &argc, &argv))) { rpmError(RPMERR_BADSPEC, _("line %d: Error parsing %%files: %s\n"), @@ -59,8 +62,10 @@ int parseFiles(Spec spec) } if (poptPeekArg(optCon)) { + /*@-mods@*/ if (name == NULL) name = poptGetArg(optCon); + /*@=mods@*/ if (poptPeekArg(optCon)) { rpmError(RPMERR_BADSPEC, _("line %d: Too many names: %s\n"), spec->lineNum, diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 933401b69..331086ad1 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -322,7 +322,7 @@ static struct optionalTag { */ static void fillOutMainPackage(Header h) /*@globals rpmGlobalMacroContext @*/ - /*@modifies h @*/ + /*@modifies h, rpmGlobalMacroContext @*/ { struct optionalTag *ot; @@ -341,7 +341,7 @@ static void fillOutMainPackage(Header h) static int readIcon(Header h, const char * file) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies h, fileSystem @*/ + /*@modifies h, rpmGlobalMacroContext, fileSystem @*/ { const char *fn = NULL; char *icon; @@ -450,7 +450,7 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro, spec->buildRestrictions, spec->BANames, spec->BACount, spec->line, spec->gotBuildRootURL, pkg->header, pkg->autoProv, pkg->autoReq, pkg->icon, - fileSystem @*/ + rpmGlobalMacroContext, fileSystem @*/ { HGE_t hge = (HGE_t)headerGetEntryMinMemory; HFD_t hfd = headerFreeData; diff --git a/build/parsePrep.c b/build/parsePrep.c index 5879383be..1728abc86 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -68,7 +68,7 @@ static int checkOwners(const char * urlfn) int reverse, int removeEmpties) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies fileSystem @*/ + /*@modifies rpmGlobalMacroContext, fileSystem @*/ { const char *fn, *urlfn; static char buf[BUFSIZ]; @@ -161,7 +161,7 @@ static int checkOwners(const char * urlfn) /*@observer@*/ static const char *doUntar(Spec spec, int c, int quietly) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies fileSystem @*/ + /*@modifies rpmGlobalMacroContext, fileSystem @*/ { const char *fn, *urlfn; static char buf[BUFSIZ]; @@ -280,7 +280,7 @@ static int doSetupMacro(Spec spec, char *line) /*@globals rpmGlobalMacroContext, fileSystem@*/ /*@modifies spec->buildSubdir, spec->macros, spec->prep, - fileSystem @*/ + rpmGlobalMacroContext, fileSystem @*/ { char buf[BUFSIZ]; StringBuf before; @@ -293,9 +293,11 @@ static int doSetupMacro(Spec spec, char *line) int rc; int num; + /*@-mods@*/ leaveDirs = skipDefaultAction = 0; createDir = quietly = 0; dirName = NULL; + /*@=mods@*/ if ((rc = poptParseArgvString(line, &argc, &argv))) { rpmError(RPMERR_BADSPEC, _("Error parsing %%setup: %s\n"), @@ -433,7 +435,7 @@ static int doSetupMacro(Spec spec, char *line) static int doPatchMacro(Spec spec, char *line) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies spec->prep, fileSystem @*/ + /*@modifies spec->prep, rpmGlobalMacroContext, fileSystem @*/ { char *opt_b; int opt_P, opt_p, opt_R, opt_E; diff --git a/build/parseScript.c b/build/parseScript.c index db0af7f7d..95c88921f 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -96,9 +96,11 @@ int parseScript(Spec spec, int parsePart) poptContext optCon = NULL; reqargs[0] = '\0'; + /*@-mods@*/ name = NULL; prog = "/bin/sh"; file = NULL; + /*@=mods@*/ /*@-branchstate@*/ switch (parsePart) { @@ -203,8 +205,10 @@ int parseScript(Spec spec, int parsePart) } if (poptPeekArg(optCon)) { + /*@-mods@*/ if (name == NULL) name = poptGetArg(optCon); + /*@=mods@*/ if (poptPeekArg(optCon)) { rpmError(RPMERR_BADSPEC, _("line %d: Too many names: %s\n"), spec->lineNum, diff --git a/build/parseSpec.c b/build/parseSpec.c index 1727b1d3c..2835bfe54 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -118,8 +118,10 @@ static void forceIncludeFile(Spec spec, const char * fileName) */ static int copyNextLine(Spec spec, OFI_t *ofi, int strip) /*@globals rpmGlobalMacroContext, - fileSystem@*/ - /*@modifies spec->nextline, fileSystem @*/ + fileSystem @*/ + /*@modifies spec->nextline, spec->nextpeekc, spec->lbuf, spec->line, + ofi->readPtr, + rpmGlobalMacroContext, fileSystem @*/ { char *last; char ch; diff --git a/build/rpmbuild.h b/build/rpmbuild.h index 4ec66bb97..aef25de0f 100644 --- a/build/rpmbuild.h +++ b/build/rpmbuild.h @@ -156,7 +156,8 @@ int readLine(Spec spec, int strip) /*@globals rpmGlobalMacroContext, fileSystem@*/ /*@modifies spec->fileStack, spec->readStack, spec->line, spec->lineNum, - spec->sl, fileSystem @*/; + spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl, + rpmGlobalMacroContext, fileSystem @*/; /** \ingroup rpmbuild * Stop reading from spec file, freeing resources. @@ -197,7 +198,7 @@ int parseNum(/*@null@*/ const char * line, /*@null@*/ /*@out@*/int * res) * @param text description of change */ void addChangelogEntry(Header h, time_t time, const char * name, - const char * text) + const char * text) /*@modifies h @*/; /** \ingroup rpmbuild @@ -211,7 +212,8 @@ int parseBuildInstallClean(Spec spec, rpmParseState parsePart) fileSystem @*/ /*@modifies spec->build, spec->install, spec->clean, spec->macros, spec->fileStack, spec->readStack, spec->line, spec->lineNum, - spec->sl, fileSystem @*/; + spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl, + rpmGlobalMacroContext, fileSystem @*/; /** \ingroup rpmbuild * Parse %%changelog section of a spec file. @@ -222,8 +224,9 @@ int parseChangelog(Spec spec) /*@globals rpmGlobalMacroContext, fileSystem@*/ /*@modifies spec->fileStack, spec->readStack, spec->line, spec->lineNum, - spec->sl, - spec->packages->header, fileSystem @*/; + spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl, + spec->packages->header, + rpmGlobalMacroContext, fileSystem @*/; /** \ingroup rpmbuild * Parse %%description section of a spec file. @@ -235,7 +238,9 @@ int parseDescription(Spec spec) fileSystem@*/ /*@modifies spec->packages, spec->fileStack, spec->readStack, spec->line, spec->lineNum, - spec->sl, spec->st, fileSystem @*/; + spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl, + spec->st, + rpmGlobalMacroContext, fileSystem @*/; /** \ingroup rpmbuild * Parse %%files section of a spec file. @@ -247,7 +252,8 @@ int parseFiles(Spec spec) fileSystem@*/ /*@modifies spec->packages, spec->fileStack, spec->readStack, spec->line, spec->lineNum, - spec->sl, fileSystem @*/; + spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl, + rpmGlobalMacroContext, fileSystem @*/; /** \ingroup rpmbuild * Parse tags from preamble of a spec file. @@ -260,11 +266,13 @@ int parsePreamble(Spec spec, int initialPackage) fileSystem, internalState @*/ /*@modifies spec->packages, spec->fileStack, spec->readStack, spec->line, spec->lineNum, - spec->buildSubdir, spec->sl, + spec->buildSubdir, spec->macros, spec->st, spec->buildRootURL, spec->sources, spec->numSources, spec->noSource, spec->buildRestrictions, spec->BANames, spec->BACount, - spec->gotBuildRootURL, fileSystem, internalState @*/; + spec->gotBuildRootURL, + spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl, + rpmGlobalMacroContext, fileSystem, internalState @*/; /** \ingroup rpmbuild * Parse %%prep section of a spec file. @@ -276,7 +284,8 @@ int parsePrep(Spec spec) fileSystem@*/ /*@modifies spec->prep, spec->buildSubdir, spec->macros, spec->fileStack, spec->readStack, spec->line, spec->lineNum, - spec->sl, fileSystem @*/; + spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl, + rpmGlobalMacroContext, fileSystem @*/; /** \ingroup rpmbuild * Parse dependency relations from spec file and/or autogenerated output buffer. @@ -304,7 +313,8 @@ int parseScript(Spec spec, int parsePart) fileSystem@*/ /*@modifies spec->packages, spec->fileStack, spec->readStack, spec->line, spec->lineNum, - spec->sl, fileSystem @*/; + spec->nextline, spec->nextpeekc, spec->lbuf, spec->sl, + rpmGlobalMacroContext, fileSystem @*/; /** \ingroup rpmbuild * Evaluate boolean expression. @@ -417,7 +427,7 @@ int processBinaryFiles(Spec spec, int installSpecialDoc, int test) /*@modifies spec->macros, spec->packages->cpioList, spec->packages->fileList, spec->packages->specialDoc, spec->packages->header, - fileSystem, internalState @*/; + rpmGlobalMacroContext, fileSystem, internalState @*/; /** \ingroup rpmbuild * Create and initialize header for source package. @@ -439,7 +449,7 @@ int processSourceFiles(Spec spec) /*@modifies spec->sourceHeader, spec->sourceCpioList, spec->buildRestrictions, spec->BANames, spec->packages->header, - fileSystem @*/; + rpmGlobalMacroContext, fileSystem @*/; /** \ingroup rpmbuild * Parse spec file into spec control structure. @@ -464,7 +474,7 @@ int parseSpec(/*@out@*/ Spec * specp, const char * specFile, /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ /*@modifies *specp, - fileSystem, internalState @*/; + rpmGlobalMacroContext, fileSystem, internalState @*/; /** \ingroup rpmbuild * @retval specp spec file control structure @@ -489,7 +499,7 @@ extern int (*parseSpecVec) (Spec * specp, const char * specFile, /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ /*@modifies *specp, - fileSystem, internalState @*/; + rpmGlobalMacroContext, fileSystem, internalState @*/; /*@=declundef@*/ /** \ingroup rpmbuild @@ -508,7 +518,7 @@ int buildSpec(Spec spec, int what, int test) spec->buildRestrictions, spec->BANames, spec->packages->cpioList, spec->packages->fileList, spec->packages->specialDoc, spec->packages->header, - fileSystem, internalState @*/; + rpmGlobalMacroContext, fileSystem, internalState @*/; /** \ingroup rpmbuild * Generate binary package(s). @@ -520,7 +530,7 @@ int packageBinaries(Spec spec) fileSystem, internalState @*/ /*@modifies spec->packages->header, spec->sourceRpmName, - fileSystem, internalState @*/; + rpmGlobalMacroContext, fileSystem, internalState @*/; /** \ingroup rpmbuild * Generate source package. @@ -532,7 +542,7 @@ int packageSources(Spec spec) fileSystem, internalState @*/ /*@modifies spec->sourceHeader, spec->cookie, spec->sourceRpmName, - fileSystem, internalState @*/; + rpmGlobalMacroContext, fileSystem, internalState @*/; /*@=redecl@*/ #ifdef __cplusplus diff --git a/build/rpmspec.h b/build/rpmspec.h index b57713aee..22b3be8f5 100644 --- a/build/rpmspec.h +++ b/build/rpmspec.h @@ -220,7 +220,8 @@ int addSource(Spec spec, Package pkg, const char * field, int tag) /*@globals rpmGlobalMacroContext @*/ /*@modifies spec->sources, spec->numSources, spec->st, spec->macros, - pkg->icon @*/; + pkg->icon, + rpmGlobalMacroContext @*/; /** \ingroup rpmbuild * @param spec spec file control structure diff --git a/build/spec.c b/build/spec.c index 53a26e4ab..bf7f2b4b5 100644 --- a/build/spec.c +++ b/build/spec.c @@ -454,7 +454,7 @@ Spec newSpec(void) spec->force = 0; spec->anyarch = 0; - spec->macros = rpmGlobalMacroContext; +/*@i@*/ spec->macros = rpmGlobalMacroContext; return spec; } diff --git a/lib/.lclintrc b/lib/.lclintrc index 951938cc2..7bb3a9fa7 100644 --- a/lib/.lclintrc +++ b/lib/.lclintrc @@ -1,46 +1,59 @@ -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -DHAVE_CONFIG_H -D_GNU_SOURCE +partial ++forcehints -warnunixlib -warnposix +unixlib -# XXX ignore doxygen markings --unrecogcomments - -#+mustmod # segfault in psm.c:597 -+proto-param-match - -#-cpp-names -#-declundef # db3 is noisy -#-deepbreak # 485 cases -#-export-local -#-export-header -#-export-header-var - -# don't-bother-me-yet parameters --branchstate # ~140 painful --mustfree # ~588 alloca is painful - -# not-yet normal parameters --boolops # ~831 w->n --predboolint # ~574 w->n --type # ~872 - -# -weak paramaters -#+boolint -#-boolops -#+ignorequals -#+ignoresigns -#-mustfree -#+longintegral -#+matchanyintegral -#-nullpass -#-observertrans -#-predboolint -#-predboolothers -#-retvalint -#-retvalother -#-shiftsigned +-unrecogcomments # XXX ignore doxygen markings + ++strict # lclint level + +# --- +partial artifacts +-declundef +-exportheadervar +-exportlocal + +-enummemuse +-fcnuse +-typeuse +-varuse + +# --- not-yet at strict level +-bitwisesigned # pita +-elseifcomplete # 95 occurences +-exportconst # 839 occurences +-exportfcn +-exporttype +-exportvar +-fielduse # 1 occurence <bits/sigset.h> +-forblock # tedious +-ifblock # tedious +-incondefs # <bits/{ipc,pthreadtypes}.h> heartburn +-matchfields # <bits/ipc.h> heartburn +-namechecks # tedious ANSI compliance checks +-numenummembers 1024 # RPMTAG has 138 members +-numstructfields 256 # Java jni.h has 229 fields +-ptrarith # tedious +-strictops +-strictusereleased +-stringliterallen 4096 # redhat*PubKey's are big +-whileblock # tedious + +# --- not-yet at checks level +-ansi-reserved ++enumint +-mustfree +-predboolptr +-usedef + +# --- not-yet at standard level +-boolops +-predboolint ++boolint ++charint ++ignorequals ++matchanyintegral diff --git a/lib/Makefile.am b/lib/Makefile.am index a58169777..f24816d78 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -69,6 +69,7 @@ getdate.c: getdate.y echo "/*@-retvalint -usedef -varuse -nullderef -nullassign @*/";\ echo "/*@-readonlytrans -modunconnomods -compdef -noeffectuncon @*/";\ echo "/*@-globs -evalorderuncon -modobserveruncon -modnomods @*/";\ + echo "/*@unused@*/";\ sed -e 's,y.tab.c,getdate.c,' y.tab.c \ -e 's,^YYSTYPE ,static &,' \ -e 's,^short ,static &,' \ diff --git a/lib/cpio.c b/lib/cpio.c index 8c5c2f1a0..efb7a83d4 100644 --- a/lib/cpio.c +++ b/lib/cpio.c @@ -15,11 +15,6 @@ /*@access FSM_t @*/ -/*@-exportheadervar@*/ -/*@unchecked@*/ -extern int _fsm_debug; -/*@=exportheadervar@*/ - /** * Convert string to unsigned integer (with buffer size check). * @param input string diff --git a/lib/depends.c b/lib/depends.c index 44728e091..a8e925ddf 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -528,12 +528,16 @@ static void parseEVR(char * evr, if (rp) *rp = release; } +/*@-exportheadervar@*/ /*@observer@*/ /*@unchecked@*/ const char *rpmNAME = PACKAGE; + /*@observer@*/ /*@unchecked@*/ const char *rpmEVR = VERSION; + /*@unchecked@*/ int rpmFLAGS = RPMSENSE_EQUAL; +/*@=exportheadervar@*/ int rpmRangesOverlap(const char * AName, const char * AEVR, int AFlags, const char * BName, const char * BEVR, int BFlags) @@ -1047,7 +1051,7 @@ alAllFileSatisfiesDepend(const availableList al, exit: dirName = _free(dirName); - /*@-mods@*/ /* FIX: al->list might be modified. */ + /*@-mods@*/ /* AOK: al->list not modified through ret alias. */ if (ret) ret[found] = NULL; /*@=mods@*/ @@ -1211,8 +1215,8 @@ static int unsatisfiedDepend(rpmTransactionSet ts, const char * keyType, const char * keyDepend, const char * keyName, const char * keyEVR, int keyFlags, /*@null@*/ /*@out@*/ struct availablePackage *** suggestion) - /*@globals fileSystem @*/ - /*@modifies ts, *suggestion, fileSystem @*/ + /*@globals _cacheDependsRC, fileSystem @*/ + /*@modifies ts, *suggestion, _cacheDependsRC, fileSystem @*/ { rpmdbMatchIterator mi; Header h; @@ -1254,7 +1258,7 @@ static int unsatisfiedDepend(rpmTransactionSet ts, } } -#ifdef DYING +#if defined(DYING) || defined(__LCLINT__) { static /*@observer@*/ const char noProvidesString[] = "nada"; static /*@observer@*/ const char * rcProvidesString = noProvidesString; const char * start; diff --git a/lib/depends.h b/lib/depends.h index 9f25da588..5758225f2 100644 --- a/lib/depends.h +++ b/lib/depends.h @@ -131,8 +131,8 @@ struct transactionElement { struct rpmTransactionSet_s { rpmtransFlags transFlags; /*!< Bit(s) to control operation. */ /*@null@*/ rpmCallbackFunction notify; /*!< Callback function. */ -/*@observer@*/ /*@null@*/ rpmCallbackData notifyData; - /*!< Callback private data. */ +/*@observer@*/ /*@null@*/ + rpmCallbackData notifyData; /*!< Callback private data. */ /*@dependent@*/ rpmProblemSet probs; /*!< Current problems in transaction. */ rpmprobFilterFlags ignoreSet; /*!< Bits to filter current problems. */ int filesystemCount; /*!< No. of mounted filesystems. */ @@ -176,7 +176,7 @@ extern "C" { /** \ingroup rpmdep * Compare package name-version-release from header with dependency, looking * for overlap. - * @deprecated Remove from API when obsoletes is correctly eliminated. + * @deprecated Remove from API when obsoletes is correctly implemented. * @param h header * @param reqName dependency name * @param reqEVR dependency [epoch:]version[-release] diff --git a/lib/formats.c b/lib/formats.c index 3e35628cf..b8adab0a3 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -251,8 +251,9 @@ static int instprefixTag(Header h, /*@null@*/ /*@out@*/ rpmTagType * type, static int fssizesTag(Header h, /*@out@*/ rpmTagType * type, /*@out@*/ const void ** data, /*@out@*/ int_32 * count, /*@out@*/ int * freeData) - /*@globals fileSystem, internalState @*/ - /*@modifies *type, *data, *count, *freeData, + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext, fileSystem, internalState @*/ { HGE_t hge = (HGE_t)headerGetEntryMinMemory; @@ -467,7 +468,7 @@ static int i18nTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type, /*@out@*/ const void ** data, /*@out@*/ int_32 * count, /*@out@*/ int * freeData) /*@globals rpmGlobalMacroContext @*/ - /*@modifies *type, *data, *count, *freeData @*/ + /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext @*/ { HGE_t hge = (HGE_t)headerGetEntryMinMemory; char * dstring = rpmExpand(_macro_i18ndomains, NULL); @@ -496,7 +497,7 @@ static int i18nTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type, /* change to en_US for msgkey -> msgid resolution */ langval = getenv(language); (void) setenv(language, "en_US", 1); - ++_nl_msg_cat_cntr; +/*@i@*/ ++_nl_msg_cat_cntr; msgid = NULL; for (domain = dstring; domain != NULL; domain = de) { @@ -511,7 +512,7 @@ static int i18nTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type, (void) setenv(language, langval, 1); else unsetenv(language); - ++_nl_msg_cat_cntr; +/*@i@*/ ++_nl_msg_cat_cntr; if (domain && msgid) { *data = /*@-unrecog@*/ dgettext(domain, msgid) /*@=unrecog@*/; @@ -552,7 +553,7 @@ static int summaryTag(Header h, /*@out@*/ rpmTagType * type, /*@out@*/ const void ** data, /*@out@*/ int_32 * count, /*@out@*/ int * freeData) /*@globals rpmGlobalMacroContext @*/ - /*@modifies *type, *data, *count, *freeData @*/ + /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext @*/ { return i18nTag(h, RPMTAG_SUMMARY, type, data, count, freeData); } @@ -569,7 +570,7 @@ static int descriptionTag(Header h, /*@out@*/ rpmTagType * type, /*@out@*/ const void ** data, /*@out@*/ int_32 * count, /*@out@*/ int * freeData) /*@globals rpmGlobalMacroContext @*/ - /*@modifies *type, *data, *count, *freeData @*/ + /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext @*/ { return i18nTag(h, RPMTAG_DESCRIPTION, type, data, count, freeData); } @@ -586,7 +587,7 @@ static int groupTag(Header h, /*@out@*/ rpmTagType * type, /*@out@*/ const void ** data, /*@out@*/ int_32 * count, /*@out@*/ int * freeData) /*@globals rpmGlobalMacroContext @*/ - /*@modifies *type, *data, *count, *freeData @*/ + /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext @*/ { return i18nTag(h, RPMTAG_GROUP, type, data, count, freeData); } @@ -1,3 +1,4 @@ +/*@-mods@*/ /** * \file lib/fs.c */ @@ -262,9 +263,7 @@ int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, int numFiles usages = xcalloc(numFilesystems, sizeof(usages)); - /*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ sourceDir = rpmGetPath("%{_sourcedir}", NULL); - /*@=globs@*/ maxLen = strlen(sourceDir); for (i = 0; i < numFiles; i++) { @@ -347,3 +346,4 @@ int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, int numFiles return 0; } /*@=usereleased =onlytrans@*/ +/*@=mods@*/ @@ -28,17 +28,13 @@ int strict_erasures = 0; rpmTransactionSet fsmGetTs(const FSM_t fsm) { const FSMI_t iter = fsm->iter; - /*@-retexpose@*/ return (iter ? iter->ts : NULL); - /*@=retexpose@*/ } TFI_t fsmGetFi(const FSM_t fsm) { const FSMI_t iter = fsm->iter; - /*@-retexpose@*/ return (iter ? iter->fi : NULL); - /*@=retexpose@*/ } #define SUFFIX_RPMORIG ".rpmorig" @@ -90,7 +86,7 @@ const char * fsmFsPath(/*@special@*/ /*@null@*/ const FSM_t fsm, static /*@null@*/ void * mapFreeIterator(/*@only@*//*@null@*/const void * p) /*@modifies *p @*/ { - return _free((void *)p); + return _free(p); } /*@=mustmod@*/ @@ -109,10 +105,8 @@ mapInitIterator(/*@kept@*/ const void * a, /*@kept@*/ const void * b) FSMI_t iter = NULL; iter = xcalloc(1, sizeof(*iter)); - /*@-assignexpose@*/ iter->ts = ts; iter->fi = fi; - /*@=assignexpose@*/ iter->reverse = (fi->type == TR_REMOVED && fi->action != FA_COPYOUT); iter->i = (iter->reverse ? (fi->fc - 1) : 0); iter->isave = iter->i; @@ -125,19 +119,21 @@ mapInitIterator(/*@kept@*/ const void * a, /*@kept@*/ const void * b) * @return next index, -1 on termination */ /*@-mustmod@*/ /* LCL: *a is modified */ -static int mapNextIterator(void * a) +static int mapNextIterator(/*@null@*/ void * a) /*@modifies *a @*/ { FSMI_t iter = a; - const TFI_t fi = iter->fi; int i = -1; - if (iter->reverse) { - if (iter->i >= 0) i = iter->i--; - } else { - if (iter->i < fi->fc) i = iter->i++; + if (iter) { + const TFI_t fi = iter->fi; + if (iter->reverse) { + if (iter->i >= 0) i = iter->i--; + } else { + if (iter->i < fi->fc) i = iter->i++; + } + iter->isave = i; } - iter->isave = i; return i; } /*@=mustmod@*/ @@ -167,22 +163,24 @@ static int cpioStrCmp(const void * a, const void * b) * @param fsmPath archive path * @return index into file info, -1 if archive path was not found */ -static int mapFind(void * a, const char * fsmPath) - /*@*/ +static int mapFind(/*@null@*/ void * a, const char * fsmPath) + /*@modifies *a @*/ { FSMI_t iter = a; - const TFI_t fi = iter->fi; int ix = -1; - if (fi && fi->fc > 0 && fi->apath && fsmPath && *fsmPath) { - const char ** p = NULL; + if (iter) { + const TFI_t fi = iter->fi; + if (fi && fi->fc > 0 && fi->apath && fsmPath && *fsmPath) { + const char ** p = NULL; - if (fi->apath != NULL) - p = bsearch(&fsmPath, fi->apath, fi->fc, sizeof(fsmPath), + if (fi->apath != NULL) + p = bsearch(&fsmPath, fi->apath, fi->fc, sizeof(fsmPath), cpioStrCmp); - if (p) { - iter->i = p - fi->apath; - ix = mapNextIterator(iter); + if (p) { + iter->i = p - fi->apath; + ix = mapNextIterator(iter); + } } } return ix; @@ -426,9 +424,7 @@ static int saveHardLink(/*@special@*/ /*@partial@*/ FSM_t fsm) fsm->path = _free(fsm->path); fsm->ix = ix; rc = fsmStage(fsm, FSM_MAP); - /*@-nullstate@*/ /* FIX: fsm->path null annotation? */ return rc; - /*@=nullstate@*/ } /** \ingroup payload @@ -525,7 +521,8 @@ int fsmSetup(FSM_t fsm, fileStage goal, return ec; } -int fsmTeardown(FSM_t fsm) { +int fsmTeardown(FSM_t fsm) +{ int rc = fsm->rc; if (!rc) @@ -539,9 +536,7 @@ int fsmTeardown(FSM_t fsm) { fsm->cfd = NULL; } fsm->failedFile = NULL; - /*@-nullstate@*/ /* FIX: fsm->iter null annotation? */ return rc; - /*@=nullstate@*/ } int fsmMapPath(FSM_t fsm) @@ -630,10 +625,8 @@ assert(fi->type == TR_ADDED); if ((fsm->mapFlags & CPIO_MAP_PATH) || fsm->nsuffix) { const struct stat * st = &fsm->sb; fsm->path = _free(fsm->path); - /*@-nullstate@*/ /* FIX: fsm->path null annotation? */ fsm->path = fsmFsPath(fsm, st, fsm->subdir, (fsm->suffix ? fsm->suffix : fsm->nsuffix)); - /*@=nullstate@*/ } } return rc; @@ -1412,7 +1405,9 @@ int fsmStage(FSM_t fsm, fileStage stage) fsm->ix = -1; fsm->links = NULL; fsm->li = NULL; + /*@-mods@*/ errno = 0; /* XXX get rid of EBADF */ + /*@=mods@*/ /* Detect and create directories not explicitly in package. */ if (fsm->goal == FSM_PKGINSTALL) { @@ -1476,7 +1471,9 @@ int fsmStage(FSM_t fsm, fileStage stage) rc = fsmStage(fsm, (!(fsm->mapFlags & CPIO_FOLLOW_SYMLINKS) ? FSM_LSTAT : FSM_STAT)); if (rc == CPIOERR_LSTAT_FAILED && errno == ENOENT) { + /*@-mods@*/ errno = saveerrno; + /*@=mods@*/ rc = 0; fsm->exists = 0; } else if (rc == 0) { @@ -1662,7 +1659,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; if (fsm->dnlx) (void) fsmStage(fsm, FSM_RMDIRS); #endif + /*@-mods@*/ errno = saveerrno; + /*@=mods@*/ } if (fsm->failedFile && *fsm->failedFile == NULL) *fsm->failedFile = xstrdup(fsm->path); @@ -1687,12 +1686,8 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; if (fsm->diskchecked && fsm->exists && fsm->osuffix) { const char * opath = fsm->opath; const char * path = fsm->path; - /*@-nullstate@*/ /* FIX: fsm->opath null annotation? */ fsm->opath = fsmFsPath(fsm, st, NULL, NULL); - /*@=nullstate@*/ - /*@-nullstate@*/ /* FIX: fsm->path null annotation? */ fsm->path = fsmFsPath(fsm, st, NULL, fsm->osuffix); - /*@=nullstate@*/ rc = fsmStage(fsm, FSM_RENAME); if (!rc) { rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"), @@ -1853,14 +1848,18 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; rc = fsmStage(fsm, FSM_STAT); if (rc == CPIOERR_STAT_FAILED && errno == ENOENT) rc = 0; if (rc) break; + /*@-mods@*/ errno = saveerrno; + /*@=mods@*/ if (S_ISDIR(ost->st_mode)) return 0; } } else if (S_ISLNK(st->st_mode)) { if (S_ISLNK(ost->st_mode)) { /* XXX NUL terminated result in fsm->rdbuf, len in fsm->rdnb. */ rc = fsmStage(fsm, FSM_READLINK); + /*@-mods@*/ errno = saveerrno; + /*@=mods@*/ if (rc) break; if (!strcmp(fsm->opath, fsm->rdbuf)) return 0; } @@ -2102,7 +2101,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; if (_fsm_debug && (stage & FSM_SYSCALL)) rpmMessage(RPMMESS_DEBUG, " %8s (%p)\n", cur, fsm->rfd); (void) Fclose(fsm->rfd); + /*@-mods@*/ errno = saveerrno; + /*@=mods@*/ } fsm->rfd = NULL; break; @@ -2130,7 +2131,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; if (_fsm_debug && (stage & FSM_SYSCALL)) rpmMessage(RPMMESS_DEBUG, " %8s (%p)\n", cur, fsm->wfd); (void) Fclose(fsm->wfd); + /*@-mods@*/ errno = saveerrno; + /*@=mods@*/ } fsm->wfd = NULL; break; @@ -8,6 +8,11 @@ #include "cpio.h" +/*@-exportlocal@*/ +/*@unchecked@*/ +extern int _fsm_debug; +/*@=exportlocal@*/ + /** */ #define FSM_VERBOSE 0x8000 @@ -100,8 +105,8 @@ struct hardLink { * Iterator across package file info, forward on install, backward on erase. */ struct fsmIterator_s { -/*@kept@*/ rpmTransactionSet ts; /*!< transaction set. */ -/*@kept@*/ TFI_t fi; /*!< transaction element file info. */ +/*@kept@*/ /*@exposed@*/ rpmTransactionSet ts; /*!< transaction set. */ +/*@kept@*/ /*@exposed@*/ TFI_t fi; /*!< transaction element file info. */ int reverse; /*!< reversed traversal? */ int isave; /*!< last returned iterator index. */ int i; /*!< iterator index. */ @@ -126,7 +131,7 @@ struct fsm_s { size_t wrsize; /*!< write: Buffer allocated size. */ size_t wrlen; /*!< write: Number of bytes requested.*/ size_t wrnb; /*!< write: Number of bytes returned. */ -/*@only@*/ FSMI_t iter; /*!< File iterator. */ +/*@only@*/ /*@null@*/ FSMI_t iter; /*!< File iterator. */ int ix; /*!< Current file iterator index. */ /*@only@*/ struct hardLink * links; /*!< Pending hard linked file(s). */ /*@only@*/ struct hardLink * li; /*!< Current hard linked file(s). */ @@ -221,7 +226,7 @@ int fsmSetup(FSM_t fsm, fileStage goal, * @return 0 on success */ int fsmTeardown(FSM_t fsm) - /*@globals fileSystem@*/ + /*@globals fileSystem @*/ /*@modifies fsm, fileSystem @*/; /*@-exportlocal@*/ @@ -230,7 +235,7 @@ int fsmTeardown(FSM_t fsm) * @param fsm file state machine data * @return transaction set */ -/*@kept@*/ rpmTransactionSet fsmGetTs(const FSM_t fsm) +/*@kept@*/ /*@exposed@*/ rpmTransactionSet fsmGetTs(const FSM_t fsm) /*@*/; /** @@ -238,7 +243,7 @@ int fsmTeardown(FSM_t fsm) * @param fsm file state machine data * @return transaction element file info */ -/*@kept@*/ TFI_t fsmGetFi(/*@partial@*/const FSM_t fsm) +/*@kept@*/ /*@exposed@*/ TFI_t fsmGetFi(/*@partial@*/const FSM_t fsm) /*@*/; /** diff --git a/lib/getdate.c b/lib/getdate.c index 0cf1223ba..646579951 100644 --- a/lib/getdate.c +++ b/lib/getdate.c @@ -2,6 +2,7 @@ /*@-retvalint -usedef -varuse -nullderef -nullassign @*/ /*@-readonlytrans -modunconnomods -compdef -noeffectuncon @*/ /*@-globs -evalorderuncon -modobserveruncon -modnomods @*/ +/*@unused@*/ #ifndef lint static char const yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $"; diff --git a/lib/header.c b/lib/header.c index 3b16425c6..d253d287a 100644 --- a/lib/header.c +++ b/lib/header.c @@ -1,4 +1,3 @@ -/*@-sizeoftype@*/ /** \ingroup header * \file lib/header.c */ @@ -1418,8 +1417,10 @@ headerFindI18NString(Header h, indexEntry entry) (lang = getenv("LANG")) == NULL) return entry->data; + /*@-mods@*/ if ((table = findEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE)) == NULL) return entry->data; + /*@=mods@*/ for (l = lang; *l != '\0'; l = le) { const char *td; @@ -2831,7 +2832,7 @@ char * headerSprintf(Header h, const char * fmt, const char * piece; int pieceLength; - /*@=mods@*/ + /*@-mods@*/ piece = singleSprintf(h, format + i, exts, extCache, 0); /*@=mods@*/ if (piece) { @@ -3178,4 +3179,3 @@ static struct HV_s hdrVec1 = { /*@observer@*/ /*@unchecked@*/ HV_t hdrVec = &hdrVec1; /*@=compmempass =redef@*/ -/*@=sizeoftype@*/ diff --git a/lib/manifest.c b/lib/manifest.c index fb3822bdc..811d56a74 100644 --- a/lib/manifest.c +++ b/lib/manifest.c @@ -24,14 +24,17 @@ char * rpmPermsString(int mode) perms[0] = 'l'; else if (S_ISFIFO(mode)) perms[0] = 'p'; + /*@-unrecog@*/ else if (S_ISSOCK(mode)) perms[0] = 's'; + /*@=unrecog@*/ else if (S_ISCHR(mode)) perms[0] = 'c'; else if (S_ISBLK(mode)) perms[0] = 'b'; + else + perms[0] = '?'; - /*@-unrecog@*/ if (mode & S_IRUSR) perms[1] = 'r'; if (mode & S_IWUSR) perms[2] = 'w'; if (mode & S_IXUSR) perms[3] = 'x'; @@ -52,7 +55,6 @@ char * rpmPermsString(int mode) if (mode & S_ISVTX) perms[9] = ((mode & S_IXOTH) ? 't' : 'T'); - /*@=unrecog@*/ return perms; } @@ -161,7 +163,7 @@ exit: } /*@=branchstate@*/ sb = freeStringBuf(sb); - /*@-nullstate@*/ + /*@-nullstate@*/ /* FIX: *argvPtr may be NULL. */ return rc; /*@=nullstate@*/ } diff --git a/lib/misc.c b/lib/misc.c index 197973cec..427dec7ce 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -221,9 +221,7 @@ int makeTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr) /*@-branchstate@*/ if (!_initialized) { _initialized = 1; - /*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ tempfn = rpmGenPath(prefix, tpmacro, NULL); - /*@=globs@*/ if (rpmMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1)) goto errxit; } @@ -237,7 +235,6 @@ int makeTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr) do { char tfnbuf[64]; - /*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ #ifndef NOTYET sprintf(tfnbuf, "rpm-tmp.%d", ran++); tempfn = _free(tempfn); @@ -247,7 +244,6 @@ int makeTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr) tempfn = _free(tempfn); tempfn = rpmGenPath(prefix, tpmacro, mktemp(tfnbuf)); #endif - /*@=globs@*/ temput = urlPath(tempfn, &tfn); if (*tfn == '\0') goto errxit; @@ -326,8 +322,10 @@ char * currentDirectory(void) return currDir; } +/*@-exportheadervar@*/ /*@unchecked@*/ int _noDirTokens = 0; +/*@=exportheadervar@*/ static int dncmp(const void * a, const void * b) { diff --git a/lib/misc.h b/lib/misc.h index 9c38cf92e..8735a6310 100644 --- a/lib/misc.h +++ b/lib/misc.h @@ -144,8 +144,10 @@ int doputenv(const char * str) int makeTempFile(/*@null@*/ const char * prefix, /*@null@*/ /*@out@*/ const char ** fnptr, /*@out@*/ FD_t * fdptr) - /*@globals fileSystem, internalState@*/ - /*@modifies *fnptr, *fdptr, fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies *fnptr, *fdptr, rpmGlobalMacroContext, + fileSystem, internalState @*/; /** * Return (malloc'd) current working directory. @@ -177,7 +179,9 @@ void buildOrigFileList(Header h, /*@out@*/ const char *** fileListPtr, /** */ +/*@-exportlocal@*/ int myGlobPatternP (const char *patternURL) /*@*/; +/*@=exportlocal@*/ /** */ diff --git a/lib/poptBT.c b/lib/poptBT.c index 885723da8..0227ab108 100644 --- a/lib/poptBT.c +++ b/lib/poptBT.c @@ -47,19 +47,28 @@ struct rpmBuildArguments_s rpmBTArgs; /*@-redecl@*/ /*@unchecked@*/ extern int _noDirTokens; + /*@unchecked@*/ extern int _fsm_debug; /*@=redecl@*/ + /*@unchecked@*/ static int force = 0; + +/*@-exportlocal@*/ /*@unchecked@*/ int noLang = 0; +/*@=exportlocal@*/ + /*@unchecked@*/ static int noBuild = 0; + /*@unchecked@*/ static int noDeps = 0; + /*@unchecked@*/ static int signIt = 0; + /*@unchecked@*/ static int useCatalog = 0; @@ -24,11 +24,6 @@ /*@access FD_t @*/ /* compared with NULL */ /*@access rpmdb @*/ /* compared with NULL */ -/*@-redecl@*/ -/*@unchecked@*/ -extern int _fsm_debug; -/*@=redecl@*/ - /*@-redecl -declundef -exportheadervar@*/ /*@unchecked@*/ extern const char * chroot_prefix; @@ -662,9 +657,7 @@ rpmRC rpmInstallSourcePackage(const char * rootDir, FD_t fd, hfd = (fi->hfd ? fi->hfd : headerFreeData); h = headerFree(h); /* XXX reference held by transaction set */ - /*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ (void) rpmInstallLoadMacros(fi, fi->h); - /*@=globs@*/ memset(psm, 0, sizeof(*psm)); psm->ts = ts; @@ -715,18 +708,14 @@ rpmRC rpmInstallSourcePackage(const char * rootDir, FD_t fd, } } - /*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ _sourcedir = rpmGenPath(ts->rootDir, "%{_sourcedir}", ""); - /*@=globs@*/ rc = chkdir(_sourcedir, "sourcedir"); if (rc) { rc = RPMRC_FAIL; goto exit; } - /*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ _specdir = rpmGenPath(ts->rootDir, "%{_specdir}", ""); - /*@=globs@*/ rc = chkdir(_specdir, "specdir"); if (rc) { rc = RPMRC_FAIL; @@ -765,11 +754,9 @@ rpmRC rpmInstallSourcePackage(const char * rootDir, FD_t fd, psm->goal = PSM_PKGINSTALL; /*@-compmempass@*/ /* FIX: psm->fi->dnl should be owned. */ -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ rc = psmStage(psm, PSM_PROCESS); (void) psmStage(psm, PSM_FINI); -/*@=globs@*/ /*@=compmempass@*/ if (rc) rc = RPMRC_FAIL; @@ -839,7 +826,7 @@ static int runScript(PSM_t psm, Header h, const char * script, int arg1, int arg2) /*@globals rpmGlobalMacroContext, fileSystem, internalState@*/ - /*@modifies psm, fileSystem, internalState @*/ + /*@modifies psm, rpmGlobalMacroContext, fileSystem, internalState @*/ { const rpmTransactionSet ts = psm->ts; TFI_t fi = psm->fi; @@ -1066,8 +1053,9 @@ static int runScript(PSM_t psm, Header h, */ static rpmRC runInstScript(PSM_t psm) /*@globals rpmGlobalMacroContext, - fileSystem, internalState@*/ - /*@modifies psm, fileSystem, internalState @*/ + fileSystem, internalState @*/ + /*@modifies psm, rpmGlobalMacroContext, + fileSystem, internalState @*/ { TFI_t fi = psm->fi; HGE_t hge = fi->hge; @@ -1116,7 +1104,8 @@ static int handleOneTrigger(PSM_t psm, Header sourceH, Header triggeredH, int arg2, unsigned char * triggersAlreadyRun) /*@globals rpmGlobalMacroContext, fileSystem, internalState@*/ - /*@modifies psm, *triggersAlreadyRun, fileSystem, internalState @*/ + /*@modifies psm, *triggersAlreadyRun, rpmGlobalMacroContext, + fileSystem, internalState @*/ { const rpmTransactionSet ts = psm->ts; TFI_t fi = psm->fi; @@ -1229,7 +1218,8 @@ static int handleOneTrigger(PSM_t psm, Header sourceH, Header triggeredH, static int runTriggers(PSM_t psm) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies psm, fileSystem, internalState @*/ + /*@modifies psm, rpmGlobalMacroContext, + fileSystem, internalState @*/ { const rpmTransactionSet ts = psm->ts; TFI_t fi = psm->fi; @@ -1265,7 +1255,8 @@ static int runTriggers(PSM_t psm) static int runImmedTriggers(PSM_t psm) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies psm, fileSystem, internalState @*/ + /*@modifies psm, rpmGlobalMacroContext, + fileSystem, internalState @*/ { const rpmTransactionSet ts = psm->ts; TFI_t fi = psm->fi; @@ -1646,7 +1637,9 @@ assert(psm->mi == NULL); saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */ xx = Fclose(psm->cfd); psm->cfd = NULL; + /*@-mods@*/ errno = saveerrno; /* XXX FIXME: Fclose with libio destroys errno */ + /*@=mods@*/ if (!rc) rc = psmStage(psm, PSM_COMMIT); @@ -1713,7 +1706,9 @@ assert(psm->mi == NULL); saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */ xx = Fclose(psm->cfd); psm->cfd = NULL; + /*@-mods@*/ errno = saveerrno; + /*@=mods@*/ fi->action = action; fi->actions = actions; @@ -1822,7 +1817,9 @@ assert(psm->mi == NULL); saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */ xx = Fclose(psm->fd); psm->fd = NULL; + /*@-mods@*/ errno = saveerrno; + /*@=mods@*/ } if (psm->goal == PSM_PKGSAVE) { @@ -1916,7 +1913,9 @@ assert(psm->mi == NULL); psm->chrootDone = ts->chrootDone = 1; if (ts->rpmdb != NULL) ts->rpmdb->db_chrootDone = 1; /*@-onlytrans@*/ + /*@-mods@*/ chroot_prefix = ts->rootDir; + /*@=mods@*/ /*@=onlytrans@*/ } break; @@ -1928,7 +1927,9 @@ assert(psm->mi == NULL); /*@=superuser@*/ psm->chrootDone = ts->chrootDone = 0; if (ts->rpmdb != NULL) ts->rpmdb->db_chrootDone = 0; + /*@-mods@*/ chroot_prefix = NULL; + /*@=mods@*/ xx = chdir(ts->currDir); } break; @@ -195,7 +195,7 @@ void freeFi(TFI_t fi) int psmStage(PSM_t psm, pkgStage stage) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies psm, fileSystem, internalState @*/; + /*@modifies psm, rpmGlobalMacroContext, fileSystem, internalState @*/; #ifdef __cplusplus } diff --git a/lib/query.c b/lib/query.c index 6225c9f01..916c9b941 100644 --- a/lib/query.c +++ b/lib/query.c @@ -405,7 +405,7 @@ exit: static void printNewSpecfile(Spec spec) /*@globals fileSystem @*/ - /*@modifies fileSystem @*/ + /*@modifies spec->sl->sl_lines[], fileSystem @*/ { Header h; speclines sl = spec->sl; @@ -675,8 +675,10 @@ restart: int anyarch = 1; int force = 1; + /*@-mods@*/ rc = parseSpecVec(&spec, arg, "/", buildRoot, recursing, passPhrase, cookie, anyarch, force); + /*@=mods@*/ if (rc || spec == NULL) { rpmError(RPMERR_QUERY, _("query of specfile %s failed, can't parse\n"), arg); diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c index 24b857d20..76502a531 100644 --- a/lib/rpmchecksig.c +++ b/lib/rpmchecksig.c @@ -20,8 +20,10 @@ static int manageFile(FD_t *fdp, const char **fnp, int flags, /*@unused@*/ int rc) - /*@globals fileSystem, internalState @*/ - /*@modifies *fdp, *fnp, fileSystem, internalState @*/ + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies *fdp, *fnp, rpmGlobalMacroContext, + fileSystem, internalState @*/ { const char *fn; FD_t fd; @@ -76,8 +78,10 @@ static int manageFile(FD_t *fdp, const char **fnp, int flags, static int copyFile(FD_t *sfdp, const char **sfnp, FD_t *tfdp, const char **tfnp, rpmDigest dig) - /*@globals fileSystem, internalState @*/ - /*@modifies *sfdp, *sfnp, *tfdp, *tfnp, *dig, fileSystem, internalState @*/ + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies *sfdp, *sfnp, *tfdp, *tfnp, *dig, rpmGlobalMacroContext, + fileSystem, internalState @*/ { unsigned char buffer[BUFSIZ]; ssize_t count; @@ -194,10 +198,8 @@ int rpmReSign(rpmResignFlags flags, char * passPhrase, const char ** argv) (void) rpmAddSignature(sig, sigtarget, RPMSIGTAG_MD5, passPhrase); } -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ if ((sigtype = rpmLookupSignatureType(RPMLOOKUPSIG_QUERY)) > 0) (void) rpmAddSignature(sig, sigtarget, sigtype, passPhrase); -/*@=globs@*/ /* Write the lead/signature of the output rpm */ strcpy(tmprpm, rpm); diff --git a/lib/rpmcli.h b/lib/rpmcli.h index 8061055fe..71cb78b2b 100644 --- a/lib/rpmcli.h +++ b/lib/rpmcli.h @@ -12,7 +12,9 @@ /** \ingroup rpmcli * Should version 3 packages be produced? */ +/*@-redecl@*/ extern int _noDirTokens; +/*@=redecl@*/ #ifdef __cplusplus extern "C" { @@ -169,7 +171,8 @@ int rpmQueryVerify(QVA_t qva, rpmQVSources source, const char * arg, rpmdb db, QVF_t showPackage) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies db, fileSystem, internalState @*/; + /*@modifies db, rpmGlobalMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmcli * Display results of package query. @@ -193,7 +196,8 @@ int showQueryPackage(QVA_t qva, rpmdb db, Header h) int rpmQuery(QVA_t qva, rpmQVSources source, const char * arg) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; + /*@modifies rpmGlobalMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmcli * Display results of package verify. @@ -203,8 +207,10 @@ int rpmQuery(QVA_t qva, rpmQVSources source, const char * arg) * @return result of last non-zero verify return */ int showVerifyPackage(QVA_t qva, /*@only@*/ rpmdb db, Header h) - /*@globals fileSystem, internalState @*/ - /*@modifies db, h, fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies db, h, rpmGlobalMacroContext, + fileSystem, internalState @*/; /** * Check original header digest. @@ -225,7 +231,8 @@ int rpmVerifyDigest(Header h) int rpmVerify(QVA_t qva, rpmQVSources source, const char *arg) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; + /*@modifies rpmGlobalMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmcli * Describe query/verify command line request. @@ -273,6 +280,31 @@ extern struct poptOption rpmVerifyPoptTable[]; /*@{*/ /* --- install/upgrade/erase modes */ +/*@unchecked@*/ +extern int packagesTotal; + +/** \ingroup rpmcli + * The rpm CLI generic transaction callback. + * @deprecated Transaction callback arguments need to change, so don't rely on + * this routine in the rpmcli API. + * + * @param arg per-callback private data (e.g. an rpm header) + * @param what callback identifier + * @param amount per-callback progress info + * @param total per-callback progress info + * @param pkgkey opaque header key (e.g. file name or PyObject) + * @param data private data (e.g. rpmInstallInterfaceFlags) + * @return per-callback data (e.g. an opened FD_t) + */ +/*@null@*/ void * rpmShowProgress(/*@null@*/ const void * arg, + const rpmCallbackType what, + const unsigned long amount, + const unsigned long total, + /*@null@*/ const void * pkgKey, + /*@null@*/ void * data) + /*@globals fileSystem, internalState @*/ + /*@modifies fileSystem, internalState @*/; + /** \ingroup rpmcli * Install/upgrade/freshen binary rpm package. * @param rootdir path to top of install tree @@ -289,9 +321,10 @@ int rpmInstall(/*@null@*/ const char * rootdir, rpmInstallInterfaceFlags interfaceFlags, rpmprobFilterFlags probFilter, /*@null@*/ rpmRelocation * relocations) - /*@globals rpmGlobalMacroContext, + /*@globals packagesTotal, rpmGlobalMacroContext, fileSystem, internalState@*/ - /*@modifies *relocations, fileSystem, internalState @*/; + /*@modifies *relocations, packagesTotal, rpmGlobalMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmcli * Install source rpm package. @@ -304,8 +337,10 @@ int rpmInstall(/*@null@*/ const char * rootdir, int rpmInstallSource(const char * rootdir, const char * arg, /*@null@*/ /*@out@*/ const char ** specFile, /*@null@*/ /*@out@*/ char ** cookie) - /*@globals fileSystem, internalState@*/ - /*@modifies *specFile, *cookie, fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState@*/ + /*@modifies *specFile, *cookie, rpmGlobalMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmcli * Erase binary rpm package. @@ -320,7 +355,8 @@ int rpmErase(/*@null@*/ const char * rootdir, /*@null@*/ const char ** argv, rpmEraseInterfaceFlags interfaceFlags) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; + /*@modifies rpmGlobalMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmcli * Describe database command line requests. @@ -417,31 +453,6 @@ typedef /*@abstract@*/ struct IDTindex_s { /*@modifies fileSystem @*/; -/** - * The rpm CLI generic transaction callback. - * @deprecated Transaction callback arguments need to change, so don't rely on - * this routine in the rpmcli API. - * - * @param arg per-callback private data (e.g. an rpm header) - * @param what callback identifier - * @param amount per-callback progress info - * @param total per-callback progress info - * @param pkgkey opaque header key (e.g. file name or PyObject) - * @param data private data (e.g. rpmInstallInterfaceFlags) - * @return per-callback data (e.g. an opened FD_t) - */ -/*@null@*/ void * rpmShowProgress(/*@null@*/ const void * arg, - const rpmCallbackType what, - const unsigned long amount, - const unsigned long total, - /*@null@*/ const void * pkgKey, - /*@null@*/ void * data) - /*@globals fileSystem@*/ - /*@modifies fileSystem @*/; - -/*@unchecked@*/ -extern int packagesTotal; - /** \ingroup rpmcli * Rollback transactions, erasing new, reinstalling old, package(s). * @return 0 on success @@ -450,7 +461,8 @@ int rpmRollback(struct rpmInstallArguments_s * ia, /*@null@*/ const char ** argv) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies fileSystem @*/; + /*@modifies rpmGlobalMacroContext, + fileSystem @*/; /** \ingroup rpmcli */ @@ -512,8 +524,10 @@ typedef enum rpmCheckSigFlags_e { * @return 0 on success */ int rpmCheckSig(rpmCheckSigFlags flags, /*@null@*/ const char ** argv) - /*@globals fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies rpmGlobalMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmcli * Bit(s) to control rpmReSign() operation. @@ -536,7 +550,8 @@ int rpmReSign(rpmResignFlags flags, char * passPhrase, /*@null@*/ const char ** argv) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; + /*@modifies rpmGlobalMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmcli * Describe signature command line request. diff --git a/lib/rpminstall.c b/lib/rpminstall.c index f754c9e5e..000010797 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -31,8 +31,8 @@ static int progressCurrent = 0; /** */ static void printHash(const unsigned long amount, const unsigned long total) - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/ + /*@globals hashesPrinted, progressCurrent, fileSystem @*/ + /*@modifies hashesPrinted, progressCurrent, fileSystem @*/ { int hashesNeeded; int hashesTotal = 50; @@ -75,8 +75,10 @@ void * rpmShowProgress(/*@null@*/ const void * arg, const unsigned long total, /*@null@*/ const void * pkgKey, /*@null@*/ void * data) - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/ + /*@globals hashesPrinted, progressCurrent, progressTotal, + fileSystem @*/ + /*@modifies hashesPrinted, progressCurrent, progressTotal, + fileSystem @*/ { /*@-castexpose@*/ Header h = (Header) arg; @@ -558,8 +560,10 @@ restart: } if (!(transFlags & RPMTRANS_FLAG_TEST)) { +#if !defined(__LCLINT__) /* LCL: segfault */ eiu->rpmrc = rpmInstallSourcePackage(rootdir, eiu->fd, NULL, rpmShowProgress, (void *) ((long)notifyFlags), NULL); +#endif if (eiu->rpmrc != RPMRC_OK) eiu->numFailed++; } diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 1f58e0511..34e90946f 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -3,13 +3,8 @@ /** \ingroup rpmcli rpmrc rpmdep rpmtrans rpmdb lead signature header payload dbi * \file lib/rpmlib.h - * */ -/* This is the *only* module users of rpmlib should need to include */ - -/* and it shouldn't need these :-( */ - #include "rpmio.h" #include "rpmmessages.h" #include "rpmerr.h" @@ -27,6 +22,14 @@ typedef enum rpmRC_e { RPMRC_SHORTREAD = 4, } rpmRC; +/*@-redecl@*/ +/*@checked@*/ +extern struct MacroContext_s * rpmGlobalMacroContext; + +/*@checked@*/ +extern struct MacroContext_s * rpmCLIMacroContext; +/*@=redecl@*/ + #ifdef __cplusplus extern "C" { #endif @@ -162,7 +165,7 @@ int rpmPackageGetEntry(void *leadp, Header sigs, Header h, * Automatically generated table of tag name/value pairs. */ /*@-redecl@*/ -/*@unchecked@*/ +/*@observer@*/ /*@unchecked@*/ extern const struct headerTagTableEntry_s rpmTagTable[]; /*@=redecl@*/ @@ -514,16 +517,6 @@ void rpmSetVar(int var, const char * val) /*@modifies internalState @*/; /** \ingroup rpmrc - * List of macro files to read when configuring rpm. - * This is a colon separated list of files. URI's are permitted as well, - * identified by the token '://', so file paths must not begin with '//'. - */ -/*@-redecl@*/ -/*@unchecked@*/ -/*@observer@*/ extern const char * macrofiles; -/*@=redecl@*/ - -/** \ingroup rpmrc * Build and install arch/os table identifiers. * @todo Eliminate from API. */ @@ -543,17 +536,10 @@ enum rpm_machtable_e { */ int rpmReadConfigFiles(/*@null@*/ const char * file, /*@null@*/ const char * target) - /*@globals fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; - -/** \ingroup rpmrc - * Read rpmrc (and macro) configuration file(s). - * @param rcfiles colon separated files to read (NULL uses default) - * @return 0 on succes - */ -int rpmReadRC(/*@null@*/ const char * rcfiles) - /*@globals fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, rpmCLIMacroContext, + fileSystem, internalState @*/ + /*@modifies rpmGlobalMacroContext, rpmCLIMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmrc * Return current arch name and/or number. @@ -597,8 +583,10 @@ int rpmMachineScore(int type, const char * name) * @return 0 always */ int rpmShowRC(FILE * fp) - /*@globals fileSystem, internalState @*/ - /*@modifies *fp, fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies *fp, rpmGlobalMacroContext, + fileSystem, internalState @*/; /** \ingroup rpmrc * @deprecated Use addMacro to set _target_* macros. @@ -1153,8 +1141,10 @@ rpmRC rpmInstallSourcePackage(/*@null@*/ const char * rootDir, FD_t fd, /*@null@*/ rpmCallbackFunction notify, /*@null@*/ rpmCallbackData notifyData, /*@null@*/ /*@out@*/ char ** cookie) - /*@globals fileSystem, internalState @*/ - /*@modifies fd, *specFilePtr, *cookie, fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies fd, *specFilePtr, *cookie, rpmGlobalMacroContext, + fileSystem, internalState @*/; /** * Compare headers to determine which header is "newer". @@ -1432,7 +1422,7 @@ typedef enum rpmtransFlags_e { int rpmGetRpmlibProvides(/*@null@*/ /*@out@*/ const char *** provNames, /*@null@*/ /*@out@*/ int ** provFlags, /*@null@*/ /*@out@*/ const char *** provVersions) - /*@ modifies *provNames, *provFlags, *provVersions @*/; + /*@modifies *provNames, *provFlags, *provVersions @*/; /** \ingroup rpmtrans * Segmented string compare for version and/or release. @@ -1510,8 +1500,10 @@ int rpmRunTransactions(rpmTransactionSet ts, /*@out@*/ rpmProblemSet * newProbs, rpmtransFlags transFlags, rpmprobFilterFlags ignoreSet) - /*@globals fileSystem, internalState@*/ - /*@modifies ts, *newProbs, fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState@*/ + /*@modifies ts, *newProbs, rpmGlobalMacroContext, + fileSystem, internalState @*/; /*@}*/ @@ -1590,8 +1582,10 @@ int rpmGetFilesystemList( /*@null@*/ /*@out@*/ const char *** listptr, int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, int numFiles, /*@null@*/ /*@out@*/ uint_32 ** usagesPtr, int flags) - /*@globals fileSystem, internalState @*/ - /*@modifies *usagesPtr, fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies *usagesPtr, rpmGlobalMacroContext, + fileSystem, internalState @*/; /* ==================================================================== */ /** \name RPMQV */ @@ -1655,7 +1649,7 @@ typedef enum rpmVerifyAttrs_e { */ int rpmVerifyFile(const char * root, Header h, int filenum, /*@out@*/ rpmVerifyAttrs * result, rpmVerifyAttrs omitMask) - /*@globals fileSystem@*/ + /*@globals fileSystem @*/ /*@modifies h, *result, fileSystem @*/; /** @@ -1667,8 +1661,10 @@ int rpmVerifyFile(const char * root, Header h, int filenum, * @return 0 on success */ int rpmVerifyScript(const char * rootDir, Header h, /*@null@*/ FD_t scriptFd) - /*@globals fileSystem, internalState@*/ - /*@modifies h, scriptFd, fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies h, scriptFd, rpmGlobalMacroContext, + fileSystem, internalState @*/; /*@}*/ /* ==================================================================== */ @@ -1767,8 +1763,10 @@ typedef enum rpmVerifySignatureReturn_e { rpmVerifySignatureReturn rpmVerifySignature(const char *file, int_32 sigTag, const void * sig, int count, const rpmDigest dig, /*@out@*/ char * result) - /*@globals fileSystem, internalState @*/ - /*@modifies *result, fileSystem, internalState @*/; + /*@globals rpmGlobalMacroContext, + fileSystem, internalState @*/ + /*@modifies *result, + fileSystem, internalState @*/; /** \ingroup signature * Destroy signature header from package. diff --git a/lib/rpmrc.c b/lib/rpmrc.c index 82ddcbd1b..605f48595 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -1,3 +1,4 @@ +/*@-mods@*/ #include "system.h" #include <stdarg.h> @@ -438,33 +439,6 @@ const char * lookupInDefaultTable(const char * name, return name; } -int rpmReadConfigFiles(const char * file, const char * target) -{ - -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ - /* Preset target macros */ - /*@-nullstate@*/ /* FIX: target can be NULL */ - rpmRebuildTargetVars(&target, NULL); - - /* Read the files */ - if (rpmReadRC(file)) return -1; - - /* Reset target macros */ - rpmRebuildTargetVars(&target, NULL); - /*@=nullstate@*/ - - /* Finally set target platform */ - { const char *cpu = rpmExpand("%{_target_cpu}", NULL); - const char *os = rpmExpand("%{_target_os}", NULL); - rpmSetMachine(cpu, os); - cpu = _free(cpu); - os = _free(os); - } -/*@=globs@*/ - - return 0; -} - static void setVarDefault(int var, const char * macroname, const char * val, /*@null@*/ const char * body) /*@globals rpmGlobalMacroContext, @@ -570,102 +544,6 @@ static void setDefaults(void) } -int rpmReadRC(const char * rcfiles) - /*@globals rpmGlobalMacroContext, - internalState @*/ - /*@modifies internalState @*/ -{ - char *myrcfiles, *r, *re; - int rc; - - if (!defaultsInitialized) { -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ - setDefaults(); -/*@=globs@*/ - defaultsInitialized = 1; - } - - if (rcfiles == NULL) - rcfiles = defrcfiles; - - /* Read each file in rcfiles. */ - rc = 0; - for (r = myrcfiles = xstrdup(rcfiles); r && *r != '\0'; r = re) { - char fn[4096]; - FD_t fd; - - /* Get pointer to rest of files */ - for (re = r; (re = strchr(re, ':')) != NULL; re++) { - if (!(re[1] == '/' && re[2] == '/')) - /*@innerbreak@*/ break; - } - if (re && *re == ':') - *re++ = '\0'; - else - re = r + strlen(r); - - /* Expand ~/ to $HOME/ */ - fn[0] = '\0'; - if (r[0] == '~' && r[1] == '/') { - const char * home = getenv("HOME"); - if (home == NULL) { - /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */ - if (rcfiles == defrcfiles && myrcfiles != r) - continue; - rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r); - rc = 1; - break; - } - if (strlen(home) > (sizeof(fn) - strlen(r))) { - rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"), - r); - rc = 1; - break; - } - strcpy(fn, home); - r++; - } - strncat(fn, r, sizeof(fn) - (strlen(fn) + 1)); - fn[sizeof(fn)-1] = '\0'; - - /* Read another rcfile */ - fd = Fopen(fn, "r.fpio"); - if (fd == NULL || Ferror(fd)) { - /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */ - if (rcfiles == defrcfiles && myrcfiles != r) - continue; - rpmError(RPMERR_RPMRC, _("Unable to open %s for reading: %s.\n"), - fn, Fstrerror(fd)); - rc = 1; - break; - } else { -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ - rc = doReadRC(fd, fn); -/*@=globs@*/ - } - if (rc) break; - } - myrcfiles = _free(myrcfiles); - if (rc) - return rc; - - rpmSetMachine(NULL, NULL); /* XXX WTFO? Why bother? */ - - { const char *mfpath; - /*@-branchstate@*/ - if ((mfpath = rpmGetVar(RPMVAR_MACROFILES)) != NULL) { - mfpath = xstrdup(mfpath); -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ - rpmInitMacros(NULL, mfpath); -/*@=globs@*/ - mfpath = _free(mfpath); - } - /*@=branchstate@*/ - } - - return rc; -} - /*@-usedef@*/ /*@ FIX: se usage inconsistent, W2DO? */ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn) /*@globals rpmGlobalMacroContext, @@ -1661,6 +1539,127 @@ void rpmFreeRpmrc(void) /*@=nullstate@*/ } +/** \ingroup rpmrc + * Read rpmrc (and macro) configuration file(s). + * @param rcfiles colon separated files to read (NULL uses default) + * @return 0 on succes + */ +static int rpmReadRC(/*@null@*/ const char * rcfiles) + /*@globals rpmGlobalMacroContext, rpmCLIMacroContext, + fileSystem, internalState @*/ + /*@modifies rpmGlobalMacroContext, + fileSystem, internalState @*/ +{ + char *myrcfiles, *r, *re; + int rc; + + if (!defaultsInitialized) { + setDefaults(); + defaultsInitialized = 1; + } + + if (rcfiles == NULL) + rcfiles = defrcfiles; + + /* Read each file in rcfiles. */ + rc = 0; + for (r = myrcfiles = xstrdup(rcfiles); r && *r != '\0'; r = re) { + char fn[4096]; + FD_t fd; + + /* Get pointer to rest of files */ + for (re = r; (re = strchr(re, ':')) != NULL; re++) { + if (!(re[1] == '/' && re[2] == '/')) + /*@innerbreak@*/ break; + } + if (re && *re == ':') + *re++ = '\0'; + else + re = r + strlen(r); + + /* Expand ~/ to $HOME/ */ + fn[0] = '\0'; + if (r[0] == '~' && r[1] == '/') { + const char * home = getenv("HOME"); + if (home == NULL) { + /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */ + if (rcfiles == defrcfiles && myrcfiles != r) + continue; + rpmError(RPMERR_RPMRC, _("Cannot expand %s\n"), r); + rc = 1; + break; + } + if (strlen(home) > (sizeof(fn) - strlen(r))) { + rpmError(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"), + r); + rc = 1; + break; + } + strcpy(fn, home); + r++; + } + strncat(fn, r, sizeof(fn) - (strlen(fn) + 1)); + fn[sizeof(fn)-1] = '\0'; + + /* Read another rcfile */ + fd = Fopen(fn, "r.fpio"); + if (fd == NULL || Ferror(fd)) { + /* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */ + if (rcfiles == defrcfiles && myrcfiles != r) + continue; + rpmError(RPMERR_RPMRC, _("Unable to open %s for reading: %s.\n"), + fn, Fstrerror(fd)); + rc = 1; + break; + } else { + rc = doReadRC(fd, fn); + } + if (rc) break; + } + myrcfiles = _free(myrcfiles); + if (rc) + return rc; + + 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; +} + +int rpmReadConfigFiles(const char * file, const char * target) +{ + + /* Preset target macros */ + /*@-nullstate@*/ /* FIX: target can be NULL */ + rpmRebuildTargetVars(&target, NULL); + + /* Read the files */ + if (rpmReadRC(file)) return -1; + + /* Reset target macros */ + rpmRebuildTargetVars(&target, NULL); + /*@=nullstate@*/ + + /* Finally set target platform */ + { const char *cpu = rpmExpand("%{_target_cpu}", NULL); + const char *os = rpmExpand("%{_target_os}", NULL); + rpmSetMachine(cpu, os); + cpu = _free(cpu); + os = _free(os); + } + + return 0; +} + int rpmShowRC(FILE * fp) { struct rpmOption *opt; @@ -1715,9 +1714,8 @@ int rpmShowRC(FILE * fp) rpmShowRpmlibProvides(fp); fprintf(fp, "\n"); -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ rpmDumpMacroTable(NULL, fp); -/*@=globs@*/ return 0; } +/*@=mods@*/ diff --git a/lib/signature.c b/lib/signature.c index 4a81ed6a4..c71a16a20 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -1,3 +1,4 @@ +/*@-mods@*/ /** \ingroup signature * \file lib/signature.c */ @@ -871,7 +872,6 @@ static int checkPassPhrase(const char * passPhrase, const int sigTag) return 0; } -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ char * rpmGetPassPhrase(const char * prompt, const int sigTag) { char *pass; @@ -917,9 +917,7 @@ char * rpmGetPassPhrase(const char * prompt, const int sigTag) return pass; } -/*@=globs@*/ -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ rpmVerifySignatureReturn rpmVerifySignature(const char * file, int_32 sigTag, const void * sig, int count, const rpmDigest dig, char * result) @@ -947,4 +945,4 @@ rpmVerifySignature(const char * file, int_32 sigTag, const void * sig, /*@notreached@*/ return RPMSIG_OK; } -/*@=globs@*/ +/*@=mods@*/ diff --git a/lib/signature.h b/lib/signature.h index cc131c57f..83856e3c4 100644 --- a/lib/signature.h +++ b/lib/signature.h @@ -96,18 +96,20 @@ int rpmLookupSignatureType(int action) * Read a pass phrase from the user. */ /*@null@*/ char * rpmGetPassPhrase(const char *prompt, const int sigTag) - /*@globals fileSystem@*/ - /*@modifies fileSystem @*/; + /*@globals rpmGlobalMacroContext, + fileSystem@*/ + /*@modifies rpmGlobalMacroContext, + fileSystem @*/; /** \ingroup signature * Return path to pgp executable of given type, or NULL when not found. */ -/*@-redecl@*/ +/*@-exportlocal -redecl@*/ /*@null@*/ const char * rpmDetectPGPVersion( /*@null@*/ /*@out@*/ pgpVersion * pgpVer) /*@globals rpmGlobalMacroContext @*/ /*@modifies *pgpVer @*/; -/*@=redecl@*/ +/*@=exportlocal =redecl@*/ #ifdef __cplusplus } diff --git a/lib/transaction.c b/lib/transaction.c index 125125a40..4e0b5de6e 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1312,7 +1312,7 @@ static int ensureOlder(struct availablePackage * alp, Header old, */ static void skipFiles(const rpmTransactionSet ts, TFI_t fi) /*@globals rpmGlobalMacroContext @*/ - /*@modifies fi @*/ + /*@modifies fi, rpmGlobalMacroContext @*/ { int noDocs = (ts->transFlags & RPMTRANS_FLAG_NODOCS); char ** netsharedPaths = NULL; @@ -1795,9 +1795,7 @@ int rpmRunTransactions( rpmTransactionSet ts, } /* Skip netshared paths, not our i18n files, and excluded docs */ -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ skipFiles(ts, fi); -/*@=globs@*/ /*@switchbreak@*/ break; case TR_REMOVED: fi->ap = NULL; @@ -1833,7 +1831,9 @@ int rpmRunTransactions( rpmTransactionSet ts, ts->chrootDone = 1; if (ts->rpmdb) ts->rpmdb->db_chrootDone = 1; /*@-onlytrans@*/ + /*@-mods@*/ chroot_prefix = ts->rootDir; + /*@=mods@*/ /*@=onlytrans@*/ } @@ -2000,7 +2000,9 @@ int rpmRunTransactions( rpmTransactionSet ts, /*@=superuser =noeffect @*/ ts->chrootDone = 0; if (ts->rpmdb) ts->rpmdb->db_chrootDone = 0; + /*@-mods@*/ chroot_prefix = NULL; + /*@=mods@*/ xx = chdir(ts->currDir); } @@ -2051,10 +2053,8 @@ int rpmRunTransactions( rpmTransactionSet ts, case TR_ADDED: /*@switchbreak@*/ break; case TR_REMOVED: -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ if (ts->transFlags & RPMTRANS_FLAG_REPACKAGE) xx = psmStage(psm, PSM_PKGSAVE); -/*@=globs@*/ /*@switchbreak@*/ break; } } @@ -2122,12 +2122,10 @@ assert(alp == fi->ap); ts->transFlags |= RPMTRANS_FLAG_MULTILIB; assert(alp == fi->ap); -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ if (psmStage(psm, PSM_PKGINSTALL)) { ourrc++; lastFailed = i; } -/*@=globs@*/ fi->h = headerFree(fi->h); if (hsave) { fi->h = headerLink(hsave); @@ -2154,10 +2152,8 @@ assert(alp == fi->ap); if (ts->order[oc].u.removed.dependsOnIndex == lastFailed) /*@switchbreak@*/ break; -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ if (psmStage(psm, PSM_PKGERASE)) ourrc++; -/*@=globs@*/ /*@switchbreak@*/ break; } diff --git a/lib/verify.c b/lib/verify.c index 0f55fcf2e..a1b0d8015 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -296,9 +296,7 @@ int rpmVerifyScript(const char * rootDir, Header h, /*@null@*/ FD_t scriptFd) psm->stepName = "verify"; psm->scriptTag = RPMTAG_VERIFYSCRIPT; psm->progTag = RPMTAG_VERIFYSCRIPTPROG; -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ rc = psmStage(psm, PSM_SCRIPT); -/*@=globs@*/ freeFi(fi); fi = _free(fi); ts = rpmtransFree(ts); diff --git a/po/rpm.pot b/po/rpm.pot index 0a8637f1e..022b39908 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-10-16 10:48-0400\n" +"POT-Creation-Date: 2001-10-17 12:38-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -75,16 +75,16 @@ msgstr "" msgid "rpm: %s\n" msgstr "" -#: rpm.c:238 rpmqv.c:246 +#: rpm.c:238 rpmqv.c:244 #, c-format msgid "RPM version %s\n" msgstr "" -#: rpm.c:242 rpmqv.c:253 +#: rpm.c:242 rpmqv.c:251 msgid "Copyright (C) 1998-2000 - Red Hat, Inc." msgstr "" -#: rpm.c:243 rpmqv.c:254 +#: rpm.c:243 rpmqv.c:252 msgid "This program may be freely redistributed under the terms of the GNU GPL" msgstr "" @@ -283,7 +283,7 @@ msgstr "" msgid "print this message" msgstr "" -#: rpm.c:335 rpmqv.c:126 +#: rpm.c:335 rpmqv.c:124 msgid "print the version of rpm being used" msgstr "" @@ -295,7 +295,7 @@ msgstr "" msgid " --define '<name> <body>'" msgstr "" -#: rpm.c:340 rpmqv.c:133 +#: rpm.c:340 rpmqv.c:131 msgid "define macro <name> with value <body>" msgstr "" @@ -311,7 +311,7 @@ msgstr "" msgid " --pipe <cmd> " msgstr "" -#: rpm.c:344 rpmqv.c:139 +#: rpm.c:344 rpmqv.c:137 msgid "send stdout to <cmd>" msgstr "" @@ -323,7 +323,7 @@ msgstr "" msgid "use <file> instead of /etc/rpmrc and $HOME/.rpmrc" msgstr "" -#: rpm.c:348 rpmqv.c:157 +#: rpm.c:348 rpmqv.c:155 msgid "display final rpmrc and macro configuration" msgstr "" @@ -399,7 +399,7 @@ msgstr "" msgid " --root <dir> " msgstr "" -#: rpm.c:374 rpm.c:418 rpm.c:476 rpm.c:505 rpm.c:569 rpmqv.c:142 +#: rpm.c:374 rpm.c:418 rpm.c:476 rpm.c:505 rpm.c:569 rpmqv.c:140 msgid "use <dir> as the top level directory" msgstr "" @@ -507,11 +507,11 @@ msgid "" "options as -q" msgstr "" -#: lib/poptI.c:151 rpm.c:420 rpm.c:462 rpm.c:497 +#: lib/poptI.c:153 rpm.c:420 rpm.c:462 rpm.c:497 msgid "do not verify package dependencies" msgstr "" -#: lib/poptK.c:69 rpm.c:422 +#: lib/poptK.c:71 rpm.c:422 msgid "do not verify file md5 checksums" msgstr "" @@ -531,7 +531,7 @@ msgstr "" msgid " -i <packagefile> " msgstr "" -#: lib/poptI.c:147 rpm.c:431 +#: lib/poptI.c:149 rpm.c:431 msgid "install package" msgstr "" @@ -551,7 +551,7 @@ msgstr "" msgid "relocate files from <oldpath> to <newpath>" msgstr "" -#: lib/poptI.c:112 rpm.c:437 +#: lib/poptI.c:114 rpm.c:437 msgid "relocate files in non-relocateable package" msgstr "" @@ -559,47 +559,47 @@ msgstr "" msgid " --prefix <dir> " msgstr "" -#: lib/poptI.c:197 rpm.c:439 +#: lib/poptI.c:199 rpm.c:439 msgid "relocate the package to <dir>, if relocatable" msgstr "" -#: lib/poptI.c:121 rpm.c:443 +#: lib/poptI.c:123 rpm.c:443 msgid "do not install documentation" msgstr "" -#: lib/poptI.c:127 rpm.c:445 +#: lib/poptI.c:129 rpm.c:445 msgid "short hand for --replacepkgs --replacefiles" msgstr "" -#: lib/poptI.c:133 rpm.c:447 +#: lib/poptI.c:135 rpm.c:447 msgid "print hash marks as package installs (good with -v)" msgstr "" -#: lib/poptI.c:98 rpm.c:449 +#: lib/poptI.c:100 rpm.c:449 msgid "install all files, even configurations which might otherwise be skipped" msgstr "" -#: lib/poptI.c:136 rpm.c:452 +#: lib/poptI.c:138 rpm.c:452 msgid "don't verify package architecture" msgstr "" -#: lib/poptI.c:142 rpm.c:454 +#: lib/poptI.c:144 rpm.c:454 msgid "don't check disk space before installing" msgstr "" -#: lib/poptI.c:139 rpm.c:456 +#: lib/poptI.c:141 rpm.c:456 msgid "don't verify package operating system" msgstr "" -#: lib/poptI.c:144 rpm.c:458 +#: lib/poptI.c:146 rpm.c:458 msgid "install documentation" msgstr "" -#: lib/poptI.c:149 rpm.c:460 rpm.c:495 +#: lib/poptI.c:151 rpm.c:460 rpm.c:495 msgid "update the database, but do not modify the filesystem" msgstr "" -#: lib/poptI.c:154 rpm.c:464 rpm.c:499 +#: lib/poptI.c:156 rpm.c:464 rpm.c:499 msgid "do not reorder package installation to satisfy dependencies" msgstr "" @@ -611,19 +611,19 @@ msgstr "" msgid "don't execute any scripts triggered by this package" msgstr "" -#: lib/poptI.c:195 rpm.c:470 +#: lib/poptI.c:197 rpm.c:470 msgid "print percentages as package installs" msgstr "" -#: lib/poptI.c:207 rpm.c:472 +#: lib/poptI.c:209 rpm.c:472 msgid "install even if the package replaces installed files" msgstr "" -#: lib/poptI.c:210 rpm.c:474 +#: lib/poptI.c:212 rpm.c:474 msgid "reinstall if the package is already present" msgstr "" -#: lib/poptI.c:215 rpm.c:478 +#: lib/poptI.c:217 rpm.c:478 msgid "don't install, but tell if it would work or not" msgstr "" @@ -639,7 +639,7 @@ msgstr "" msgid "upgrade package (same options as --install, plus)" msgstr "" -#: lib/poptI.c:191 rpm.c:485 +#: lib/poptI.c:193 rpm.c:485 msgid "" "upgrade to an old version of the package (--force on upgrades does this " "automatically)" @@ -653,11 +653,11 @@ msgstr "" msgid " -e <package> " msgstr "" -#: lib/poptI.c:118 rpm.c:489 +#: lib/poptI.c:120 rpm.c:489 msgid "erase (uninstall) package" msgstr "" -#: lib/poptI.c:102 rpm.c:491 +#: lib/poptI.c:104 rpm.c:491 msgid "" "remove all packages which match <package> (normally an error is generated if " "<package> specified multiple packages)" @@ -704,15 +704,15 @@ msgstr "" msgid "bin/src package (prep, compile, install, package)" msgstr "" -#: lib/poptBT.c:211 rpm.c:523 +#: lib/poptBT.c:222 rpm.c:523 msgid "skip straight to specified stage (only for c,i)" msgstr "" -#: lib/poptBT.c:190 rpm.c:525 +#: lib/poptBT.c:201 rpm.c:525 msgid "remove build tree when done" msgstr "" -#: lib/poptBT.c:207 rpm.c:527 +#: lib/poptBT.c:218 rpm.c:527 msgid "remove sources when done" msgstr "" @@ -720,7 +720,7 @@ msgstr "" msgid "remove spec file when done" msgstr "" -#: lib/poptBT.c:213 rpm.c:531 +#: lib/poptBT.c:224 rpm.c:531 msgid "generate PGP/GPG signature" msgstr "" @@ -766,7 +766,7 @@ msgstr "" msgid " --resign <pkg>+ " msgstr "" -#: lib/poptK.c:56 rpm.c:546 +#: lib/poptK.c:58 rpm.c:546 msgid "sign a package (discard current signature)" msgstr "" @@ -774,7 +774,7 @@ msgstr "" msgid " --addsign <pkg>+ " msgstr "" -#: lib/poptK.c:54 rpm.c:548 +#: lib/poptK.c:56 rpm.c:548 msgid "add a signature to a package" msgstr "" @@ -786,15 +786,15 @@ msgstr "" msgid " -K <pkg>+ " msgstr "" -#: lib/poptK.c:60 rpm.c:551 +#: lib/poptK.c:62 rpm.c:551 msgid "verify package signature" msgstr "" -#: lib/poptK.c:66 rpm.c:553 +#: lib/poptK.c:68 rpm.c:553 msgid "skip any PGP signatures" msgstr "" -#: lib/poptK.c:63 rpm.c:555 +#: lib/poptK.c:65 rpm.c:555 msgid "skip any GPG signatures" msgstr "" @@ -1104,97 +1104,97 @@ msgstr "" msgid "cannot re-open payload: %s\n" msgstr "" -#: rpmqv.c:129 +#: rpmqv.c:127 msgid "provide less detailed output" msgstr "" -#: rpmqv.c:131 +#: rpmqv.c:129 msgid "provide more detailed output" msgstr "" -#: rpmqv.c:134 +#: rpmqv.c:132 msgid "'<name> <body>'" msgstr "" -#: rpmqv.c:136 +#: rpmqv.c:134 msgid "print macro expansion of <expr>+" msgstr "" -#: rpmqv.c:137 +#: rpmqv.c:135 msgid "<expr>+" msgstr "" -#: rpmqv.c:140 +#: rpmqv.c:138 msgid "<cmd>" msgstr "" -#: lib/poptI.c:198 rpmqv.c:143 +#: lib/poptI.c:200 rpmqv.c:141 msgid "<dir>" msgstr "" -#: rpmqv.c:145 +#: rpmqv.c:143 msgid "read <file:...> instead of default macro file(s)" msgstr "" -#: rpmqv.c:146 rpmqv.c:150 rpmqv.c:154 +#: rpmqv.c:144 rpmqv.c:148 rpmqv.c:152 msgid "<file:...>" msgstr "" -#: rpmqv.c:149 rpmqv.c:153 +#: rpmqv.c:147 rpmqv.c:151 msgid "read <file:...> instead of default rpmrc file(s)" msgstr "" -#: rpmqv.c:162 +#: rpmqv.c:160 msgid "disable use of libio(3) API" msgstr "" -#: rpmqv.c:165 +#: rpmqv.c:163 msgid "debug protocol data stream" msgstr "" -#: rpmqv.c:167 +#: rpmqv.c:165 msgid "debug rpmio I/O" msgstr "" -#: rpmqv.c:169 +#: rpmqv.c:167 msgid "debug URL cache handling" msgstr "" -#: rpmqv.c:189 +#: rpmqv.c:187 msgid "Query options (with -q or --query):" msgstr "" -#: rpmqv.c:192 +#: rpmqv.c:190 msgid "Verify options (with -V or --verify):" msgstr "" -#: rpmqv.c:198 +#: rpmqv.c:196 msgid "Signature options:" msgstr "" -#: rpmqv.c:204 +#: rpmqv.c:202 msgid "Database options:" msgstr "" -#: rpmqv.c:210 +#: rpmqv.c:208 msgid "Build options with [ <specfile> | <tarball> | <source package> ]:" msgstr "" -#: rpmqv.c:216 +#: rpmqv.c:214 msgid "Install/Upgrade/Erase options:" msgstr "" -#: rpmqv.c:221 +#: rpmqv.c:219 msgid "Common options for all rpm modes:" msgstr "" #. @-modfilesys -globs @ -#: lib/poptI.c:27 rpmqv.c:238 +#: lib/poptI.c:27 rpmqv.c:236 #, c-format msgid "%s: %s\n" msgstr "" -#: rpmqv.c:266 +#: rpmqv.c:264 #, c-format msgid "Usage: %s {--help}\n" msgstr "" @@ -1225,78 +1225,78 @@ msgstr "" msgid "no tar files given for build" msgstr "" -#: build/build.c:125 build/pack.c:469 +#: build/build.c:125 build/pack.c:471 msgid "Unable to open temp file.\n" msgstr "" -#: build/build.c:209 +#: build/build.c:211 #, c-format msgid "Executing(%s): %s\n" msgstr "" -#: build/build.c:215 +#: build/build.c:219 #, c-format msgid "Exec of %s failed (%s): %s\n" msgstr "" -#: build/build.c:224 +#: build/build.c:228 #, c-format msgid "Bad exit status from %s (%s)\n" msgstr "" -#: build/build.c:324 +#: build/build.c:328 msgid "" "\n" "\n" "RPM build errors:\n" msgstr "" -#: build/expression.c:223 +#: build/expression.c:224 msgid "syntax error while parsing ==\n" msgstr "" -#: build/expression.c:253 +#: build/expression.c:254 msgid "syntax error while parsing &&\n" msgstr "" -#: build/expression.c:262 +#: build/expression.c:263 msgid "syntax error while parsing ||\n" msgstr "" -#: build/expression.c:305 +#: build/expression.c:306 msgid "parse error in expression\n" msgstr "" -#: build/expression.c:342 +#: build/expression.c:345 msgid "unmatched (\n" msgstr "" -#: build/expression.c:372 +#: build/expression.c:375 msgid "- only on numbers\n" msgstr "" -#: build/expression.c:388 +#: build/expression.c:391 msgid "! only on numbers\n" msgstr "" -#: build/expression.c:434 build/expression.c:486 build/expression.c:548 -#: build/expression.c:644 +#: build/expression.c:438 build/expression.c:491 build/expression.c:554 +#: build/expression.c:651 msgid "types must match\n" msgstr "" -#: build/expression.c:447 +#: build/expression.c:451 msgid "* / not suported for strings\n" msgstr "" -#: build/expression.c:502 +#: build/expression.c:507 msgid "- not suported for strings\n" msgstr "" -#: build/expression.c:657 +#: build/expression.c:664 msgid "&& and || not suported for strings\n" msgstr "" -#: build/expression.c:691 build/expression.c:738 +#: build/expression.c:698 build/expression.c:745 msgid "syntax error in expression\n" msgstr "" @@ -1433,7 +1433,7 @@ msgstr "" msgid "Could not open %%files file %s: %s\n" msgstr "" -#: build/files.c:1781 build/pack.c:148 +#: build/files.c:1781 build/pack.c:150 #, c-format msgid "line: %s\n" msgstr "" @@ -1444,66 +1444,66 @@ msgid "Bad file: %s: %s\n" msgstr "" #. XXX this error message is probably not seen. -#: build/files.c:2226 +#: build/files.c:2228 #, c-format msgid "Couldn't exec %s: %s\n" msgstr "" -#: build/files.c:2231 +#: build/files.c:2233 #, c-format msgid "Couldn't fork %s: %s\n" msgstr "" -#: build/files.c:2313 +#: build/files.c:2317 #, c-format msgid "%s failed\n" msgstr "" -#: build/files.c:2317 +#: build/files.c:2321 #, c-format msgid "failed to write all data to %s\n" msgstr "" -#: build/files.c:2452 +#: build/files.c:2457 #, c-format msgid "Finding %s: (using %s)...\n" msgstr "" -#: build/files.c:2478 build/files.c:2492 +#: build/files.c:2483 build/files.c:2497 #, c-format msgid "Failed to find %s:\n" msgstr "" -#: build/files.c:2613 +#: build/files.c:2618 #, c-format msgid "Processing files: %s-%s-%s\n" msgstr "" -#: build/names.c:50 +#: build/names.c:51 msgid "getUname: too many uid's\n" msgstr "" -#: build/names.c:72 +#: build/names.c:73 msgid "getUnameS: too many uid's\n" msgstr "" -#: build/names.c:94 +#: build/names.c:95 msgid "getUidS: too many uid's\n" msgstr "" -#: build/names.c:116 +#: build/names.c:117 msgid "getGname: too many gid's\n" msgstr "" -#: build/names.c:138 +#: build/names.c:139 msgid "getGnameS: too many gid's\n" msgstr "" -#: build/names.c:160 +#: build/names.c:161 msgid "getGidS: too many gid's\n" msgstr "" -#: build/names.c:195 +#: build/names.c:196 #, c-format msgid "Could not canonicalize hostname: %s\n" msgstr "" @@ -1528,132 +1528,132 @@ msgstr "" msgid "cpio_copy read failed: %s\n" msgstr "" -#: build/pack.c:216 +#: build/pack.c:218 #, c-format msgid "Could not open PreIn file: %s\n" msgstr "" -#: build/pack.c:223 +#: build/pack.c:225 #, c-format msgid "Could not open PreUn file: %s\n" msgstr "" -#: build/pack.c:230 +#: build/pack.c:232 #, c-format msgid "Could not open PostIn file: %s\n" msgstr "" -#: build/pack.c:237 +#: build/pack.c:239 #, c-format msgid "Could not open PostUn file: %s\n" msgstr "" -#: build/pack.c:245 +#: build/pack.c:247 #, c-format msgid "Could not open VerifyScript file: %s\n" msgstr "" -#: build/pack.c:260 +#: build/pack.c:262 #, c-format msgid "Could not open Trigger script file: %s\n" msgstr "" -#: build/pack.c:288 +#: build/pack.c:290 #, c-format msgid "readRPM: open %s: %s\n" msgstr "" -#: build/pack.c:298 +#: build/pack.c:300 #, c-format msgid "readRPM: read %s: %s\n" msgstr "" -#: build/pack.c:307 build/pack.c:511 +#: build/pack.c:309 build/pack.c:513 #, c-format msgid "%s: Fseek failed: %s\n" msgstr "" -#: build/pack.c:323 +#: build/pack.c:325 #, c-format msgid "readRPM: %s is not an RPM package\n" msgstr "" -#: build/pack.c:332 +#: build/pack.c:334 #, c-format msgid "readRPM: reading header from %s\n" msgstr "" -#: build/pack.c:457 +#: build/pack.c:459 msgid "Unable to create immutable header region.\n" msgstr "" -#: build/pack.c:475 +#: build/pack.c:477 msgid "Unable to write temp header\n" msgstr "" -#: build/pack.c:483 +#: build/pack.c:485 msgid "Bad CSA data\n" msgstr "" -#: build/pack.c:518 +#: build/pack.c:520 msgid "Unable to write final header\n" msgstr "" -#: build/pack.c:536 +#: build/pack.c:538 #, c-format msgid "Generating signature: %d\n" msgstr "" -#: build/pack.c:549 +#: build/pack.c:551 msgid "Unable to reload signature header.\n" msgstr "" -#: build/pack.c:557 +#: build/pack.c:559 #, c-format msgid "Could not open %s: %s\n" msgstr "" -#: build/pack.c:593 lib/psm.c:1571 +#: build/pack.c:595 lib/psm.c:1562 #, c-format msgid "Unable to write package: %s\n" msgstr "" -#: build/pack.c:608 +#: build/pack.c:610 #, c-format msgid "Unable to open sigtarget %s: %s\n" msgstr "" -#: build/pack.c:618 +#: build/pack.c:620 #, c-format msgid "Unable to read header from %s: %s\n" msgstr "" -#: build/pack.c:632 +#: build/pack.c:634 #, c-format msgid "Unable to write header to %s: %s\n" msgstr "" -#: build/pack.c:642 +#: build/pack.c:644 #, c-format msgid "Unable to read payload from %s: %s\n" msgstr "" -#: build/pack.c:648 +#: build/pack.c:650 #, c-format msgid "Unable to write payload to %s: %s\n" msgstr "" -#: build/pack.c:673 lib/psm.c:1830 +#: build/pack.c:675 lib/psm.c:1827 #, c-format msgid "Wrote: %s\n" msgstr "" -#: build/pack.c:740 +#: build/pack.c:742 #, c-format msgid "Could not generate output filename for package %s: %s\n" msgstr "" -#: build/pack.c:757 +#: build/pack.c:759 #, c-format msgid "cannot create %s: %s\n" msgstr "" @@ -1693,37 +1693,37 @@ msgstr "" msgid "no description in %%changelog\n" msgstr "" -#: build/parseDescription.c:45 +#: build/parseDescription.c:47 #, c-format msgid "line %d: Error parsing %%description: %s\n" msgstr "" -#: build/parseDescription.c:58 build/parseFiles.c:53 build/parseScript.c:197 +#: build/parseDescription.c:60 build/parseFiles.c:56 build/parseScript.c:199 #, c-format msgid "line %d: Bad option %s: %s\n" msgstr "" -#: build/parseDescription.c:71 build/parseFiles.c:65 build/parseScript.c:209 +#: build/parseDescription.c:75 build/parseFiles.c:70 build/parseScript.c:213 #, c-format msgid "line %d: Too many names: %s\n" msgstr "" -#: build/parseDescription.c:81 build/parseFiles.c:74 build/parseScript.c:218 +#: build/parseDescription.c:85 build/parseFiles.c:79 build/parseScript.c:222 #, c-format msgid "line %d: Package does not exist: %s\n" msgstr "" -#: build/parseDescription.c:93 +#: build/parseDescription.c:97 #, c-format msgid "line %d: Second description\n" msgstr "" -#: build/parseFiles.c:39 +#: build/parseFiles.c:42 #, c-format msgid "line %d: Error parsing %%files: %s\n" msgstr "" -#: build/parseFiles.c:81 +#: build/parseFiles.c:86 #, c-format msgid "line %d: Second %%files list\n" msgstr "" @@ -1794,7 +1794,7 @@ msgstr "" msgid "line %d: Illegal char '-' in %s: %s\n" msgstr "" -#: build/parsePreamble.c:571 build/parseSpec.c:404 +#: build/parsePreamble.c:571 build/parseSpec.c:408 #, c-format msgid "BuildRoot can not be \"/\": %s\n" msgstr "" @@ -1868,51 +1868,51 @@ msgstr "" msgid "Couldn't download nosource %s: %s\n" msgstr "" -#: build/parsePrep.c:301 +#: build/parsePrep.c:303 #, c-format msgid "Error parsing %%setup: %s\n" msgstr "" -#: build/parsePrep.c:316 +#: build/parsePrep.c:318 #, c-format msgid "line %d: Bad arg to %%setup: %s\n" msgstr "" -#: build/parsePrep.c:334 +#: build/parsePrep.c:336 #, c-format msgid "line %d: Bad %%setup option %s: %s\n" msgstr "" -#: build/parsePrep.c:474 +#: build/parsePrep.c:476 #, c-format msgid "line %d: Need arg to %%patch -b: %s\n" msgstr "" -#: build/parsePrep.c:483 +#: build/parsePrep.c:485 #, c-format msgid "line %d: Need arg to %%patch -z: %s\n" msgstr "" -#: build/parsePrep.c:495 +#: build/parsePrep.c:497 #, c-format msgid "line %d: Need arg to %%patch -p: %s\n" msgstr "" -#: build/parsePrep.c:502 +#: build/parsePrep.c:504 #, c-format msgid "line %d: Bad arg to %%patch -p: %s\n" msgstr "" -#: build/parsePrep.c:509 +#: build/parsePrep.c:511 msgid "Too many patches!\n" msgstr "" -#: build/parsePrep.c:513 +#: build/parsePrep.c:515 #, c-format msgid "line %d: Bad arg to %%patch: %s\n" msgstr "" -#: build/parsePrep.c:548 +#: build/parsePrep.c:550 #, c-format msgid "line %d: second %%prep\n" msgstr "" @@ -1938,67 +1938,67 @@ msgstr "" msgid "line %d: Version required: %s\n" msgstr "" -#: build/parseScript.c:163 +#: build/parseScript.c:165 #, c-format msgid "line %d: triggers must have --: %s\n" msgstr "" -#: build/parseScript.c:173 build/parseScript.c:234 +#: build/parseScript.c:175 build/parseScript.c:238 #, c-format msgid "line %d: Error parsing %s: %s\n" msgstr "" -#: build/parseScript.c:184 +#: build/parseScript.c:186 #, c-format msgid "line %d: script program must begin with '/': %s\n" msgstr "" -#: build/parseScript.c:226 +#: build/parseScript.c:230 #, c-format msgid "line %d: Second %s\n" msgstr "" -#: build/parseSpec.c:146 +#: build/parseSpec.c:148 #, c-format msgid "line %d: %s\n" msgstr "" #. XXX Fstrerror -#: build/parseSpec.c:196 +#: build/parseSpec.c:198 #, c-format msgid "Unable to open %s: %s\n" msgstr "" -#: build/parseSpec.c:210 +#: build/parseSpec.c:214 #, c-format msgid "Unclosed %%if\n" msgstr "" -#: build/parseSpec.c:282 +#: build/parseSpec.c:286 #, c-format msgid "%s:%d: parseExpressionBoolean returns %d\n" msgstr "" -#: build/parseSpec.c:291 +#: build/parseSpec.c:295 #, c-format msgid "%s:%d: Got a %%else with no %%if\n" msgstr "" -#: build/parseSpec.c:303 +#: build/parseSpec.c:307 #, c-format msgid "%s:%d: Got a %%endif with no %%if\n" msgstr "" -#: build/parseSpec.c:317 build/parseSpec.c:326 +#: build/parseSpec.c:321 build/parseSpec.c:330 #, c-format msgid "malformed %%include statement\n" msgstr "" -#: build/parseSpec.c:523 +#: build/parseSpec.c:527 msgid "No compatible architectures found for build\n" msgstr "" -#: build/parseSpec.c:580 +#: build/parseSpec.c:584 #, c-format msgid "Package has no %%description: %s\n" msgstr "" @@ -2018,114 +2018,114 @@ msgstr "" msgid "line %d: Bad %s number: %s\n" msgstr "" -#: lib/cpio.c:188 +#: lib/cpio.c:183 #, c-format msgid "(error 0x%x)" msgstr "" -#: lib/cpio.c:191 +#: lib/cpio.c:186 msgid "Bad magic" msgstr "" -#: lib/cpio.c:192 +#: lib/cpio.c:187 msgid "Bad/unreadable header" msgstr "" -#: lib/cpio.c:213 +#: lib/cpio.c:208 msgid "Header size too big" msgstr "" -#: lib/cpio.c:214 +#: lib/cpio.c:209 msgid "Unknown file type" msgstr "" -#: lib/cpio.c:215 +#: lib/cpio.c:210 msgid "Missing hard link(s)" msgstr "" -#: lib/cpio.c:216 +#: lib/cpio.c:211 msgid "MD5 sum mismatch" msgstr "" -#: lib/cpio.c:217 +#: lib/cpio.c:212 msgid "Internal error" msgstr "" -#: lib/cpio.c:218 +#: lib/cpio.c:213 msgid "Archive file not in header" msgstr "" -#: lib/cpio.c:229 +#: lib/cpio.c:224 msgid " failed - " msgstr "" #. XXX legacy epoch-less requires/conflicts compatibility -#: lib/depends.c:574 +#: lib/depends.c:582 #, c-format msgid "" "the \"B\" dependency needs an epoch (assuming same as \"A\")\n" "\tA %s\tB %s\n" msgstr "" -#: lib/depends.c:603 +#: lib/depends.c:611 #, c-format msgid " %s A %s\tB %s\n" msgstr "" -#: lib/depends.c:604 lib/depends.c:1238 lib/depends.c:1371 +#: lib/depends.c:612 lib/depends.c:1248 lib/depends.c:1381 msgid "YES" msgstr "" -#: lib/depends.c:604 lib/depends.c:1238 lib/depends.c:1371 +#: lib/depends.c:612 lib/depends.c:1248 lib/depends.c:1381 msgid "NO " msgstr "" -#: lib/depends.c:1032 +#: lib/depends.c:1042 #, c-format msgid "%s: %-45s YES (added files)\n" msgstr "" -#: lib/depends.c:1143 +#: lib/depends.c:1153 #, c-format msgid "%s: %-45s YES (added provide)\n" msgstr "" -#: lib/depends.c:1237 +#: lib/depends.c:1247 #, c-format msgid "%s: %-45s %-s (cached)\n" msgstr "" -#: lib/depends.c:1266 +#: lib/depends.c:1276 #, c-format msgid "%s: %-45s YES (rpmrc provides)\n" msgstr "" -#: lib/depends.c:1283 +#: lib/depends.c:1293 #, c-format msgid "%s: %-45s YES (rpmlib provides)\n" msgstr "" -#: lib/depends.c:1307 +#: lib/depends.c:1317 #, c-format msgid "%s: %-45s YES (db files)\n" msgstr "" -#: lib/depends.c:1320 +#: lib/depends.c:1330 #, c-format msgid "%s: %-45s YES (db provides)\n" msgstr "" -#: lib/depends.c:1334 +#: lib/depends.c:1344 #, c-format msgid "%s: %-45s YES (db package)\n" msgstr "" -#: lib/depends.c:1350 +#: lib/depends.c:1360 #, c-format msgid "%s: %-45s NO\n" msgstr "" -#: lib/depends.c:1371 +#: lib/depends.c:1381 #, c-format msgid "%s: (%s, %s) added to Depends cache.\n" msgstr "" @@ -2133,47 +2133,47 @@ msgstr "" #. requirements are satisfied. #. @switchbreak@ #. requirements are not satisfied. -#: lib/depends.c:1444 +#: lib/depends.c:1454 #, c-format msgid "package %s-%s-%s require not satisfied: %s\n" msgstr "" #. conflicts exist. -#: lib/depends.c:1523 +#: lib/depends.c:1533 #, c-format msgid "package %s conflicts: %s\n" msgstr "" -#: lib/depends.c:1776 +#: lib/depends.c:1786 #, c-format msgid "removing %s-%s-%s \"%s\" from tsort relations.\n" msgstr "" #. Record all relations. -#: lib/depends.c:1926 +#: lib/depends.c:1936 msgid "========== recording tsort relations\n" msgstr "" #. T4. Scan for zeroes. -#: lib/depends.c:1986 +#: lib/depends.c:1996 msgid "" "========== tsorting packages (order, #predecessors, #succesors, depth)\n" msgstr "" -#: lib/depends.c:2036 +#: lib/depends.c:2046 msgid "========== successors only (presentation order)\n" msgstr "" -#: lib/depends.c:2089 +#: lib/depends.c:2099 msgid "LOOP:\n" msgstr "" -#: lib/depends.c:2119 +#: lib/depends.c:2129 msgid "========== continuing tsort ...\n" msgstr "" #: lib/formats.c:28 lib/formats.c:54 lib/formats.c:85 lib/formats.c:160 -#: lib/header.c:2863 lib/header.c:2884 lib/header.c:2906 +#: lib/header.c:2869 lib/header.c:2890 lib/header.c:2912 msgid "(not a number)" msgstr "" @@ -2181,75 +2181,75 @@ msgstr "" msgid "(not a blob)" msgstr "" -#: lib/fs.c:74 +#: lib/fs.c:75 #, c-format msgid "mntctl() failed to return size: %s\n" msgstr "" -#: lib/fs.c:89 +#: lib/fs.c:90 #, c-format msgid "mntctl() failed to return mount points: %s\n" msgstr "" -#: lib/fs.c:109 lib/fs.c:195 lib/fs.c:300 +#: lib/fs.c:110 lib/fs.c:196 lib/fs.c:299 #, c-format msgid "failed to stat %s: %s\n" msgstr "" -#: lib/fs.c:154 +#: lib/fs.c:155 msgid "getting list of mounted filesystems\n" msgstr "" -#: lib/fs.c:159 rpmio/url.c:499 +#: lib/fs.c:160 rpmio/url.c:505 #, c-format msgid "failed to open %s: %s\n" msgstr "" -#: lib/fs.c:323 +#: lib/fs.c:322 #, c-format msgid "file %s is on an unknown device\n" msgstr "" -#: lib/fsm.c:303 +#: lib/fsm.c:301 msgid "========= Directories not explictly included in package:\n" msgstr "" -#: lib/fsm.c:305 +#: lib/fsm.c:303 #, c-format msgid "%9d %s\n" msgstr "" -#: lib/fsm.c:1162 +#: lib/fsm.c:1163 #, c-format msgid "%s directory created with perms %04o.\n" msgstr "" -#: lib/fsm.c:1441 +#: lib/fsm.c:1444 #, c-format msgid "archive file %s was not found in header file list\n" msgstr "" -#: lib/fsm.c:1560 lib/fsm.c:1688 +#: lib/fsm.c:1565 lib/fsm.c:1693 #, c-format msgid "%s saved as %s\n" msgstr "" -#: lib/fsm.c:1714 +#: lib/fsm.c:1719 #, c-format msgid "%s rmdir of %s failed: Directory not empty\n" msgstr "" -#: lib/fsm.c:1720 +#: lib/fsm.c:1725 #, c-format msgid "%s rmdir of %s failed: %s\n" msgstr "" -#: lib/fsm.c:1730 +#: lib/fsm.c:1735 #, c-format msgid "%s unlink of %s failed: %s\n" msgstr "" -#: lib/fsm.c:1749 +#: lib/fsm.c:1754 #, c-format msgid "%s created as %s\n" msgstr "" @@ -2261,87 +2261,87 @@ msgid "dataLength() RPM_STRING_TYPE count must be 1.\n" msgstr "" #. @-modfilesys@ -#: lib/header.c:346 lib/header_internal.c:160 lib/psm.c:406 +#: lib/header.c:346 lib/header_internal.c:161 lib/psm.c:401 #, c-format msgid "Data type %d not supported\n" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2149 +#: lib/header.c:2155 #, c-format msgid "missing { after %" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2179 +#: lib/header.c:2185 msgid "missing } after %{" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2193 +#: lib/header.c:2199 msgid "empty tag format" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2207 +#: lib/header.c:2213 msgid "empty tag name" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2224 +#: lib/header.c:2230 msgid "unknown tag" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2251 +#: lib/header.c:2257 msgid "] expected at end of array" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2269 +#: lib/header.c:2275 msgid "unexpected ]" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2273 +#: lib/header.c:2279 msgid "unexpected }" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2339 +#: lib/header.c:2345 msgid "? expected in expression" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2348 +#: lib/header.c:2354 msgid "{ expected after ? in expression" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2361 lib/header.c:2403 +#: lib/header.c:2367 lib/header.c:2409 msgid "} expected in expression" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2371 +#: lib/header.c:2377 msgid ": expected following ? subexpression" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2388 +#: lib/header.c:2394 msgid "{ expected after : in expression" msgstr "" #. @-observertrans -readonlytrans@ -#: lib/header.c:2413 +#: lib/header.c:2419 msgid "| expected at end of expression" msgstr "" -#: lib/header.c:2609 +#: lib/header.c:2615 msgid "(unknown type)" msgstr "" -#: lib/misc.c:276 lib/misc.c:281 lib/misc.c:287 +#: lib/misc.c:272 lib/misc.c:277 lib/misc.c:283 #, c-format msgid "error creating temporary file %s\n" msgstr "" @@ -2355,135 +2355,135 @@ msgid "" "only packaging with major numbers <= 4 is supported by this version of RPM\n" msgstr "" -#: lib/poptBT.c:109 +#: lib/poptBT.c:118 #, c-format msgid "buildroot already specified, ignoring %s\n" msgstr "" -#: lib/poptBT.c:137 +#: lib/poptBT.c:148 #, c-format msgid "build through %prep (unpack sources and apply patches) from <specfile>" msgstr "" -#: lib/poptBT.c:138 lib/poptBT.c:141 lib/poptBT.c:144 lib/poptBT.c:147 -#: lib/poptBT.c:150 lib/poptBT.c:153 lib/poptBT.c:156 +#: lib/poptBT.c:149 lib/poptBT.c:152 lib/poptBT.c:155 lib/poptBT.c:158 +#: lib/poptBT.c:161 lib/poptBT.c:164 lib/poptBT.c:167 msgid "<specfile>" msgstr "" -#: lib/poptBT.c:140 +#: lib/poptBT.c:151 msgid "build through %build (%prep, then compile) from <specfile>" msgstr "" -#: lib/poptBT.c:143 +#: lib/poptBT.c:154 msgid "build through %install (%prep, %build, then install) from <specfile>" msgstr "" -#: lib/poptBT.c:146 +#: lib/poptBT.c:157 #, c-format msgid "verify %files section from <specfile>" msgstr "" -#: lib/poptBT.c:149 +#: lib/poptBT.c:160 msgid "build source and binary packages from <specfile>" msgstr "" -#: lib/poptBT.c:152 +#: lib/poptBT.c:163 msgid "build binary package only from <specfile>" msgstr "" -#: lib/poptBT.c:155 +#: lib/poptBT.c:166 msgid "build source package only from <specfile>" msgstr "" -#: lib/poptBT.c:159 +#: lib/poptBT.c:170 #, c-format msgid "build through %prep (unpack sources and apply patches) from <tarball>" msgstr "" -#: lib/poptBT.c:160 lib/poptBT.c:163 lib/poptBT.c:166 lib/poptBT.c:169 -#: lib/poptBT.c:172 lib/poptBT.c:175 lib/poptBT.c:178 +#: lib/poptBT.c:171 lib/poptBT.c:174 lib/poptBT.c:177 lib/poptBT.c:180 +#: lib/poptBT.c:183 lib/poptBT.c:186 lib/poptBT.c:189 msgid "<tarball>" msgstr "" -#: lib/poptBT.c:162 +#: lib/poptBT.c:173 msgid "build through %build (%prep, then compile) from <tarball>" msgstr "" -#: lib/poptBT.c:165 +#: lib/poptBT.c:176 msgid "build through %install (%prep, %build, then install) from <tarball>" msgstr "" -#: lib/poptBT.c:168 +#: lib/poptBT.c:179 #, c-format msgid "verify %files section from <tarball>" msgstr "" -#: lib/poptBT.c:171 +#: lib/poptBT.c:182 msgid "build source and binary packages from <tarball>" msgstr "" -#: lib/poptBT.c:174 +#: lib/poptBT.c:185 msgid "build binary package only from <tarball>" msgstr "" -#: lib/poptBT.c:177 +#: lib/poptBT.c:188 msgid "build source package only from <tarball>" msgstr "" -#: lib/poptBT.c:181 +#: lib/poptBT.c:192 msgid "build binary package from <source package>" msgstr "" -#: lib/poptBT.c:182 lib/poptBT.c:185 +#: lib/poptBT.c:193 lib/poptBT.c:196 msgid "<source package>" msgstr "" -#: lib/poptBT.c:184 +#: lib/poptBT.c:195 msgid "" "build through %install (%prep, %build, then install) from <source package>" msgstr "" -#: lib/poptBT.c:188 +#: lib/poptBT.c:199 msgid "override build root" msgstr "" -#: lib/poptBT.c:192 rpmdb/poptDB.c:32 +#: lib/poptBT.c:203 rpmdb/poptDB.c:32 msgid "generate headers compatible with rpm4 packaging" msgstr "" -#: lib/poptBT.c:194 +#: lib/poptBT.c:205 msgid "ignore ExcludeArch: directives from spec file" msgstr "" -#: lib/poptBT.c:196 +#: lib/poptBT.c:207 msgid "debug file state machine" msgstr "" -#: lib/poptBT.c:198 +#: lib/poptBT.c:209 msgid "do not execute any stages of the build" msgstr "" -#: lib/poptBT.c:200 +#: lib/poptBT.c:211 msgid "do not verify build dependencies" msgstr "" -#: lib/poptBT.c:202 +#: lib/poptBT.c:213 msgid "generate package header(s) compatible with (legacy) rpm[23] packaging" msgstr "" -#: lib/poptBT.c:205 +#: lib/poptBT.c:216 msgid "do not accept i18N msgstr's from specfile" msgstr "" -#: lib/poptBT.c:209 +#: lib/poptBT.c:220 msgid "remove specfile when done" msgstr "" -#: lib/poptBT.c:215 +#: lib/poptBT.c:226 msgid "override target platform" msgstr "" -#: lib/poptBT.c:217 +#: lib/poptBT.c:228 msgid "lookup i18N strings in specfile catalog" msgstr "" @@ -2491,246 +2491,246 @@ msgstr "" msgid "malformed rollback time" msgstr "" -#: lib/poptI.c:108 lib/poptI.c:159 +#: lib/poptI.c:110 lib/poptI.c:161 msgid "do not execute package scriptlet(s)" msgstr "" -#: lib/poptI.c:115 +#: lib/poptI.c:117 msgid "save erased package files by renaming into sub-directory" msgstr "" -#: lib/poptI.c:118 +#: lib/poptI.c:120 msgid "<package>+" msgstr "" -#: lib/poptI.c:123 +#: lib/poptI.c:125 msgid "skip files with leading component <path> " msgstr "" -#: lib/poptI.c:124 +#: lib/poptI.c:126 msgid "<path>" msgstr "" -#: lib/poptI.c:130 +#: lib/poptI.c:132 msgid "upgrade package(s) if already installed" msgstr "" -#: lib/poptI.c:131 lib/poptI.c:147 lib/poptI.c:219 +#: lib/poptI.c:133 lib/poptI.c:149 lib/poptI.c:221 msgid "<packagefile>+" msgstr "" -#: lib/poptI.c:162 +#: lib/poptI.c:164 #, c-format msgid "do not execute %%pre scriptlet (if any)" msgstr "" -#: lib/poptI.c:165 +#: lib/poptI.c:167 #, c-format msgid "do not execute %%post scriptlet (if any)" msgstr "" -#: lib/poptI.c:168 +#: lib/poptI.c:170 #, c-format msgid "do not execute %%preun scriptlet (if any)" msgstr "" -#: lib/poptI.c:171 +#: lib/poptI.c:173 #, c-format msgid "do not execute %%postun scriptlet (if any)" msgstr "" -#: lib/poptI.c:175 +#: lib/poptI.c:177 msgid "do not execute any scriptlet(s) triggered by this package" msgstr "" -#: lib/poptI.c:178 +#: lib/poptI.c:180 #, c-format msgid "do not execute any %%triggerprein scriptlet(s)" msgstr "" -#: lib/poptI.c:181 +#: lib/poptI.c:183 #, c-format msgid "do not execute any %%triggerin scriptlet(s)" msgstr "" -#: lib/poptI.c:184 +#: lib/poptI.c:186 #, c-format msgid "do not execute any %%triggerun scriptlet(s)" msgstr "" -#: lib/poptI.c:187 +#: lib/poptI.c:189 #, c-format msgid "do not execute any %%triggerpostun scriptlet(s)" msgstr "" -#: lib/poptI.c:200 +#: lib/poptI.c:202 msgid "relocate files from path <old> to <new>" msgstr "" -#: lib/poptI.c:201 +#: lib/poptI.c:203 msgid "<old>=<new>" msgstr "" -#: lib/poptI.c:204 +#: lib/poptI.c:206 msgid "save erased package files by repackaging" msgstr "" -#: lib/poptI.c:212 +#: lib/poptI.c:214 msgid "deinstall new package(s), reinstall old package(s), back to date" msgstr "" -#: lib/poptI.c:213 +#: lib/poptI.c:215 msgid "<date>" msgstr "" -#: lib/poptI.c:218 +#: lib/poptI.c:220 msgid "upgrade package(s)" msgstr "" -#: lib/poptK.c:58 +#: lib/poptK.c:60 msgid "generate signature" msgstr "" -#: lib/poptQV.c:76 +#: lib/poptQV.c:78 msgid "query/verify all packages" msgstr "" -#: lib/poptQV.c:78 +#: lib/poptQV.c:80 msgid "query/verify package(s) owning file" msgstr "" -#: lib/poptQV.c:80 +#: lib/poptQV.c:82 msgid "query/verify package(s) in group" msgstr "" -#: lib/poptQV.c:82 +#: lib/poptQV.c:84 msgid "query/verify a package file (i.e. a binary *.rpm file)" msgstr "" -#: lib/poptQV.c:84 +#: lib/poptQV.c:86 msgid "rpm query mode" msgstr "" -#: lib/poptQV.c:88 +#: lib/poptQV.c:90 msgid "display known query tags" msgstr "" -#: lib/poptQV.c:90 +#: lib/poptQV.c:92 msgid "query a spec file" msgstr "" -#: lib/poptQV.c:90 +#: lib/poptQV.c:92 msgid "<spec>" msgstr "" -#: lib/poptQV.c:92 +#: lib/poptQV.c:94 msgid "query the package(s) triggered by the package" msgstr "" -#: lib/poptQV.c:94 +#: lib/poptQV.c:96 msgid "rpm verify mode" msgstr "" -#: lib/poptQV.c:96 +#: lib/poptQV.c:98 msgid "rpm verify mode (legacy)" msgstr "" -#: lib/poptQV.c:98 +#: lib/poptQV.c:100 msgid "query/verify the package(s) which require a dependency" msgstr "" -#: lib/poptQV.c:100 +#: lib/poptQV.c:102 msgid "query/verify the package(s) which provide a dependency" msgstr "" -#: lib/poptQV.c:158 +#: lib/poptQV.c:162 msgid "list all configuration files" msgstr "" -#: lib/poptQV.c:160 +#: lib/poptQV.c:164 msgid "list all documentation files" msgstr "" -#: lib/poptQV.c:162 +#: lib/poptQV.c:166 msgid "dump basic file information" msgstr "" -#: lib/poptQV.c:164 +#: lib/poptQV.c:168 msgid "list files in package" msgstr "" -#: lib/poptQV.c:169 +#: lib/poptQV.c:173 #, c-format msgid "skip %%ghost files" msgstr "" -#: lib/poptQV.c:173 +#: lib/poptQV.c:177 #, c-format msgid "skip %%license files" msgstr "" -#: lib/poptQV.c:176 +#: lib/poptQV.c:180 #, c-format msgid "skip %%readme files" msgstr "" -#: lib/poptQV.c:182 +#: lib/poptQV.c:186 msgid "use the following query format" msgstr "" -#: lib/poptQV.c:184 +#: lib/poptQV.c:188 msgid "substitute i18n sections into spec file" msgstr "" -#: lib/poptQV.c:186 +#: lib/poptQV.c:190 msgid "display the states of the listed files" msgstr "" -#: lib/poptQV.c:188 +#: lib/poptQV.c:192 msgid "display a verbose file listing" msgstr "" -#: lib/poptQV.c:205 +#: lib/poptQV.c:209 msgid "don't verify MD5 digest of files" msgstr "" -#: lib/poptQV.c:208 +#: lib/poptQV.c:212 msgid "don't verify size of files" msgstr "" -#: lib/poptQV.c:211 +#: lib/poptQV.c:215 msgid "don't verify symlink path of files" msgstr "" -#: lib/poptQV.c:214 +#: lib/poptQV.c:218 msgid "don't verify owner of files" msgstr "" -#: lib/poptQV.c:217 +#: lib/poptQV.c:221 msgid "don't verify group of files" msgstr "" -#: lib/poptQV.c:220 +#: lib/poptQV.c:224 msgid "don't verify modification time of files" msgstr "" -#: lib/poptQV.c:223 lib/poptQV.c:226 +#: lib/poptQV.c:227 lib/poptQV.c:230 msgid "don't verify mode of files" msgstr "" -#: lib/poptQV.c:229 +#: lib/poptQV.c:233 msgid "don't verify files in package" msgstr "" -#: lib/poptQV.c:231 +#: lib/poptQV.c:235 msgid "don't verify package dependencies" msgstr "" -#: lib/poptQV.c:233 lib/poptQV.c:237 +#: lib/poptQV.c:237 lib/poptQV.c:241 msgid "don't execute %verifyscript (if any)" msgstr "" -#: lib/poptQV.c:240 +#: lib/poptQV.c:244 msgid "don't verify header SHA1 digest" msgstr "" @@ -2799,74 +2799,74 @@ msgstr "" msgid "unknown error %d encountered while manipulating package %s" msgstr "" -#: lib/psm.c:603 +#: lib/psm.c:598 #, c-format msgid "cannot create %%%s %s\n" msgstr "" -#: lib/psm.c:609 +#: lib/psm.c:604 #, c-format msgid "cannot write to %%%s %s\n" msgstr "" -#: lib/psm.c:647 +#: lib/psm.c:642 msgid "source package expected, binary found\n" msgstr "" -#: lib/psm.c:760 +#: lib/psm.c:749 msgid "source package contains no .spec file\n" msgstr "" -#: lib/psm.c:1034 +#: lib/psm.c:1021 #, c-format msgid "execution of %s scriptlet from %s-%s-%s failed, waitpid returned %s\n" msgstr "" -#: lib/psm.c:1041 +#: lib/psm.c:1028 #, c-format msgid "execution of %s scriptlet from %s-%s-%s failed, exit status %d\n" msgstr "" -#: lib/psm.c:1376 +#: lib/psm.c:1367 #, c-format msgid "%s: %s-%s-%s has %d files, test = %d\n" msgstr "" -#: lib/psm.c:1493 +#: lib/psm.c:1484 #, c-format msgid "%s: %s scriptlet failed (%d), skipping %s-%s-%s\n" msgstr "" -#: lib/psm.c:1608 +#: lib/psm.c:1599 #, c-format msgid "user %s does not exist - using root\n" msgstr "" -#: lib/psm.c:1617 +#: lib/psm.c:1608 #, c-format msgid "group %s does not exist - using root\n" msgstr "" -#: lib/psm.c:1656 +#: lib/psm.c:1649 #, c-format msgid "unpacking of archive failed%s%s: %s\n" msgstr "" -#: lib/psm.c:1657 +#: lib/psm.c:1650 msgid " on file " msgstr "" -#: lib/psm.c:1838 +#: lib/psm.c:1835 #, c-format msgid "%s failed on file %s: %s\n" msgstr "" -#: lib/psm.c:1841 +#: lib/psm.c:1838 #, c-format msgid "%s failed: %s\n" msgstr "" -#: lib/psm.c:1936 +#: lib/psm.c:1937 #, c-format msgid "%s: running %s script(s) (if any)\n" msgstr "" @@ -2914,8 +2914,8 @@ msgstr "" msgid "can't query %s: %s\n" msgstr "" -#: lib/query.c:596 lib/query.c:630 lib/rpminstall.c:317 lib/rpminstall.c:461 -#: lib/rpminstall.c:839 +#: lib/query.c:596 lib/query.c:630 lib/rpminstall.c:323 lib/rpminstall.c:467 +#: lib/rpminstall.c:847 #, c-format msgid "open of %s failed: %s\n" msgstr "" @@ -2929,507 +2929,507 @@ msgstr "" msgid "old format source packages cannot be queried\n" msgstr "" -#: lib/query.c:640 lib/rpminstall.c:474 +#: lib/query.c:640 lib/rpminstall.c:480 #, c-format msgid "%s: read manifest failed: %s\n" msgstr "" -#: lib/query.c:682 +#: lib/query.c:684 #, c-format msgid "query of specfile %s failed, can't parse\n" msgstr "" -#: lib/query.c:707 +#: lib/query.c:709 msgid "no packages\n" msgstr "" -#: lib/query.c:726 +#: lib/query.c:728 #, c-format msgid "group %s does not contain any packages\n" msgstr "" -#: lib/query.c:736 +#: lib/query.c:738 #, c-format msgid "no package triggers %s\n" msgstr "" -#: lib/query.c:746 +#: lib/query.c:748 #, c-format msgid "no package requires %s\n" msgstr "" -#: lib/query.c:757 +#: lib/query.c:759 #, c-format msgid "no package provides %s\n" msgstr "" -#: lib/query.c:794 +#: lib/query.c:796 #, c-format msgid "file %s: %s\n" msgstr "" -#: lib/query.c:798 +#: lib/query.c:800 #, c-format msgid "file %s is not owned by any package\n" msgstr "" -#: lib/query.c:824 +#: lib/query.c:826 #, c-format msgid "invalid package number: %s\n" msgstr "" -#: lib/query.c:827 +#: lib/query.c:829 #, c-format msgid "package record number: %u\n" msgstr "" -#: lib/query.c:832 +#: lib/query.c:834 #, c-format msgid "record %u could not be read\n" msgstr "" -#: lib/query.c:843 lib/rpminstall.c:625 +#: lib/query.c:845 lib/rpminstall.c:633 #, c-format msgid "package %s is not installed\n" msgstr "" -#: lib/rpmchecksig.c:44 +#: lib/rpmchecksig.c:46 #, c-format msgid "%s: open failed: %s\n" msgstr "" -#: lib/rpmchecksig.c:56 +#: lib/rpmchecksig.c:58 msgid "makeTempFile failed\n" msgstr "" -#: lib/rpmchecksig.c:99 +#: lib/rpmchecksig.c:109 #, c-format msgid "%s: Fwrite failed: %s\n" msgstr "" -#: lib/rpmchecksig.c:105 +#: lib/rpmchecksig.c:115 #, c-format msgid "%s: Fread failed: %s\n" msgstr "" -#: lib/rpmchecksig.c:148 lib/rpmchecksig.c:294 +#: lib/rpmchecksig.c:160 lib/rpmchecksig.c:304 #, c-format msgid "%s: readLead failed\n" msgstr "" -#: lib/rpmchecksig.c:153 +#: lib/rpmchecksig.c:165 #, c-format msgid "%s: Can't sign v1.0 RPM\n" msgstr "" -#: lib/rpmchecksig.c:157 +#: lib/rpmchecksig.c:169 #, c-format msgid "%s: Can't re-sign v2.0 RPM\n" msgstr "" -#: lib/rpmchecksig.c:166 lib/rpmchecksig.c:310 +#: lib/rpmchecksig.c:178 lib/rpmchecksig.c:320 #, c-format msgid "%s: rpmReadSignature failed\n" msgstr "" -#: lib/rpmchecksig.c:170 lib/rpmchecksig.c:315 +#: lib/rpmchecksig.c:182 lib/rpmchecksig.c:325 #, c-format msgid "%s: No signature available\n" msgstr "" -#: lib/rpmchecksig.c:205 +#: lib/rpmchecksig.c:215 #, c-format msgid "%s: writeLead failed: %s\n" msgstr "" -#: lib/rpmchecksig.c:211 +#: lib/rpmchecksig.c:221 #, c-format msgid "%s: rpmWriteSignature failed: %s\n" msgstr "" -#: lib/rpmchecksig.c:300 +#: lib/rpmchecksig.c:310 #, c-format msgid "%s: No signature available (v1.0 RPM)\n" msgstr "" -#: lib/rpmchecksig.c:525 +#: lib/rpmchecksig.c:539 msgid "NOT OK" msgstr "" -#: lib/rpmchecksig.c:526 lib/rpmchecksig.c:540 +#: lib/rpmchecksig.c:540 lib/rpmchecksig.c:554 msgid " (MISSING KEYS:" msgstr "" -#: lib/rpmchecksig.c:528 lib/rpmchecksig.c:542 +#: lib/rpmchecksig.c:542 lib/rpmchecksig.c:556 msgid ") " msgstr "" -#: lib/rpmchecksig.c:529 lib/rpmchecksig.c:543 +#: lib/rpmchecksig.c:543 lib/rpmchecksig.c:557 msgid " (UNTRUSTED KEYS:" msgstr "" -#: lib/rpmchecksig.c:531 lib/rpmchecksig.c:545 +#: lib/rpmchecksig.c:545 lib/rpmchecksig.c:559 msgid ")" msgstr "" -#: lib/rpmchecksig.c:539 +#: lib/rpmchecksig.c:553 msgid "OK" msgstr "" -#: lib/rpminstall.c:146 +#: lib/rpminstall.c:152 msgid "Preparing..." msgstr "" -#: lib/rpminstall.c:148 +#: lib/rpminstall.c:154 msgid "Preparing packages for installation..." msgstr "" -#: lib/rpminstall.c:267 +#: lib/rpminstall.c:273 #, c-format msgid "Retrieving %s\n" msgstr "" #. XXX undefined %{name}/%{version}/%{release} here #. XXX %{_tmpdir} does not exist -#: lib/rpminstall.c:277 +#: lib/rpminstall.c:283 #, c-format msgid " ... as %s\n" msgstr "" -#: lib/rpminstall.c:281 +#: lib/rpminstall.c:287 #, c-format msgid "skipping %s - transfer failed - %s\n" msgstr "" -#: lib/rpminstall.c:363 +#: lib/rpminstall.c:369 #, c-format msgid "cannot open Packages database in %s\n" msgstr "" -#: lib/rpminstall.c:386 +#: lib/rpminstall.c:392 #, c-format msgid "package %s is not relocateable\n" msgstr "" -#: lib/rpminstall.c:435 +#: lib/rpminstall.c:441 #, c-format msgid "error reading from file %s\n" msgstr "" -#: lib/rpminstall.c:441 +#: lib/rpminstall.c:447 #, c-format msgid "file %s requires a newer version of RPM\n" msgstr "" -#: lib/rpminstall.c:453 lib/rpminstall.c:696 +#: lib/rpminstall.c:459 lib/rpminstall.c:704 #, c-format msgid "%s cannot be installed\n" msgstr "" -#: lib/rpminstall.c:489 +#: lib/rpminstall.c:495 #, c-format msgid "found %d source and %d binary packages\n" msgstr "" -#: lib/rpminstall.c:505 +#: lib/rpminstall.c:511 msgid "failed dependencies:\n" msgstr "" -#: lib/rpminstall.c:526 +#: lib/rpminstall.c:532 msgid "installing binary packages\n" msgstr "" -#: lib/rpminstall.c:547 +#: lib/rpminstall.c:553 #, c-format msgid "cannot open file %s: %s\n" msgstr "" -#: lib/rpminstall.c:612 +#: lib/rpminstall.c:620 #, c-format msgid "cannot open %s/packages.rpm\n" msgstr "" -#: lib/rpminstall.c:628 +#: lib/rpminstall.c:636 #, c-format msgid "\"%s\" specifies multiple packages\n" msgstr "" -#: lib/rpminstall.c:652 +#: lib/rpminstall.c:660 msgid "removing these packages would break dependencies:\n" msgstr "" -#: lib/rpminstall.c:682 +#: lib/rpminstall.c:690 #, c-format msgid "cannot open %s: %s\n" msgstr "" -#: lib/rpminstall.c:688 +#: lib/rpminstall.c:696 #, c-format msgid "Installing %s\n" msgstr "" -#: lib/rpmlead.c:49 +#: lib/rpmlead.c:50 #, c-format msgid "read failed: %s (%d)\n" msgstr "" -#: lib/rpmrc.c:187 +#: lib/rpmrc.c:188 #, c-format msgid "missing second ':' at %s:%d\n" msgstr "" -#: lib/rpmrc.c:190 +#: lib/rpmrc.c:191 #, c-format msgid "missing architecture name at %s:%d\n" msgstr "" -#: lib/rpmrc.c:344 +#: lib/rpmrc.c:345 #, c-format msgid "Incomplete data line at %s:%d\n" msgstr "" -#: lib/rpmrc.c:349 +#: lib/rpmrc.c:350 #, c-format msgid "Too many args in data line at %s:%d\n" msgstr "" -#: lib/rpmrc.c:357 +#: lib/rpmrc.c:358 #, c-format msgid "Bad arch/os number: %s (%s:%d)\n" msgstr "" -#: lib/rpmrc.c:394 +#: lib/rpmrc.c:395 #, c-format msgid "Incomplete default line at %s:%d\n" msgstr "" -#: lib/rpmrc.c:399 +#: lib/rpmrc.c:400 #, c-format msgid "Too many args in default line at %s:%d\n" msgstr "" -#: lib/rpmrc.c:615 -#, c-format -msgid "Cannot expand %s\n" -msgstr "" - -#: lib/rpmrc.c:620 -#, c-format -msgid "Cannot read %s, HOME is too large.\n" -msgstr "" - -#: lib/rpmrc.c:637 -#, c-format -msgid "Unable to open %s for reading: %s.\n" -msgstr "" - #. XXX Feof(fd) -#: lib/rpmrc.c:692 +#: lib/rpmrc.c:570 #, c-format msgid "Failed to read %s: %s.\n" msgstr "" -#: lib/rpmrc.c:730 +#: lib/rpmrc.c:608 #, c-format msgid "missing ':' (found 0x%02x) at %s:%d\n" msgstr "" -#: lib/rpmrc.c:747 lib/rpmrc.c:821 +#: lib/rpmrc.c:625 lib/rpmrc.c:699 #, c-format msgid "missing argument for %s at %s:%d\n" msgstr "" -#: lib/rpmrc.c:764 lib/rpmrc.c:786 +#: lib/rpmrc.c:642 lib/rpmrc.c:664 #, c-format msgid "%s expansion failed at %s:%d \"%s\"\n" msgstr "" -#: lib/rpmrc.c:773 +#: lib/rpmrc.c:651 #, c-format msgid "cannot open %s at %s:%d: %s\n" msgstr "" -#: lib/rpmrc.c:813 +#: lib/rpmrc.c:691 #, c-format msgid "missing architecture for %s at %s:%d\n" msgstr "" -#: lib/rpmrc.c:880 +#: lib/rpmrc.c:758 #, c-format msgid "bad option '%s' at %s:%d\n" msgstr "" -#: lib/rpmrc.c:1484 +#: lib/rpmrc.c:1362 #, c-format msgid "Unknown system: %s\n" msgstr "" -#: lib/rpmrc.c:1485 +#: lib/rpmrc.c:1363 msgid "Please contact rpm-list@redhat.com\n" msgstr "" -#: lib/signature.c:124 +#: lib/rpmrc.c:1588 +#, c-format +msgid "Cannot expand %s\n" +msgstr "" + +#: lib/rpmrc.c:1593 +#, c-format +msgid "Cannot read %s, HOME is too large.\n" +msgstr "" + +#: lib/rpmrc.c:1610 +#, c-format +msgid "Unable to open %s for reading: %s.\n" +msgstr "" + +#: lib/signature.c:125 msgid "file is not regular -- skipping size check\n" msgstr "" -#: lib/signature.c:133 +#: lib/signature.c:134 #, c-format msgid "Expected size: %12d = lead(%d)+sigs(%d)+pad(%d)+data(%d)\n" msgstr "" -#: lib/signature.c:138 +#: lib/signature.c:139 #, c-format msgid " Actual size: %12d\n" msgstr "" -#: lib/signature.c:158 +#: lib/signature.c:159 msgid "No signature\n" msgstr "" -#: lib/signature.c:162 +#: lib/signature.c:163 msgid "Old PGP signature\n" msgstr "" -#: lib/signature.c:173 +#: lib/signature.c:176 msgid "Old (internal-only) signature! How did you get that!?\n" msgstr "" -#: lib/signature.c:227 +#: lib/signature.c:232 #, c-format msgid "Signature: size(%d)+pad(%d)\n" msgstr "" -#: lib/signature.c:289 +#: lib/signature.c:294 #, c-format msgid "Couldn't exec pgp (%s)\n" msgstr "" -#: lib/signature.c:302 +#: lib/signature.c:307 msgid "pgp failed\n" msgstr "" #. PGP failed to write signature #. Just in case -#: lib/signature.c:309 +#: lib/signature.c:314 msgid "pgp failed to write signature\n" msgstr "" -#: lib/signature.c:314 +#: lib/signature.c:319 #, c-format msgid "PGP sig size: %d\n" msgstr "" -#: lib/signature.c:327 lib/signature.c:411 +#: lib/signature.c:334 lib/signature.c:420 msgid "unable to read the signature\n" msgstr "" -#: lib/signature.c:332 +#: lib/signature.c:339 #, c-format msgid "Got %d bytes of PGP sig\n" msgstr "" -#: lib/signature.c:373 lib/signature.c:809 +#: lib/signature.c:380 lib/signature.c:822 msgid "Couldn't exec gpg\n" msgstr "" -#: lib/signature.c:386 +#: lib/signature.c:393 msgid "gpg failed\n" msgstr "" #. GPG failed to write signature #. Just in case -#: lib/signature.c:393 +#: lib/signature.c:400 msgid "gpg failed to write signature\n" msgstr "" -#: lib/signature.c:398 +#: lib/signature.c:405 #, c-format msgid "GPG sig size: %d\n" msgstr "" -#: lib/signature.c:416 +#: lib/signature.c:425 #, c-format msgid "Got %d bytes of GPG sig\n" msgstr "" -#: lib/signature.c:444 +#: lib/signature.c:453 msgid "Generating signature using PGP.\n" msgstr "" -#: lib/signature.c:450 +#: lib/signature.c:459 msgid "Generating signature using GPG.\n" msgstr "" -#: lib/signature.c:557 lib/signature.c:632 +#: lib/signature.c:568 lib/signature.c:643 msgid "Could not run pgp. Use --nopgp to skip PGP checks.\n" msgstr "" -#: lib/signature.c:742 +#: lib/signature.c:755 msgid "Could not run gpg. Use --nogpg to skip GPG checks.\n" msgstr "" -#: lib/signature.c:838 +#: lib/signature.c:851 msgid "Couldn't exec pgp\n" msgstr "" #. @notreached@ #. This case should have been screened out long ago. -#: lib/signature.c:842 lib/signature.c:896 +#: lib/signature.c:855 lib/signature.c:908 #, c-format msgid "Invalid %%_signature spec in macro file\n" msgstr "" -#: lib/signature.c:876 +#: lib/signature.c:888 #, c-format msgid "You must set \"%%_gpg_name\" in your macro file\n" msgstr "" -#: lib/signature.c:888 +#: lib/signature.c:900 #, c-format msgid "You must set \"%%_pgp_name\" in your macro file\n" msgstr "" -#: lib/transaction.c:475 +#: lib/transaction.c:477 msgid "========== relocations\n" msgstr "" -#: lib/transaction.c:479 +#: lib/transaction.c:481 #, c-format msgid "%5d exclude %s\n" msgstr "" -#: lib/transaction.c:482 +#: lib/transaction.c:484 #, c-format msgid "%5d relocate %s -> %s\n" msgstr "" -#: lib/transaction.c:552 +#: lib/transaction.c:554 #, c-format msgid "excluding multilib path %s%s\n" msgstr "" -#: lib/transaction.c:618 +#: lib/transaction.c:620 #, c-format msgid "excluding %s %s\n" msgstr "" -#: lib/transaction.c:628 +#: lib/transaction.c:630 #, c-format msgid "relocating %s to %s\n" msgstr "" -#: lib/transaction.c:707 +#: lib/transaction.c:709 #, c-format msgid "relocating directory %s to %s\n" msgstr "" -#: lib/transaction.c:853 +#: lib/transaction.c:855 #, c-format msgid "%s skipped due to missingok flag\n" msgstr "" #. @innercontinue@ -#: lib/transaction.c:1474 +#: lib/transaction.c:1476 #, c-format msgid "excluding directory %s\n" msgstr "" @@ -3442,113 +3442,113 @@ msgstr "" msgid "package lacks both group name and id lists (this should never happen)\n" msgstr "" -#: lib/verify.c:402 +#: lib/verify.c:404 #, c-format msgid "missing %s" msgstr "" -#: lib/verify.c:498 +#: lib/verify.c:501 #, c-format msgid "Unsatisfied dependencies for %s-%s-%s: " msgstr "" -#: lib/verify.c:538 +#: lib/verify.c:543 #, c-format msgid "%s-%s-%s: immutable header region digest check failed\n" msgstr "" -#: rpmdb/db1.c:100 rpmdb/db3.c:97 +#: rpmdb/db1.c:101 rpmdb/db3.c:98 #, c-format msgid "db%d error(%d) from %s: %s\n" msgstr "" -#: rpmdb/db1.c:103 rpmdb/db3.c:100 +#: rpmdb/db1.c:104 rpmdb/db3.c:101 #, c-format msgid "db%d error(%d): %s\n" msgstr "" -#: rpmdb/db1.c:170 +#: rpmdb/db1.c:171 #, c-format msgid "" "Broken package chain at offset %d(0x%08x), attempting to reconnect ...\n" msgstr "" -#: rpmdb/db1.c:182 +#: rpmdb/db1.c:183 #, c-format msgid "Reconnecting broken chain at offset %d(0x%08x).\n" msgstr "" #. @=branchstate@ -#: rpmdb/db1.c:508 +#: rpmdb/db1.c:509 #, c-format msgid "closed db file %s\n" msgstr "" -#: rpmdb/db1.c:511 +#: rpmdb/db1.c:512 #, c-format msgid "removed db file %s\n" msgstr "" -#: rpmdb/db1.c:546 +#: rpmdb/db1.c:547 #, c-format msgid "bad db file %s\n" msgstr "" -#: rpmdb/db1.c:551 +#: rpmdb/db1.c:552 #, c-format msgid "opening db file %s mode 0x%x\n" msgstr "" #. XXX check errno validity -#: rpmdb/db1.c:574 +#: rpmdb/db1.c:575 #, c-format msgid "cannot get %s lock on database\n" msgstr "" -#: rpmdb/db1.c:575 rpmdb/db3.c:1192 +#: rpmdb/db1.c:576 rpmdb/db3.c:1209 msgid "exclusive" msgstr "" -#: rpmdb/db1.c:575 rpmdb/db3.c:1192 +#: rpmdb/db1.c:576 rpmdb/db3.c:1209 msgid "shared" msgstr "" -#: rpmdb/db3.c:128 +#: rpmdb/db3.c:129 #, c-format msgid "closed db environment %s/%s\n" msgstr "" -#: rpmdb/db3.c:146 +#: rpmdb/db3.c:147 #, c-format msgid "removed db environment %s/%s\n" msgstr "" -#: rpmdb/db3.c:187 +#: rpmdb/db3.c:188 #, c-format msgid "opening db environment %s/%s %s\n" msgstr "" -#: rpmdb/db3.c:703 +#: rpmdb/db3.c:708 #, c-format msgid "closed db index %s/%s\n" msgstr "" -#: rpmdb/db3.c:764 +#: rpmdb/db3.c:773 #, c-format msgid "verified db index %s/%s\n" msgstr "" -#: rpmdb/db3.c:969 +#: rpmdb/db3.c:986 #, c-format msgid "opening db index %s/%s %s mode=0x%x\n" msgstr "" -#: rpmdb/db3.c:1190 +#: rpmdb/db3.c:1207 #, c-format msgid "cannot get %s lock on %s/%s\n" msgstr "" -#: rpmdb/db3.c:1196 +#: rpmdb/db3.c:1213 #, c-format msgid "locked db index %s/%s\n" msgstr "" @@ -3558,22 +3558,22 @@ msgstr "" msgid "unrecognized db option: \"%s\" ignored.\n" msgstr "" -#: rpmdb/dbconfig.c:442 +#: rpmdb/dbconfig.c:444 #, c-format msgid "%s has invalid numeric value, skipped\n" msgstr "" -#: rpmdb/dbconfig.c:451 +#: rpmdb/dbconfig.c:453 #, c-format msgid "%s has too large or too small long value, skipped\n" msgstr "" -#: rpmdb/dbconfig.c:460 +#: rpmdb/dbconfig.c:462 #, c-format msgid "%s has too large or too small integer value, skipped\n" msgstr "" -#: rpmdb/falloc.c:151 +#: rpmdb/falloc.c:153 #, c-format msgid "" "free list corrupt (%u)- please run\n" @@ -3601,298 +3601,298 @@ msgstr "" msgid "dbiTagsInit: unrecognized tag name: \"%s\" ignored\n" msgstr "" -#: rpmdb/rpmdb.c:382 +#: rpmdb/rpmdb.c:384 #, c-format msgid "cannot open %s index using db%d - %s (%d)\n" msgstr "" -#: rpmdb/rpmdb.c:402 +#: rpmdb/rpmdb.c:406 #, c-format msgid "cannot open %s index\n" msgstr "" -#: rpmdb/rpmdb.c:494 +#: rpmdb/rpmdb.c:498 #, c-format msgid "error(%d) getting \"%s\" records from %s index\n" msgstr "" -#: rpmdb/rpmdb.c:625 +#: rpmdb/rpmdb.c:629 #, c-format msgid "error(%d) storing record %s into %s\n" msgstr "" -#: rpmdb/rpmdb.c:635 +#: rpmdb/rpmdb.c:639 #, c-format msgid "error(%d) removing record %s from %s\n" msgstr "" -#: rpmdb/rpmdb.c:888 +#: rpmdb/rpmdb.c:893 msgid "no dbpath has been set\n" msgstr "" -#: rpmdb/rpmdb.c:1020 +#: rpmdb/rpmdb.c:1032 msgid "" "old format database is present; use --rebuilddb to generate a new format " "database\n" msgstr "" #. error -#: rpmdb/rpmdb.c:1258 +#: rpmdb/rpmdb.c:1276 #, c-format msgid "error(%d) counting packages\n" msgstr "" -#: rpmdb/rpmdb.c:2033 rpmdb/rpmdb.c:3241 +#: rpmdb/rpmdb.c:2055 rpmdb/rpmdb.c:3264 #, c-format msgid "record number %u in database is bad -- skipping.\n" msgstr "" -#: rpmdb/rpmdb.c:2086 +#: rpmdb/rpmdb.c:2108 #, c-format msgid "rpmdb: damaged header instance #%u retrieved, skipping.\n" msgstr "" -#: rpmdb/rpmdb.c:2353 +#: rpmdb/rpmdb.c:2376 #, c-format msgid "%s: cannot read header at 0x%x\n" msgstr "" -#: rpmdb/rpmdb.c:2424 +#: rpmdb/rpmdb.c:2447 #, c-format msgid "removing \"%s\" from %s index.\n" msgstr "" -#: rpmdb/rpmdb.c:2433 +#: rpmdb/rpmdb.c:2456 #, c-format msgid "removing %d entries from %s index.\n" msgstr "" -#: rpmdb/rpmdb.c:2633 +#: rpmdb/rpmdb.c:2656 #, c-format msgid "error(%d) allocating new package instance\n" msgstr "" -#: rpmdb/rpmdb.c:2713 +#: rpmdb/rpmdb.c:2736 #, c-format msgid "adding \"%s\" to %s index.\n" msgstr "" -#: rpmdb/rpmdb.c:2724 +#: rpmdb/rpmdb.c:2747 #, c-format msgid "adding %d entries to %s index.\n" msgstr "" -#: rpmdb/rpmdb.c:3127 +#: rpmdb/rpmdb.c:3150 #, c-format msgid "removing %s after successful db3 rebuild.\n" msgstr "" -#: rpmdb/rpmdb.c:3160 +#: rpmdb/rpmdb.c:3183 msgid "no dbpath has been set" msgstr "" -#: rpmdb/rpmdb.c:3187 +#: rpmdb/rpmdb.c:3210 #, c-format msgid "rebuilding database %s into %s\n" msgstr "" -#: rpmdb/rpmdb.c:3191 +#: rpmdb/rpmdb.c:3214 #, c-format msgid "temporary database %s already exists\n" msgstr "" -#: rpmdb/rpmdb.c:3197 +#: rpmdb/rpmdb.c:3220 #, c-format msgid "creating directory %s\n" msgstr "" -#: rpmdb/rpmdb.c:3199 +#: rpmdb/rpmdb.c:3222 #, c-format msgid "creating directory %s: %s\n" msgstr "" -#: rpmdb/rpmdb.c:3206 +#: rpmdb/rpmdb.c:3229 #, c-format msgid "opening old database with dbapi %d\n" msgstr "" -#: rpmdb/rpmdb.c:3217 +#: rpmdb/rpmdb.c:3240 #, c-format msgid "opening new database with dbapi %d\n" msgstr "" -#: rpmdb/rpmdb.c:3281 +#: rpmdb/rpmdb.c:3304 #, c-format msgid "cannot add record originally at %u\n" msgstr "" -#: rpmdb/rpmdb.c:3299 +#: rpmdb/rpmdb.c:3322 msgid "failed to rebuild database: original database remains in place\n" msgstr "" -#: rpmdb/rpmdb.c:3307 +#: rpmdb/rpmdb.c:3330 msgid "failed to replace old database with new database!\n" msgstr "" -#: rpmdb/rpmdb.c:3309 +#: rpmdb/rpmdb.c:3332 #, c-format msgid "replace files in %s with files from %s to recover" msgstr "" -#: rpmdb/rpmdb.c:3319 +#: rpmdb/rpmdb.c:3342 #, c-format msgid "removing directory %s\n" msgstr "" -#: rpmdb/rpmdb.c:3321 +#: rpmdb/rpmdb.c:3344 #, c-format msgid "failed to remove directory %s: %s\n" msgstr "" -#: rpmio/macro.c:224 +#: rpmio/macro.c:228 #, c-format msgid "======================== active %d empty %d\n" msgstr "" #. XXX just in case -#: rpmio/macro.c:349 +#: rpmio/macro.c:353 #, c-format msgid "%3d>%*s(empty)" msgstr "" -#: rpmio/macro.c:392 +#: rpmio/macro.c:396 #, c-format msgid "%3d<%*s(empty)\n" msgstr "" -#: rpmio/macro.c:622 +#: rpmio/macro.c:627 #, c-format msgid "Macro %%%s has unterminated body\n" msgstr "" -#: rpmio/macro.c:649 +#: rpmio/macro.c:654 #, c-format msgid "Macro %%%s has illegal name (%%define)\n" msgstr "" -#: rpmio/macro.c:655 +#: rpmio/macro.c:660 #, c-format msgid "Macro %%%s has unterminated opts\n" msgstr "" -#: rpmio/macro.c:660 +#: rpmio/macro.c:665 #, c-format msgid "Macro %%%s has empty body\n" msgstr "" -#: rpmio/macro.c:666 +#: rpmio/macro.c:671 #, c-format msgid "Macro %%%s failed to expand\n" msgstr "" -#: rpmio/macro.c:701 +#: rpmio/macro.c:706 #, c-format msgid "Macro %%%s has illegal name (%%undefine)\n" msgstr "" -#: rpmio/macro.c:813 +#: rpmio/macro.c:818 #, c-format msgid "Macro %%%s (%s) was not used below level %d\n" msgstr "" -#: rpmio/macro.c:929 +#: rpmio/macro.c:936 #, c-format msgid "Unknown option %c in %s(%s)\n" msgstr "" -#: rpmio/macro.c:1123 +#: rpmio/macro.c:1135 #, c-format msgid "Recursion depth(%d) greater than max(%d)\n" msgstr "" -#: rpmio/macro.c:1190 rpmio/macro.c:1207 +#: rpmio/macro.c:1202 rpmio/macro.c:1219 #, c-format msgid "Unterminated %c: %s\n" msgstr "" -#: rpmio/macro.c:1248 +#: rpmio/macro.c:1260 #, c-format msgid "A %% is followed by an unparseable macro\n" msgstr "" -#: rpmio/macro.c:1377 +#: rpmio/macro.c:1389 #, c-format msgid "Macro %%%.*s not found, skipping\n" msgstr "" -#: rpmio/macro.c:1453 +#: rpmio/macro.c:1465 msgid "Target buffer overflow\n" msgstr "" #. XXX Fstrerror -#: rpmio/macro.c:1642 rpmio/macro.c:1648 +#: rpmio/macro.c:1658 rpmio/macro.c:1664 #, c-format msgid "File %s: %s\n" msgstr "" -#: rpmio/macro.c:1651 +#: rpmio/macro.c:1667 #, c-format msgid "File %s is smaller than %u bytes\n" msgstr "" -#: rpmio/rpmio.c:631 +#: rpmio/rpmio.c:632 msgid "Success" msgstr "" -#: rpmio/rpmio.c:634 +#: rpmio/rpmio.c:635 msgid "Bad server response" msgstr "" -#: rpmio/rpmio.c:637 +#: rpmio/rpmio.c:638 msgid "Server I/O error" msgstr "" -#: rpmio/rpmio.c:640 +#: rpmio/rpmio.c:641 msgid "Server timeout" msgstr "" -#: rpmio/rpmio.c:643 +#: rpmio/rpmio.c:644 msgid "Unable to lookup server host address" msgstr "" -#: rpmio/rpmio.c:646 +#: rpmio/rpmio.c:647 msgid "Unable to lookup server host name" msgstr "" -#: rpmio/rpmio.c:649 +#: rpmio/rpmio.c:650 msgid "Failed to connect to server" msgstr "" -#: rpmio/rpmio.c:652 +#: rpmio/rpmio.c:653 msgid "Failed to establish data connection to server" msgstr "" -#: rpmio/rpmio.c:655 +#: rpmio/rpmio.c:656 msgid "I/O error to local file" msgstr "" -#: rpmio/rpmio.c:658 +#: rpmio/rpmio.c:659 msgid "Error setting remote server to passive mode" msgstr "" -#: rpmio/rpmio.c:661 +#: rpmio/rpmio.c:662 msgid "File not found on server" msgstr "" -#: rpmio/rpmio.c:664 +#: rpmio/rpmio.c:665 msgid "Abort in progress" msgstr "" -#: rpmio/rpmio.c:668 +#: rpmio/rpmio.c:669 msgid "Unknown or unexpected error" msgstr "" -#: rpmio/rpmio.c:1339 +#: rpmio/rpmio.c:1341 #, c-format msgid "logging into %s as %s, pw %s\n" msgstr "" @@ -3902,17 +3902,17 @@ msgid "(no error)" msgstr "" #. !< RPMLOG_EMERG -#: rpmio/rpmlog.c:122 rpmio/rpmlog.c:123 rpmio/rpmlog.c:124 +#: rpmio/rpmlog.c:129 rpmio/rpmlog.c:130 rpmio/rpmlog.c:131 msgid "fatal error: " msgstr "" #. !< RPMLOG_CRIT -#: rpmio/rpmlog.c:125 +#: rpmio/rpmlog.c:132 msgid "error: " msgstr "" #. !< RPMLOG_ERR -#: rpmio/rpmlog.c:126 +#: rpmio/rpmlog.c:133 msgid "warning: " msgstr "" @@ -3921,37 +3921,37 @@ msgstr "" msgid "memory alloc (%u bytes) returned NULL.\n" msgstr "" -#: rpmio/url.c:113 +#: rpmio/url.c:117 #, c-format msgid "warning: u %p ctrl %p nrefs != 0 (%s %s)\n" msgstr "" -#: rpmio/url.c:133 +#: rpmio/url.c:137 #, c-format msgid "warning: u %p data %p nrefs != 0 (%s %s)\n" msgstr "" -#: rpmio/url.c:161 +#: rpmio/url.c:165 #, c-format -msgid "warning: uCache[%d] %p nrefs(%d) != 1 (%s %s)\n" +msgid "warning: _url_cache[%d] %p nrefs(%d) != 1 (%s %s)\n" msgstr "" -#: rpmio/url.c:257 +#: rpmio/url.c:262 #, c-format msgid "Password for %s@%s: " msgstr "" -#: rpmio/url.c:282 rpmio/url.c:308 +#: rpmio/url.c:287 rpmio/url.c:313 #, c-format msgid "error: %sport must be a number\n" msgstr "" -#: rpmio/url.c:453 +#: rpmio/url.c:459 msgid "url port must be a number\n" msgstr "" #. XXX Fstrerror -#: rpmio/url.c:519 +#: rpmio/url.c:525 #, c-format msgid "failed to create %s: %s\n" msgstr "" diff --git a/popt/po/popt.pot b/popt/po/popt.pot index 86265e374..b8743a6d5 100644 --- a/popt/po/popt.pot +++ b/popt/po/popt.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-10-16 10:48-0400\n" +"POT-Creation-Date: 2001-10-17 12:38-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -18,99 +18,99 @@ msgstr "" msgid "unknown errno" msgstr "" -#: popt.c:909 +#: popt.c:911 #, c-format msgid "option type (%d) not implemented in popt\n" msgstr "" -#: popt.c:1120 +#: popt.c:1122 msgid "missing argument" msgstr "" -#: popt.c:1122 +#: popt.c:1124 msgid "unknown option" msgstr "" -#: popt.c:1124 +#: popt.c:1126 msgid "mutually exclusive logical operations requested" msgstr "" -#: popt.c:1126 +#: popt.c:1128 msgid "opt->arg should not be NULL" msgstr "" -#: popt.c:1128 +#: popt.c:1130 msgid "aliases nested too deeply" msgstr "" -#: popt.c:1130 +#: popt.c:1132 msgid "error in parameter quoting" msgstr "" -#: popt.c:1132 +#: popt.c:1134 msgid "invalid numeric value" msgstr "" -#: popt.c:1134 +#: popt.c:1136 msgid "number too large or too small" msgstr "" -#: popt.c:1136 +#: popt.c:1138 msgid "memory allocation failed" msgstr "" -#: popt.c:1140 +#: popt.c:1142 msgid "unknown error" msgstr "" -#: popthelp.c:52 +#: popthelp.c:53 msgid "Show this help message" msgstr "" -#: popthelp.c:53 +#: popthelp.c:54 msgid "Display brief usage message" msgstr "" -#: popthelp.c:56 +#: popthelp.c:57 msgid "Display option defaults in message" msgstr "" -#: popthelp.c:98 +#: popthelp.c:99 msgid "NONE" msgstr "" -#: popthelp.c:99 +#: popthelp.c:100 msgid "VAL" msgstr "" -#: popthelp.c:100 +#: popthelp.c:101 msgid "INT" msgstr "" -#: popthelp.c:101 +#: popthelp.c:102 msgid "LONG" msgstr "" -#: popthelp.c:102 +#: popthelp.c:103 msgid "STRING" msgstr "" -#: popthelp.c:103 +#: popthelp.c:104 msgid "FLOAT" msgstr "" -#: popthelp.c:104 +#: popthelp.c:105 msgid "DOUBLE" msgstr "" -#: popthelp.c:105 +#: popthelp.c:106 msgid "ARG" msgstr "" -#: popthelp.c:456 +#: popthelp.c:457 msgid "Usage:" msgstr "" -#: popthelp.c:478 +#: popthelp.c:479 msgid "[OPTION...]" msgstr "" diff --git a/popt/popt.c b/popt/popt.c index 728bf8c50..cd01a77d5 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -883,12 +883,14 @@ int poptGetNextOpt(poptContext con) char *end; if (con->os->nextArg) { + /*@-mods@*/ int saveerrno = errno; errno = 0; aDouble = strtod(con->os->nextArg, &end); if (errno == ERANGE) return POPT_ERROR_OVERFLOW; errno = saveerrno; + /*@=mods@*/ if (*end != '\0') return POPT_ERROR_BADNUMBER; } diff --git a/popt/poptconfig.c b/popt/poptconfig.c index e553f86de..0c704716a 100644 --- a/popt/poptconfig.c +++ b/popt/poptconfig.c @@ -103,7 +103,9 @@ int poptReadConfigFile(poptContext con, const char * fn) if (fileLength == -1 || lseek(fd, 0, 0) == -1) { rc = errno; (void) close(fd); + /*@-mods@*/ errno = rc; + /*@=mods@*/ return POPT_ERROR_ERRNO; } @@ -111,7 +113,9 @@ int poptReadConfigFile(poptContext con, const char * fn) if (read(fd, (char *)file, fileLength) != fileLength) { rc = errno; (void) close(fd); + /*@-mods@*/ errno = rc; + /*@=mods@*/ return POPT_ERROR_ERRNO; } if (close(fd) == -1) diff --git a/rpmdb/db1.c b/rpmdb/db1.c index d9a3eabf1..c0f2aa157 100644 --- a/rpmdb/db1.c +++ b/rpmdb/db1.c @@ -476,7 +476,7 @@ static int db1stat(/*@unused@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) static int db1close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) /*@globals rpmGlobalMacroContext, fileSystem @*/ - /*@modifies dbi, fileSystem @*/ + /*@modifies dbi, rpmGlobalMacroContext, fileSystem @*/ { rpmdb rpmdb = dbi->dbi_rpmdb; const char * base = db1basename(dbi->dbi_rpmtag); @@ -523,7 +523,7 @@ static int db1open(/*@keep@*/ rpmdb rpmdb, int rpmtag, /*@out@*/ dbiIndex * dbip) /*@globals rpmGlobalMacroContext, fileSystem @*/ - /*@modifies *dbip, fileSystem @*/ + /*@modifies *dbip, rpmGlobalMacroContext, fileSystem @*/ { /*@-nestedextern@*/ extern struct _dbiVec db1vec; diff --git a/rpmdb/db3.c b/rpmdb/db3.c index 0c30147d9..d0d27a213 100644 --- a/rpmdb/db3.c +++ b/rpmdb/db3.c @@ -268,7 +268,9 @@ static int db_init(dbiIndex dbi, const char * dbhome, root = (dbi->dbi_root ? dbi->dbi_root : rpmdb->db_root); if ((root[0] == '/' && root[1] == '\0') || rpmdb->db_chrootDone) root = NULL; + /*@-mods@*/ tmpdir = rpmGenPath(root, dbi->dbi_tmpdir, NULL); + /*@=mods@*/ xx = dbenv->set_tmp_dir(dbenv, tmpdir); xx = cvtdberr(dbi, "dbenv->set_tmp_dir", rc, _debug); tmpdir = _free(tmpdir); @@ -678,7 +680,9 @@ static int db3close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) * Either the root or directory components may be a URL. Concatenate, * convert the URL to a path, and add the name of the file. */ + /*@-mods@*/ urlfn = rpmGenPath(root, home, NULL); + /*@=mods@*/ (void) urlPath(urlfn, &dbhome); if (dbi->dbi_temporary) { dbfile = NULL; @@ -739,7 +743,9 @@ static int db3close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) (dbi->dbi_verbose & DB_VERB_WAITSFOR)); if (dbi->dbi_tmpdir) { + /*@-mods@*/ const char * tmpdir = rpmGenPath(root, dbi->dbi_tmpdir, NULL); + /*@=mods@*/ rc = dbenv->set_tmp_dir(dbenv, tmpdir); rc = cvtdberr(dbi, "dbenv->set_tmp_dir", rc, _debug); tmpdir = _free(tmpdir); @@ -757,7 +763,9 @@ static int db3close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) rc = cvtdberr(dbi, "db_create", rc, _debug); if (db != NULL) { + /*@-mods@*/ const char * dbf = rpmGetPath(dbhome, "/", dbfile, NULL); + /*@=mods@*/ rc = db->verify(db, dbf, NULL, NULL, flags); rc = cvtdberr(dbi, "db->verify", rc, _debug); @@ -819,10 +827,12 @@ static int db3open(/*@keep@*/ rpmdb rpmdb, int rpmtag, dbiIndex * dbip) /* * Parse db configuration parameters. */ + /*@-mods@*/ if ((dbi = db3New(rpmdb, rpmtag)) == NULL) /*@-nullstate@*/ return 1; /*@=nullstate@*/ + /*@=mods@*/ dbi->dbi_api = DB_VERSION_MAJOR; /* @@ -837,7 +847,9 @@ static int db3open(/*@keep@*/ rpmdb rpmdb, int rpmtag, dbiIndex * dbip) * Either the root or directory components may be a URL. Concatenate, * convert the URL to a path, and add the name of the file. */ + /*@-mods@*/ urlfn = rpmGenPath(root, home, NULL); + /*@=mods@*/ (void) urlPath(urlfn, &dbhome); if (dbi->dbi_temporary) { dbfile = NULL; @@ -911,7 +923,9 @@ static int db3open(/*@keep@*/ rpmdb rpmdb, int rpmtag, dbiIndex * dbip) } } else { /* dbhome is writable, check for persistent dbenv. */ + /*@-mods@*/ const char * dbf = rpmGetPath(dbhome, "/__db.001", NULL); + /*@=mods@*/ if (access(dbf, F_OK) == -1) { /* ... non-existent (or unwritable) DBENV, will create ... */ @@ -937,7 +951,9 @@ static int db3open(/*@keep@*/ rpmdb rpmdb, int rpmtag, dbiIndex * dbip) if ((oflags & DB_CREATE) && (oflags & DB_RDONLY)) { /* dbhome is writable, and DB->open flags may conflict. */ const char * dbfn = (dbfile ? dbfile : tagName(dbi->dbi_rpmtag)); + /*@-mods@*/ const char * dbf = rpmGetPath(dbhome, "/", dbfn, NULL); + /*@=mods@*/ if (access(dbf, F_OK) == -1) { /* File does not exist, DB->open might create ... */ diff --git a/rpmdb/dbconfig.c b/rpmdb/dbconfig.c index 44f3ff21e..75d209901 100644 --- a/rpmdb/dbconfig.c +++ b/rpmdb/dbconfig.c @@ -423,10 +423,12 @@ dbiIndex db3New(rpmdb rpmdb, int rpmtag) /*@switchbreak@*/ break; case POPT_ARG_STRING: { const char ** t = opt->arg; + /*@-mods@*/ if (t) { *t = _free(*t); *t = xstrdup( (p ? p : "") ); } + /*@=mods@*/ } /*@switchbreak@*/ break; case POPT_ARG_INT: diff --git a/rpmdb/falloc.c b/rpmdb/falloc.c index 021249ebb..3d8201dff 100644 --- a/rpmdb/falloc.c +++ b/rpmdb/falloc.c @@ -67,10 +67,10 @@ FD_t fadOpen(const char * path, int flags, mode_t perms) /* XXX Fstrerror */ return NULL; - /*@-modobserver -observertrans@*/ + /*@-modobserver -observertrans -mods @*/ memcpy(fadio, fdio, sizeof(*fadio)); fadio->_open = fadOpen; - /*@=modobserver =observertrans@*/ + /*@=modobserver =observertrans =mods @*/ fdSetIo(fd, fadio); fadSetFirstFree(fd, 0); diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index 4c1640646..b6960adf6 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -1,4 +1,4 @@ -/*@-sizeoftype@*/ +/*@-sizeoftype @*/ /** \ingroup rpmdb dbi * \file rpmdb/rpmdb.c */ @@ -86,7 +86,7 @@ static int dbiTagToDbix(int rpmtag) */ static void dbiTagsInit(void) /*@globals rpmGlobalMacroContext, dbiTags, dbiTagsMax @*/ - /*@modifies dbiTags, dbiTagsMax @*/ + /*@modifies rpmGlobalMacroContext, dbiTags, dbiTagsMax @*/ { /*@observer@*/ static const char * const _dbiTagStr_default = "Packages:Name:Basenames:Group:Requirename:Providename:Conflictname:Triggername:Dirnames:Requireversion:Provideversion:Installtid:Removetid"; @@ -359,9 +359,9 @@ dbiIndex dbiOpen(rpmdb db, int rpmtag, /*@unused@*/ unsigned int flags) if ((dbi = db->_dbi[dbix]) != NULL) return dbi; -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ +/*@-globs -mods @*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ _dbapi_rebuild = rpmExpandNumeric("%{_dbapi_rebuild}"); -/*@=globs@*/ +/*@=globs =mods @*/ if (_dbapi_rebuild < 1 || _dbapi_rebuild > 3) _dbapi_rebuild = 3; _dbapi_wanted = (_rebuildinprogress ? -1 : db->db_api); @@ -372,7 +372,9 @@ dbiIndex dbiOpen(rpmdb db, int rpmtag, /*@unused@*/ unsigned int flags) if (_dbapi < 0 || _dbapi >= 4 || mydbvecs[_dbapi] == NULL) { return NULL; } + /*@-mods@*/ errno = 0; + /*@=mods@*/ dbi = NULL; rc = (*mydbvecs[_dbapi]->open) (db, rpmtag, &dbi); if (rc) { @@ -390,7 +392,9 @@ dbiIndex dbiOpen(rpmdb db, int rpmtag, /*@unused@*/ unsigned int flags) while (_dbapi-- > 1) { if (mydbvecs[_dbapi] == NULL) continue; + /*@-mods@*/ errno = 0; + /*@=mods@*/ dbi = NULL; rc = (*mydbvecs[_dbapi]->open) (db, rpmtag, &dbi); if (rc == 0 && dbi) @@ -853,13 +857,14 @@ int rpmdbSync(rpmdb db) return rc; } +/*@-mods@*/ static /*@only@*/ /*@null@*/ rpmdb newRpmdb(/*@kept@*/ /*@null@*/ const char * root, /*@kept@*/ /*@null@*/ const char * home, int mode, int perms, int flags) /*@globals _db_filter_dups, rpmGlobalMacroContext, fileSystem @*/ - /*@modifies _db_filter_dups, fileSystem @*/ + /*@modifies _db_filter_dups, rpmGlobalMacroContext, fileSystem @*/ { rpmdb db = xcalloc(sizeof(*db), 1); const char * epfx = _DB_ERRPFX; @@ -898,6 +903,7 @@ rpmdb newRpmdb(/*@kept@*/ /*@null@*/ const char * root, db->_dbi = xcalloc(db->db_ndbi, sizeof(*db->_dbi)); /*@-globstate@*/ return db; /*@=globstate@*/ } +/*@=mods@*/ static int openDatabase(/*@null@*/ const char * prefix, /*@null@*/ const char * dbpath, @@ -920,8 +926,10 @@ static int openDatabase(/*@null@*/ const char * prefix, static int _enable_cdb = -1; /* XXX hack in suoport for CDB, otherwise nuke the state. */ + /*@-mods@*/ if (_enable_cdb < 0) _enable_cdb = rpmExpandNumeric("%{?__dbi_cdb:1}"); + /*@=mods@*/ if (!_enable_cdb) { char * filename; @@ -939,7 +947,9 @@ static int openDatabase(/*@null@*/ const char * prefix, } } #endif + /*@-mods@*/ dbiTagsInit(); + /*@=mods@*/ _initialized++; } @@ -954,7 +964,9 @@ static int openDatabase(/*@null@*/ const char * prefix, if (mode & O_WRONLY) return 1; + /*@-mods@*/ db = newRpmdb(prefix, dbpath, mode, perms, flags); + /*@=mods@*/ if (db == NULL) return 1; db->db_api = _dbapi; @@ -1044,14 +1056,18 @@ exit: /*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ int rpmdbOpen (const char * prefix, rpmdb *dbp, int mode, int perms) { + /*@-mods@*/ int _dbapi = rpmExpandNumeric("%{_dbapi}"); + /*@=mods@*/ return openDatabase(prefix, NULL, _dbapi, dbp, mode, perms, 0); } int rpmdbInit (const char * prefix, int perms) { rpmdb db = NULL; + /*@-mods@*/ int _dbapi = rpmExpandNumeric("%{_dbapi}"); + /*@=mods@*/ int rc; rc = openDatabase(prefix, NULL, _dbapi, &db, (O_CREAT | O_RDWR), @@ -1070,7 +1086,9 @@ int rpmdbInit (const char * prefix, int perms) int rpmdbVerify(const char * prefix) { rpmdb db = NULL; + /*@-mods@*/ int _dbapi = rpmExpandNumeric("%{_dbapi}"); + /*@=mods@*/ int rc = 0; rc = openDatabase(prefix, NULL, _dbapi, &db, O_RDONLY, 0644, 0); @@ -1760,7 +1778,9 @@ int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTag tag, int rc = 0; if (defmode == (rpmMireMode)-1) { + /*@-mods@*/ const char *t = rpmExpand("%{?_query_selector_match}", NULL); + /*@=mods@*/ if (*t == '\0' || !strcmp(t, "default")) defmode = RPMMIRE_DEFAULT; else if (!strcmp(t, "strcmp")) @@ -2332,6 +2352,7 @@ static INLINE int removeIndexEntry(dbiIndex dbi, DBC * dbcursor, return rc; } +/*@-mods@*/ /* XXX install.c uninstall.c */ int rpmdbRemove(rpmdb db, /*@unused@*/ int rid, unsigned int hdrNum) { @@ -3329,4 +3350,5 @@ exit: return rc; } /*@=globs@*/ -/*@=sizeoftype@*/ +/*@=mods@*/ +/*@=sizeoftype @*/ diff --git a/rpmio/macro.c b/rpmio/macro.c index c4318241a..4c8b267de 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -82,11 +82,6 @@ typedef /*@abstract@*/ struct MacroBuf_s { #define SAVECHAR(_mb, _c) { *(_mb)->t = (_c), (_mb)->t++, (_mb)->nb--; } -static int expandMacro(MacroBuf mb) - /*@globals rpmGlobalMacroContext, - fileSystem @*/ - /*@modifies mb, fileSystem @*/; - /*@-exportlocal -exportheadervar@*/ #define MAX_MACRO_DEPTH 16 @@ -108,6 +103,15 @@ int print_expand_trace = 0; #define MACRO_CHUNK_SIZE 16 +/* forward ref */ +static int expandMacro(MacroBuf mb) + /*@globals rpmGlobalMacroContext, + print_macro_trace, print_expand_trace, + fileSystem @*/ + /*@modifies mb, rpmGlobalMacroContext, + print_macro_trace, print_expand_trace, + fileSystem @*/; + /** * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL. * @param p memory to free @@ -459,7 +463,7 @@ static int expandT(MacroBuf mb, const char * f, size_t flen) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies mb, fileSystem @*/ + /*@modifies mb, rpmGlobalMacroContext, fileSystem @*/ { char *sbuf; const char *s = mb->s; @@ -488,7 +492,7 @@ static int expandS(MacroBuf mb, char * tbuf, size_t tbuflen) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies mb, *tbuf, fileSystem @*/ + /*@modifies mb, *tbuf, rpmGlobalMacroContext, fileSystem @*/ { const char *t = mb->t; size_t nb = mb->nb; @@ -514,7 +518,7 @@ static int expandU(MacroBuf mb, char * u, size_t ulen) /*@globals rpmGlobalMacroContext, fileSystem@*/ - /*@modifies mb, *u, fileSystem @*/ + /*@modifies mb, *u, rpmGlobalMacroContext, fileSystem @*/ { const char *s = mb->s; char *t = mb->t; @@ -554,7 +558,8 @@ static int doShellEscape(MacroBuf mb, const char * cmd, size_t clen) /*@globals rpmGlobalMacroContext, fileSystem @*/ - /*@modifies mb, fileSystem @*/ + /*@modifies mb, rpmGlobalMacroContext, + fileSystem @*/ { char pcmd[BUFSIZ]; FILE *shf; @@ -592,7 +597,7 @@ doShellEscape(MacroBuf mb, const char * cmd, size_t clen) /*@dependent@*/ static const char * doDefine(MacroBuf mb, const char * se, int level, int expandbody) /*@globals rpmGlobalMacroContext @*/ - /*@modifies mb @*/ + /*@modifies mb, rpmGlobalMacroContext @*/ { const char *s = se; char buf[BUFSIZ], *n = buf, *ne = n; @@ -682,7 +687,7 @@ doDefine(MacroBuf mb, const char * se, int level, int expandbody) /*@dependent@*/ static const char * doUndefine(MacroContext mc, const char * se) /*@globals rpmGlobalMacroContext @*/ - /*@modifies mc @*/ + /*@modifies mc, rpmGlobalMacroContext @*/ { const char *s = se; char buf[BUFSIZ], *n = buf, *ne = n; @@ -836,7 +841,7 @@ freeArgs(MacroBuf mb) /*@dependent@*/ static const char * grabArgs(MacroBuf mb, const MacroEntry me, const char * se, char lastc) /*@globals rpmGlobalMacroContext @*/ - /*@modifies mb @*/ + /*@modifies mb, rpmGlobalMacroContext @*/ { char buf[BUFSIZ], *b, *be; char aname[16]; @@ -918,7 +923,9 @@ grabArgs(MacroBuf mb, const MacroEntry me, const char * se, char lastc) /* 1003.2 says this must be 1 before any call. */ #ifdef __GLIBC__ + /*@-mods@*/ optind = 1; + /*@=mods@*/ #endif opts = me->opts; @@ -980,7 +987,8 @@ static void doOutput(MacroBuf mb, int waserror, const char * msg, size_t msglen) /*@globals rpmGlobalMacroContext, fileSystem @*/ - /*@modifies mb, fileSystem @*/ + /*@modifies mb, rpmGlobalMacroContext, + fileSystem @*/ { char buf[BUFSIZ]; @@ -1007,7 +1015,8 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn, const char * g, size_t glen) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ - /*@modifies mb, fileSystem, internalState @*/ + /*@modifies mb, rpmGlobalMacroContext, + fileSystem, internalState @*/ { char buf[BUFSIZ], *b = NULL, *be; int c; @@ -1102,8 +1111,11 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn, static int expandMacro(MacroBuf mb) /*@globals rpmGlobalMacroContext, + print_macro_trace, print_expand_trace, + fileSystem @*/ + /*@modifies mb, rpmGlobalMacroContext, + print_macro_trace, print_expand_trace, fileSystem @*/ - /*@modifies mb, rpmGlobalMacroContext, fileSystem @*/ { MacroEntry *mep; MacroEntry me; @@ -1577,7 +1589,9 @@ rpmInitMacros(MacroContext mc, const char *macrofiles) } /* XXX Assume new fangled macro expansion */ + /*@-mods@*/ max_macro_depth = 16; + /*@=mods@*/ while(rdcl(buf, sizeof(buf), fd, 1) != NULL) { char c, *n; @@ -1595,7 +1609,9 @@ rpmInitMacros(MacroContext mc, const char *macrofiles) m = _free(m); /* Reload cmdline macros */ + /*@-mods@*/ rpmLoadMacros(rpmCLIMacroContext, RMIL_CMDLINE); + /*@=mods@*/ } /*@-globstate@*/ diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index fbfe0858e..91a9edb6c 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -715,7 +715,8 @@ static int mygethostbyname(const char * host, /*@-compdef@*/ /* FIX: address->s_addr undefined. */ static int getHostAddress(const char * host, /*@out@*/ struct in_addr * address) - /*@modifies *address @*/ + /*@globals errno @*/ + /*@modifies *address, errno @*/ { if (xisdigit(host[0])) { /*@-unrecog -moduncon @*/ @@ -804,7 +805,7 @@ static int checkResponse(void * uu, FD_t ctrl, URLSANE(u); if (u->bufAlloced == 0 || u->buf == NULL) { - u->bufAlloced = url_iobuf_size; + u->bufAlloced = _url_iobuf_size; u->buf = xcalloc(u->bufAlloced, sizeof(u->buf[0])); } buf = u->buf; diff --git a/rpmio/rpmio.h b/rpmio/rpmio.h index 169abaa6c..9ad0aa354 100644 --- a/rpmio/rpmio.h +++ b/rpmio/rpmio.h @@ -506,13 +506,14 @@ int fdClose( /*@only@*/ void * cookie) /** */ int fdWritable(FD_t fd, int secs) - /*@globals fileSystem @*/ - /*@modifies fd, fileSystem @*/; + /*@globals errno, fileSystem @*/ + /*@modifies fd, errno, fileSystem @*/; /** */ int fdReadable(FD_t fd, int secs) - /*@modifies fd @*/; + /*@globals errno @*/ + /*@modifies fd, errno @*/; /*@=exportlocal@*/ /** diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h index b61a241ea..c91df8740 100644 --- a/rpmio/rpmio_internal.h +++ b/rpmio/rpmio_internal.h @@ -159,8 +159,8 @@ extern "C" { /** \ingroup rpmio */ int fdFgets(FD_t fd, char * buf, size_t len) - /*@globals fileSystem @*/ - /*@modifies *buf, fd, fileSystem @*/; + /*@globals errno, fileSystem @*/ + /*@modifies *buf, fd, errno, fileSystem @*/; /** \ingroup rpmio */ diff --git a/rpmio/rpmlog.c b/rpmio/rpmlog.c index a2407cee9..f7d35dfa6 100644 --- a/rpmio/rpmlog.c +++ b/rpmio/rpmlog.c @@ -76,6 +76,8 @@ void rpmlogPrint(FILE *f) /*@=modfilesys@*/ void rpmlogClose (void) + /*@globals recs, nrecs @*/ + /*@modifies recs, nrecs @*/ { int i; @@ -95,10 +97,13 @@ void rpmlogOpen (/*@unused@*/ const char *ident, /*@unused@*/ int option, /*@unchecked@*/ static int rpmlogMask = RPMLOG_UPTO( RPMLOG_NOTICE ); + /*@unchecked@*/ static /*@unused@*/ int rpmlogFacility = RPMLOG_USER; int rpmlogSetMask (int mask) + /*@globals rpmlogMask @*/ + /*@modifies rpmlogMask @*/ { int omask = rpmlogMask; if (mask) @@ -110,6 +115,8 @@ int rpmlogSetMask (int mask) static /*@null@*/ rpmlogCallback _rpmlogCallback = NULL; rpmlogCallback rpmlogSetCallback(rpmlogCallback cb) + /*@globals _rpmlogCallback @*/ + /*@modifies _rpmlogCallback @*/ { rpmlogCallback ocb = _rpmlogCallback; _rpmlogCallback = cb; @@ -142,8 +149,8 @@ static inline int vsnprintf(char * buf, /*@unused@*/ int nb, /*@-compmempass@*/ /* FIX: rpmlogMsgPrefix[] dependent, not unqualified */ /*@-nullstate@*/ /* FIX: rpmlogMsgPrefix[] may be NULL */ static void vrpmlog (unsigned code, const char *fmt, va_list ap) - /*@globals internalState @*/ - /*@modifies internalState @*/ + /*@globals nrecs, recs, internalState @*/ + /*@modifies nrecs, recs, internalState @*/ { int pri = RPMLOG_PRI(code); int mask = RPMLOG_MASK(pri); diff --git a/rpmio/rpmmacro.h b/rpmio/rpmmacro.h index 79d19b344..df9d5b961 100644 --- a/rpmio/rpmmacro.h +++ b/rpmio/rpmmacro.h @@ -18,17 +18,27 @@ typedef /*@abstract@*/ struct MacroEntry_s { /*! The structure used to store the set of macros in a context. */ typedef /*@abstract@*/ struct MacroContext_s { /*@owned@*//*@null@*/ MacroEntry *macroTable; /*!< Macro entry table for context. */ - int macrosAllocated;/*!< No. of allocated macros. */ - int firstFree; /*!< No. of macros. */ + int macrosAllocated;/*!< No. of allocated macros. */ + int firstFree; /*!< No. of macros. */ } * MacroContext; -/** - */ +/*@-redecl@*/ +/*@checked@*/ extern MacroContext rpmGlobalMacroContext; -/** - */ +/*@checked@*/ extern MacroContext rpmCLIMacroContext; +/*@=redecl@*/ + +/** \ingroup rpmrc + * List of macro files to read when configuring rpm. + * This is a colon separated list of files. URI's are permitted as well, + * identified by the token '://', so file paths must not begin with '//'. + */ +/*@-redecl@*/ +/*@observer@*/ /*@checked@*/ +extern const char * macrofiles; +/*@=redecl@*/ /** * Markers for sources of macros added throughout rpm. @@ -161,7 +171,7 @@ int isCompressed (const char * file, * @param arg macro(s) to expand (NULL terminates list) * @return macro expansion (malloc'ed) */ -char * rpmExpand (/*@null@*/ const char * arg, ...) +char * rpmExpand (/*@null@*/ const char * arg, ...) /*@globals rpmGlobalMacroContext @*/ /*@modifies rpmGlobalMacroContext @*/; @@ -178,7 +188,7 @@ char * rpmExpand (/*@null@*/ const char * arg, ...) * @param path macro(s) to expand (NULL terminates list) * @return canonicalized path (malloc'ed) */ -/*@-redecl@*/ +/*@-redecl@*/ /* LCL: shrug */ const char * rpmGetPath (/*@null@*/ const char * path, ...) /*@globals rpmGlobalMacroContext @*/ /*@modifies rpmGlobalMacroContext @*/; @@ -194,7 +204,7 @@ const char * rpmGetPath (/*@null@*/ const char * path, ...) * @param urlfile file URL (often a file, or NULL) * @return expanded, merged, canonicalized path (malloc'ed) */ -/*@-redecl@*/ +/*@-redecl@*/ /* LCL: shrug */ const char * rpmGenPath (/*@null@*/ const char * urlroot, /*@null@*/ const char * urlmdir, /*@null@*/ const char * urlfile) diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c index a9c7f262a..2d694133b 100644 --- a/rpmio/rpmpgp.c +++ b/rpmio/rpmpgp.c @@ -318,7 +318,9 @@ int pgpPrtPktSigV3(pgpPkt pkt, const byte *h, unsigned int hlen) return 1; } + /*@-mods@*/ if (_dig) memcpy(&_dig->sig.v3, v, sizeof(_dig->sig.v3)); + /*@=mods@*/ pgpPrtVal("V3 ", pgpPktTbl, pkt); @@ -341,6 +343,7 @@ int pgpPrtPktSigV3(pgpPkt pkt, const byte *h, unsigned int hlen) for (i = 0; p < &h[hlen]; i++, p += pgpMpiLen(p)) { if (v->pubkey_algo == PGPPUBKEYALGO_RSA) { if (pgpSigRSA[i] == NULL) break; + /*@-mods@*/ if (_dig && (v->sigtype == PGPSIGTYPE_BINARY || v->sigtype == PGPSIGTYPE_TEXT)) { @@ -354,9 +357,11 @@ printf("\t m**d = "), mp32println(_dig->c.size, _dig->c.data); /*@switchbreak@*/ break; } } + /*@=mods@*/ pgpPrtStr("", pgpSigRSA[i]); } else if (v->pubkey_algo == PGPPUBKEYALGO_DSA) { if (pgpSigDSA[i] == NULL) break; + /*@-mods@*/ if (_dig && (v->sigtype == PGPSIGTYPE_BINARY || v->sigtype == PGPSIGTYPE_TEXT)) { @@ -371,6 +376,7 @@ printf("\t m**d = "), mp32println(_dig->c.size, _dig->c.data); /*@switchbreak@*/ break; } } + /*@=mods@*/ pgpPrtStr("", pgpSigDSA[i]); } else { if (_print) @@ -476,7 +482,9 @@ int pgpPrtPktSigV4(pgpPkt pkt, const byte *h, unsigned int hlen) return 1; } + /*@-mods@*/ if (_dig) memcpy(&_dig->sig.v4, v, sizeof(_dig->sig.v4)); + /*@=mods@*/ pgpPrtVal("V4 ", pgpPktTbl, pkt); pgpPrtVal(" ", pgpPubkeyTbl, v->pubkey_algo); @@ -491,11 +499,13 @@ int pgpPrtPktSigV4(pgpPkt pkt, const byte *h, unsigned int hlen) if (_debug && _print) fprintf(stderr, " hash[%u] -- %s\n", plen, pgpHexStr(p, plen)); + /*@-mods@*/ if (_dig) { _dig->hash_datalen = plen; _dig->hash_data = xmalloc(_dig->hash_datalen); memcpy(_dig->hash_data, p, plen); } + /*@=mods@*/ (void) pgpPrtSubType(p, plen); p += plen; @@ -515,6 +525,7 @@ fprintf(stderr, " unhash[%u] -- %s\n", plen, pgpHexStr(p, plen)); for (i = 0; p < &h[hlen]; i++, p += pgpMpiLen(p)) { if (v->pubkey_algo == PGPPUBKEYALGO_RSA) { if (pgpSigRSA[i] == NULL) break; + /*@-mods@*/ if (_dig && (v->sigtype == PGPSIGTYPE_BINARY || v->sigtype == PGPSIGTYPE_TEXT)) { @@ -528,9 +539,11 @@ printf("\t m**d = "), mp32println(_dig->c.size, _dig->c.data); /*@switchbreak@*/ break; } } + /*@=mods@*/ pgpPrtStr("", pgpSigRSA[i]); } else if (v->pubkey_algo == PGPPUBKEYALGO_DSA) { if (pgpSigDSA[i] == NULL) break; + /*@-mods@*/ if (_dig && (v->sigtype == PGPSIGTYPE_BINARY || v->sigtype == PGPSIGTYPE_TEXT)) { @@ -545,6 +558,7 @@ printf("\t m**d = "), mp32println(_dig->c.size, _dig->c.data); /*@switchbreak@*/ break; } } + /*@=mods@*/ pgpPrtStr("", pgpSigDSA[i]); } else { if (_print) @@ -646,6 +660,7 @@ int pgpPrtKeyV3(pgpPkt pkt, const byte *h, unsigned int hlen) for (i = 0; p < &h[hlen]; i++, p += pgpMpiLen(p)) { if (v->pubkey_algo == PGPPUBKEYALGO_RSA) { if (pgpPublicRSA[i] == NULL) break; + /*@-mods@*/ if (_dig) { switch (i) { case 0: /* n */ @@ -662,9 +677,11 @@ printf("\t e = "), mp32println(_dig->rsa_pk.e.size, _dig->rsa_pk.e.data); /*@switchbreak@*/ break; } } + /*@=mods@*/ pgpPrtStr("", pgpPublicRSA[i]); } else if (v->pubkey_algo == PGPPUBKEYALGO_DSA) { if (pgpPublicDSA[i] == NULL) break; + /*@-mods@*/ if (_dig) { switch (i) { case 0: /* p */ @@ -691,6 +708,7 @@ printf("\t y = "), mp32println(_dig->y.size, _dig->y.data); /*@switchbreak@*/ break; } } + /*@=mods@*/ pgpPrtStr("", pgpPublicDSA[i]); } else if (v->pubkey_algo == PGPPUBKEYALGO_ELGAMAL_ENCRYPT) { if (pgpPublicELGAMAL[i] == NULL) break; @@ -699,6 +717,7 @@ printf("\t y = "), mp32println(_dig->y.size, _dig->y.data); if (_print) fprintf(stderr, "%7d", i); } + /*@=mods@*/ pgpPrtStr("", pgpMpiStr(p)); pgpPrtNL(); } @@ -728,6 +747,7 @@ int pgpPrtKeyV4(pgpPkt pkt, const byte *h, unsigned int hlen) for (i = 0; p < &h[hlen]; i++, p += pgpMpiLen(p)) { if (v->pubkey_algo == PGPPUBKEYALGO_RSA) { if (pgpPublicRSA[i] == NULL) break; + /*@-mods@*/ if (_dig) { switch (i) { case 0: /* n */ @@ -744,9 +764,11 @@ printf("\t e = "), mp32println(_dig->rsa_pk.e.size, _dig->rsa_pk.e.data); /*@switchbreak@*/ break; } } + /*@=mods@*/ pgpPrtStr("", pgpPublicRSA[i]); } else if (v->pubkey_algo == PGPPUBKEYALGO_DSA) { if (pgpPublicDSA[i] == NULL) break; + /*@-mods@*/ if (_dig) { switch (i) { case 0: /* p */ @@ -773,6 +795,7 @@ printf("\t y = "), mp32println(_dig->y.size, _dig->y.data); /*@switchbreak@*/ break; } } + /*@=mods@*/ pgpPrtStr("", pgpPublicDSA[i]); } else if (v->pubkey_algo == PGPPUBKEYALGO_ELGAMAL_ENCRYPT) { if (pgpPublicELGAMAL[i] == NULL) break; @@ -978,8 +1001,10 @@ int pgpPrtPkts(const byte *pkts, unsigned int plen, struct pgpSig_s * dig, int p const byte *p; int len; +/*@-mods@*/ _print = printing; _dig = dig; +/*@=mods@*/ for (p = pkts; p < (pkts + plen); p += len) { len = pgpPrtPkt(p); diff --git a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c index 2d5fa1901..c2a48059a 100644 --- a/rpmio/rpmrpc.c +++ b/rpmio/rpmrpc.c @@ -524,7 +524,9 @@ static int vfs_parse_filedate(int idx, /*@out@*/ time_t *t) /* Here just this special case with MM-DD-YY */ if (is_dos_date(p)){ + /*@-mods@*/ p[2] = p[5] = '-'; + /*@=mods@*/ memset(d, 0, sizeof(d)); if (sscanf(p, "%2d-%2d-%2d", &d[0], &d[1], &d[2]) == 3){ @@ -808,6 +810,7 @@ static /*@only@*/ char * ftpBuf = NULL; #define alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s)) +/*@-mods@*/ static int ftpNLST(const char * url, ftpSysCall_t ftpSysCall, /*@out@*/ /*@null@*/ struct stat * st, /*@out@*/ /*@null@*/ char * rlbuf, size_t rlbufsiz) @@ -876,7 +879,7 @@ static int ftpNLST(const char * url, ftpSysCall_t ftpSysCall, } if (ftpBufAlloced == 0 || ftpBuf == NULL) { - ftpBufAlloced = url_iobuf_size; + ftpBufAlloced = _url_iobuf_size; ftpBuf = xcalloc(ftpBufAlloced, sizeof(ftpBuf[0])); } *ftpBuf = '\0'; @@ -886,7 +889,7 @@ static int ftpNLST(const char * url, ftpSysCall_t ftpSysCall, do { - /* XXX FIXME: realloc ftpBuf is < ~128 chars remain */ + /* XXX FIXME: realloc ftpBuf if < ~128 chars remain */ if ((ftpBufAlloced - bufLength) < (1024+80)) { ftpBufAlloced <<= 2; ftpBuf = xrealloc(ftpBuf, ftpBufAlloced); @@ -996,6 +999,7 @@ exit: (void) ufdClose(fd); return rc; } +/*@=mods@*/ static int ftpStat(const char * path, /*@out@*/ struct stat *st) /*@globals fileSystem @*/ diff --git a/rpmio/rpmurl.h b/rpmio/rpmurl.h index 902a41c8c..3c3e66a8f 100644 --- a/rpmio/rpmurl.h +++ b/rpmio/rpmurl.h @@ -10,7 +10,7 @@ /** * Supported URL types. */ -typedef enum { +typedef enum urltype_e { URL_IS_UNKNOWN = 0, /*!< unknown (aka a file) */ URL_IS_DASH = 1, /*!< stdin/stdout */ URL_IS_PATH = 2, /*!< file://... */ @@ -24,37 +24,49 @@ typedef enum { /** * URL control structure. */ -typedef /*@abstract@*/ /*@refcounted@*/ struct urlinfo { +typedef /*@abstract@*/ /*@refcounted@*/ struct urlinfo_s { /*@refs@*/ int nrefs; /*!< no. of references */ -/*@owned@*//*@null@*/ const char * url; /*!< copy of original url */ -/*@owned@*//*@null@*/ const char * service; -/*@owned@*//*@null@*/ const char * user; -/*@owned@*//*@null@*/ const char * password; -/*@owned@*//*@null@*/ const char * host; -/*@owned@*//*@null@*/ const char * portstr; -/*@owned@*//*@null@*/ const char * proxyu; /*!< FTP: proxy user */ -/*@owned@*//*@null@*/ const char * proxyh; /*!< FTP/HTTP: proxy host */ +/*@owned@*/ /*@null@*/ const char * url; /*!< copy of original url */ +/*@owned@*/ /*@null@*/ const char * service; +/*@owned@*/ /*@null@*/ const char * user; +/*@owned@*/ /*@null@*/ const char * password; +/*@owned@*/ /*@null@*/ const char * host; +/*@owned@*/ /*@null@*/ const char * portstr; +/*@owned@*/ /*@null@*/ const char * proxyu; /*!< FTP: proxy user */ +/*@owned@*/ /*@null@*/ const char * proxyh; /*!< FTP/HTTP: proxy host */ int proxyp; /*!< FTP/HTTP: proxy port */ int port; int urltype; FD_t ctrl; /*!< control channel */ FD_t data; /*!< per-xfer data channel */ int bufAlloced; /*!< sizeof I/O buffer */ -/*@owned@*/ char *buf; /*!< I/O buffer */ +/*@owned@*/ char * buf; /*!< I/O buffer */ int openError; /*!< Type of open failure */ int httpVersion; int httpHasRange; int magic; -} *urlinfo; +} * urlinfo; #ifdef __cplusplus extern "C" { #endif -/** - */ +/*@checked@*/ +extern int _url_count; /*!< No. of cached URL's. */ + +/*@checked@*/ +/*@only@*/ /*@null@*/ +extern urlinfo * _url_cache; /*!< URL cache. */ + +/*@unchecked@*/ +extern int _url_iobuf_size; /*!< Initial size of URL I/O buffer. */ +#define RPMURL_IOBUF_SIZE 4096 + /*@unchecked@*/ -extern int url_iobuf_size; +extern int _url_debug; /*!< URL debugging? */ +#define RPMURL_DEBUG_IO 0x40000000 +#define RPMURL_DEBUG_REFS 0x20000000 + /** * Create a URL control structure instance. @@ -101,8 +113,8 @@ urlinfo XurlFree( /*@killref@*/ urlinfo u, const char * msg, * Free cached URL control structures. */ void urlFreeCache(void) - /*@globals fileSystem@*/ - /*@modifies fileSystem @*/; + /*@globals _url_cache, _url_count, fileSystem @*/ + /*@modifies _url_cache, _url_count, fileSystem @*/; /** * Return type of URL. @@ -119,7 +131,7 @@ urltype urlIsURL(const char * url) * @return type of url */ urltype urlPath(const char * url, /*@out@*/ const char ** pathp) - /*@modifies *pathp@*/; + /*@modifies *pathp @*/; /** * Parse URL string into a control structure. @@ -137,7 +149,7 @@ int urlSplit(const char * url, /*@out@*/ urlinfo * uret) * @return 0 on success, otherwise FTPERR_* code */ int urlGetFile(const char * url, /*@null@*/ const char * dest) - /*@globals fileSystem@*/ + /*@globals fileSystem @*/ /*@modifies fileSystem @*/; #ifdef __cplusplus diff --git a/rpmio/url.c b/rpmio/url.c index f2775e1a2..fb280d026 100644 --- a/rpmio/url.c +++ b/rpmio/url.c @@ -23,14 +23,16 @@ #define IPPORT_HTTP 80 #endif -#define URL_IOBUF_SIZE 4096 -int url_iobuf_size = URL_IOBUF_SIZE; - -#define RPMURL_DEBUG_IO 0x40000000 -#define RPMURL_DEBUG_REFS 0x20000000 +/** + */ +/*@unchecked@*/ +int _url_iobuf_size = RPMURL_IOBUF_SIZE; +/** + */ /*@unchecked@*/ int _url_debug = 0; + #define URLDBG(_f, _m, _x) if ((_url_debug | (_f)) & (_m)) fprintf _x #define URLDBGIO(_f, _x) URLDBG((_f), RPMURL_DEBUG_IO, _x) @@ -38,13 +40,14 @@ int _url_debug = 0; /** */ -/*@only@*/ /*@null@*/ /*@unchecked@*/ -static urlinfo *uCache = NULL; +/*@unchecked@*/ +/*@only@*/ /*@null@*/ +urlinfo *_url_cache = NULL; /** */ /*@unchecked@*/ -static int uCount = 0; +int _url_count = 0; /** * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL. @@ -152,21 +155,21 @@ URLDBGREFS(0, (stderr, "--> url %p -- %d %s at %s:%u\n", u, u->nrefs, msg, file, void urlFreeCache(void) { - if (uCache) { + if (_url_cache) { int i; - for (i = 0; i < uCount; i++) { - if (uCache[i] == NULL) continue; - uCache[i] = urlFree(uCache[i], "uCache"); - if (uCache[i]) + for (i = 0; i < _url_count; i++) { + if (_url_cache[i] == NULL) continue; + _url_cache[i] = urlFree(_url_cache[i], "_url_cache"); + if (_url_cache[i]) fprintf(stderr, - _("warning: uCache[%d] %p nrefs(%d) != 1 (%s %s)\n"), - i, uCache[i], uCache[i]->nrefs, - (uCache[i]->host ? uCache[i]->host : ""), - (uCache[i]->service ? uCache[i]->service : "")); + _("warning: _url_cache[%d] %p nrefs(%d) != 1 (%s %s)\n"), + i, _url_cache[i], _url_cache[i]->nrefs, + (_url_cache[i]->host ? _url_cache[i]->host : ""), + (_url_cache[i]->service ? _url_cache[i]->service : "")); } } - uCache = _free(uCache); - uCount = 0; + _url_cache = _free(_url_cache); + _url_count = 0; } static int urlStrcmp(/*@null@*/ const char * str1, /*@null@*/ const char * str2) @@ -181,6 +184,7 @@ static int urlStrcmp(/*@null@*/ const char * str1, /*@null@*/ const char * str2) return 0; } +/*@-mods@*/ static void urlFind(/*@null@*/ /*@in@*/ /*@out@*/ urlinfo * uret, int mustAsk) /*@globals rpmGlobalMacroContext, fileSystem@*/ @@ -198,9 +202,9 @@ static void urlFind(/*@null@*/ /*@in@*/ /*@out@*/ urlinfo * uret, int mustAsk) URLSANE(u); ucx = -1; - for (i = 0; i < uCount; i++) { + for (i = 0; i < _url_count; i++) { urlinfo ou = NULL; - if (uCache == NULL || (ou = uCache[i]) == NULL) { + if (_url_cache == NULL || (ou = _url_cache[i]) == NULL) { if (ucx < 0) ucx = i; continue; @@ -221,13 +225,13 @@ static void urlFind(/*@null@*/ /*@in@*/ /*@out@*/ urlinfo * uret, int mustAsk) break; /* Found item in cache */ } - if (i == uCount) { + if (i == _url_count) { if (ucx < 0) { - ucx = uCount++; - uCache = xrealloc(uCache, sizeof(*uCache) * uCount); + ucx = _url_count++; + _url_cache = xrealloc(_url_cache, sizeof(*_url_cache) * _url_count); } - if (uCache) /* XXX always true */ - uCache[ucx] = urlLink(u, "uCache (miss)"); + if (_url_cache) /* XXX always true */ + _url_cache[ucx] = urlLink(u, "_url_cache (miss)"); u = urlFree(u, "urlSplit (urlFind miss)"); } else { ucx = i; @@ -236,11 +240,11 @@ static void urlFind(/*@null@*/ /*@in@*/ /*@out@*/ urlinfo * uret, int mustAsk) /* This URL is now cached. */ - if (uCache) /* XXX always true */ - u = urlLink(uCache[ucx], "uCache"); + if (_url_cache) /* XXX always true */ + u = urlLink(_url_cache[ucx], "_url_cache"); *uret = u; /*@-usereleased@*/ - u = urlFree(u, "uCache (urlFind)"); + u = urlFree(u, "_url_cache (urlFind)"); /*@=usereleased@*/ /* Zap proxy host and port in case they have been reset */ @@ -319,6 +323,7 @@ static void urlFind(/*@null@*/ /*@in@*/ /*@out@*/ urlinfo * uret, int mustAsk) return; } +/*@=mods@*/ /** */ @@ -476,9 +481,9 @@ int urlSplit(const char * url, urlinfo *uret) myurl = _free(myurl); if (uret) { *uret = u; -/*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ +/*@-globs -mods @*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */ urlFind(uret, 0); -/*@=globs@*/ +/*@=globs =mods @*/ } return 0; } @@ -81,8 +81,6 @@ extern int _ftp_debug; extern int noLibio; /*@unchecked@*/ extern int _rpmio_debug; -/*@unchecked@*/ -extern int _url_debug; /*@-varuse@*/ /*@unchecked@*/ @@ -295,6 +293,7 @@ static void printUsage(void) } +/*@-mods@*/ /* FIX: shrug */ int main(int argc, const char ** argv) /*@globals __assert_program_name, rpmGlobalMacroContext, rpmCLIMacroContext, @@ -380,7 +379,6 @@ int main(int argc, const char ** argv) noLibio = 1; #endif _rpmio_debug = 0; - _url_debug = 0; /* XXX Eliminate query linkage loop */ specedit = 0; @@ -583,7 +581,7 @@ int main(int argc, const char ** argv) case GETOPT_DEFINEMACRO: if (optArg) { (void) rpmDefineMacro(NULL, optArg, RMIL_CMDLINE); - (void) rpmDefineMacro(rpmCLIMacroContext, optArg,RMIL_CMDLINE); +/*@i@*/ (void) rpmDefineMacro(rpmCLIMacroContext, optArg,RMIL_CMDLINE); } noUsageMsg = 1; /*@switchbreak@*/ break; @@ -1200,7 +1198,7 @@ exit: #endif /* IAM_RPMBT || IAM_RPMK */ optCon = poptFreeContext(optCon); rpmFreeMacros(NULL); - rpmFreeMacros(rpmCLIMacroContext); +/*@i@*/ rpmFreeMacros(rpmCLIMacroContext); rpmFreeRpmrc(); if (pipeChild) { @@ -1211,7 +1209,7 @@ exit: /* keeps memory leak checkers quiet */ freeNames(); freeFilesystems(); - urlFreeCache(); +/*@i@*/ urlFreeCache(); rpmlogClose(); dbiTags = _free(dbiTags); @@ -1237,3 +1235,4 @@ exit: return ec; /*@=globstate@*/ } +/*@=mods@*/ |