- transaction iterator(s) need to run in reverse order on pure erasures.
- erasures not yet strict, warn & chug on unlink(2)/rmdir(2) failure.
- more boring lclint annotations and fiddles.
+ - yet more boring lclint annotations and fiddles.
4.0 -> 4.0.[12]
- add doxygen and lclint annotations most everywhere.
-unrecogcomments
# don't-bother-me-yet parameters
--branchstate
-#-immediatetrans
--mustfree
-#-observertrans
-#-statictrans
+-branchstate # ~39
+-mustfree # ~325
# not-yet normal parameters
--boolops # w->n
--fixedformalarray
--null
--predboolint # w->n
--predboolothers # w->n
--retvalint # w->n
--type
+-boolops # ~351 w->n
+#-null # ~68
+-predboolint # ~200 w->n
+-type # ~271
# -weak paramaters
static int _build_debug = 0;
/*@access StringBuf @*/
+/*@access urlinfo @*/ /* XXX compared with NULL */
/*@access FD_t @*/
/**
for (p = spec->sources; p != NULL; p = p->next) {
if (! (p->flags & RPMBUILD_ISNO)) {
const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
- Unlink(fn);
+ (void) Unlink(fn);
fn = _free(fn);
}
}
for (p = pkg->icon; p != NULL; p = p->next) {
if (! (p->flags & RPMBUILD_ISNO)) {
const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
- Unlink(fn);
+ (void) Unlink(fn);
fn = _free(fn);
}
}
buildTemplate = rpmExpand(mTemplate, NULL);
buildPost = rpmExpand(mPost, NULL);
- fputs(buildTemplate, fp);
+ (void) fputs(buildTemplate, fp);
if (what != RPMBUILD_PREP && what != RPMBUILD_RMBUILD && spec->buildSubdir)
fprintf(fp, "cd %s\n", spec->buildSubdir);
} else
fprintf(fp, "%s", getStringBuf(sb));
- fputs(buildPost, fp);
+ (void) fputs(buildPost, fp);
- Fclose(xfd);
+ (void) Fclose(xfd);
if (test) {
rc = 0;
rc = RPMERR_SCRIPT;
goto exit;
}
- if (u) {
+ if (u != NULL) {
switch (u->urltype) {
case URL_IS_FTP:
if (_build_debug)
}
buildCmd = rpmExpand("%{___build_cmd}", " ", buildScript, NULL);
- poptParseArgvString(buildCmd, &argc, &argv);
+ (void) poptParseArgvString(buildCmd, &argc, &argv);
rpmMessage(RPMMESS_NORMAL, _("Executing(%s): %s\n"), name, buildCmd);
if (!(child = fork())) {
errno = 0;
- execvp(argv[0], (char *const *)argv);
+ (void) execvp(argv[0], (char *const *)argv);
rpmError(RPMERR_SCRIPT, _("Exec of %s failed (%s): %s\n"),
scriptName, name, strerror(errno));
exit:
if (scriptName) {
if (!rc)
- Unlink(scriptName);
+ (void) Unlink(scriptName);
scriptName = _free(scriptName);
}
- if (u) {
+ if (u != NULL) {
switch (u->urltype) {
case URL_IS_FTP:
case URL_IS_HTTP:
doRmSource(spec);
if (what & RPMBUILD_RMSPEC)
- Unlink(spec->specFile);
+ (void) Unlink(spec->specFile);
exit:
if (rc && rpmlogGetNrecs() > 0) {
state.spec = spec;
state.nextToken = 0;
state.tokenValue = NULL;
- rdToken(&state);
+ (void) rdToken(&state);
/* Parse the expression. */
v = doLogical(&state);
state.spec = spec;
state.nextToken = 0;
state.tokenValue = NULL;
- rdToken(&state);
+ (void) rdToken(&state);
/* Parse the expression. */
v = doLogical(&state);
int count, x;
time_t currentTime = time(NULL);
- hge(h, RPMTAG_OLDFILENAMES, &fnt, (void **) &files, &count);
- hge(h, RPMTAG_FILEMTIMES, NULL, (void **) &mtime, NULL);
+ (void) hge(h, RPMTAG_OLDFILENAMES, &fnt, (void **) &files, &count);
+ (void) hge(h, RPMTAG_FILEMTIMES, NULL, (void **) &mtime, NULL);
for (x = 0; x < count; x++) {
if ((currentTime - mtime[x]) > tc)
not = 0;
verifyFlags = RPMVERIFY_NONE;
- for (p = q; *p; p = pe) {
+ for (p = q; *p != '\0'; p = pe) {
SKIPWHITE(p);
if (*p == '\0')
break;
pe = p;
SKIPNONWHITE(pe);
- if (*pe)
+ if (*pe != '\0')
*pe++ = '\0';
{ VFA_t *vfa;
q = pe;
q++;
SKIPSPACE(q);
- if (*q) {
+ if (*q != '\0') {
rpmError(RPMERR_BADSPEC,
_("Non-white space follows %s(): %s\n"), name, q);
fl->processingFailed = 1;
nullAttrRec(ar);
p = q; SKIPWHITE(p);
- if (*p) {
- pe = p; SKIPNONWHITE(pe); if (*pe) *pe++ = '\0';
+ if (*p != '\0') {
+ pe = p; SKIPNONWHITE(pe); if (*pe != '\0') *pe++ = '\0';
ar->ar_fmodestr = p;
p = pe; SKIPWHITE(p);
}
- if (*p) {
- pe = p; SKIPNONWHITE(pe); if (*pe) *pe++ = '\0';
+ if (*p != '\0') {
+ pe = p; SKIPNONWHITE(pe); if (*pe != '\0') *pe++ = '\0';
ar->ar_user = p;
p = pe; SKIPWHITE(p);
}
- if (*p) {
- pe = p; SKIPNONWHITE(pe); if (*pe) *pe++ = '\0';
+ if (*p != '\0') {
+ pe = p; SKIPNONWHITE(pe); if (*pe != '\0') *pe++ = '\0';
ar->ar_group = p;
p = pe; SKIPWHITE(p);
}
- if (*p && ret_ar == &(fl->def_ar)) { /* %defattr */
- pe = p; SKIPNONWHITE(pe); if (*pe) *pe++ = '\0';
+ if (*p != '\0' && ret_ar == &(fl->def_ar)) { /* %defattr */
+ pe = p; SKIPNONWHITE(pe); if (*pe != '\0') *pe++ = '\0';
ar->ar_dmodestr = p;
p = pe; SKIPWHITE(p);
}
while (p <= pe)
*p++ = ' ';
- for (p = q; *p; p = pe) {
+ for (p = q; *p != '\0'; p = pe) {
SKIPWHITE(p);
if (*p == '\0')
break;
pe = p;
SKIPNONWHITE(pe);
- if (*pe)
+ if (*pe != '\0')
*pe++ = '\0';
if (!strcmp(p, "missingok")) {
fl->currentFlags |= RPMFILE_MISSINGOK;
*p++ = ' ';
/* Parse multiple arguments from %lang */
- for (p = q; *p; p = pe) {
+ for (p = q; *p != '\0'; p = pe) {
char *newp;
size_t np;
int i;
/* XXX WATCHOUT: buf is an arg */
{ const char *ddir, *n, *v;
- headerNVR(pkg->header, &n, &v, NULL);
+ (void) headerNVR(pkg->header, &n, &v, NULL);
ddir = rpmGetPath("%{_docdir}/", n, "-", v, NULL);
strcpy(buf, ddir);
* compressed file list write before we write the actual package to
* disk.
*/
- headerAddOrAppendEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
&(flp->fileURL), 1);
if (sizeof(flp->fl_size) != sizeof(uint_32)) {
uint_32 psize = (uint_32)flp->fl_size;
- headerAddOrAppendEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE,
&(psize), 1);
} else {
- headerAddOrAppendEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE,
&(flp->fl_size), 1);
}
- headerAddOrAppendEntry(h, RPMTAG_FILEUSERNAME, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEUSERNAME, RPM_STRING_ARRAY_TYPE,
&(flp->uname), 1);
- headerAddOrAppendEntry(h, RPMTAG_FILEGROUPNAME, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEGROUPNAME, RPM_STRING_ARRAY_TYPE,
&(flp->gname), 1);
- headerAddOrAppendEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE,
&(flp->fl_mtime), 1);
if (sizeof(flp->fl_mode) != sizeof(uint_16)) {
uint_16 pmode = (uint_16)flp->fl_mode;
- headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE,
&(pmode), 1);
} else {
- headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE,
&(flp->fl_mode), 1);
}
if (sizeof(flp->fl_rdev) != sizeof(uint_16)) {
uint_16 prdev = (uint_16)flp->fl_rdev;
- headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE,
&(prdev), 1);
} else {
- headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE,
&(flp->fl_rdev), 1);
}
if (sizeof(flp->fl_dev) != sizeof(uint_32)) {
uint_32 pdevice = (uint_32)flp->fl_dev;
- headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE,
&(pdevice), 1);
} else {
- headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE,
&(flp->fl_dev), 1);
}
- headerAddOrAppendEntry(h, RPMTAG_FILEINODES, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEINODES, RPM_INT32_TYPE,
&(flp->fl_ino), 1);
- headerAddOrAppendEntry(h, RPMTAG_FILELANGS, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILELANGS, RPM_STRING_ARRAY_TYPE,
&(flp->langs), 1);
/* We used to add these, but they should not be needed */
- /* headerAddOrAppendEntry(h, RPMTAG_FILEUIDS,
+ /* (void) headerAddOrAppendEntry(h, RPMTAG_FILEUIDS,
* RPM_INT32_TYPE, &(flp->fl_uid), 1);
- * headerAddOrAppendEntry(h, RPMTAG_FILEGIDS,
+ * (void) headerAddOrAppendEntry(h, RPMTAG_FILEGIDS,
* RPM_INT32_TYPE, &(flp->fl_gid), 1);
*/
buf[0] = '\0';
if (S_ISREG(flp->fl_mode))
- mdfile(flp->diskURL, buf);
+ (void) mdfile(flp->diskURL, buf);
s = buf;
- headerAddOrAppendEntry(h, RPMTAG_FILEMD5S, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEMD5S, RPM_STRING_ARRAY_TYPE,
&s, 1);
buf[0] = '\0';
}
}
s = buf;
- headerAddOrAppendEntry(h, RPMTAG_FILELINKTOS, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILELINKTOS, RPM_STRING_ARRAY_TYPE,
&s, 1);
if (flp->flags & RPMFILE_GHOST) {
flp->verifyFlags &= ~(RPMVERIFY_MD5 | RPMVERIFY_FILESIZE |
RPMVERIFY_LINKTO | RPMVERIFY_MTIME);
}
- headerAddOrAppendEntry(h, RPMTAG_FILEVERIFYFLAGS, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEVERIFYFLAGS, RPM_INT32_TYPE,
&(flp->verifyFlags), 1);
if (!isSrc && isDoc(fl, flp->fileURL))
if (S_ISDIR(flp->fl_mode))
flp->flags &= ~(RPMFILE_CONFIG|RPMFILE_DOC);
- headerAddOrAppendEntry(h, RPMTAG_FILEFLAGS, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_FILEFLAGS, RPM_INT32_TYPE,
&(flp->flags), 1);
}
- headerAddEntry(h, RPMTAG_SIZE, RPM_INT32_TYPE,
+ (void) headerAddEntry(h, RPMTAG_SIZE, RPM_INT32_TYPE,
&(fl->totalFileSize), 1);
/* XXX This should be added always so that packages look alike.
* XXX existence (rather than value) that will need to change as well.
*/
if (multiLibMask)
- headerAddEntry(h, RPMTAG_MULTILIBS, RPM_INT32_TYPE,
+ (void) headerAddEntry(h, RPMTAG_MULTILIBS, RPM_INT32_TYPE,
&multiLibMask, 1);
if (_addDotSlash)
- rpmlibNeedsFeature(h, "PayloadFilesHavePrefix", "4.0-1");
+ (void) rpmlibNeedsFeature(h, "PayloadFilesHavePrefix", "4.0-1");
/* Choose how filenames are represented. */
if (_noDirTokens)
else {
compressFilelist(h);
/* Binary packages with dirNames cannot be installed by legacy rpm. */
- rpmlibNeedsFeature(h, "CompressedFileNames", "3.0.4-1");
+ (void) rpmlibNeedsFeature(h, "CompressedFileNames", "3.0.4-1");
}
{ TFI_t fi = xcalloc(sizeof(*fi), 1);
fl->inFtw = 1; /* Flag to indicate file has buildRootURL prefixed */
fl->isDir = 1; /* Keep it from following myftw() again */
- myftw(diskURL, 16, (myftwFunc) addFile, fl);
+ (void) myftw(diskURL, 16, (myftwFunc) addFile, fl);
fl->isDir = 0;
fl->inFtw = 0;
return 0;
#endif
rpmMessage(RPMMESS_DEBUG, _("File %4d: %07o %s.%s\t %s\n"), fl->fileCount,
- fileMode, fileUname, fileGname, fileURL);
+ (unsigned)fileMode, fileUname, fileGname, fileURL);
/* Add to the file list */
if (fl->fileListRecsUsed == fl->fileListRecsAlloced) {
for (i = 0; i < fl->nLangs; i++) {
const char *ocl;
if (i) *ncl++ = '|';
- for (ocl = fl->currentLangs[i]; *ocl; ocl++)
+ for (ocl = fl->currentLangs[i]; *ocl != '\0'; ocl++)
*ncl++ = *ocl;
*ncl = '\0';
}
}
appendStringBuf(pkg->fileList, buf);
}
- Fclose(fd);
+ (void) Fclose(fd);
}
/* Init the file list structure */
if (fl.currentLangs) {
int i;
for (i = 0; i < fl.nLangs; i++)
+ /*@-unqualifiedtrans@*/
fl.currentLangs[i] = _free(fl.currentLangs[i]);
+ /*@=unqualifiedtrans@*/
fl.currentLangs = _free(fl.currentLangs);
}
fl.nLangs = 0;
specialDoc = xstrdup(fileName);
dupAttrRec(&fl.cur_ar, specialDocAttrRec);
} else {
- processBinaryFile(pkg, &fl, fileName);
+ (void) processBinaryFile(pkg, &fl, fileName);
}
}
/* Now process special doc, if there is one */
if (specialDoc) {
if (installSpecialDoc) {
- doScript(spec, RPMBUILD_STRINGBUF, "%doc", pkg->specialDoc, test);
+ (void) doScript(spec, RPMBUILD_STRINGBUF, "%doc", pkg->specialDoc, test);
}
/* Reset for %doc */
if (fl.currentLangs) {
int i;
for (i = 0; i < fl.nLangs; i++)
+ /*@-unqualifiedtrans@*/
fl.currentLangs[i] = _free(fl.currentLangs[i]);
+ /*@=unqualifiedtrans@*/
fl.currentLangs = _free(fl.currentLangs);
}
fl.nLangs = 0;
dupAttrRec(specialDocAttrRec, &fl.cur_ar);
freeAttrRec(specialDocAttrRec);
- processBinaryFile(pkg, &fl, specialDoc);
+ (void) processBinaryFile(pkg, &fl, specialDoc);
specialDoc = _free(specialDoc);
}
if (fl.currentLangs) {
int i;
for (i = 0; i < fl.nLangs; i++)
+ /*@-unqualifiedtrans@*/
fl.currentLangs[i] = _free(fl.currentLangs[i]);
+ /*@=unqualifiedtrans@*/
fl.currentLangs = _free(fl.currentLangs);
}
case RPMTAG_CHANGELOGTEXT:
case RPMTAG_URL:
case HEADER_I18NTABLE:
- headerAddEntry(spec->sourceHeader, tag, type, ptr, count);
+ (void) headerAddEntry(spec->sourceHeader, tag, type, ptr, count);
break;
default:
/* do not copy */
headerNextIterator(hi, &tag, &type, &ptr, &count);
ptr = headerFreeData(ptr, type))
{
- headerAddEntry(spec->sourceHeader, tag, type, ptr, count);
+ (void) headerAddEntry(spec->sourceHeader, tag, type, ptr, count);
}
headerFreeIterator(hi);
if (spec->buildArchitectureCount) {
- headerAddEntry(spec->sourceHeader, RPMTAG_BUILDARCHS,
+ (void) headerAddEntry(spec->sourceHeader, RPMTAG_BUILDARCHS,
RPM_STRING_ARRAY_TYPE,
spec->buildArchitectures, spec->buildArchitectureCount);
}
appendLineStringBuf(sourceFiles, spec->specFile);
for (srcPtr = spec->sources; srcPtr != NULL; srcPtr = srcPtr->next) {
if (srcPtr->flags & RPMBUILD_ISSOURCE) {
- headerAddOrAppendEntry(spec->sourceHeader, RPMTAG_SOURCE,
+ (void) headerAddOrAppendEntry(spec->sourceHeader, RPMTAG_SOURCE,
RPM_STRING_ARRAY_TYPE, &srcPtr->source, 1);
if (srcPtr->flags & RPMBUILD_ISNO) {
- headerAddOrAppendEntry(spec->sourceHeader, RPMTAG_NOSOURCE,
+ (void) headerAddOrAppendEntry(spec->sourceHeader, RPMTAG_NOSOURCE,
RPM_INT32_TYPE, &srcPtr->num, 1);
}
}
if (srcPtr->flags & RPMBUILD_ISPATCH) {
- headerAddOrAppendEntry(spec->sourceHeader, RPMTAG_PATCH,
+ (void) headerAddOrAppendEntry(spec->sourceHeader, RPMTAG_PATCH,
RPM_STRING_ARRAY_TYPE, &srcPtr->source, 1);
if (srcPtr->flags & RPMBUILD_ISNO) {
- headerAddOrAppendEntry(spec->sourceHeader, RPMTAG_NOPATCH,
+ (void) headerAddOrAppendEntry(spec->sourceHeader, RPMTAG_NOPATCH,
RPM_INT32_TYPE, &srcPtr->num, 1);
}
}
oldhandler = signal(SIGPIPE, SIG_IGN);
toProg[0] = toProg[1] = 0;
- pipe(toProg);
+ (void) pipe(toProg);
fromProg[0] = fromProg[1] = 0;
- pipe(fromProg);
+ (void) pipe(fromProg);
if (!(progPID = fork())) {
- close(toProg[1]);
- close(fromProg[0]);
+ (void) close(toProg[1]);
+ (void) close(fromProg[0]);
- dup2(toProg[0], STDIN_FILENO); /* Make stdin the in pipe */
- dup2(fromProg[1], STDOUT_FILENO); /* Make stdout the out pipe */
+ (void) dup2(toProg[0], STDIN_FILENO); /* Make stdin the in pipe */
+ (void) dup2(fromProg[1], STDOUT_FILENO); /* Make stdout the out pipe */
- close(toProg[0]);
- close(fromProg[1]);
+ (void) close(toProg[0]);
+ (void) close(fromProg[1]);
if (dir) {
- chdir(dir);
+ (void) chdir(dir);
}
- execvp(argv[0], argv);
+ (void) execvp(argv[0], argv);
/* XXX this error message is probably not seen. */
rpmError(RPMERR_EXEC, _("Couldn't exec %s: %s\n"),
argv[0], strerror(errno));
return NULL;
}
- close(toProg[0]);
- close(fromProg[1]);
+ (void) close(toProg[0]);
+ (void) close(fromProg[1]);
/* Do not block reading or writing from/to prog. */
- fcntl(fromProg[0], F_SETFL, O_NONBLOCK);
- fcntl(toProg[1], F_SETFL, O_NONBLOCK);
+ (void) fcntl(fromProg[0], F_SETFL, O_NONBLOCK);
+ (void) fcntl(toProg[1], F_SETFL, O_NONBLOCK);
readBuff = newStringBuf();
writeBytesLeft -= nbw;
writePtr += nbw;
} else if (toProg[1] >= 0) { /* close write fd */
- close(toProg[1]);
+ (void) close(toProg[1]);
toProg[1] = -1;
}
}
/* Clean up */
if (toProg[1] >= 0)
- close(toProg[1]);
+ (void) close(toProg[1]);
if (fromProg[0] >= 0)
- close(fromProg[0]);
- (void)signal(SIGPIPE, oldhandler);
+ (void) close(fromProg[0]);
+ (void) signal(SIGPIPE, oldhandler);
/* Collect status from prog */
(void)waitpid(progPID, &status, 0);
break;
default:
versions = hfd(versions, dvt);
- hge(h, dm->vtag, &dvt, (void **) &versions, NULL);
+ (void) hge(h, dm->vtag, &dvt, (void **) &versions, NULL);
break;
}
switch (dm->ftag) {
case -1:
break;
default:
- hge(h, dm->ftag, NULL, (void **) &flags, NULL);
+ (void) hge(h, dm->ftag, NULL, (void **) &flags, NULL);
break;
}
printDepMsg(dm, count, names, versions, flags);
if (pkg->fileList == NULL)
continue;
- headerNVR(pkg->header, &n, &v, &r);
+ (void) headerNVR(pkg->header, &n, &v, &r);
rpmMessage(RPMMESS_NORMAL, _("Processing files: %s-%s-%s\n"), n, v, r);
if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)))
* XXX existence (rather than value) that will need to change as well.
*/
if (headerIsEntry(pkg->header, RPMTAG_MULTILIBS)) {
- generateDepends(spec, pkg, pkg->cpioList, 1);
- generateDepends(spec, pkg, pkg->cpioList, 2);
+ (void) generateDepends(spec, pkg, pkg->cpioList, 1);
+ (void) generateDepends(spec, pkg, pkg->cpioList, 2);
} else
- generateDepends(spec, pkg, pkg->cpioList, 0);
+ (void) generateDepends(spec, pkg, pkg->cpioList, 0);
printDeps(pkg->header);
}
newlev = (level + 1) % descriptors;
if (dirs[newlev] != NULL)
- Closedir (dirs[newlev]);
+ (void) Closedir (dirs[newlev]);
dirs[newlev] = Opendir (dir);
if (dirs[newlev] != NULL)
int save;
save = errno;
- Closedir (dirs[newlev]);
+ (void) Closedir (dirs[newlev]);
errno = save;
dirs[newlev] = NULL;
}
int save;
save = errno;
- Closedir (dirs[0]);
+ (void) Closedir (dirs[0]);
errno = save;
}
}
struct hostent *hbn;
if (! gotit) {
- gethostname(hostname, sizeof(hostname));
+ (void) gethostname(hostname, sizeof(hostname));
if ((hbn = /*@-unrecog@*/ gethostbyname(hostname) /*@=unrecog@*/ ))
strcpy(hostname, hbn->h_name);
else
const char *name, *version, *release;
char fileName[BUFSIZ];
- headerNVR(spec->packages->header, &name, &version, &release);
+ (void) headerNVR(spec->packages->header, &name, &version, &release);
sprintf(fileName, "%s-%s-%s.%ssrc.rpm", name, version, release,
spec->noSource ? "no" : "");
spec->sourceRpmName = xstrdup(fileName);
rc = fsmSetup(fi->fsm, FSM_PKGBUILD, ts, fi, cfd,
&csa->cpioArchiveSize, &failedFile);
- Fclose(cfd);
+ (void) Fclose(cfd);
(void) fsmTeardown(fi->fsm);
if (rc) {
/**
*/
-static StringBuf addFileToTagAux(Spec spec, const char *file, StringBuf sb)
+static /*@only@*/ /*@null@*/ StringBuf addFileToTagAux(Spec spec,
+ const char * file, /*@only@*/ StringBuf sb)
{
char buf[BUFSIZ];
- const char *fn = buf;
+ const char * fn = buf;
+ FILE * f;
FD_t fd;
/* XXX use rpmGenPath(rootdir, "%{_buildir}/%{_buildsubdir}/", file) */
freeStringBuf(sb);
return NULL;
}
- while (fgets(buf, sizeof(buf), (FILE *)fdGetFp(fd))) {
+ f = fdGetFp(fd);
+ while (fgets(buf, sizeof(buf), f)) {
/* XXX display fn in error msg */
if (expandMacros(spec, spec->macros, buf, sizeof(buf))) {
rpmError(RPMERR_BADSPEC, _("line: %s\n"), buf);
- return NULL;
+ freeStringBuf(sb);
+ sb = NULL;
+ break;
}
appendStringBuf(sb, buf);
}
- Fclose(fd);
+ (void) Fclose(fd);
return sb;
}
if (hge(h, tag, NULL, (void **)&s, NULL)) {
appendLineStringBuf(sb, s);
- headerRemoveEntry(h, tag);
+ (void) headerRemoveEntry(h, tag);
}
if ((sb = addFileToTagAux(spec, file, sb)) == NULL)
return 1;
- headerAddEntry(h, tag, RPM_STRING_TYPE, getStringBuf(sb), 1);
+ (void) headerAddEntry(h, tag, RPM_STRING_TYPE, getStringBuf(sb), 1);
freeStringBuf(sb);
return 0;
return 1;
s = getStringBuf(sb);
- headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE, &s, 1);
+ (void) headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE, &s, 1);
freeStringBuf(sb);
return 0;
}
for (p = pkg->triggerFiles; p != NULL; p = p->next) {
- headerAddOrAppendEntry(pkg->header, RPMTAG_TRIGGERSCRIPTPROG,
+ (void) headerAddOrAppendEntry(pkg->header, RPMTAG_TRIGGERSCRIPTPROG,
RPM_STRING_ARRAY_TYPE, &(p->prog), 1);
if (p->script) {
- headerAddOrAppendEntry(pkg->header, RPMTAG_TRIGGERSCRIPTS,
+ (void) headerAddOrAppendEntry(pkg->header, RPMTAG_TRIGGERSCRIPTS,
RPM_STRING_ARRAY_TYPE, &(p->script), 1);
} else if (p->fileName) {
if (addFileToArrayTag(spec, p->fileName, pkg->header,
/* This is dumb. When the header supports NULL string */
/* this will go away. */
char *bull = "";
- headerAddOrAppendEntry(pkg->header, RPMTAG_TRIGGERSCRIPTS,
+ (void) headerAddOrAppendEntry(pkg->header, RPMTAG_TRIGGERSCRIPTS,
RPM_STRING_ARRAY_TYPE, &bull, 1);
}
}
if (csa)
csa->cpioFdIn = fdi;
else
- Fclose(fdi);
+ (void) Fclose(fdi);
return 0;
}
if (Fileno(csa->cpioFdIn) < 0) {
csa->cpioArchiveSize = 0;
/* Add a bogus archive size to the Header */
- headerAddEntry(h, RPMTAG_ARCHIVESIZE, RPM_INT32_TYPE,
+ (void) headerAddEntry(h, RPMTAG_ARCHIVESIZE, RPM_INT32_TYPE,
&csa->cpioArchiveSize, 1);
}
}
s = strchr(rpmio_flags, '.');
if (s) {
- headerAddEntry(h, RPMTAG_PAYLOADFORMAT, RPM_STRING_TYPE, "cpio", 1);
+ (void) headerAddEntry(h, RPMTAG_PAYLOADFORMAT, RPM_STRING_TYPE, "cpio", 1);
if (s[1] == 'g' && s[2] == 'z')
- headerAddEntry(h, RPMTAG_PAYLOADCOMPRESSOR, RPM_STRING_TYPE,
+ (void) headerAddEntry(h, RPMTAG_PAYLOADCOMPRESSOR, RPM_STRING_TYPE,
"gzip", 1);
if (s[1] == 'b' && s[2] == 'z') {
- headerAddEntry(h, RPMTAG_PAYLOADCOMPRESSOR, RPM_STRING_TYPE,
+ (void) headerAddEntry(h, RPMTAG_PAYLOADCOMPRESSOR, RPM_STRING_TYPE,
"bzip2", 1);
/* Add prereq on rpm version that understands bzip2 payloads */
- rpmlibNeedsFeature(h, "PayloadIsBzip2", "3.0.5-1");
+ (void) rpmlibNeedsFeature(h, "PayloadIsBzip2", "3.0.5-1");
}
strcpy(buf, rpmio_flags);
buf[s - rpmio_flags] = '\0';
- headerAddEntry(h, RPMTAG_PAYLOADFLAGS, RPM_STRING_TYPE, buf+1, 1);
+ (void) headerAddEntry(h, RPMTAG_PAYLOADFLAGS, RPM_STRING_TYPE, buf+1, 1);
}
/* Create and add the cookie */
if (cookie) {
sprintf(buf, "%s %d", buildHost(), (int) time(NULL));
*cookie = xstrdup(buf);
- headerAddEntry(h, RPMTAG_COOKIE, RPM_STRING_TYPE, *cookie, 1);
+ (void) headerAddEntry(h, RPMTAG_COOKIE, RPM_STRING_TYPE, *cookie, 1);
}
/* Reallocate the header into one contiguous region. */
if (headerWrite(fd, h, HEADER_MAGIC_YES))
rc = RPMERR_NOSPACE;
- Fclose(fd);
+ (void) Fclose(fd);
fd = NULL;
- Unlink(fileName);
+ (void) Unlink(fileName);
if (rc)
goto exit;
/* Generate the signature */
- fflush(stdout);
+ (void) fflush(stdout);
sig = rpmNewSignature();
- rpmAddSignature(sig, sigtarget, RPMSIGTAG_SIZE, passPhrase);
- rpmAddSignature(sig, sigtarget, RPMSIGTAG_MD5, passPhrase);
+ (void) rpmAddSignature(sig, sigtarget, RPMSIGTAG_SIZE, passPhrase);
+ (void) rpmAddSignature(sig, sigtarget, RPMSIGTAG_MD5, passPhrase);
if ((sigtype = rpmLookupSignatureType(RPMLOOKUPSIG_QUERY)) > 0) {
rpmMessage(RPMMESS_NORMAL, _("Generating signature: %d\n"), sigtype);
- rpmAddSignature(sig, sigtarget, sigtype, passPhrase);
+ (void) rpmAddSignature(sig, sigtarget, sigtype, passPhrase);
}
/* Reallocate the signature into one contiguous region. */
lead.signature_type = RPMSIGTYPE_HEADERSIG;
{ const char *name, *version, *release;
- headerNVR(h, &name, &version, &release);
+ (void) headerNVR(h, &name, &version, &release);
sprintf(buf, "%s-%s-%s", name, version, release);
strncpy(lead.name, buf, sizeof(lead.name));
}
}
#ifdef NOTYET
- headerMergeLegacySigs(nh, sig);
+ (void) headerMergeLegacySigs(nh, sig);
#endif
rc = headerWrite(fd, nh, HEADER_MAGIC_YES);
sig = NULL;
}
if (ifd) {
- Fclose(ifd);
+ (void) Fclose(ifd);
ifd = NULL;
}
if (fd) {
- Fclose(fd);
+ (void) Fclose(fd);
fd = NULL;
}
if (sigtarget) {
- Unlink(sigtarget);
+ (void) Unlink(sigtarget);
sigtarget = _free(sigtarget);
}
if (rc == 0)
rpmMessage(RPMMESS_NORMAL, _("Wrote: %s\n"), fileName);
else
- Unlink(fileName);
+ (void) Unlink(fileName);
return rc;
}
return rc;
if (spec->cookie) {
- headerAddEntry(pkg->header, RPMTAG_COOKIE,
+ (void) headerAddEntry(pkg->header, RPMTAG_COOKIE,
RPM_STRING_TYPE, spec->cookie, 1);
}
/* Copy changelog from src rpm */
headerCopyTags(spec->packages->header, pkg->header, copyTags);
- headerAddEntry(pkg->header, RPMTAG_RPMVERSION,
+ (void) headerAddEntry(pkg->header, RPMTAG_RPMVERSION,
RPM_STRING_TYPE, VERSION, 1);
- headerAddEntry(pkg->header, RPMTAG_BUILDHOST,
+ (void) headerAddEntry(pkg->header, RPMTAG_BUILDHOST,
RPM_STRING_TYPE, buildHost(), 1);
- headerAddEntry(pkg->header, RPMTAG_BUILDTIME,
+ (void) headerAddEntry(pkg->header, RPMTAG_BUILDTIME,
RPM_INT32_TYPE, getBuildTime(), 1);
providePackageNVR(pkg->header);
{ const char * optflags = rpmExpand("%{optflags}", NULL);
- headerAddEntry(pkg->header, RPMTAG_OPTFLAGS, RPM_STRING_TYPE,
+ (void) headerAddEntry(pkg->header, RPMTAG_OPTFLAGS, RPM_STRING_TYPE,
optflags, 1);
optflags = _free(optflags);
}
- genSourceRpmName(spec);
- headerAddEntry(pkg->header, RPMTAG_SOURCERPM, RPM_STRING_TYPE,
+ (void) genSourceRpmName(spec);
+ (void) headerAddEntry(pkg->header, RPMTAG_SOURCERPM, RPM_STRING_TYPE,
spec->sourceRpmName, 1);
{ const char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
binFormat = _free(binFormat);
if (binRpm == NULL) {
const char *name;
- headerNVR(pkg->header, &name, NULL, NULL);
+ (void) headerNVR(pkg->header, &name, NULL, NULL);
rpmError(RPMERR_BADFILENAME, _("Could not generate output "
"filename for package %s: %s\n"), name, errorString);
return RPMERR_BADFILENAME;
int rc;
/* Add some cruft */
- headerAddEntry(spec->sourceHeader, RPMTAG_RPMVERSION,
+ (void) headerAddEntry(spec->sourceHeader, RPMTAG_RPMVERSION,
RPM_STRING_TYPE, VERSION, 1);
- headerAddEntry(spec->sourceHeader, RPMTAG_BUILDHOST,
+ (void) headerAddEntry(spec->sourceHeader, RPMTAG_BUILDHOST,
RPM_STRING_TYPE, buildHost(), 1);
- headerAddEntry(spec->sourceHeader, RPMTAG_BUILDTIME,
+ (void) headerAddEntry(spec->sourceHeader, RPMTAG_BUILDTIME,
RPM_INT32_TYPE, getBuildTime(), 1);
- genSourceRpmName(spec);
+ (void) genSourceRpmName(spec);
spec->cookie = _free(spec->cookie);
{
int_32 mytime = time; /* XXX convert to header representation */
if (headerIsEntry(h, RPMTAG_CHANGELOGTIME)) {
- headerAppendEntry(h, RPMTAG_CHANGELOGTIME, RPM_INT32_TYPE,
+ (void) headerAppendEntry(h, RPMTAG_CHANGELOGTIME, RPM_INT32_TYPE,
&mytime, 1);
- headerAppendEntry(h, RPMTAG_CHANGELOGNAME, RPM_STRING_ARRAY_TYPE,
+ (void) headerAppendEntry(h, RPMTAG_CHANGELOGNAME, RPM_STRING_ARRAY_TYPE,
&name, 1);
- headerAppendEntry(h, RPMTAG_CHANGELOGTEXT, RPM_STRING_ARRAY_TYPE,
+ (void) headerAppendEntry(h, RPMTAG_CHANGELOGTEXT, RPM_STRING_ARRAY_TYPE,
&text, 1);
} else {
- headerAddEntry(h, RPMTAG_CHANGELOGTIME, RPM_INT32_TYPE,
+ (void) headerAddEntry(h, RPMTAG_CHANGELOGTIME, RPM_INT32_TYPE,
&mytime, 1);
- headerAddEntry(h, RPMTAG_CHANGELOGNAME, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddEntry(h, RPMTAG_CHANGELOGNAME, RPM_STRING_ARRAY_TYPE,
&name, 1);
- headerAddEntry(h, RPMTAG_CHANGELOGTEXT, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddEntry(h, RPMTAG_CHANGELOGTEXT, RPM_STRING_ARRAY_TYPE,
&text, 1);
}
}
/* day of week */
p = pe; SKIPSPACE(p);
if (*p == '\0') return -1;
- pe = p; SKIPNONSPACE(pe); if (*pe) *pe++ = '\0';
+ pe = p; SKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
for (idx = days; *idx && strcmp(*idx, p); idx++)
;
if (*idx == NULL) return -1;
/* month */
p = pe; SKIPSPACE(p);
if (*p == '\0') return -1;
- pe = p; SKIPNONSPACE(pe); if (*pe) *pe++ = '\0';
+ pe = p; SKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
for (idx = months; *idx && strcmp(*idx, p); idx++)
;
if (*idx == NULL) return -1;
/* day */
p = pe; SKIPSPACE(p);
if (*p == '\0') return -1;
- pe = p; SKIPNONSPACE(pe); if (*pe) *pe++ = '\0';
+ pe = p; SKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
/* make this noon so the day is always right (as we make this UTC) */
time.tm_hour = 12;
/* year */
p = pe; SKIPSPACE(p);
if (*p == '\0') return -1;
- pe = p; SKIPNONSPACE(pe); if (*pe) *pe++ = '\0';
+ pe = p; SKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
time.tm_year = strtol(p, &q, 10);
if (!(q && *q == '\0')) return -1;
if (time.tm_year < 1997 || time.tm_year >= 3000) return -1;
/* skip space */
SKIPSPACE(s);
- while (*s) {
+ while (*s != '\0') {
if (*s != '*') {
rpmError(RPMERR_BADSPEC,
_("%%changelog entries must start with *\n"));
rpmError(RPMERR_BADSPEC, _("incomplete %%changelog entry\n"));
return RPMERR_BADSPEC;
}
+ /*@-modobserver@*/
*s = '\0';
+ /*@=modobserver@*/
text = s + 1;
/* 4 fields of date */
/* name */
name = s;
- while (*s) s++;
+ while (*s != '\0') s++;
while (s > name && xisspace(*s)) {
*s-- = '\0';
}
stripTrailingBlanksStringBuf(sb);
if (!(noLang && strcmp(lang, RPMBUILD_DEFAULT_LANG))) {
- headerAddI18NString(pkg->header, RPMTAG_DESCRIPTION,
+ (void) headerAddI18NString(pkg->header, RPMTAG_DESCRIPTION,
getStringBuf(sb), lang);
}
int argc;
const char **argv;
- poptParseArgvString(line, &argc, &argv);
+ (void) poptParseArgvString(line, &argc, &argv);
if (argc)
- headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE, argv, argc);
+ (void) headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE, argv, argc);
argv = _free(argv);
}
int c = 0;
if (s) {
- while (*s) {
+ while (*s != '\0') {
while ((c = *s) && xisspace(c)) s++;
se = s;
while ((c = *se) && xisalpha(c)) se++;
s = ++se;
}
}
- if (c == 0 && *bp) *bp = bits;
+ if (c == 0 && bp) *bp = bits;
return (c ? RPMERR_BADSPEC : 0);
}
{
char *res = s;
- while (*s) {
+ while (*s != '\0') {
if (! xisspace(*s))
res = s;
s++;
}
+ /*@-temptrans@*/
return res;
+ /*@=temptrans@*/
}
/**
if (!headerIsEntry(h, ot->ot_tag)) {
const char *val = rpmExpand(ot->ot_mac, NULL);
if (val && *val != '%')
- headerAddEntry(h, ot->ot_tag, RPM_STRING_TYPE, (void *)val, 1);
+ (void) headerAddEntry(h, ot->ot_tag, RPM_STRING_TYPE, (void *)val, 1);
val = _free(val);
}
}
size = fdSize(fd);
iconsize = (size >= 0 ? size : (8 * BUFSIZ));
if (iconsize == 0) {
- Fclose(fd);
+ (void) Fclose(fd);
rc = 0;
goto exit;
}
fn, Fstrerror(fd));
rc = RPMERR_BADSPEC;
}
- Fclose(fd);
+ (void) Fclose(fd);
if (rc)
goto exit;
if (! strncmp(icon, "GIF", sizeof("GIF")-1)) {
- headerAddEntry(h, RPMTAG_GIF, RPM_BIN_TYPE, icon, iconsize);
+ (void) headerAddEntry(h, RPMTAG_GIF, RPM_BIN_TYPE, icon, iconsize);
} else if (! strncmp(icon, "/* XPM", sizeof("/* XPM")-1)) {
- headerAddEntry(h, RPMTAG_XPM, RPM_BIN_TYPE, icon, iconsize);
+ (void) headerAddEntry(h, RPMTAG_XPM, RPM_BIN_TYPE, icon, iconsize);
} else {
rpmError(RPMERR_BADSPEC, _("Unknown icon type: %s\n"), file);
rc = RPMERR_BADSPEC;
}
}
}
+ /*@-usereleased -compdef@*/
return t;
+ /*@=usereleased =compdef@*/
}
#define SINGLE_TOKEN_ONLY \
/* See if this is multi-token */
end = field;
SKIPNONSPACE(end);
- if (*end)
+ if (*end != '\0')
multiToken = 1;
switch (tag) {
}
addMacro(spec->macros, "PACKAGE_RELEASE", NULL, field, RMIL_OLDSPEC-1);
}
- headerAddEntry(pkg->header, tag, RPM_STRING_TYPE, field, 1);
+ (void) headerAddEntry(pkg->header, tag, RPM_STRING_TYPE, field, 1);
break;
case RPMTAG_GROUP:
case RPMTAG_SUMMARY:
case RPMTAG_LICENSE:
case RPMTAG_PACKAGER:
if (!*lang)
- headerAddEntry(pkg->header, tag, RPM_STRING_TYPE, field, 1);
+ (void) headerAddEntry(pkg->header, tag, RPM_STRING_TYPE, field, 1);
else if (!(noLang && strcmp(lang, RPMBUILD_DEFAULT_LANG)))
- headerAddI18NString(pkg->header, tag, field, lang);
+ (void) headerAddI18NString(pkg->header, tag, field, lang);
break;
case RPMTAG_BUILDROOT:
SINGLE_TOKEN_ONLY;
} break;
case RPMTAG_PREFIXES:
addOrAppendListEntry(pkg->header, tag, field);
- hge(pkg->header, tag, &type, (void **)&array, &num);
+ (void) hge(pkg->header, tag, &type, (void **)&array, &num);
while (num--) {
len = strlen(array[num]);
if (array[num][len - 1] == '/' && len > 1) {
spec->lineNum, spec->line);
return RPMERR_BADSPEC;
}
- headerAddEntry(pkg->header, tag, RPM_INT32_TYPE, &num, 1);
+ (void) headerAddEntry(pkg->header, tag, RPM_INT32_TYPE, &num, 1);
break;
case RPMTAG_AUTOREQPROV:
pkg->autoReq = parseYesNo(field);
*tag = p->tag;
if (macro)
+ /*@-onlytrans@*/
*macro = p->token;
+ /*@=onlytrans@*/
return 0;
}
/* Construct the package */
if (flag == PART_SUBNAME) {
const char * mainName;
- headerNVR(spec->packages->header, &mainName, NULL, NULL);
+ (void) headerNVR(spec->packages->header, &mainName, NULL, NULL);
sprintf(fullName, "%s-%s", mainName, name);
} else
strcpy(fullName, name);
- headerAddEntry(pkg->header, RPMTAG_NAME, RPM_STRING_TYPE, fullName, 1);
+ (void) headerAddEntry(pkg->header, RPMTAG_NAME, RPM_STRING_TYPE, fullName, 1);
}
if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
/* Skip blank lines */
linep = spec->line;
SKIPSPACE(linep);
- if (*linep) {
+ if (*linep != '\0') {
if (findPreambleTag(spec, &tag, ¯o, lang)) {
rpmError(RPMERR_BADSPEC, _("line %d: Unknown tag: %s\n"),
spec->lineNum, spec->line);
/* We only parse -a and -b here */
if (parseNum(optArg, &num)) {
- rpmError(RPMERR_BADSPEC, _("line %d: Bad arg to %%setup %c: %s\n"),
- spec->lineNum, num, optArg);
+ rpmError(RPMERR_BADSPEC, _("line %d: Bad arg to %%setup: %s\n"),
+ spec->lineNum, optArg);
freeStringBuf(before);
freeStringBuf(after);
poptFreeContext(optCon);
spec->buildSubdir = xstrdup(dirName);
} else {
const char *name, *version;
- headerNVR(spec->packages->header, &name, &version, NULL);
+ (void) headerNVR(spec->packages->header, &name, &version, NULL);
sprintf(buf, "%s-%s", name, version);
spec->buildSubdir = xstrdup(buf);
}
}
saveLines = splitString(getStringBuf(buf), strlen(getStringBuf(buf)), '\n');
+ /*@-usereleased@*/
for (lines = saveLines; *lines; lines++) {
res = 0;
if (! strncmp(*lines, "%setup", sizeof("%setup")-1)) {
return res;
}
}
+ /*@=usereleased@*/
freeSplitString(saveLines);
freeStringBuf(buf);
break;
}
- for (r = field; *r; r = re) {
+ for (r = field; *r != '\0'; r = re) {
SKIPWHITE(r);
if (*r == '\0')
break;
case RPMTAG_OBSOLETEFLAGS:
/* Add prereq on rpmlib that has versioned dependencies. */
if (!rpmExpandNumeric("%{_noVersionedDependencies}"))
- rpmlibNeedsFeature(h, "VersionedDependencies", "3.0.3-1");
+ (void) rpmlibNeedsFeature(h, "VersionedDependencies", "3.0.3-1");
break;
default:
break;
} else
version = NULL;
- addReqProv(spec, h, flags, req, version, index);
+ (void) addReqProv(spec, h, flags, req, version, index);
req = _free(req);
version = _free(version);
#include "rpmbuild.h"
#include "debug.h"
+/*@access StringBuf@*/ /* XXX compared with NULL */
+
/**
*/
static int addTriggerIndex(Package pkg, const char *file, const char *script, const char *prog)
new = xmalloc(sizeof(*new));
new->fileName = (file) ? xstrdup(file) : NULL;
- new->script = (*script) ? xstrdup(script) : NULL;
+ new->script = (script && *script != '\0') ? xstrdup(script) : NULL;
new->prog = xstrdup(prog);
new->index = index;
new->next = NULL;
stripTrailingBlanksStringBuf(sb);
p = getStringBuf(sb);
- addReqProv(spec, pkg->header, (tagflags | RPMSENSE_INTERP), progArgv[0], NULL, 0);
+ (void) addReqProv(spec, pkg->header, (tagflags | RPMSENSE_INTERP), progArgv[0], NULL, 0);
/* Trigger script insertion is always delayed in order to */
/* get the index right. */
goto exit;
} else {
if (progArgc == 1)
- headerAddEntry(pkg->header, progtag, RPM_STRING_TYPE,
+ (void) headerAddEntry(pkg->header, progtag, RPM_STRING_TYPE,
*progArgv, progArgc);
else
- headerAddEntry(pkg->header, progtag, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddEntry(pkg->header, progtag, RPM_STRING_ARRAY_TYPE,
progArgv, progArgc);
- if (*p)
- headerAddEntry(pkg->header, tag, RPM_STRING_TYPE, p, 1);
+ if (*p != '\0')
+ (void) headerAddEntry(pkg->header, tag, RPM_STRING_TYPE, p, 1);
if (file) {
switch (parsePart) {
rc = nextPart;
exit:
- if (sb)
+ if (sb != NULL)
freeStringBuf(sb);
progArgv = _free(progArgv);
argv = _free(argv);
size_t toklen = strlen(token);
int rc = 0;
- while ( *(b = be) ) {
+ while ( *(b = be) != '\0' ) {
SKIPSPACE(b);
be = b;
SKIPNONSPACE(be);
}
/* Save 1st char of next line in order to terminate current line. */
- if (*spec->nextline) {
+ if (*spec->nextline != '\0') {
spec->nextpeekc = *spec->nextline;
*spec->nextline = '\0';
}
/* remove this file from the stack */
spec->fileStack = ofi->next;
- Fclose(ofi->fd);
+ (void) Fclose(ofi->fd);
ofi->fileName = _free(ofi->fileName);
ofi = _free(ofi);
while (spec->fileStack) {
ofi = spec->fileStack;
spec->fileStack = spec->fileStack->next;
- if (ofi->fd) Fclose(ofi->fd);
+ if (ofi->fd) (void) Fclose(ofi->fd);
ofi->fileName = _free(ofi->fileName);
ofi = _free(ofi);
}
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
if (!headerIsEntry(pkg->header, RPMTAG_DESCRIPTION)) {
const char * name;
- headerNVR(pkg->header, &name, NULL, NULL);
+ (void) headerNVR(pkg->header, &name, NULL, NULL);
rpmError(RPMERR_BADSPEC, _("Package has no %%description: %s\n"),
name);
freeSpec(spec);
return RPMERR_BADSPEC;
}
- headerAddEntry(pkg->header, RPMTAG_OS, RPM_STRING_TYPE, os, 1);
- headerAddEntry(pkg->header, RPMTAG_ARCH, RPM_STRING_TYPE, arch, 1);
+ (void) headerAddEntry(pkg->header, RPMTAG_OS, RPM_STRING_TYPE, os, 1);
+ (void) headerAddEntry(pkg->header, RPMTAG_ARCH, RPM_STRING_TYPE, arch, 1);
}
#ifdef DYING
myos = _free(myos);
/* Check for duplicate dependencies. */
if (hge(h, nametag, &dnt, (void **) &names, &len)) {
const char ** versions = NULL;
- int dvt;
+ int dvt = RPM_STRING_ARRAY_TYPE;
int *flags = NULL;
int *indexes = NULL;
int duplicate = 0;
if (flagtag) {
- hge(h, versiontag, &dvt, (void **) &versions, NULL);
- hge(h, flagtag, NULL, (void **) &flags, NULL);
+ (void) hge(h, versiontag, &dvt, (void **) &versions, NULL);
+ (void) hge(h, flagtag, NULL, (void **) &flags, NULL);
}
if (indextag)
- hge(h, indextag, NULL, (void **) &indexes, NULL);
+ (void) hge(h, indextag, NULL, (void **) &indexes, NULL);
while (len > 0) {
len--;
}
/* Add this dependency. */
- headerAddOrAppendEntry(h, nametag, RPM_STRING_ARRAY_TYPE, &depName, 1);
+ (void) headerAddOrAppendEntry(h, nametag, RPM_STRING_ARRAY_TYPE, &depName, 1);
if (flagtag) {
- headerAddOrAppendEntry(h, versiontag,
+ (void) headerAddOrAppendEntry(h, versiontag,
RPM_STRING_ARRAY_TYPE, &depEVR, 1);
- headerAddOrAppendEntry(h, flagtag,
+ (void) headerAddOrAppendEntry(h, flagtag,
RPM_INT32_TYPE, &depFlags, 1);
}
if (indextag)
- headerAddOrAppendEntry(h, indextag, RPM_INT32_TYPE, &index, 1);
+ (void) headerAddOrAppendEntry(h, indextag, RPM_INT32_TYPE, &index, 1);
return 0;
}
/* Construct package name */
{ char *n;
if (flag == PART_SUBNAME) {
- headerNVR(spec->packages->header, &pname, NULL, NULL);
+ (void) headerNVR(spec->packages->header, &pname, NULL, NULL);
fullName = n = alloca(strlen(pname) + 1 + strlen(name) + 1);
- while (*pname) *n++ = *pname++;
+ while (*pname != '\0') *n++ = *pname++;
*n++ = '-';
} else {
fullName = n = alloca(strlen(name)+1);
}
+ /*@-mayaliasunique@*/
strcpy(n, name);
+ /*@=mayaliasunique@*/
}
/* Locate package with fullName */
for (p = spec->packages; p != NULL; p = p->next) {
- headerNVR(p->header, &pname, NULL, NULL);
+ (void) headerNVR(p->header, &pname, NULL, NULL);
if (pname && (! strcmp(fullName, pname))) {
break;
}
}
if (pkg)
+ /*@-dependenttrans@*/
*pkg = p;
+ /*@=dependenttrans@*/
return ((p == NULL) ? 1 : 0);
}
Package p;
while ((p = spec->packages) != NULL) {
+ /*@-dependenttrans@*/
spec->packages = p->next;
+ /*@=dependenttrans@*/
p->next = NULL;
freePackage(p);
}
}
fe = field;
- for (f = fe; *f; f = fe) {
+ for (f = fe; *f != '\0'; f = fe) {
struct Source *p;
SKIPWHITE(f);
break;
fe = f;
SKIPNONWHITE(fe);
- if (*fe) fe++;
+ if (*fe != '\0') fe++;
if (parseNum(f, &num)) {
rpmError(RPMERR_BADSPEC, _("line %d: Bad number: %s\n"),
if (sl == NULL)
return;
for (i = 0; i < sl->sl_nlines; i++)
+ /*@-unqualifiedtrans@*/
sl->sl_lines[i] = _free(sl->sl_lines[i]);
+ /*@=unqualifiedtrans@*/
sl->sl_lines = _free(sl->sl_lines);
sl = _free(sl);
}
while (spec->readStack) {
rl = spec->readStack;
+ /*@-dependenttrans@*/
spec->readStack = rl->next;
+ /*@=dependenttrans@*/
rl->next = NULL;
rl = _free(rl);
}
if (!spec->inBuildArchitectures) {
while (spec->buildArchitectureCount--) {
+ /*@-unqualifiedtrans@*/
freeSpec(
spec->buildArchitectureSpecs[spec->buildArchitectureCount]);
+ /*@=unqualifiedtrans@*/
}
+ /*@-compdef@*/
spec->buildArchitectureSpecs = _free(spec->buildArchitectureSpecs);
+ /*@=compdef@*/
}
spec->buildArchitectures = _free(spec->buildArchitectures);
-unrecogcomments
# don't-bother-me-yet parameters
--branchstate # ~142 occurences, painful
-#-immediatetrans
--mustfree # ~529 alloca is painful
-#-observertrans
-#-statictrans
+-branchstate # ~140 painful
+-mustfree # ~588 alloca is painful
# not-yet normal parameters
--boolops # w->n
-#-fixedformalarray # md5 whines
--null
--predboolint # w->n
-#-predboolothers # w->n
--retvalint # w->n
--type
+-boolops # ~831 w->n
+#-null # ~267
+-predboolint # ~576 w->n
+-type # ~872
-# not-yet -weak paramaters
+# -weak paramaters
#+boolint
#-boolops
#+ignorequals
@echo expect 10 shift/reduce conflicts
$(YACC) $(srcdir)/getdate.y
-@if test -f y.tab.c; then \
- { echo "/*@-unqualifiedtrans -usedef -varuse -globstate@*/";\
+ { echo "/*@-globstate -retvalint -unqualifiedtrans -usedef -varuse@*/";\
cat y.tab.c ;\
- echo "/*@=unqualifiedtrans =usedef =varuse =globstate@*/";\
+ echo "/*@=globstate =retvalint =unqualifiedtrans =usedef =varuse@*/";\
} > getdate.c ;\
rm -f y.tab.c; \
else \
#endif
#endif
-#define DB_VERSION_MAJOR 0
-#define DB_VERSION_MINOR 0
+#define DB_VERSION_MAJOR 1
+#define DB_VERSION_MINOR 85
#define DB_VERSION_PATCH 0
#define _mymemset(_a, _b, _c)
h = headerRead(pkgs, HEADER_MAGIC_NO);
+ /* let's sanity check this record a bit, otherwise just skip it */
+ if (!(headerIsEntry(h, RPMTAG_NAME) &&
+ headerIsEntry(h, RPMTAG_VERSION) &&
+ headerIsEntry(h, RPMTAG_RELEASE) &&
+ headerIsEntry(h, RPMTAG_BUILDTIME)))
+ {
+ headerFree(h);
+ h = NULL;
+ }
+
if (h == NULL)
goto exit;
free(fileNames);
- headerModifyEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
+ (void) headerModifyEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
newFileNames, fileCount);
}
} else { /* XXX simulated retrieval */
data.data = doGetRecord(pkgs, offset);
data.size = 0; /* XXX WRONG */
- if (data.data == NULL)
+ if (data.data == NULL) {
+if (keyp) *keyp = key.data;
+if (keylen) *keylen = key.size;
rc = EFAULT;
+ }
}
} else {
DB * db;
dbi->dbi_vec = &db1vec;
*dbip = dbi;
} else
- db1close(dbi, 0);
+ (void) db1close(dbi, 0);
base = _free(base);
urlfn = _free(urlfn);
#if defined(__USE_DB2) || defined(__USE_DB3)
if (dbi->dbi_rmw)
- db3cclose(dbi, NULL, 0);
+ rc = db3cclose(dbi, NULL, 0);
if (db) {
rc = db->close(db, 0);
dbi->dbi_vec = &db3vec;
*dbip = dbi;
} else
- db3close(dbi, 0);
+ (void) db3close(dbi, 0);
urlfn = _free(urlfn);
memset(&p->tsi, 0, sizeof(p->tsi));
p->multiLib = 0; /* MULTILIB */
- headerNVR(p->h, &p->name, &p->version, &p->release);
+ (void) headerNVR(p->h, &p->name, &p->version, &p->release);
/* XXX This should be added always so that packages look alike.
* XXX However, there is logic in files.c/depends.c that checks for
(void **) &pp, NULL)
&& !rpmVersionCompare(p->h, al->list[i].h)
&& *pp && !(*pp & multiLibMask))
- p->multiLib = multiLibMask;
+ p->multiLib = multiLibMask;
}
}
p->requireFlags = NULL;
}
- if (!hge(h, RPMTAG_BASENAMES, &bnt, (void **) &p->baseNames, &p->filesCount))
+ if (!hge(h, RPMTAG_BASENAMES, &bnt, (void **)&p->baseNames, &p->filesCount))
{
p->filesCount = 0;
p->baseNames = NULL;
} else {
- hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, &numDirs);
- hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
- hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &fileFlags, NULL);
+ (void) hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, &numDirs);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
+ (void) hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &fileFlags, NULL);
/* XXX FIXME: We ought to relocate the directory list here */
int_32 * provideFlags;
int providesCount;
int result;
- int type;
int i;
if (!(reqFlags & RPMSENSE_SENSEMASK) || !reqEVR || !strlen(reqEVR))
(void **) &providesEVR, &providesCount))
return 1;
- hge(h, RPMTAG_PROVIDEFLAGS, &type, (void **) &provideFlags, &providesCount);
+ (void) hge(h, RPMTAG_PROVIDEFLAGS, NULL, (void **) &provideFlags, NULL);
if (!hge(h, RPMTAG_PROVIDENAME, &pnt, (void **) &provides, &providesCount))
{
return 1;
/* Get package information from header */
- headerNVR(h, &name, &version, &release);
+ (void) headerNVR(h, &name, &version, &release);
pkgEVR = p = alloca(21 + strlen(version) + 1 + strlen(release) + 1);
*p = '\0';
if (headerIsEntry(h, RPMTAG_SOURCEPACKAGE))
return 0;
- headerNVR(h, &name, NULL, NULL);
+ (void) headerNVR(h, &name, NULL, NULL);
{ rpmdbMatchIterator mi;
Header h2;
}
if (hge(h, RPMTAG_OBSOLETENAME, &ont, (void **) &obsoletes, &count)) {
- const char **obsoletesEVR;
- int_32 *obsoletesFlags;
+ const char ** obsoletesEVR;
+ int_32 * obsoletesFlags;
int j;
- hge(h, RPMTAG_OBSOLETEVERSION, &ovt, (void **) &obsoletesEVR, NULL);
- hge(h, RPMTAG_OBSOLETEFLAGS, NULL, (void **) &obsoletesFlags, NULL);
+ (void) hge(h, RPMTAG_OBSOLETEVERSION, &ovt, (void **) &obsoletesEVR,
+ NULL);
+ (void) hge(h, RPMTAG_OBSOLETEFLAGS, NULL, (void **) &obsoletesFlags,
+ NULL);
for (j = 0; j < count; j++) {
mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_NAME, obsoletes[j], 0);
- rpmdbPruneIterator(mi,
+ (void) rpmdbPruneIterator(mi,
ts->removedPackages, ts->numRemovedPackages, 1);
while((h2 = rpmdbNextIterator(mi)) != NULL) {
mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_BASENAMES, keyName, 0);
- rpmdbPruneIterator(mi,
+ (void) rpmdbPruneIterator(mi,
ts->removedPackages, ts->numRemovedPackages, 1);
while ((h = rpmdbNextIterator(mi)) != NULL) {
}
mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_PROVIDENAME, keyName, 0);
- rpmdbPruneIterator(mi,
+ (void) rpmdbPruneIterator(mi,
ts->removedPackages, ts->numRemovedPackages, 1);
while ((h = rpmdbNextIterator(mi)) != NULL) {
if (rangeMatchesDepFlags(h, keyName, keyEVR, keyFlags)) {
#ifndef DYING
mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_NAME, keyName, 0);
- rpmdbPruneIterator(mi,
+ (void) rpmdbPruneIterator(mi,
ts->removedPackages, ts->numRemovedPackages, 1);
while ((h = rpmdbNextIterator(mi)) != NULL) {
if (rangeMatchesDepFlags(h, keyName, keyEVR, keyFlags)) {
int ourrc = 0;
struct availablePackage * suggestion;
- headerNVR(h, &name, &version, &release);
+ (void) headerNVR(h, &name, &version, &release);
if (!hge(h, RPMTAG_REQUIRENAME, &rnt, (void **) &requires, &requiresCount))
{
requiresCount = 0;
rvt = RPM_STRING_ARRAY_TYPE;
} else {
- hge(h, RPMTAG_REQUIREFLAGS, &type, (void **) &requireFlags,
- &requiresCount);
- hge(h, RPMTAG_REQUIREVERSION, &rvt,
- (void **) &requiresEVR, &requiresCount);
+ (void)hge(h, RPMTAG_REQUIREFLAGS, NULL, (void **) &requireFlags, NULL);
+ (void)hge(h, RPMTAG_REQUIREVERSION, &rvt, (void **) &requiresEVR, NULL);
}
for (i = 0; i < requiresCount && !ourrc; i++) {
conflictsCount = 0;
cvt = RPM_STRING_ARRAY_TYPE;
} else {
- hge(h, RPMTAG_CONFLICTFLAGS, &type,
+ (void) hge(h, RPMTAG_CONFLICTFLAGS, &type,
(void **) &conflictFlags, &conflictsCount);
- hge(h, RPMTAG_CONFLICTVERSION, &cvt,
+ (void) hge(h, RPMTAG_CONFLICTVERSION, &cvt,
(void **) &conflictsEVR, &conflictsCount);
}
Header h;
int rc = 0;
- rpmdbPruneIterator(mi, ts->removedPackages, ts->numRemovedPackages, 1);
+ (void) rpmdbPruneIterator(mi,
+ ts->removedPackages, ts->numRemovedPackages, 1);
while ((h = rpmdbNextIterator(mi)) != NULL) {
if (checkPackageDeps(ts, psp, h, key, 0)) {
rc = 1;
*/
if (ts->numRemovedPackages > 0) {
mi = rpmdbInitIterator(ts->rpmdb, RPMDBI_PACKAGES, NULL, 0);
- rpmdbAppendIterator(mi, ts->removedPackages, ts->numRemovedPackages);
+ (void) rpmdbAppendIterator(mi,
+ ts->removedPackages, ts->numRemovedPackages);
while ((h = rpmdbNextIterator(mi)) != NULL) {
{ const char * name, * version, * release;
- headerNVR(h, &name, &version, &release);
+ (void) headerNVR(h, &name, &version, &release);
rpmMessage(RPMMESS_DEBUG, ("========== --- %s-%s-%s\n"),
name, version, release);
if (hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, &fileCount))
{
- hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL);
- hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
+ (void) hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes,
+ NULL);
rc = 0;
for (j = 0; j < fileCount; j++) {
len = strlen(baseNames[j]) + 1 +
newHdr.magic = FA_MAGIC;
newHdr.firstFree = 0;
if (Fwrite(&newHdr, sizeof(char), sizeof(newHdr), fd) != sizeof(newHdr)) {
- Fclose(fd);
+ (void) Fclose(fd);
return NULL;
}
fadSetFirstFree(fd, 0);
} else {
memset(&newHdr, 0, sizeof(newHdr));
if (Pread(fd, &newHdr, sizeof(newHdr), 0) != sizeof(newHdr)) {
- Fclose(fd);
+ (void) Fclose(fd);
return NULL;
}
if (newHdr.magic != FA_MAGIC) {
- Fclose(fd);
+ (void) Fclose(fd);
return NULL;
}
fadSetFirstFree(fd, newHdr.firstFree);
fadSetFileSize(fd, Fseek(fd, 0, SEEK_END));
if (fadGetFileSize(fd) < 0) {
- Fclose(fd);
+ (void) Fclose(fd);
return NULL;
}
}
return 0;
}
- hge(h, RPMTAG_TRIGGERINDEX, NULL, (void **) &indices, NULL);
- hge(h, RPMTAG_TRIGGERFLAGS, NULL, (void **) &flags, NULL);
- hge(h, RPMTAG_TRIGGERVERSION, &tvt, (void **) &versions, NULL);
- hge(h, RPMTAG_TRIGGERSCRIPTS, &tst, (void **) &s, &numScripts);
+ (void) hge(h, RPMTAG_TRIGGERINDEX, NULL, (void **) &indices, NULL);
+ (void) hge(h, RPMTAG_TRIGGERFLAGS, NULL, (void **) &flags, NULL);
+ (void) hge(h, RPMTAG_TRIGGERVERSION, &tvt, (void **) &versions, NULL);
+ (void) hge(h, RPMTAG_TRIGGERSCRIPTS, &tst, (void **) &s, &numScripts);
s = hfd(s, tst);
*freeData = 1;
return 1;
}
- hge(h, RPMTAG_TRIGGERFLAGS, NULL, (void **) &flags, NULL);
- hge(h, RPMTAG_TRIGGERSCRIPTS, &tst, (void **) &s, &numScripts);
+ (void) hge(h, RPMTAG_TRIGGERFLAGS, NULL, (void **) &flags, NULL);
+ (void) hge(h, RPMTAG_TRIGGERSCRIPTS, &tst, (void **) &s, &numScripts);
s = hfd(s, tst);
*freeData = 1;
{ const char * tn = tagName(tag);
const char * n;
char * mk;
- headerNVR(h, &n, NULL, NULL);
+ (void) headerNVR(h, &n, NULL, NULL);
mk = alloca(strlen(n) + strlen(tn) + sizeof("()"));
sprintf(mk, "%s(%s)", n, tn);
msgkey = mk;
/* change to en_US for msgkey -> msgid resolution */
langval = getenv(language);
- setenv(language, "en_US", 1);
+ (void) setenv(language, "en_US", 1);
++_nl_msg_cat_cntr;
msgid = NULL;
/* restore previous environment for msgid -> msgstr resolution */
if (langval)
- setenv(language, langval, 1);
+ (void) setenv(language, langval, 1);
else
unsetenv(language);
++_nl_msg_cat_cntr;
void fpLookupHeader(fingerPrintCache cache, Header h, fingerPrint * fpList)
{
- int fileCount;
+ HGE_t hge = (HGE_t)headerGetEntryMinMemory;
+ HFD_t hfd = headerFreeData;
const char ** baseNames, ** dirNames;
+ int bnt, dnt;
int_32 * dirIndexes;
+ int fileCount;
- if (!headerGetEntryMinMemory(h, RPMTAG_BASENAMES, NULL,
- (const void **) &baseNames, &fileCount)) return;
+ if (!hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, &fileCount))
+ return;
- headerGetEntryMinMemory(h, RPMTAG_DIRNAMES, NULL,
- (const void **) &dirNames, NULL);
- headerGetEntryMinMemory(h, RPMTAG_DIRINDEXES, NULL,
- (const void **) &dirIndexes, NULL);
+ (void) hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
fpLookupList(cache, dirNames, baseNames, dirIndexes, fileCount, fpList);
- free(dirNames);
- free(baseNames);
+ dirNames = hfd(dirNames, dnt);
+ baseNames = hfd(baseNames, bnt);
}
}
# if GETMNTENT_ONE || GETMNTENT_TWO
- fclose(mtab);
+ (void) fclose(mtab);
# elif HAVE_GETMNTINFO_R
- free(mounts);
+ mounts = _free(mounts);
# endif
filesystems[numFilesystems].dev = 0;
if (st->st_size > 0 && fmd5sum) {
const char * md5sum = NULL;
- Fflush(fsm->wfd);
+ (void) Fflush(fsm->wfd);
fdFiniMD5(fsm->wfd, (void **)&md5sum, NULL, 1);
if (md5sum == NULL) {
#if HAVE_MMAP
if (mapped != (void *)-1) {
- /*@-noeffect@*/ munmap(mapped, nmapped) /*@=noeffect@*/;
+ /*@-noeffect@*/ (void) munmap(mapped, nmapped) /*@=noeffect@*/;
fsm->rdbuf = rdbuf;
}
#endif
+/*@-globstate -retvalint -unqualifiedtrans -usedef -varuse@*/
#ifndef lint
static char const
yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $";
unportable getdate.c's), but that seems to cause as many problems
as it solves. */
+#if 0
extern struct tm *gmtime();
extern struct tm *localtime();
+#endif
+
+extern time_t get_date(char * p, struct timeb * now);
#define yyparse getdate_yyparse
#define yylex getdate_yylex
#define yyerror getdate_yyerror
-static int yylex ();
-static int yyerror ();
+static int yyparse (void);
+static int yylex (void);
+static int yyerror(const char * s);
#define EPOCH 1970
#define HOUR(x) ((time_t)(x) * 60)
static time_t yyRelMonth;
static time_t yyRelSeconds;
-#line 179 "./getdate.y"
+#line 184 "./getdate.y"
typedef union {
time_t Number;
enum _MERIDIAN Meridian;
} YYSTYPE;
-#line 198 "y.tab.c"
+#line 203 "y.tab.c"
#define YYERRCODE 256
#define tAGO 257
#define tDAY 258
short *yysslim;
YYSTYPE *yyvs;
int yystacksize;
-#line 398 "./getdate.y"
+#line 403 "./getdate.y"
/* Month and day table. */
static TABLE const MonthDayTable[] = {
{ "thurs", tDAY, 4 },
{ "friday", tDAY, 5 },
{ "saturday", tDAY, 6 },
- { NULL }
+ { NULL, 0, 0 }
};
/* Time units table. */
{ "min", tMINUTE_UNIT, 1 },
{ "second", tSEC_UNIT, 1 },
{ "sec", tSEC_UNIT, 1 },
- { NULL }
+ { NULL, 0, 0 }
};
/* Assorted relative-time words. */
{ "eleventh", tUNUMBER, 11 },
{ "twelfth", tUNUMBER, 12 },
{ "ago", tAGO, 1 },
- { NULL }
+ { NULL, 0, 0 }
};
/* The timezone table. */
{ "nzst", tZONE, -HOUR(12) }, /* New Zealand Standard */
{ "nzdt", tDAYZONE, -HOUR(12) }, /* New Zealand Daylight */
{ "idle", tZONE, -HOUR(12) }, /* International Date Line East */
- { NULL }
+ { NULL, 0, 0 }
};
/* Military timezone table. */
{ "x", tZONE, HOUR(-11) },
{ "y", tZONE, HOUR(-12) },
{ "z", tZONE, HOUR( 0) },
- { NULL }
+ { NULL, 0, 0 }
};
\f
/* ARGSUSED */
static int
-yyerror(s)
- char *s;
+yyerror(const char * s)
{
return 0;
}
static time_t
-ToSeconds(Hours, Minutes, Seconds, Meridian)
- time_t Hours;
- time_t Minutes;
- time_t Seconds;
- MERIDIAN Meridian;
+ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian)
{
if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59)
return -1;
* A number from 0 to 99, which means a year from 1900 to 1999, or
* The actual year (>=100). */
static time_t
-Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode)
- time_t Month;
- time_t Day;
- time_t Year;
- time_t Hours;
- time_t Minutes;
- time_t Seconds;
- MERIDIAN Meridian;
- DSTMODE DSTmode;
+Convert(time_t Month, time_t Day, time_t Year,
+ time_t Hours, time_t Minutes, time_t Seconds,
+ MERIDIAN Meridian, DSTMODE DSTmode)
{
static int DaysInMonth[12] = {
31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
static time_t
-DSTcorrect(Start, Future)
- time_t Start;
- time_t Future;
+DSTcorrect(time_t Start, time_t Future)
{
time_t StartDay;
time_t FutureDay;
static time_t
-RelativeDate(Start, DayOrdinal, DayNumber)
- time_t Start;
- time_t DayOrdinal;
- time_t DayNumber;
+RelativeDate(time_t Start, time_t DayOrdinal, time_t DayNumber)
{
struct tm *tm;
time_t now;
static time_t
-RelativeMonth(Start, RelMonth)
- time_t Start;
- time_t RelMonth;
+RelativeMonth(time_t Start, time_t RelMonth)
{
struct tm *tm;
time_t Month;
static int
-LookupWord(buff)
- char *buff;
+LookupWord(char * buff)
{
register char *p;
register char *q;
int abbrev;
/* Make it lowercase. */
- for (p = buff; *p; p++)
+ for (p = buff; *p != '\0'; p++)
if (isupper(*p))
*p = tolower(*p);
}
/* Drop out any periods and try the timezone table again. */
- for (i = 0, p = q = buff; *q; q++)
+ for (i = 0, p = q = buff; *q != '\0'; q++)
if (*q != '.')
*p++ = *q;
else
static int
-yylex()
+yylex(void)
{
register char c;
register char *p;
Count--;
} while (Count > 0);
}
+ /*@notreached@*/
+ return 0;
}
#define TM_YEAR_ORIGIN 1900
/* Yield A - B, measured in seconds. */
static long
-difftm (a, b)
- struct tm *a, *b;
+difftm (const struct tm * a, const struct tm * b)
{
- int ay = a->tm_year + (TM_YEAR_ORIGIN - 1);
- int by = b->tm_year + (TM_YEAR_ORIGIN - 1);
+ unsigned ay = a->tm_year + (TM_YEAR_ORIGIN - 1);
+ unsigned by = b->tm_year + (TM_YEAR_ORIGIN - 1);
int days = (
/* difference in day of year */
a->tm_yday - b->tm_yday
}
time_t
-get_date(p, now)
- char *p;
- struct timeb *now;
+get_date(char * p, struct timeb * now)
{
struct tm *tm, gmt;
struct timeb ftz;
time_t nowtime;
yyInput = p;
+ memset(&gmt, 0, sizeof(gmt));
if (now == NULL) {
struct tm *gmt_ptr;
return -1;
if (gmt_ptr != NULL)
+ /*@-observertrans -dependenttrans@*/
ftz.timezone = difftm (&gmt, tm) / 60;
+ /*@=observertrans =dependenttrans@*/
else
/* We are on a system like VMS, where the system clock is
in local time and the system has no concept of timezones.
yyHaveTime = 0;
yyHaveZone = 0;
+ /*@-unrecog@*/
if (yyparse()
|| yyHaveTime > 1 || yyHaveZone > 1 || yyHaveDate > 1 || yyHaveDay > 1)
return -1;
+ /*@=unrecog@*/
if (yyHaveDate || yyHaveTime || yyHaveDay) {
Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
/* NOTREACHED */
}
#endif /* defined(TEST) */
-#line 1060 "y.tab.c"
+#line 1050 "y.tab.c"
/* allocate initial stack or double stack size, up to YYMAXDEPTH */
static int yygrowstack()
{
switch (yyn)
{
case 3:
-#line 197 "./getdate.y"
+#line 202 "./getdate.y"
{
yyHaveTime++;
}
break;
case 4:
-#line 200 "./getdate.y"
+#line 205 "./getdate.y"
{
yyHaveZone++;
}
break;
case 5:
-#line 203 "./getdate.y"
+#line 208 "./getdate.y"
{
yyHaveDate++;
}
break;
case 6:
-#line 206 "./getdate.y"
+#line 211 "./getdate.y"
{
yyHaveDay++;
}
break;
case 7:
-#line 209 "./getdate.y"
+#line 214 "./getdate.y"
{
yyHaveRel++;
}
break;
case 9:
-#line 215 "./getdate.y"
+#line 220 "./getdate.y"
{
yyHour = yyvsp[-1].Number;
yyMinutes = 0;
}
break;
case 10:
-#line 221 "./getdate.y"
+#line 226 "./getdate.y"
{
yyHour = yyvsp[-3].Number;
yyMinutes = yyvsp[-1].Number;
}
break;
case 11:
-#line 227 "./getdate.y"
+#line 232 "./getdate.y"
{
yyHour = yyvsp[-3].Number;
yyMinutes = yyvsp[-1].Number;
}
break;
case 12:
-#line 234 "./getdate.y"
+#line 239 "./getdate.y"
{
yyHour = yyvsp[-5].Number;
yyMinutes = yyvsp[-3].Number;
}
break;
case 13:
-#line 240 "./getdate.y"
+#line 245 "./getdate.y"
{
yyHour = yyvsp[-5].Number;
yyMinutes = yyvsp[-3].Number;
}
break;
case 14:
-#line 250 "./getdate.y"
+#line 255 "./getdate.y"
{
yyTimezone = yyvsp[0].Number;
yyDSTmode = DSToff;
}
break;
case 15:
-#line 254 "./getdate.y"
+#line 259 "./getdate.y"
{
yyTimezone = yyvsp[0].Number;
yyDSTmode = DSTon;
}
break;
case 16:
-#line 259 "./getdate.y"
+#line 264 "./getdate.y"
{
yyTimezone = yyvsp[-1].Number;
yyDSTmode = DSTon;
}
break;
case 17:
-#line 265 "./getdate.y"
+#line 270 "./getdate.y"
{
yyDayOrdinal = 1;
yyDayNumber = yyvsp[0].Number;
}
break;
case 18:
-#line 269 "./getdate.y"
+#line 274 "./getdate.y"
{
yyDayOrdinal = 1;
yyDayNumber = yyvsp[-1].Number;
}
break;
case 19:
-#line 273 "./getdate.y"
+#line 278 "./getdate.y"
{
yyDayOrdinal = yyvsp[-1].Number;
yyDayNumber = yyvsp[0].Number;
}
break;
case 20:
-#line 279 "./getdate.y"
+#line 284 "./getdate.y"
{
yyMonth = yyvsp[-2].Number;
yyDay = yyvsp[0].Number;
}
break;
case 21:
-#line 283 "./getdate.y"
+#line 288 "./getdate.y"
{
if (yyvsp[-4].Number >= 100) {
yyYear = yyvsp[-4].Number;
}
break;
case 22:
-#line 294 "./getdate.y"
+#line 299 "./getdate.y"
{
/* ISO 8601 format. yyyy-mm-dd. */
yyYear = yyvsp[-2].Number;
}
break;
case 23:
-#line 300 "./getdate.y"
+#line 305 "./getdate.y"
{
/* e.g. 17-JUN-1992. */
yyDay = yyvsp[-2].Number;
}
break;
case 24:
-#line 306 "./getdate.y"
+#line 311 "./getdate.y"
{
yyMonth = yyvsp[-1].Number;
yyDay = yyvsp[0].Number;
}
break;
case 25:
-#line 310 "./getdate.y"
+#line 315 "./getdate.y"
{
yyMonth = yyvsp[-3].Number;
yyDay = yyvsp[-2].Number;
}
break;
case 26:
-#line 315 "./getdate.y"
+#line 320 "./getdate.y"
{
yyMonth = yyvsp[0].Number;
yyDay = yyvsp[-1].Number;
}
break;
case 27:
-#line 319 "./getdate.y"
+#line 324 "./getdate.y"
{
yyMonth = yyvsp[-1].Number;
yyDay = yyvsp[-2].Number;
}
break;
case 28:
-#line 326 "./getdate.y"
+#line 331 "./getdate.y"
{
yyRelSeconds = -yyRelSeconds;
yyRelMonth = -yyRelMonth;
}
break;
case 30:
-#line 333 "./getdate.y"
+#line 338 "./getdate.y"
{
yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
}
break;
case 31:
-#line 336 "./getdate.y"
+#line 341 "./getdate.y"
{
yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
}
break;
case 32:
-#line 339 "./getdate.y"
+#line 344 "./getdate.y"
{
yyRelSeconds += yyvsp[0].Number * 60L;
}
break;
case 33:
-#line 342 "./getdate.y"
+#line 347 "./getdate.y"
{
yyRelSeconds += yyvsp[-1].Number;
}
break;
case 34:
-#line 345 "./getdate.y"
+#line 350 "./getdate.y"
{
yyRelSeconds += yyvsp[-1].Number;
}
break;
case 35:
-#line 348 "./getdate.y"
+#line 353 "./getdate.y"
{
yyRelSeconds++;
}
break;
case 36:
-#line 351 "./getdate.y"
+#line 356 "./getdate.y"
{
yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
}
break;
case 37:
-#line 354 "./getdate.y"
+#line 359 "./getdate.y"
{
yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
}
break;
case 38:
-#line 357 "./getdate.y"
+#line 362 "./getdate.y"
{
yyRelMonth += yyvsp[0].Number;
}
break;
case 39:
-#line 362 "./getdate.y"
+#line 367 "./getdate.y"
{
if (yyHaveTime && yyHaveDate && !yyHaveRel)
yyYear = yyvsp[0].Number;
}
break;
case 40:
-#line 389 "./getdate.y"
+#line 394 "./getdate.y"
{
yyval.Meridian = MER24;
}
break;
case 41:
-#line 392 "./getdate.y"
+#line 397 "./getdate.y"
{
yyval.Meridian = yyvsp[0].Meridian;
}
break;
-#line 1545 "y.tab.c"
+#line 1535 "y.tab.c"
}
yyssp -= yym;
yystate = *yyssp;
yyaccept:
return (0);
}
+/*@=globstate =retvalint =unqualifiedtrans =usedef =varuse@*/
headerNextIterator(hi, &tag, &type, &ptr, &count);
ptr = headerFreeData((void *)ptr, type))
{
- headerAddEntry(nh, tag, type, ptr, count);
+ (void) headerAddEntry(nh, tag, type, ptr, count);
}
headerFreeIterator(hi);
/* Dribble entries replace duplicate region entries. */
h->indexUsed -= ne;
for (j = 0; j < ne; j++, newEntry++) {
- headerRemoveEntry(h, newEntry->info.tag);
+ (void) headerRemoveEntry(h, newEntry->info.tag);
if (newEntry->info.tag == HEADER_BASENAMES)
- headerRemoveEntry(h, HEADER_OLDFILENAMES);
+ (void) headerRemoveEntry(h, HEADER_OLDFILENAMES);
}
/* If any duplicate entries were replaced, move new entries down. */
}
if (*chptr == '|') {
- parseFormat(xstrdup(""), tags, extensions, &token->u.cond.elseFormat,
+ (void) parseFormat(xstrdup(""), tags, extensions,
+ &token->u.cond.elseFormat,
&token->u.cond.numElseTokens, &end, PARSER_IN_EXPR,
errmsg);
} else {
if (!headerGetEntryMinMemory(headerFrom, *p, &type,
(const void **) &s, &count))
continue;
- headerAddEntry(headerTo, *p, type, s, count);
+ (void) headerAddEntry(headerTo, *p, type, s, count);
s = headerFreeData(s, type);
}
}
rpmMD5Update(&ctx, buf, rc);
rpmMD5Final(bindigest, &ctx);
if (ferror(fp)) {
- fclose(fp);
+ (void) fclose(fp);
return 1;
}
(unsigned)bindigest[15]);
}
- fclose(fp);
+ (void) fclose(fp);
rc = 0;
#else
FD_t fd = Fopen(fn, "r.ufdio");
errxit:
tempfn = _free(tempfn);
/*@-usereleased@*/
- if (fd) Fclose(fd);
+ if (fd) (void) Fclose(fd);
/*@=usereleased@*/
return 1;
}
void compressFilelist(Header h)
{
+ HGE_t hge = (HGE_t)headerGetEntryMinMemory;
char ** fileNames;
const char ** dirNames;
const char ** baseNames;
*/
if (headerIsEntry(h, RPMTAG_DIRNAMES)) {
- headerRemoveEntry(h, RPMTAG_OLDFILENAMES);
+ (void) headerRemoveEntry(h, RPMTAG_OLDFILENAMES);
return; /* Already converted. */
}
- if (!headerGetEntry(h, RPMTAG_OLDFILENAMES, &fnt,
- (void **) &fileNames, &count))
+ if (!hge(h, RPMTAG_OLDFILENAMES, &fnt, (void **) &fileNames, &count))
return; /* no file list */
dirNames = alloca(sizeof(*dirNames) * count); /* worst case */
}
exit:
- headerAddEntry(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE,
+ (void) headerAddEntry(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE,
dirIndexes, count);
- headerAddEntry(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddEntry(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE,
baseNames, count);
- headerAddEntry(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddEntry(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
dirNames, dirIndex + 1);
fileNames = headerFreeData(fileNames, fnt);
- headerRemoveEntry(h, RPMTAG_OLDFILENAMES);
+ (void) headerRemoveEntry(h, RPMTAG_OLDFILENAMES);
}
/*
/*@out@*/ int * fileCountPtr, int baseNameTag,
int dirNameTag, int dirIndexesTag)
{
+ HGE_t hge = (HGE_t)headerGetEntryMinMemory;
+ HFD_t hfd = headerFreeData;
const char ** baseNames;
const char ** dirNames;
int * dirIndexes;
char * data;
int i;
- if (!headerGetEntry(h, baseNameTag, &bnt, (void **) &baseNames, &count)) {
+ if (!hge(h, baseNameTag, &bnt, (void **) &baseNames, &count)) {
if (fileListPtr) *fileListPtr = NULL;
if (fileCountPtr) *fileCountPtr = 0;
return; /* no file list */
}
- headerGetEntry(h, dirNameTag, &dnt, (void **) &dirNames, NULL);
- headerGetEntry(h, dirIndexesTag, NULL, (void **) &dirIndexes, &count);
+ (void) hge(h, dirNameTag, &dnt, (void **) &dirNames, NULL);
+ (void) hge(h, dirIndexesTag, NULL, (void **) &dirIndexes, &count);
size = sizeof(*fileNames) * count;
for (i = 0; i < count; i++)
data = stpcpy( stpcpy(data, dirNames[dirIndexes[i]]), baseNames[i]);
*data++ = '\0';
}
- baseNames = headerFreeData(baseNames, bnt);
- dirNames = headerFreeData(dirNames, dnt);
+ baseNames = hfd(baseNames, bnt);
+ dirNames = hfd(dirNames, dnt);
if (fileListPtr)
*fileListPtr = fileNames;
RPMTAG_DIRNAMES, RPMTAG_DIRINDEXES);
if (fileNames == NULL || count <= 0)
return;
- headerAddEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
fileNames, count);
fileNames = _free(fileNames);
}
- headerRemoveEntry(h, RPMTAG_DIRNAMES);
- headerRemoveEntry(h, RPMTAG_BASENAMES);
- headerRemoveEntry(h, RPMTAG_DIRINDEXES);
+ (void) headerRemoveEntry(h, RPMTAG_DIRNAMES);
+ (void) headerRemoveEntry(h, RPMTAG_BASENAMES);
+ (void) headerRemoveEntry(h, RPMTAG_DIRINDEXES);
}
*/
void providePackageNVR(Header h)
{
+ HGE_t hge = (HGE_t)headerGetEntryMinMemory;
+ HFD_t hfd = headerFreeData;
const char *name, *version, *release;
int_32 * epoch;
const char *pEVR;
int_32 pFlags = RPMSENSE_EQUAL;
const char ** provides = NULL;
const char ** providesEVR = NULL;
+ int pnt, pvt;
int_32 * provideFlags = NULL;
int providesCount;
int i;
int bingo = 1;
/* Generate provides for this package name-version-release. */
- headerNVR(h, &name, &version, &release);
+ (void) headerNVR(h, &name, &version, &release);
if (!(name && version && release))
return;
pEVR = p = alloca(21 + strlen(version) + 1 + strlen(release) + 1);
*p = '\0';
- if (headerGetEntry(h, RPMTAG_EPOCH, NULL, (void **) &epoch, NULL)) {
+ if (hge(h, RPMTAG_EPOCH, NULL, (void **) &epoch, NULL)) {
sprintf(p, "%d:", *epoch);
while (*p != '\0')
p++;
* Rpm prior to 3.0.3 does not have versioned provides.
* If no provides at all are available, we can just add.
*/
- if (!headerGetEntry(h, RPMTAG_PROVIDENAME, NULL,
- (void **) &provides, &providesCount)) {
+ if (!hge(h, RPMTAG_PROVIDENAME, &pnt, (void **) &provides, &providesCount))
goto exit;
- }
/*
* Otherwise, fill in entries on legacy packages.
*/
- if (!headerGetEntry(h, RPMTAG_PROVIDEVERSION, NULL,
- (void **) &providesEVR, NULL)) {
+ if (!hge(h, RPMTAG_PROVIDEVERSION, &pvt, (void **) &providesEVR, NULL)) {
for (i = 0; i < providesCount; i++) {
char * vdummy = "";
int_32 fdummy = RPMSENSE_ANY;
- headerAddOrAppendEntry(h, RPMTAG_PROVIDEVERSION, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_PROVIDEVERSION, RPM_STRING_ARRAY_TYPE,
&vdummy, 1);
- headerAddOrAppendEntry(h, RPMTAG_PROVIDEFLAGS, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_PROVIDEFLAGS, RPM_INT32_TYPE,
&fdummy, 1);
}
goto exit;
}
- headerGetEntry(h, RPMTAG_PROVIDEFLAGS, NULL,
- (void **) &provideFlags, NULL);
+ (void) hge(h, RPMTAG_PROVIDEFLAGS, NULL, (void **) &provideFlags, NULL);
for (i = 0; i < providesCount; i++) {
if (!(provideFlags[i] == RPMSENSE_EQUAL &&
}
exit:
- provides = headerFreeData(provides, -1);
- providesEVR = headerFreeData(providesEVR, -1);
+ provides = hfd(provides, pnt);
+ providesEVR = hfd(providesEVR, pvt);
if (bingo) {
- headerAddOrAppendEntry(h, RPMTAG_PROVIDENAME, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_PROVIDENAME, RPM_STRING_ARRAY_TYPE,
&name, 1);
- headerAddOrAppendEntry(h, RPMTAG_PROVIDEFLAGS, RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_PROVIDEFLAGS, RPM_INT32_TYPE,
&pFlags, 1);
- headerAddOrAppendEntry(h, RPMTAG_PROVIDEVERSION, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_PROVIDEVERSION, RPM_STRING_ARRAY_TYPE,
&pEVR, 1);
}
}
/*@notreached@*/ break;
}
if (!headerIsEntry(h, tag))
- headerAddEntry(h, tag, type, ptr, count);
+ (void) headerAddEntry(h, tag, type, ptr, count);
}
headerFreeIterator(hi);
}
/*@notreached@*/ break;
}
if (!headerIsEntry(sig, stag))
- headerAddEntry(sig, stag, type, ptr, count);
+ (void) headerAddEntry(sig, stag, type, ptr, count);
}
headerFreeIterator(hi);
return sig;
hdr = hdrPtr ? hdrPtr : &hdrBlock;
lead = leadPtr ? leadPtr : &leadBlock;
- fstat(Fileno(fd), &sb);
+ memset(&sb, 0, sizeof(sb));
+ (void) fstat(Fileno(fd), &sb);
/* if fd points to a socket, pipe, etc, sb.st_size is *always* zero */
if (S_ISREG(sb.st_mode) && sb.st_size < sizeof(*lead)) return 1;
* anyone.
*/
if (headerIsEntry(*hdr, RPMTAG_FILEUSERNAME))
- headerRemoveEntry(*hdr, RPMTAG_FILEUIDS);
+ (void) headerRemoveEntry(*hdr, RPMTAG_FILEUIDS);
if (headerIsEntry(*hdr, RPMTAG_FILEGROUPNAME))
- headerRemoveEntry(*hdr, RPMTAG_FILEGIDS);
+ (void) headerRemoveEntry(*hdr, RPMTAG_FILEGIDS);
/*
* We switched the way we do relocateable packages. We fix some of
(void **) &defaultPrefix, NULL)) {
defaultPrefix =
stripTrailingChar(alloca_strdup(defaultPrefix), '/');
- headerAddEntry(*hdr, RPMTAG_PREFIXES, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddEntry(*hdr, RPMTAG_PREFIXES, RPM_STRING_ARRAY_TYPE,
&defaultPrefix, 1);
}
/* XXX binary rpms always have RPMTAG_SOURCERPM, source rpms do not */
if (lead->type == RPMLEAD_SOURCE) {
if (!headerIsEntry(*hdr, RPMTAG_SOURCEPACKAGE))
- headerAddEntry(*hdr, RPMTAG_SOURCEPACKAGE, RPM_INT32_TYPE,
+ (void)headerAddEntry(*hdr, RPMTAG_SOURCEPACKAGE, RPM_INT32_TYPE,
&true, 1);
} else if (lead->major < 4) {
/* Retrofit "Provide: name = EVR" for binary packages. */
switch (prob->type) {
case RPMPROB_BADARCH:
- snprintf(buf, nb, _("package %s is for a different architecture"),
+ (void) snprintf(buf, nb,
+ _("package %s is for a different architecture"),
prob->pkgNEVR);
break;
case RPMPROB_BADOS:
- snprintf(buf, nb, _("package %s is for a different operating system"),
+ (void) snprintf(buf, nb,
+ _("package %s is for a different operating system"),
prob->pkgNEVR);
break;
case RPMPROB_PKG_INSTALLED:
- snprintf(buf, nb, _("package %s is already installed"),
+ (void) snprintf(buf, nb,
+ _("package %s is already installed"),
prob->pkgNEVR);
break;
case RPMPROB_BADRELOCATE:
- snprintf(buf, nb, _("path %s in package %s is not relocateable"),
+ (void) snprintf(buf, nb,
+ _("path %s in package %s is not relocateable"),
prob->str1, prob->pkgNEVR);
break;
case RPMPROB_NEW_FILE_CONFLICT:
- snprintf(buf, nb,
+ (void) snprintf(buf, nb,
_("file %s conflicts between attempted installs of %s and %s"),
prob->str1, prob->pkgNEVR, prob->altNEVR);
break;
case RPMPROB_FILE_CONFLICT:
- snprintf(buf, nb,
+ (void) snprintf(buf, nb,
_("file %s from install of %s conflicts with file from package %s"),
prob->str1, prob->pkgNEVR, prob->altNEVR);
break;
case RPMPROB_OLDPACKAGE:
- snprintf(buf, nb,
+ (void) snprintf(buf, nb,
_("package %s (which is newer than %s) is already installed"),
prob->altNEVR, prob->pkgNEVR);
break;
case RPMPROB_DISKSPACE:
- snprintf(buf, nb,
+ (void) snprintf(buf, nb,
_("installing package %s needs %ld%cb on the %s filesystem"),
prob->pkgNEVR,
prob->ulong1 > (1024*1024)
prob->str1);
break;
case RPMPROB_DISKNODES:
- snprintf(buf, nb,
+ (void) snprintf(buf, nb,
_("installing package %s needs %ld inodes on the %s filesystem"),
prob->pkgNEVR, (long)prob->ulong1, prob->str1);
break;
case RPMPROB_BADPRETRANS:
- snprintf(buf, nb,
+ (void) snprintf(buf, nb,
_("package %s pre-transaction syscall(s): %s failed: %s"),
prob->pkgNEVR, prob->str1, strerror(prob->ulong1));
break;
case RPMPROB_REQUIRES:
case RPMPROB_CONFLICT:
default:
- snprintf(buf, nb,
+ (void) snprintf(buf, nb,
_("unknown error %d encountered while manipulating package %s"),
prob->type, prob->pkgNEVR);
break;
return 1;
}
- headerGetEntry(first, RPMTAG_VERSION, NULL, (void **) &one, NULL);
- headerGetEntry(second, RPMTAG_VERSION, NULL, (void **) &two, NULL);
+ (void) headerGetEntry(first, RPMTAG_VERSION, NULL, (void **) &one, NULL);
+ (void) headerGetEntry(second, RPMTAG_VERSION, NULL, (void **) &two, NULL);
rc = rpmvercmp(one, two);
if (rc)
return rc;
- headerGetEntry(first, RPMTAG_RELEASE, NULL, (void **) &one, NULL);
- headerGetEntry(second, RPMTAG_RELEASE, NULL, (void **) &two, NULL);
+ (void) headerGetEntry(first, RPMTAG_RELEASE, NULL, (void **) &one, NULL);
+ (void) headerGetEntry(second, RPMTAG_RELEASE, NULL, (void **) &two, NULL);
return rpmvercmp(one, two);
}
if (h && fi->h == NULL) fi->h = headerLink(h);
/* Duplicate name-version-release so that headers can be free'd. */
- hge(fi->h, RPMTAG_NAME, NULL, (void **) &fi->name, NULL);
+ rc = hge(fi->h, RPMTAG_NAME, NULL, (void **) &fi->name, NULL);
fi->name = xstrdup(fi->name);
- hge(fi->h, RPMTAG_VERSION, NULL, (void **) &fi->version, NULL);
+ rc = hge(fi->h, RPMTAG_VERSION, NULL, (void **) &fi->version, NULL);
fi->version = xstrdup(fi->version);
- hge(fi->h, RPMTAG_RELEASE, NULL, (void **) &fi->release, NULL);
+ rc = hge(fi->h, RPMTAG_RELEASE, NULL, (void **) &fi->release, NULL);
fi->release = xstrdup(fi->release);
/* -1 means not found */
return;
}
- hge(fi->h, RPMTAG_DIRINDEXES, NULL, (void **) &fi->dil, NULL);
- hge(fi->h, RPMTAG_DIRNAMES, NULL, (void **) &fi->dnl, &fi->dc);
- hge(fi->h, RPMTAG_FILEMODES, NULL, (void **) &fi->fmodes, NULL);
- hge(fi->h, RPMTAG_FILEFLAGS, NULL, (void **) &fi->fflags, NULL);
- hge(fi->h, RPMTAG_FILESIZES, NULL, (void **) &fi->fsizes, NULL);
- hge(fi->h, RPMTAG_FILESTATES, NULL, (void **) &fi->fstates, NULL);
+ rc = hge(fi->h, RPMTAG_DIRINDEXES, NULL, (void **) &fi->dil, NULL);
+ rc = hge(fi->h, RPMTAG_DIRNAMES, NULL, (void **) &fi->dnl, &fi->dc);
+ rc = hge(fi->h, RPMTAG_FILEMODES, NULL, (void **) &fi->fmodes, NULL);
+ rc = hge(fi->h, RPMTAG_FILEFLAGS, NULL, (void **) &fi->fflags, NULL);
+ rc = hge(fi->h, RPMTAG_FILESIZES, NULL, (void **) &fi->fsizes, NULL);
+ rc = hge(fi->h, RPMTAG_FILESTATES, NULL, (void **) &fi->fstates, NULL);
fi->action = FA_UNKNOWN;
fi->flags = 0;
switch (fi->type) {
case TR_ADDED:
fi->mapflags = CPIO_MAP_PATH | CPIO_MAP_MODE | CPIO_MAP_UID | CPIO_MAP_GID;
- hge(fi->h, RPMTAG_FILEMD5S, NULL, (void **) &fi->fmd5s, NULL);
- hge(fi->h, RPMTAG_FILELINKTOS, NULL, (void **) &fi->flinks, NULL);
- hge(fi->h, RPMTAG_FILELANGS, NULL, (void **) &fi->flangs, NULL);
- hge(fi->h, RPMTAG_FILEMTIMES, NULL, (void **) &fi->fmtimes, NULL);
+ rc = hge(fi->h, RPMTAG_FILEMD5S, NULL, (void **) &fi->fmd5s, NULL);
+ rc = hge(fi->h, RPMTAG_FILELINKTOS, NULL, (void **) &fi->flinks, NULL);
+ rc = hge(fi->h, RPMTAG_FILELANGS, NULL, (void **) &fi->flangs, NULL);
+ rc = hge(fi->h, RPMTAG_FILEMTIMES, NULL, (void **) &fi->fmtimes, NULL);
/* 0 makes for noops */
fi->replacedSizes = xcalloc(fi->fc, sizeof(*fi->replacedSizes));
break;
case TR_REMOVED:
fi->mapflags = CPIO_MAP_ABSOLUTE | CPIO_MAP_ADDDOT | CPIO_MAP_PATH | CPIO_MAP_MODE;
- hge(fi->h, RPMTAG_FILEMD5S, NULL, (void **) &fi->fmd5s, NULL);
- hge(fi->h, RPMTAG_FILELINKTOS, NULL, (void **) &fi->flinks, NULL);
+ rc = hge(fi->h, RPMTAG_FILEMD5S, NULL, (void **) &fi->fmd5s, NULL);
+ rc = hge(fi->h, RPMTAG_FILELINKTOS, NULL, (void **) &fi->flinks, NULL);
fi->fsizes = memcpy(xmalloc(fi->fc * sizeof(*fi->fsizes)),
fi->fsizes, fi->fc * sizeof(*fi->fsizes));
fi->fflags = memcpy(xmalloc(fi->fc * sizeof(*fi->fflags)),
RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTVERSION, RPMTAG_CONFLICTFLAGS
};
- hge(h, RPMTAG_SIZE, NULL, (void **) &fileSizes, NULL);
+ (void) hge(h, RPMTAG_SIZE, NULL, (void **) &fileSizes, NULL);
fileSize = *fileSizes;
- hge(newH, RPMTAG_FILESIZES, NULL, (void **) &fileSizes, &count);
+ (void) hge(newH, RPMTAG_FILESIZES, NULL, (void **) &fileSizes, &count);
for (i = 0, fc = 0; i < count; i++)
if (actions[i] != FA_SKIPMULTILIB) {
fc++;
fileSize += fileSizes[i];
}
- headerModifyEntry(h, RPMTAG_SIZE, RPM_INT32_TYPE, &fileSize, 1);
+ (void) headerModifyEntry(h, RPMTAG_SIZE, RPM_INT32_TYPE, &fileSize, 1);
for (i = 0; mergeTags[i]; i++) {
if (!hge(newH, mergeTags[i], &type, (void **) &data, &count))
for (j = 0, k = 0; j < count; j++)
if (actions[j] != FA_SKIPMULTILIB)
((int_8 *) newdata)[k++] = ((int_8 *) data)[j];
- headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
+ (void) headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
free (newdata);
break;
case RPM_INT16_TYPE:
for (j = 0, k = 0; j < count; j++)
if (actions[j] != FA_SKIPMULTILIB)
((int_16 *) newdata)[k++] = ((int_16 *) data)[j];
- headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
+ (void) headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
free (newdata);
break;
case RPM_INT32_TYPE:
for (j = 0, k = 0; j < count; j++)
if (actions[j] != FA_SKIPMULTILIB)
((int_32 *) newdata)[k++] = ((int_32 *) data)[j];
- headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
+ (void) headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
free (newdata);
break;
case RPM_STRING_ARRAY_TYPE:
for (j = 0, k = 0; j < count; j++)
if (actions[j] != FA_SKIPMULTILIB)
((char **) newdata)[k++] = ((char **) data)[j];
- headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
+ (void) headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc);
free (newdata);
break;
default:
}
data = hfd(data, type);
}
- hge(newH, RPMTAG_DIRINDEXES, NULL, (void **) &newDirIndexes, &count);
- hge(newH, RPMTAG_DIRNAMES, NULL, (void **) &newDirNames, NULL);
- hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
- hge(h, RPMTAG_DIRNAMES, NULL, (void **) &data, &dirNamesCount);
+ (void) hge(newH, RPMTAG_DIRINDEXES, NULL, (void **) &newDirIndexes, &count);
+ (void) hge(newH, RPMTAG_DIRNAMES, NULL, (void **) &newDirNames, NULL);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
+ (void) hge(h, RPMTAG_DIRNAMES, NULL, (void **) &data, &dirNamesCount);
dirNames = xcalloc(dirNamesCount + fc, sizeof(char *));
for (i = 0; i < dirNamesCount; i++)
dirNames[dirCount++] = newDirNames[newDirIndexes[i]];
((int_32 *) newdata)[k++] = j;
}
- headerAddOrAppendEntry(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE, newdata, fc);
+ (void) headerAddOrAppendEntry(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE, newdata, fc);
if (dirCount > dirNamesCount)
- headerAddOrAppendEntry(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddOrAppendEntry(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
dirNames + dirNamesCount,
dirCount - dirNamesCount);
data = hfd(data, -1);
if (!hge(newH, requireTags[i], &nnt, (void **) &newNames, &newCount))
continue;
- hge(newH, requireTags[i+1], &nvt, (void **) &newEVR, NULL);
- hge(newH, requireTags[i+2], NULL, (void **) &newFlags, NULL);
+ (void) hge(newH, requireTags[i+1], &nvt, (void **) &newEVR, NULL);
+ (void) hge(newH, requireTags[i+2], NULL, (void **) &newFlags, NULL);
if (hge(h, requireTags[i], &rnt, (void **) &Names, &Count))
{
- hge(h, requireTags[i+1], NULL, (void **) &EVR, NULL);
- hge(h, requireTags[i+2], NULL, (void **) &Flags, NULL);
+ (void) hge(h, requireTags[i+1], NULL, (void **) &EVR, NULL);
+ (void) hge(h, requireTags[i+2], NULL, (void **) &Flags, NULL);
for (j = 0; j < newCount; j++)
for (k = 0; k < Count; k++)
if (!strcmp (newNames[j], Names[k])
k++;
}
if (k) {
- headerAddOrAppendEntry(h, requireTags[i],
+ (void) headerAddOrAppendEntry(h, requireTags[i],
RPM_STRING_ARRAY_TYPE, newNames, k);
- headerAddOrAppendEntry(h, requireTags[i+1],
+ (void) headerAddOrAppendEntry(h, requireTags[i+1],
RPM_STRING_ARRAY_TYPE, newEVR, k);
- headerAddOrAppendEntry(h, requireTags[i+2], RPM_INT32_TYPE,
+ (void) headerAddOrAppendEntry(h, requireTags[i+2], RPM_INT32_TYPE,
newFlags, k);
}
newNames = hfd(newNames, nnt);
}
mi = rpmdbInitIterator(ts->rpmdb, RPMDBI_PACKAGES, NULL, 0);
- rpmdbAppendIterator(mi, offsets, num);
+ (void) rpmdbAppendIterator(mi, offsets, num);
sfi = replaced;
while ((h = rpmdbNextIterator(mi)) != NULL) {
if (modified == 0) {
/* Modified header will be rewritten. */
modified = 1;
- rpmdbSetIteratorModified(mi, modified);
+ (void) rpmdbSetIteratorModified(mi, modified);
}
num++;
}
headerFree(h); /* XXX reference held by transaction set */
h = NULL;
- rpmInstallLoadMacros(fi, fi->h);
+ (void) rpmInstallLoadMacros(fi, fi->h);
memset(psm, 0, sizeof(*psm));
psm->ts = ts;
argc = progArgc;
}
- headerNVR(h, &n, &v, &r);
+ (void) headerNVR(h, &n, &v, &r);
if (hge(h, RPMTAG_INSTPREFIXES, &ipt, (void **) &prefixes, &numPrefixes)) {
freePrefixes = 1;
} else if (hge(h, RPMTAG_INSTALLPREFIX, NULL, (void **) &oldPrefix, NULL)) {
if (rpmIsDebug() &&
(!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash")))
- (void)Fwrite("set -x\n", sizeof(char), 7, fd);
+ (void) Fwrite("set -x\n", sizeof(char), 7, fd);
- (void)Fwrite(script, sizeof(script[0]), strlen(script), fd);
- Fclose(fd);
+ (void) Fwrite(script, sizeof(script[0]), strlen(script), fd);
+ (void) Fclose(fd);
{ const char * sn = fn;
if (!ts->chrootDone &&
pipes[0] = pipes[1] = 0;
/* make stdin inaccessible */
- pipe(pipes);
- close(pipes[1]);
- dup2(pipes[0], STDIN_FILENO);
- close(pipes[0]);
+ (void) pipe(pipes);
+ (void) close(pipes[1]);
+ (void) dup2(pipes[0], STDIN_FILENO);
+ (void) close(pipes[0]);
if (ts->scriptFd != NULL) {
if (Fileno(ts->scriptFd) != STDERR_FILENO)
- dup2(Fileno(ts->scriptFd), STDERR_FILENO);
+ (void) dup2(Fileno(ts->scriptFd), STDERR_FILENO);
if (Fileno(out) != STDOUT_FILENO)
- dup2(Fileno(out), STDOUT_FILENO);
+ (void) dup2(Fileno(out), STDOUT_FILENO);
/* make sure we don't close stdin/stderr/stdout by mistake! */
if (Fileno(out) > STDERR_FILENO && Fileno(out) != Fileno(ts->scriptFd)) {
- Fclose (out);
+ (void) Fclose (out);
}
if (Fileno(ts->scriptFd) > STDERR_FILENO) {
- Fclose (ts->scriptFd);
+ (void) Fclose (ts->scriptFd);
}
}
if (ipath && ipath[5] != '%')
path = ipath;
- doputenv(path);
+ (void) doputenv(path);
ipath = _free(ipath);
}
for (i = 0; i < numPrefixes; i++) {
sprintf(prefixBuf, "RPM_INSTALL_PREFIX%d=%s", i, prefixes[i]);
- doputenv(prefixBuf);
+ (void) doputenv(prefixBuf);
/* backwards compatibility */
if (i == 0) {
sprintf(prefixBuf, "RPM_INSTALL_PREFIX=%s", prefixes[i]);
- doputenv(prefixBuf);
+ (void) doputenv(prefixBuf);
}
}
if (!ts->chrootDone && !(rootDir[0] == '/' && rootDir[1] == '\0')) {
/*@-unrecog@*/ chroot(rootDir); /*@=unrecog@*/
}
- chdir("/");
- execv(argv[0], (char *const *)argv);
+ (void) chdir("/");
+ (void) execv(argv[0], (char *const *)argv);
break;
default:
break;
if (freePrefixes) prefixes = hfd(prefixes, ipt);
- Fclose(out); /* XXX dup'd STDOUT_FILENO */
+ (void) Fclose(out); /* XXX dup'd STDOUT_FILENO */
if (script) {
- if (!rpmIsDebug()) unlink(fn);
+ if (!rpmIsDebug())
+ (void) unlink(fn);
fn = _free(fn);
}
* headerGetEntry() sets the data pointer to NULL if the entry does
* not exist.
*/
- hge(fi->h, psm->progTag, &ptt, (void **) &programArgv, &programArgc);
- hge(fi->h, psm->scriptTag, &stt, (void **) &script, NULL);
+ (void) hge(fi->h, psm->progTag, &ptt, (void **) &programArgv, &programArgc);
+ (void) hge(fi->h, psm->scriptTag, &stt, (void **) &script, NULL);
if (programArgv && ptt == RPM_STRING_TYPE) {
argv = alloca(sizeof(char *));
(void **) &triggerNames, &numTriggers))
return 0;
- headerNVR(sourceH, &sourceName, NULL, NULL);
+ (void) headerNVR(sourceH, &sourceName, NULL, NULL);
- hge(triggeredH, RPMTAG_TRIGGERFLAGS, &tft, (void **) &triggerFlags, NULL);
- hge(triggeredH, RPMTAG_TRIGGERVERSION, &tvt, (void **) &triggerEVR, NULL);
+ (void) hge(triggeredH, RPMTAG_TRIGGERFLAGS, &tft, (void **) &triggerFlags, NULL);
+ (void) hge(triggeredH, RPMTAG_TRIGGERVERSION, &tvt, (void **) &triggerEVR, NULL);
for (i = 0; i < numTriggers; i++) {
int_32 tit, tst, tpt;
triggerEVR[i] + skip, triggerFlags[i]))
continue;
- hge(triggeredH, RPMTAG_TRIGGERINDEX, &tit,
+ (void) hge(triggeredH, RPMTAG_TRIGGERINDEX, &tit,
(void **) &triggerIndices, NULL);
- hge(triggeredH, RPMTAG_TRIGGERSCRIPTS, &tst,
+ (void) hge(triggeredH, RPMTAG_TRIGGERSCRIPTS, &tst,
(void **) &triggerScripts, NULL);
- hge(triggeredH, RPMTAG_TRIGGERSCRIPTPROG, &tpt,
+ (void) hge(triggeredH, RPMTAG_TRIGGERSCRIPTPROG, &tpt,
(void **) &triggerProgs, NULL);
- headerNVR(triggeredH, &triggerPackageName, NULL, NULL);
+ (void) headerNVR(triggeredH, &triggerPackageName, NULL, NULL);
{ int arg1;
int index;
(void **) &triggerNames, &numTriggers))
return 0;
- hge(fi->h, RPMTAG_TRIGGERINDEX, &tit, (void **) &triggerIndices,
+ (void) hge(fi->h, RPMTAG_TRIGGERINDEX, &tit, (void **) &triggerIndices,
&numTriggerIndices);
triggersRun = alloca(sizeof(*triggersRun) * numTriggerIndices);
memset(triggersRun, 0, sizeof(*triggersRun) * numTriggerIndices);
rpmBuildFileList(fi->h, &fi->apath, NULL);
if (fi->fuser == NULL)
- hge(fi->h, RPMTAG_FILEUSERNAME, NULL,
+ (void) hge(fi->h, RPMTAG_FILEUSERNAME, NULL,
(void **) &fi->fuser, NULL);
if (fi->fgroup == NULL)
- hge(fi->h, RPMTAG_FILEGROUPNAME, NULL,
+ (void) hge(fi->h, RPMTAG_FILEGROUPNAME, NULL,
(void **) &fi->fgroup, NULL);
if (fi->fuids == NULL)
fi->fuids = xcalloc(sizeof(*fi->fuids), fi->fc);
(void) fsmTeardown(fi->fsm);
saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
- Fclose(psm->cfd);
+ (void) Fclose(psm->cfd);
psm->cfd = NULL;
errno = saveerrno; /* XXX FIXME: Fclose with libio destroys errno */
fi->action = FA_COPYOUT;
fi->actions = NULL;
- Fflush(psm->fd);
+ (void) Fflush(psm->fd);
psm->cfd = Fdopen(fdDup(Fileno(psm->fd)), psm->rpmio_flags);
/* XXX failedFile? */
(void) fsmTeardown(fi->fsm);
saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
- Fclose(psm->cfd);
+ (void) Fclose(psm->cfd);
psm->cfd = NULL;
errno = saveerrno;
int_32 installTime = time(NULL);
if (fi->fc > 0 && fi->fstates)
- headerAddEntry(fi->h, RPMTAG_FILESTATES, RPM_CHAR_TYPE,
+ (void) headerAddEntry(fi->h, RPMTAG_FILESTATES, RPM_CHAR_TYPE,
fi->fstates, fi->fc);
- headerAddEntry(fi->h, RPMTAG_INSTALLTIME, RPM_INT32_TYPE,
+ (void) headerAddEntry(fi->h, RPMTAG_INSTALLTIME, RPM_INT32_TYPE,
&installTime, 1);
if (ts->transFlags & RPMTRANS_FLAG_MULTILIB) {
uint_32 multiLib, * newMultiLib, * p;
if (hge(fi->h, RPMTAG_MULTILIBS, NULL, (void **) &newMultiLib, NULL) &&
- hge(psm->oh, RPMTAG_MULTILIBS, NULL, (void **) &p, NULL)) {
+ hge(psm->oh, RPMTAG_MULTILIBS, NULL, (void **) &p, NULL))
+ {
multiLib = *p;
multiLib |= *newMultiLib;
- headerModifyEntry(psm->oh, RPMTAG_MULTILIBS, RPM_INT32_TYPE,
+ (void) headerModifyEntry(psm->oh, RPMTAG_MULTILIBS, RPM_INT32_TYPE,
&multiLib, 1);
}
rc = mergeFiles(fi, psm->oh, fi->h);
if (psm->fd) {
saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
- Fclose(psm->fd);
+ (void) Fclose(psm->fd);
psm->fd = NULL;
errno = saveerrno;
}
_loaded++;
}
- chdir("/");
+ (void) chdir("/");
/*@-unrecog@*/
rc = chroot(ts->rootDir);
/*@=unrecog@*/
rc = chroot(".");
/*@=unrecog@*/
psm->chrootDone = ts->chrootDone = 0;
- chdir(ts->currDir);
+ (void) chdir(ts->currDir);
}
break;
case PSM_SCRIPT:
int showQueryPackage(QVA_t *qva, /*@unused@*/rpmdb rpmdb, Header h)
{
+ HGE_t hge = (HGE_t)headerGetEntryMinMemory;
+ HFD_t hfd = headerFreeData;
char * t, * te;
int queryFlags = qva->qva_flags;
char * prefix = NULL;
const char ** dirNames = NULL;
const char ** baseNames = NULL;
+ int bnt, dnt;
const char ** fileMD5List = NULL;
const char ** fileOwnerList = NULL;
const char ** fileGroupList = NULL;
if (!queryFormat && !queryFlags) {
const char * name, * version, * release;
- headerNVR(h, &name, &version, &release);
+ (void) headerNVR(h, &name, &version, &release);
te = stpcpy(te, name);
te = stpcpy( stpcpy(te, "-"), version);
te = stpcpy( stpcpy(te, "-"), release);
if (!(queryFlags & QUERY_FOR_LIST))
goto exit;
- if (!headerGetEntry(h, RPMTAG_BASENAMES, &type,
- (void **) &baseNames, &count)) {
+ if (!hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, &count)) {
te = stpcpy(te, _("(contains no files)"));
goto exit;
}
- if (!headerGetEntry(h, RPMTAG_FILESTATES, &type,
- (void **) &fileStatesList, &count)) {
+ if (!hge(h, RPMTAG_FILESTATES, &type, (void **) &fileStatesList, &count)) {
fileStatesList = NULL;
}
- headerGetEntry(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, NULL);
- headerGetEntry(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
- headerGetEntry(h, RPMTAG_FILEFLAGS, &type, (void **)&fileFlagsList, &count);
- headerGetEntry(h, RPMTAG_FILESIZES, &type, (void **) &fileSizeList, &count);
- headerGetEntry(h, RPMTAG_FILEMODES, &type, (void **) &fileModeList, &count);
- headerGetEntry(h, RPMTAG_FILEMTIMES, &type, (void **)&fileMTimeList,&count);
- headerGetEntry(h, RPMTAG_FILERDEVS, &type, (void **) &fileRdevList, &count);
- headerGetEntry(h, RPMTAG_FILEINODES, &type, (void **)&fileInodeList,&count);
- headerGetEntry(h, RPMTAG_FILELINKTOS,&type,(void **)&fileLinktoList,&count);
- headerGetEntry(h, RPMTAG_FILEMD5S, &type, (void **) &fileMD5List, &count);
-
- if (!headerGetEntry(h, RPMTAG_FILEUIDS, &type,
- (void **) &fileUIDList, &count)) {
+ (void) hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
+ (void) hge(h, RPMTAG_FILEFLAGS, &type, (void **)&fileFlagsList, &count);
+ (void) hge(h, RPMTAG_FILESIZES, &type, (void **) &fileSizeList, &count);
+ (void) hge(h, RPMTAG_FILEMODES, &type, (void **) &fileModeList, &count);
+ (void) hge(h, RPMTAG_FILEMTIMES, &type, (void **)&fileMTimeList,&count);
+ (void) hge(h, RPMTAG_FILERDEVS, &type, (void **) &fileRdevList, &count);
+ (void) hge(h, RPMTAG_FILEINODES, &type, (void **)&fileInodeList,&count);
+ (void) hge(h, RPMTAG_FILELINKTOS,&type,(void **)&fileLinktoList,&count);
+ (void) hge(h, RPMTAG_FILEMD5S, &type, (void **) &fileMD5List, &count);
+
+ if (!hge(h, RPMTAG_FILEUIDS, &type, (void **) &fileUIDList, &count)) {
fileUIDList = NULL;
- } else if (!headerGetEntry(h, RPMTAG_FILEGIDS, &type,
+ } else if (!hge(h, RPMTAG_FILEGIDS, &type,
(void **) &fileGIDList, &count)) {
fileGIDList = NULL;
}
- if (!headerGetEntry(h, RPMTAG_FILEUSERNAME, &type,
- (void **) &fileOwnerList, &count)) {
+ if (!hge(h, RPMTAG_FILEUSERNAME, &type, (void **) &fileOwnerList, &count)) {
fileOwnerList = NULL;
- } else if (!headerGetEntry(h, RPMTAG_FILEGROUPNAME, &type,
- (void **) &fileGroupList, &count)) {
+ } else
+ if (!hge(h, RPMTAG_FILEGROUPNAME, &type, (void **) &fileGroupList, &count)) {
fileGroupList = NULL;
}
rpmMessage(RPMMESS_NORMAL, "%s", t);
}
t = _free(t);
- dirNames = headerFreeData(dirNames, -1);
- baseNames = headerFreeData(baseNames, -1);
- fileLinktoList = headerFreeData(fileLinktoList, -1);
- fileMD5List = headerFreeData(fileMD5List, -1);
- fileOwnerList = headerFreeData(fileOwnerList, -1);
- fileGroupList = headerFreeData(fileGroupList, -1);
+ dirNames = hfd(dirNames, dnt);
+ baseNames = hfd(baseNames, bnt);
+ fileLinktoList = hfd(fileLinktoList, -1);
+ fileMD5List = hfd(fileMD5List, -1);
+ fileOwnerList = hfd(fileOwnerList, -1);
+ fileGroupList = hfd(fileGroupList, -1);
return rc;
}
if (fd == NULL || Ferror(fd)) {
rpmError(RPMERR_OPEN, _("open of %s failed: %s\n"), fileURL,
Fstrerror(fd));
- if (fd) Fclose(fd);
+ if (fd) (void) Fclose(fd);
retcode = 1;
break;
}
rpmrc = rpmReadPackageHeader(fd, &h, &isSource, NULL, NULL);
- Fclose(fd);
+ (void) Fclose(fd);
if (!(rpmrc == RPMRC_OK || rpmrc == RPMRC_BADMAGIC)) {
rpmError(RPMERR_QUERY, _("query of %s failed\n"), fileURL);
if (fd == NULL || Ferror(fd)) {
rpmError(RPMERR_OPEN, _("open of %s failed: %s\n"), fileURL,
Fstrerror(fd));
- if (fd) Fclose(fd);
+ if (fd) (void) Fclose(fd);
retcode = 1;
break;
}
fileURL, Fstrerror(fd));
retcode = 1;
}
- Fclose(fd);
+ (void) Fclose(fd);
/* If successful, restart the query loop. */
if (retcode == 0)
}
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
- showPackage(qva, NULL, pkg->header);
+ (void) showPackage(qva, NULL, pkg->header);
}
freeSpecVec(spec);
} break;
rc = rpmQueryVerify(qva, source, arg, rpmdb, showQueryPackage);
if (rpmdb != NULL)
- rpmdbClose(rpmdb);
+ (void) rpmdbClose(rpmdb);
return rc;
}
/* close and reset *fdp to NULL */
if (*fdp && (fnp == NULL || *fnp == NULL)) {
- Fclose(*fdp);
+ (void) Fclose(*fdp);
*fdp = NULL;
return 0;
}
rc = 0;
exit:
- if (*sfdp) manageFile(sfdp, NULL, 0, rc);
- if (*tfdp) manageFile(tfdp, NULL, 0, rc);
+ if (*sfdp) (void) manageFile(sfdp, NULL, 0, rc);
+ if (*tfdp) (void) manageFile(tfdp, NULL, 0, rc);
return rc;
}
if (add != RESIGN_ADD_SIGNATURE) {
rpmFreeSignature(sig);
sig = rpmNewSignature();
- rpmAddSignature(sig, sigtarget, RPMSIGTAG_SIZE, passPhrase);
- rpmAddSignature(sig, sigtarget, RPMSIGTAG_MD5, passPhrase);
+ (void) rpmAddSignature(sig, sigtarget, RPMSIGTAG_SIZE, passPhrase);
+ (void) rpmAddSignature(sig, sigtarget, RPMSIGTAG_MD5, passPhrase);
}
if ((sigtype = rpmLookupSignatureType(RPMLOOKUPSIG_QUERY)) > 0)
- rpmAddSignature(sig, sigtarget, sigtype, passPhrase);
+ (void) rpmAddSignature(sig, sigtarget, sigtype, passPhrase);
/* Write the lead/signature of the output rpm */
strcpy(tmprpm, rpm);
/* ASSERT: fd == NULL && ofd == NULL */
/* Clean up intermediate target */
- unlink(sigtarget);
+ (void) unlink(sigtarget);
sigtarget = _free(sigtarget);
/* Move final target into place. */
- unlink(rpm);
- rename(trpm, rpm); tmprpm[0] = '\0';
+ (void) unlink(rpm);
+ (void) rename(trpm, rpm);
+ tmprpm[0] = '\0';
}
res = 0;
exit:
- if (fd) manageFile(&fd, NULL, 0, res);
- if (ofd) manageFile(&ofd, NULL, 0, res);
+ if (fd) (void) manageFile(&fd, NULL, 0, res);
+ if (ofd) (void) manageFile(&ofd, NULL, 0, res);
if (sig) {
rpmFreeSignature(sig);
sig = NULL;
}
if (sigtarget) {
- unlink(sigtarget);
+ (void) unlink(sigtarget);
sigtarget = _free(sigtarget);
}
if (tmprpm[0] != '\0') {
- unlink(tmprpm);
+ (void) unlink(tmprpm);
tmprpm[0] = '\0';
}
}
headerFreeIterator(hi);
res += res2;
- unlink(sigtarget);
+ (void) unlink(sigtarget);
sigtarget = _free(sigtarget);
if (res2) {
}
bottom:
- if (fd) manageFile(&fd, NULL, 0, 0);
- if (ofd) manageFile(&ofd, NULL, 0, 0);
+ if (fd) (void) manageFile(&fd, NULL, 0, 0);
+ if (ofd) (void) manageFile(&ofd, NULL, 0, 0);
if (sigtarget) {
- unlink(sigtarget);
+ (void) unlink(sigtarget);
sigtarget = _free(sigtarget);
}
}
/* XXX HACK (disabled) permit ^C aborts for now ... */
if (!(rpmdb && rpmdb->db_api == 4)) {
- sigfillset(&newMask); /* block all signals */
- sigprocmask(SIG_BLOCK, &newMask, oldMask);
+ (void) sigfillset(&newMask); /* block all signals */
+ (void) sigprocmask(SIG_BLOCK, &newMask, oldMask);
}
}
{
/* XXX HACK (disabled) permit ^C aborts for now ... */
if (!(rpmdb && rpmdb->db_api == 4)) {
- sigprocmask(SIG_SETMASK, oldMask, NULL);
+ (void) sigprocmask(SIG_SETMASK, oldMask, NULL);
}
}
if (rpmdb->_dbi[dbix] == NULL)
continue;
/*@-unqualifiedtrans@*/
- dbiClose(rpmdb->_dbi[dbix], 0);
+ (void) dbiClose(rpmdb->_dbi[dbix], 0);
rpmdb->_dbi[dbix] = NULL;
/*@=unqualifiedtrans@*/
}
rpmdb->db_home = rpmGetPath( (home && *home ? home : _DB_HOME), NULL);
if (!(rpmdb->db_home && rpmdb->db_home[0] != '%')) {
rpmError(RPMERR_DBOPEN, _("no dbpath has been set\n"));
- rpmdbClose(rpmdb);
+ (void) rpmdbClose(rpmdb);
/*@-globstate@*/ return NULL; /*@=globstate@*/
}
rpmdb->db_errpfx = rpmExpand( (epfx && *epfx ? epfx : _DB_ERRPFX), NULL);
exit:
if (rc || justCheck || dbp == NULL)
- rpmdbClose(rpmdb);
+ (void) rpmdbClose(rpmdb);
else
*dbp = rpmdb;
rc = openDatabase(prefix, NULL, _dbapi, &rpmdb, (O_CREAT | O_RDWR),
perms, RPMDB_FLAG_JUSTCHECK);
if (rpmdb) {
- rpmdbOpenAll(rpmdb);
- rpmdbClose(rpmdb);
+ (void) rpmdbOpenAll(rpmdb);
+ (void) rpmdbClose(rpmdb);
rpmdb = NULL;
}
return rc;
continue;
}
- hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, NULL);
- hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL);
- hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
+ (void) hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, NULL);
+ (void) hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
do {
fingerPrint fp2;
if (FP_EQUAL(fp1, fp2)) {
rec->hdrNum = dbiIndexRecordOffset(allMatches, i);
rec->tagNum = dbiIndexRecordFileNumber(allMatches, i);
- dbiAppendSet(*matches, rec, 1, sizeof(*rec), 0);
+ (void) dbiAppendSet(*matches, rec, 1, sizeof(*rec), 0);
}
prevoff = offset;
goto exit;
}
- headerNVR(h, NULL, &pkgVersion, &pkgRelease);
+ (void) headerNVR(h, NULL, &pkgVersion, &pkgRelease);
goodRelease = goodVersion = 1;
unsigned int mi_filenum;
unsigned int mi_fpnum;
unsigned int mi_dbnum;
-/*@only@*/ const char *mi_version;
-/*@only@*/ const char *mi_release;
+/*@only@*/ const char * mi_version;
+/*@only@*/ const char * mi_release;
};
rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi)
if (mi->mi_modified && mi->mi_prevoffset) {
DBC * dbcursor = NULL;
xx = dbiCopen(dbi, &dbcursor, 0);
- dbiUpdateRecord(dbi, dbcursor, mi->mi_prevoffset, mi->mi_h);
+ (void) dbiUpdateRecord(dbi, dbcursor, mi->mi_prevoffset, mi->mi_h);
xx = dbiCclose(dbi, dbcursor, 0);
dbcursor = NULL;
}
keylen = mi->mi_keylen;
rc = dbiGet(dbi, mi->mi_dbc, &keyp, &keylen, &uh, &uhlen, 0);
+if (dbi->dbi_api == 1 && dbi->dbi_rpmtag == RPMDBI_PACKAGES && rc == EFAULT) {
+ rpmError(RPMERR_INTERNAL,
+ _("record number %u in database is bad -- skipping.\n"), dbi->dbi_lastoffset);
+ if (keyp && dbi->dbi_lastoffset)
+ memcpy(&mi->mi_offset, keyp, sizeof(mi->mi_offset));
+ continue;
+}
/*
* If we got the next key, save the header instance number.
/* Free current header */
if (mi->mi_h) {
if (mi->mi_modified && mi->mi_prevoffset)
- dbiUpdateRecord(dbi, mi->mi_dbc, mi->mi_prevoffset, mi->mi_h);
+ (void) dbiUpdateRecord(dbi, mi->mi_dbc, mi->mi_prevoffset, mi->mi_h);
headerFree(mi->mi_h);
mi->mi_h = NULL;
}
mi->mi_h = headerCopyLoad(uh);
+ /* XXX db1 with hybrid, simulated db interface on falloc.c needs free. */
+ if (dbi->dbi_api <= 1) free(uh);
if (mi->mi_release) {
const char *release;
- headerNVR(mi->mi_h, NULL, NULL, &release);
+ (void) headerNVR(mi->mi_h, NULL, NULL, &release);
if (strcmp(mi->mi_release, release))
goto top;
}
if (mi->mi_version) {
const char *version;
- headerNVR(mi->mi_h, NULL, &version, NULL);
+ (void) headerNVR(mi->mi_h, NULL, &version, NULL);
if (strcmp(mi->mi_version, version))
goto top;
}
return 1;
if (mi->mi_set)
- dbiPruneSet(mi->mi_set, hdrNums, nHdrNums, sizeof(*hdrNums), sorted);
+ (void) dbiPruneSet(mi->mi_set, hdrNums, nHdrNums, sizeof(*hdrNums), sorted);
return 0;
}
if (mi->mi_set == NULL)
mi->mi_set = xcalloc(1, sizeof(*mi->mi_set));
- dbiAppendSet(mi->mi_set, hdrNums, nHdrNums, sizeof(*hdrNums), 0);
+ (void) dbiAppendSet(mi->mi_set, hdrNums, nHdrNums, sizeof(*hdrNums), 0);
return 0;
}
/* Add remove transaction id to header. */
if (rid > 0) {
int_32 tid = rid;
- headerAddEntry(h, RPMTAG_REMOVETID, RPM_INT32_TYPE, &tid, 1);
+ (void) headerAddEntry(h, RPMTAG_REMOVETID, RPM_INT32_TYPE, &tid, 1);
}
{ const char *n, *v, *r;
- headerNVR(h, &n, &v, &r);
+ (void) headerNVR(h, &n, &v, &r);
rpmMessage(RPMMESS_DEBUG, " --- %10u %s-%s-%s\n", hdrNum, n, v, r);
}
rc = 0;
set = xcalloc(1, sizeof(*set));
}
- dbiAppendSet(set, rec, 1, sizeof(*rec), 0);
+ (void) dbiAppendSet(set, rec, 1, sizeof(*rec), 0);
if (dbiUpdateIndex(dbi, dbcursor, keyp, keylen, set))
rc = 1;
}
if (iid > 0) {
int_32 tid = iid;
- headerRemoveEntry(h, RPMTAG_REMOVETID);
- headerAddEntry(h, RPMTAG_INSTALLTID, RPM_INT32_TYPE, &tid, 1);
+ (void) headerRemoveEntry(h, RPMTAG_REMOVETID);
+ (void) headerAddEntry(h, RPMTAG_INSTALLTID, RPM_INT32_TYPE, &tid, 1);
}
/*
* being written to the package header database.
*/
- hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, &count);
+ (void) hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, &count);
if (_noDirTokens)
expandFilelist(h);
if (!dbi->dbi_no_dbsync)
xx = dbiSync(dbi, 0);
{ const char *n, *v, *r;
- headerNVR(h, &n, &v, &r);
+ (void) headerNVR(h, &n, &v, &r);
rpmMessage(RPMMESS_DEBUG, " +++ %10u %s-%s-%s\n", hdrNum, n, v, r);
}
continue;
rpmcnt = count;
break;
case RPMTAG_REQUIRENAME:
- hge(h, rpmtag, &rpmtype, (void **)&rpmvals, &rpmcnt);
- hge(h, RPMTAG_REQUIREFLAGS, NULL, (void **)&requireFlags, NULL);
+ (void) hge(h, rpmtag, &rpmtype, (void **)&rpmvals, &rpmcnt);
+ (void) hge(h, RPMTAG_REQUIREFLAGS, NULL, (void **)&requireFlags, NULL);
break;
default:
- hge(h, rpmtag, &rpmtype, (void **)&rpmvals, &rpmcnt);
+ (void) hge(h, rpmtag, &rpmtype, (void **)&rpmvals, &rpmcnt);
break;
}
/* Gather all matches from the database */
for (i = 0; i < numItems; i++) {
- rpmdbGrowIterator(mi, fpList[i].baseName, 0, i);
+ (void) rpmdbGrowIterator(mi, fpList[i].baseName, 0, i);
matchList[i] = xcalloc(1, sizeof(*(matchList[i])));
}
num = end - start;
/* Compute fingerprints for this header's matches */
- hge(h, RPMTAG_BASENAMES, &bnt, (void **) &fullBaseNames, NULL);
- hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL);
- hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &fullDirIndexes, NULL);
+ (void) hge(h, RPMTAG_BASENAMES, &bnt, (void **) &fullBaseNames, NULL);
+ (void) hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &fullDirIndexes, NULL);
baseNames = xcalloc(num, sizeof(*baseNames));
dirIndexes = xcalloc(num, sizeof(*dirIndexes));
for (i = 0; i < num; i++, im++) {
if (FP_EQUAL(fps[i], fpList[im->fpNum]))
/*@-usedef@*/
- dbiAppendSet(matchList[im->fpNum], im, 1, sizeof(*im), 0);
+ (void) dbiAppendSet(matchList[im->fpNum], im, 1, sizeof(*im), 0);
/*@=usedef@*/
}
const char * name, * version, * release;
int skip = 0;
- headerNVR(h, &name, &version, &release);
+ (void) headerNVR(h, &name, &version, &release);
/*@-shadow@*/
{ rpmdbMatchIterator mi;
olddb->db_remove_env = 1;
newdb->db_remove_env = 1;
}
- rpmdbClose(olddb);
- rpmdbClose(newdb);
+ (void) rpmdbClose(olddb);
+ (void) rpmdbClose(newdb);
if (failed) {
rpmMessage(RPMMESS_NORMAL, _("failed to rebuild database: original database "
"remains in place\n"));
- rpmdbRemoveDatabase(rootdir, newdbpath, _dbapi_rebuild);
+ (void) rpmdbRemoveDatabase(rootdir, newdbpath, _dbapi_rebuild);
rc = 1;
goto exit;
} else if (!nocleanup) {
#ifdef FANCY_HASH
if (isatty (STDOUT_FILENO)) {
int i;
- for (i = 0; i < hashesPrinted; i++) putchar ('#');
- for (; i < hashesTotal; i++) putchar (' ');
+ for (i = 0; i < hashesPrinted; i++) (void) putchar ('#');
+ for (; i < hashesTotal; i++) (void) putchar (' ');
printf ("(%3d%%)",
(int)(100 * (total ? (((float) amount) / total) : 1)));
- for (i = 0; i < (hashesTotal + 6); i++) putchar ('\b');
+ for (i = 0; i < (hashesTotal + 6); i++) (void) putchar ('\b');
} else
#endif
fprintf(stdout, "#");
hashesPrinted++;
}
- fflush(stdout);
+ (void) fflush(stdout);
hashesPrinted = hashesNeeded;
if (hashesPrinted == hashesTotal) {
#ifdef FANCY_HASH
int i;
progressCurrent++;
- for (i = 1; i < hashesPrinted; i++) putchar ('#');
+ for (i = 1; i < hashesPrinted; i++) (void) putchar ('#');
printf (" [%3d%%]\n", (int)(100 * (progressTotal ?
(((float) progressCurrent) / progressTotal) : 1)));
#else
fprintf (stdout, "\n");
#endif
}
- fflush(stdout);
+ (void) fflush(stdout);
}
}
case RPMCALLBACK_INST_CLOSE_FILE:
fd = fdFree(fd, "persist (showProgress)");
if (fd) {
- Fclose(fd);
+ (void) Fclose(fd);
fd = NULL;
}
break;
#else
fprintf(stdout, "%-28s", s);
#endif
- fflush(stdout);
+ (void) fflush(stdout);
} else {
s = headerSprintf(h, "%{NAME}-%{VERSION}-%{RELEASE}",
rpmTagTable, rpmHeaderFormats, NULL);
fprintf(stdout, "%s\n", s);
- fflush(stdout);
+ (void) fflush(stdout);
}
s = _free(s);
break;
: 100.0));
else if (flags & INSTALL_HASH)
printHash(amount, total);
- fflush(stdout);
+ (void) fflush(stdout);
break;
case RPMCALLBACK_TRANS_START:
fprintf(stdout, "%-28s", _("Preparing..."));
else
printf("%s\n", _("Preparing packages for installation..."));
- fflush(stdout);
+ (void) fflush(stdout);
break;
case RPMCALLBACK_TRANS_STOP:
if (fd == NULL || Ferror(fd)) {
rpmError(RPMERR_OPEN, _("open of %s failed: %s\n"), *fnp,
Fstrerror(fd));
- if (fd) Fclose(fd);
+ if (fd) (void) Fclose(fd);
numFailed++; *fnp = NULL;
continue;
}
rpmrc = rpmReadPackageHeader(fd, &h, &isSource, NULL, NULL);
- Fclose(fd);
+ (void) Fclose(fd);
if (rpmrc == RPMRC_FAIL || rpmrc == RPMRC_SHORTREAD) {
numFailed++; *fnp = NULL;
paths = headerFreeData(paths, pft);
} else {
const char * name;
- headerNVR(h, &name, NULL, NULL);
+ (void) headerNVR(h, &name, NULL, NULL);
rpmMessage(RPMMESS_ERROR,
_("package %s is not relocateable\n"), name);
numFailed++;
Header oldH;
int count;
- headerNVR(h, &name, NULL, NULL);
+ (void) headerNVR(h, &name, NULL, NULL);
mi = rpmdbInitIterator(db, RPMTAG_NAME, name, 0);
count = rpmdbGetIteratorCount(mi);
while ((oldH = rpmdbNextIterator(mi)) != NULL) {
if (fd == NULL || Ferror(fd)) {
rpmError(RPMERR_OPEN, _("open of %s failed: %s\n"), *fnp,
Fstrerror(fd));
- if (fd) Fclose(fd);
+ if (fd) (void) Fclose(fd);
numFailed++; *fnp = NULL;
break;
}
if (rc)
rpmError(RPMERR_MANIFEST, _("%s: read manifest failed: %s\n"),
fileURL, Fstrerror(fd));
- Fclose(fd);
+ (void) Fclose(fd);
/* If successful, restart the query loop. */
if (rc == 0) {
if (fd == NULL || Ferror(fd)) {
rpmMessage(RPMMESS_ERROR, _("cannot open file %s: %s\n"),
sourceURL[i], Fstrerror(fd));
- if (fd) Fclose(fd);
+ if (fd) (void) Fclose(fd);
continue;
}
if (rpmrc != RPMRC_OK) numFailed++;
}
- Fclose(fd);
+ (void) Fclose(fd);
}
}
if (ts) rpmtransFree(ts);
for (i = 0; i < numPkgs; i++) {
if (pkgState[i] == 1)
- Unlink(pkgURL[i]);
+ (void) Unlink(pkgURL[i]);
pkgURL[i] = _free(pkgURL[i]);
}
pkgState = _free(pkgState);
pkgURL = _free(pkgURL);
argv = _free(argv);
- if (dbIsOpen) rpmdbClose(db);
+ if (dbIsOpen) (void) rpmdbClose(db);
return numFailed;
}
}
rpmtransFree(ts);
- rpmdbClose(db);
+ (void) rpmdbClose(db);
return numFailed;
}
fd = Fopen(arg, "r.ufdio");
if (fd == NULL || Ferror(fd)) {
rpmMessage(RPMMESS_ERROR, _("cannot open %s: %s\n"), arg, Fstrerror(fd));
- if (fd) Fclose(fd);
+ if (fd) (void) Fclose(fd);
return 1;
}
/*@=unqualifiedtrans@*/
}
- Fclose(fd);
+ (void) Fclose(fd);
return rc;
}
{ off_t size = fdSize(fd);
size_t nb = (size >= 0 ? size : (8*BUFSIZ - 2));
if (nb == 0) {
- Fclose(fd);
+ (void) Fclose(fd);
return 0;
}
next = alloca(nb + 2);
rc = 1;
} else
rc = 0;
- Fclose(fd);
+ (void) Fclose(fd);
if (rc) return rc;
next[nb] = '\n';
next[nb + 1] = '\0';
const struct canonEntry * canon;
if (!gotDefaults) {
- uname(&un);
+ (void) uname(&un);
#if !defined(__linux__)
#ifdef SNI
if (!Ferror(fd)) {
chptr = xcalloc(1, 256);
{ int irelid = Fread(chptr, sizeof(*chptr), 256, fd);
- Fclose(fd);
+ (void) Fclose(fd);
/* example: "112393 RELEASE 020200 Version 01 OS" */
if (irelid > 0) {
if ((prelid = strstr(chptr, "RELEASE "))){
if (timedRead(fd, buf, 256) != 256)
break;
h = headerNew();
- headerAddEntry(h, RPMSIGTAG_PGP, RPM_BIN_TYPE, buf, 152);
+ (void) headerAddEntry(h, RPMSIGTAG_PGP, RPM_BIN_TYPE, buf, 152);
rc = RPMRC_OK;
break;
case RPMSIGTYPE_MD5:
(void) stpcpy( stpcpy(sigfile, file), ".sig");
inpipe[0] = inpipe[1] = 0;
- pipe(inpipe);
+ (void) pipe(inpipe);
if (!(pid = fork())) {
const char *pgp_path = rpmExpand("%{_pgp_path}", NULL);
const char *path;
pgpVersion pgpVer;
- close(STDIN_FILENO);
- dup2(inpipe[0], 3);
- close(inpipe[1]);
+ (void) close(STDIN_FILENO);
+ (void) dup2(inpipe[0], 3);
+ (void) close(inpipe[1]);
- dosetenv("PGPPASSFD", "3", 1);
+ (void) dosetenv("PGPPASSFD", "3", 1);
if (pgp_path && *pgp_path != '%')
- dosetenv("PGPPATH", pgp_path, 1);
+ (void) dosetenv("PGPPATH", pgp_path, 1);
/* dosetenv("PGPPASS", passPhrase, 1); */
if ((path = rpmDetectPGPVersion(&pgpVer)) != NULL) {
switch(pgpVer) {
case PGP_2:
- execlp(path, "pgp", "+batchmode=on", "+verbose=0", "+armor=off",
+ (void) execlp(path, "pgp", "+batchmode=on", "+verbose=0", "+armor=off",
name, "-sb", file, sigfile, NULL);
break;
case PGP_5:
- execlp(path,"pgps", "+batchmode=on", "+verbose=0", "+armor=off",
+ (void) execlp(path,"pgps", "+batchmode=on", "+verbose=0", "+armor=off",
name, "-b", file, "-o", sigfile, NULL);
break;
case PGP_UNKNOWN:
_exit(RPMERR_EXEC);
}
- close(inpipe[0]);
- (void)write(inpipe[1], passPhrase, strlen(passPhrase));
- (void)write(inpipe[1], "\n", 1);
- close(inpipe[1]);
+ (void) close(inpipe[0]);
+ (void) write(inpipe[1], passPhrase, strlen(passPhrase));
+ (void) write(inpipe[1], "\n", 1);
+ (void) close(inpipe[1]);
(void)waitpid(pid, &status, 0);
if (!WIFEXITED(status) || WEXITSTATUS(status)) {
if (stat(sigfile, &st)) {
/* PGP failed to write signature */
- unlink(sigfile); /* Just in case */
+ (void) unlink(sigfile); /* Just in case */
rpmError(RPMERR_SIGGEN, _("pgp failed to write signature\n"));
return 1;
}
int rc;
fd = Fopen(sigfile, "r.fdio");
rc = timedRead(fd, *sig, *size);
- unlink(sigfile);
- Fclose(fd);
+ (void) unlink(sigfile);
+ (void) Fclose(fd);
if (rc != *size) {
- free(*sig);
+ *sig = _free(*sig);
rpmError(RPMERR_SIGGEN, _("unable to read the signature\n"));
return 1;
}
(void) stpcpy( stpcpy(sigfile, file), ".sig");
inpipe[0] = inpipe[1] = 0;
- pipe(inpipe);
+ (void) pipe(inpipe);
if (!(pid = fork())) {
const char *gpg_path = rpmExpand("%{_gpg_path}", NULL);
const char *name = rpmExpand("%{_gpg_name}", NULL);
- close(STDIN_FILENO);
- dup2(inpipe[0], 3);
- close(inpipe[1]);
+ (void) close(STDIN_FILENO);
+ (void) dup2(inpipe[0], 3);
+ (void) close(inpipe[1]);
if (gpg_path && *gpg_path != '%')
- dosetenv("GNUPGHOME", gpg_path, 1);
- execlp("gpg", "gpg",
+ (void) dosetenv("GNUPGHOME", gpg_path, 1);
+ (void) execlp("gpg", "gpg",
"--batch", "--no-verbose", "--no-armor", "--passphrase-fd", "3",
"-u", name, "-sbo", sigfile, file,
NULL);
}
fpipe = fdopen(inpipe[1], "w");
- close(inpipe[0]);
+ (void) close(inpipe[0]);
fprintf(fpipe, "%s\n", passPhrase);
- fclose(fpipe);
+ (void) fclose(fpipe);
(void)waitpid(pid, &status, 0);
if (!WIFEXITED(status) || WEXITSTATUS(status)) {
if (stat(sigfile, &st)) {
/* GPG failed to write signature */
- unlink(sigfile); /* Just in case */
+ (void) unlink(sigfile); /* Just in case */
rpmError(RPMERR_SIGGEN, _("gpg failed to write signature\n"));
return 1;
}
int rc;
fd = Fopen(sigfile, "r.fdio");
rc = timedRead(fd, *sig, *size);
- unlink(sigfile);
- Fclose(fd);
+ (void) unlink(sigfile);
+ (void) Fclose(fd);
if (rc != *size) {
- free(*sig);
+ *sig = _free(*sig);
rpmError(RPMERR_SIGGEN, _("unable to read the signature\n"));
return 1;
}
switch (sigTag) {
case RPMSIGTAG_SIZE:
- stat(file, &st);
+ (void) stat(file, &st);
size = st.st_size;
ret = 0;
- headerAddEntry(header, RPMSIGTAG_SIZE, RPM_INT32_TYPE, &size, 1);
+ (void) headerAddEntry(header, RPMSIGTAG_SIZE, RPM_INT32_TYPE, &size, 1);
break;
case RPMSIGTAG_MD5:
ret = mdbinfile(file, buf);
if (ret == 0)
- headerAddEntry(header, sigTag, RPM_BIN_TYPE, buf, 16);
+ (void) headerAddEntry(header, sigTag, RPM_BIN_TYPE, buf, 16);
break;
case RPMSIGTAG_PGP5: /* XXX legacy */
case RPMSIGTAG_PGP:
rpmMessage(RPMMESS_VERBOSE, _("Generating signature using PGP.\n"));
ret = makePGPSignature(file, &sig, &size, passPhrase);
if (ret == 0)
- headerAddEntry(header, sigTag, RPM_BIN_TYPE, sig, size);
+ (void) headerAddEntry(header, sigTag, RPM_BIN_TYPE, sig, size);
break;
case RPMSIGTAG_GPG:
rpmMessage(RPMMESS_VERBOSE, _("Generating signature using GPG.\n"));
ret = makeGPGSignature(file, &sig, &size, passPhrase);
if (ret == 0)
- headerAddEntry(header, sigTag, RPM_BIN_TYPE, sig, size);
+ (void) headerAddEntry(header, sigTag, RPM_BIN_TYPE, sig, size);
break;
}
{
struct stat st;
- stat(datafile, &st);
+ (void) stat(datafile, &st);
if (size != st.st_size) {
sprintf(result, "Header+Archive size mismatch.\n"
"Expected %d, saw %d.\n",
{
byte md5sum[16];
- fn(datafile, md5sum);
+ (void) fn(datafile, md5sum);
if (memcmp(md5sum, sig, 16)) {
sprintf(result, "MD5 sum mismatch\n"
"Expected: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
}
sfd = Fopen(sigfile, "w.fdio");
(void)Fwrite(sig, sizeof(char), count, sfd);
- Fclose(sfd);
+ (void) Fclose(sfd);
/* Now run PGP */
outpipe[0] = outpipe[1] = 0;
- pipe(outpipe);
+ (void) pipe(outpipe);
if (!(pid = fork())) {
const char *pgp_path = rpmExpand("%{_pgp_path}", NULL);
- close(outpipe[0]);
- close(STDOUT_FILENO); /* XXX unnecessary */
- dup2(outpipe[1], STDOUT_FILENO);
+ (void) close(outpipe[0]);
+ (void) close(STDOUT_FILENO); /* XXX unnecessary */
+ (void) dup2(outpipe[1], STDOUT_FILENO);
if (pgp_path && *pgp_path != '%')
- dosetenv("PGPPATH", pgp_path, 1);
+ (void) dosetenv("PGPPATH", pgp_path, 1);
switch (pgpVer) {
case PGP_5:
/* another message") is _always_ written to stderr; we */
/* want to catch that output, so dup stdout to stderr: */
{ int save_stderr = dup(2);
- dup2(1, 2);
- execlp(path, "pgpv", "+batchmode=on", "+verbose=0",
+ (void) dup2(1, 2);
+ (void) execlp(path, "pgpv", "+batchmode=on", "+verbose=0",
/* Write "Good signature..." to stdout: */
"+OutputInformationFD=1",
/* Write "WARNING: ... is not trusted to... to stdout: */
"+OutputWarningFD=1",
sigfile, "-o", datafile, NULL);
/* Restore stderr so we can print the error message below. */
- dup2(save_stderr, 2);
- close(save_stderr);
+ (void) dup2(save_stderr, 2);
+ (void) close(save_stderr);
} break;
case PGP_2:
- execlp(path, "pgp", "+batchmode=on", "+verbose=0",
+ (void) execlp(path, "pgp", "+batchmode=on", "+verbose=0",
sigfile, datafile, NULL);
break;
case PGP_UNKNOWN:
_exit(RPMERR_EXEC);
}
- close(outpipe[1]);
+ (void) close(outpipe[1]);
file = fdopen(outpipe[0], "r");
result[0] = '\0';
while (fgets(buf, 1024, file)) {
else if (!strncmp("Good signature", buf, 14))
res = RPMSIG_OK;
}
- fclose(file);
+ (void) fclose(file);
- (void)waitpid(pid, &status, 0);
- unlink(sigfile);
+ (void) waitpid(pid, &status, 0);
+ (void) unlink(sigfile);
if (!res && (!WIFEXITED(status) || WEXITSTATUS(status))) {
res = RPMSIG_BAD;
}
tmppath = _free(tmppath);
}
sfd = Fopen(sigfile, "w.fdio");
- (void)Fwrite(sig, sizeof(char), count, sfd);
- Fclose(sfd);
+ (void) Fwrite(sig, sizeof(char), count, sfd);
+ (void) Fclose(sfd);
/* Now run GPG */
outpipe[0] = outpipe[1] = 0;
- pipe(outpipe);
+ (void) pipe(outpipe);
if (!(pid = fork())) {
const char *gpg_path = rpmExpand("%{_gpg_path}", NULL);
- close(outpipe[0]);
+ (void) close(outpipe[0]);
/* gpg version 0.9 sends its output to stderr. */
- dup2(outpipe[1], STDERR_FILENO);
+ (void) dup2(outpipe[1], STDERR_FILENO);
if (gpg_path && *gpg_path != '%')
- dosetenv("GNUPGHOME", gpg_path, 1);
+ (void) dosetenv("GNUPGHOME", gpg_path, 1);
- execlp("gpg", "gpg",
+ (void) execlp("gpg", "gpg",
"--batch", "--no-verbose",
"--verify", sigfile, datafile,
NULL);
_exit(RPMERR_EXEC);
}
- close(outpipe[1]);
+ (void) close(outpipe[1]);
file = fdopen(outpipe[0], "r");
result[0] = '\0';
while (fgets(buf, 1024, file)) {
res = RPMSIG_NOKEY;
}
}
- fclose(file);
+ (void) fclose(file);
- (void)waitpid(pid, &status, 0);
- unlink(sigfile);
+ (void) waitpid(pid, &status, 0);
+ (void) unlink(sigfile);
if (!res && (!WIFEXITED(status) || WEXITSTATUS(status))) {
res = RPMSIG_BAD;
}
int fd;
passPhrasePipe[0] = passPhrasePipe[1] = 0;
- pipe(passPhrasePipe);
+ (void) pipe(passPhrasePipe);
if (!(pid = fork())) {
- close(STDIN_FILENO);
- close(STDOUT_FILENO);
- close(passPhrasePipe[1]);
+ (void) close(STDIN_FILENO);
+ (void) close(STDOUT_FILENO);
+ (void) close(passPhrasePipe[1]);
if (! rpmIsVerbose()) {
- close(STDERR_FILENO);
+ (void) close(STDERR_FILENO);
}
if ((fd = open("/dev/null", O_RDONLY)) != STDIN_FILENO) {
- dup2(fd, STDIN_FILENO);
- close(fd);
+ (void) dup2(fd, STDIN_FILENO);
+ (void) close(fd);
}
if ((fd = open("/dev/null", O_WRONLY)) != STDOUT_FILENO) {
- dup2(fd, STDOUT_FILENO);
- close(fd);
+ (void) dup2(fd, STDOUT_FILENO);
+ (void) close(fd);
}
- dup2(passPhrasePipe[0], 3);
+ (void) dup2(passPhrasePipe[0], 3);
switch (sigTag) {
case RPMSIGTAG_GPG:
{ const char *gpg_path = rpmExpand("%{_gpg_path}", NULL);
const char *name = rpmExpand("%{_gpg_name}", NULL);
if (gpg_path && *gpg_path != '%')
- dosetenv("GNUPGHOME", gpg_path, 1);
- execlp("gpg", "gpg",
+ (void) dosetenv("GNUPGHOME", gpg_path, 1);
+ (void) execlp("gpg", "gpg",
"--batch", "--no-verbose", "--passphrase-fd", "3",
"-u", name, "-so", "-",
NULL);
const char *path;
pgpVersion pgpVer;
- dosetenv("PGPPASSFD", "3", 1);
+ (void) dosetenv("PGPPASSFD", "3", 1);
if (pgp_path && *pgp_path != '%')
- dosetenv("PGPPATH", pgp_path, 1);
+ (void) dosetenv("PGPPATH", pgp_path, 1);
if ((path = rpmDetectPGPVersion(&pgpVer)) != NULL) {
switch(pgpVer) {
case PGP_2:
- execlp(path, "pgp", "+batchmode=on", "+verbose=0",
+ (void) execlp(path, "pgp", "+batchmode=on", "+verbose=0",
name, "-sf", NULL);
break;
case PGP_5: /* XXX legacy */
- execlp(path,"pgps", "+batchmode=on", "+verbose=0",
+ (void) execlp(path,"pgps", "+batchmode=on", "+verbose=0",
name, "-f", NULL);
break;
case PGP_UNKNOWN:
}
}
- close(passPhrasePipe[0]);
- (void)write(passPhrasePipe[1], passPhrase, strlen(passPhrase));
- (void)write(passPhrasePipe[1], "\n", 1);
- close(passPhrasePipe[1]);
+ (void) close(passPhrasePipe[0]);
+ (void) write(passPhrasePipe[1], passPhrase, strlen(passPhrase));
+ (void) write(passPhrasePipe[1], "\n", 1);
+ (void) close(passPhrasePipe[1]);
(void)waitpid(pid, &status, 0);
if (!WIFEXITED(status) || WEXITSTATUS(status)) {
if (altH) {
const char * n, * v, * r;
- headerNVR(altH, &n, &v, &r);
+ (void) headerNVR(altH, &n, &v, &r);
p->altNEVR =
t = xmalloc(strlen(n) + strlen(v) + strlen(r) + sizeof("--"));
t = stpcpy(t, n);
int type, count;
/* make sure we're trying to install this on the proper architecture */
- headerGetEntry(h, RPMTAG_ARCH, &type, (void **) &pkgArch, &count);
+ (void) headerGetEntry(h, RPMTAG_ARCH, &type, (void **) &pkgArch, &count);
#ifndef DYING
if (type == RPM_INT8_TYPE) {
int_8 * pkgArchNum;
int type, count;
/* make sure we're trying to install this on the proper os */
- headerGetEntry(h, RPMTAG_OS, &type, (void **) &pkgOs, &count);
+ (void) headerGetEntry(h, RPMTAG_OS, &type, (void **) &pkgOs, &count);
#ifndef DYING
if (type == RPM_INT8_TYPE) {
/* v1 packages and v2 packages both used improper OS numbers, so just
if (numRelocations == 0) {
if (numValid) {
if (!headerIsEntry(origH, RPMTAG_INSTPREFIXES))
- headerAddEntry(origH, RPMTAG_INSTPREFIXES,
+ (void) headerAddEntry(origH, RPMTAG_INSTPREFIXES,
validType, validRelocations, numValid);
validRelocations = hfd(validRelocations, validType);
}
}
if (numActual)
- headerAddEntry(h, RPMTAG_INSTPREFIXES, RPM_STRING_ARRAY_TYPE,
+ (void) headerAddEntry(h, RPMTAG_INSTPREFIXES, RPM_STRING_ARRAY_TYPE,
(void **) actualRelocations, numActual);
actualRelocations = _free(actualRelocations);
validRelocations = hfd(validRelocations, validType);
}
- hge(h, RPMTAG_BASENAMES, NULL, (void **) &baseNames, &fileCount);
- hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
- hge(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, &dirCount);
- hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &fFlags, NULL);
- hge(h, RPMTAG_FILEMODES, NULL, (void **) &fModes, NULL);
+ (void) hge(h, RPMTAG_BASENAMES, NULL, (void **) &baseNames, &fileCount);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
+ (void) hge(h, RPMTAG_DIRNAMES, NULL, (void **) &dirNames, &dirCount);
+ (void) hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &fFlags, NULL);
+ (void) hge(h, RPMTAG_FILEMODES, NULL, (void **) &fModes, NULL);
skipDirList = alloca(dirCount * sizeof(*skipDirList));
memset(skipDirList, 0, dirCount * sizeof(*skipDirList));
int t;
p = NULL;
- hge(h, RPMTAG_BASENAMES, &t, &p, &c);
- headerAddEntry(h, RPMTAG_ORIGBASENAMES, t, p, c);
+ (void) hge(h, RPMTAG_BASENAMES, &t, &p, &c);
+ (void) headerAddEntry(h, RPMTAG_ORIGBASENAMES, t, p, c);
p = hfd(p, t);
p = NULL;
- hge(h, RPMTAG_DIRNAMES, &t, &p, &c);
- headerAddEntry(h, RPMTAG_ORIGDIRNAMES, t, p, c);
+ (void) hge(h, RPMTAG_DIRNAMES, &t, &p, &c);
+ (void) headerAddEntry(h, RPMTAG_ORIGDIRNAMES, t, p, c);
p = hfd(p, t);
p = NULL;
- hge(h, RPMTAG_DIRINDEXES, &t, &p, &c);
- headerAddEntry(h, RPMTAG_ORIGDIRINDEXES, t, p, c);
+ (void) hge(h, RPMTAG_DIRINDEXES, &t, &p, &c);
+ (void) headerAddEntry(h, RPMTAG_ORIGDIRINDEXES, t, p, c);
p = hfd(p, t);
- headerModifyEntry(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE,
+ (void) headerModifyEntry(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE,
baseNames, fileCount);
fi->bnl = hfd(fi->bnl, RPM_STRING_ARRAY_TYPE);
- hge(h, RPMTAG_BASENAMES, NULL, (void **) &fi->bnl, &fi->fc);
+ (void) hge(h, RPMTAG_BASENAMES, NULL, (void **) &fi->bnl, &fi->fc);
- headerModifyEntry(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
+ (void) headerModifyEntry(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE,
dirNames, dirCount);
fi->dnl = hfd(fi->dnl, RPM_STRING_ARRAY_TYPE);
- hge(h, RPMTAG_DIRNAMES, NULL, (void **) &fi->dnl, &fi->dc);
+ (void) hge(h, RPMTAG_DIRNAMES, NULL, (void **) &fi->dnl, &fi->dc);
- headerModifyEntry(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE,
+ (void) headerModifyEntry(h, RPMTAG_DIRINDEXES, RPM_INT32_TYPE,
dirIndexes, fileCount);
- hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &fi->dil, NULL);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &fi->dil, NULL);
}
baseNames = hfd(baseNames, RPM_STRING_ARRAY_TYPE);
return 1;
}
- hge(h, RPMTAG_FILEMD5S, &omtype, (void **) &otherMd5s, NULL);
- hge(h, RPMTAG_FILELINKTOS, &oltype, (void **) &otherLinks, NULL);
- hge(h, RPMTAG_FILESTATES, NULL, (void **) &otherStates, NULL);
- hge(h, RPMTAG_FILEMODES, NULL, (void **) &otherModes, NULL);
- hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &otherFlags, NULL);
- hge(h, RPMTAG_FILESIZES, NULL, (void **) &otherSizes, NULL);
+ (void) hge(h, RPMTAG_FILEMD5S, &omtype, (void **) &otherMd5s, NULL);
+ (void) hge(h, RPMTAG_FILELINKTOS, &oltype, (void **) &otherLinks, NULL);
+ (void) hge(h, RPMTAG_FILESTATES, NULL, (void **) &otherStates, NULL);
+ (void) hge(h, RPMTAG_FILEMODES, NULL, (void **) &otherModes, NULL);
+ (void) hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &otherFlags, NULL);
+ (void) hge(h, RPMTAG_FILESIZES, NULL, (void **) &otherSizes, NULL);
fi->replaced = xmalloc(sharedCount * sizeof(*fi->replaced));
return 1;
}
- hge(h, RPMTAG_FILESTATES, NULL, (void **) &otherStates, NULL);
+ (void) hge(h, RPMTAG_FILESTATES, NULL, (void **) &otherStates, NULL);
for (i = 0; i < sharedCount; i++, shared++) {
int otherFileNum, fileNum;
* will be installed and removed so the records for an overlapped
* files will be sorted in exactly the same order.
*/
- htGetEntry(ht, &fi->fps[i], (const void ***) &recs, &numRecs, NULL);
+ (void) htGetEntry(ht, &fi->fps[i], (const void ***) &recs, &numRecs, NULL);
/*
* If this package is being added, look only at other packages
ts->di[i].iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
? sfb.f_ffree : -1;
- stat(ts->filesystems[i], &sb);
+ (void) stat(ts->filesystems[i], &sb);
ts->di[i].dev = sb.st_dev;
}
}
Header oldH;
mi = rpmdbInitIterator(ts->rpmdb, RPMTAG_NAME, alp->name, 0);
while ((oldH = rpmdbNextIterator(mi)) != NULL)
- ensureOlder(alp, oldH, ts->probs);
+ (void) ensureOlder(alp, oldH, ts->probs);
mi = rpmdbFreeIterator(mi);
}
int fileCount;
mi = rpmdbInitIterator(ts->rpmdb, RPMDBI_PACKAGES, NULL, 0);
- rpmdbAppendIterator(mi, ts->removedPackages, ts->numRemovedPackages);
+ (void) rpmdbAppendIterator(mi, ts->removedPackages, ts->numRemovedPackages);
while ((h = rpmdbNextIterator(mi)) != NULL) {
if (headerGetEntry(h, RPMTAG_BASENAMES, NULL, NULL, &fileCount))
totalFileCount += fileCount;
tsi = tsFreeIterator(tsi);
/* Open all database indices before installing. */
- rpmdbOpenAll(ts->rpmdb);
+ (void) rpmdbOpenAll(ts->rpmdb);
if (!ts->chrootDone) {
- chdir("/");
+ (void) chdir("/");
/*@-unrecog@*/ chroot(ts->rootDir); /*@=unrecog@*/
ts->chrootDone = 1;
}
/* Determine the fate of each file. */
switch (fi->type) {
case TR_ADDED:
- handleInstInstalledFiles(fi, ts->rpmdb, shared, nexti - i,
+ (void) handleInstInstalledFiles(fi, ts->rpmdb, shared, nexti - i,
!(beingRemoved || (ts->ignoreSet & RPMPROB_FILTER_REPLACEOLDFILES)),
ts->probs, ts->transFlags);
break;
case TR_REMOVED:
if (!beingRemoved)
- handleRmvdInstalledFiles(fi, ts->rpmdb, shared, nexti - i);
+ (void) handleRmvdInstalledFiles(fi, ts->rpmdb, shared, nexti - i);
break;
}
}
if (ts->chrootDone) {
/*@-unrecog@*/ chroot("."); /*@-unrecog@*/
ts->chrootDone = 0;
- chdir(ts->currDir);
+ (void) chdir(ts->currDir);
}
NOTIFY(ts, (NULL, RPMCALLBACK_TRANS_STOP, 6, ts->flEntries,
if (alp->multiLib)
ts->transFlags |= RPMTRANS_FLAG_MULTILIB;
-if (fi->ap == NULL) fi->ap = alp; /* XXX WTFO? */
+assert(alp == fi->ap);
if (psmStage(psm, PSM_PKGINSTALL)) {
ourrc++;
lastFailed = i;
int rpmVerifyFile(const char * prefix, Header h, int filenum,
int * result, int omitMask)
{
- char ** baseNames, ** md5List, ** linktoList, ** dirNames;
+ HGE_t hge = (HGE_t)headerGetEntryMinMemory;
+ HFD_t hfd = headerFreeData;
int_32 * verifyFlags;
rpmVerifyAttrs flags;
- int_32 * sizeList, * mtimeList, * dirIndexes;
- unsigned short * modeList, * rdevList;
- char * fileStatesList;
+ unsigned short * modeList;
+ const char * fileStatesList;
char * filespec;
- char * name;
- gid_t gid;
- int type, count, rc;
+ int count;
+ int rc;
struct stat sb;
- unsigned char md5sum[40];
- int_32 * uidList, * gidList;
- char linkto[1024];
- int size;
- char ** unameList, ** gnameList;
int_32 useBrokenMd5;
if (IS_BIG_ENDIAN()) { /* XXX was ifdef WORDS_BIGENDIAN */
int_32 * brokenPtr;
- if (!headerGetEntry(h, RPMTAG_BROKENMD5, NULL, (void **) &brokenPtr, NULL)) {
- char * rpmVersion;
+ if (!hge(h, RPMTAG_BROKENMD5, NULL, (void **) &brokenPtr, NULL)) {
+ const char * rpmVersion;
- if (headerGetEntry(h, RPMTAG_RPMVERSION, NULL, (void **) &rpmVersion,
- NULL)) {
+ if (hge(h, RPMTAG_RPMVERSION, NULL, (void **) &rpmVersion, NULL)) {
useBrokenMd5 = ((rpmvercmp(rpmVersion, "2.3.3") >= 0) &&
(rpmvercmp(rpmVersion, "2.3.8") <= 0));
} else {
useBrokenMd5 = 1;
}
- headerAddEntry(h, RPMTAG_BROKENMD5, RPM_INT32_TYPE, &useBrokenMd5, 1);
+ (void) headerAddEntry(h, RPMTAG_BROKENMD5, RPM_INT32_TYPE,
+ &useBrokenMd5, 1);
} else {
useBrokenMd5 = *brokenPtr;
}
useBrokenMd5 = 0;
}
- headerGetEntry(h, RPMTAG_FILEMODES, &type, (void **) &modeList, &count);
+ (void) hge(h, RPMTAG_FILEMODES, NULL, (void **) &modeList, &count);
- if (headerGetEntry(h, RPMTAG_FILEVERIFYFLAGS, &type, (void **) &verifyFlags,
- &count)) {
+ if (hge(h, RPMTAG_FILEVERIFYFLAGS, NULL, (void **) &verifyFlags, NULL)) {
flags = verifyFlags[filenum];
} else {
flags = RPMVERIFY_ALL;
}
- headerGetEntry(h, RPMTAG_BASENAMES, &type, (void **) &baseNames,
- &count);
- headerGetEntry(h, RPMTAG_DIRINDEXES, &type, (void **) &dirIndexes,
- NULL);
- headerGetEntry(h, RPMTAG_DIRNAMES, &type, (void **) &dirNames, NULL);
+ {
+ const char ** baseNames;
+ const char ** dirNames;
+ int_32 * dirIndexes;
+ int bnt, dnt;
+
+ (void) hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, NULL);
+ (void) hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL);
+ (void) hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL);
- filespec = alloca(strlen(dirNames[dirIndexes[filenum]]) +
+ filespec = alloca(strlen(dirNames[dirIndexes[filenum]]) +
strlen(baseNames[filenum]) + strlen(prefix) + 5);
- sprintf(filespec, "%s/%s%s", prefix, dirNames[dirIndexes[filenum]],
+ sprintf(filespec, "%s/%s%s", prefix, dirNames[dirIndexes[filenum]],
baseNames[filenum]);
- free(baseNames);
- free(dirNames);
+ baseNames = hfd(baseNames, bnt);
+ dirNames = hfd(dirNames, dnt);
+ }
*result = 0;
/* Check to see if the file was installed - if not pretend all is OK */
- if (headerGetEntry(h, RPMTAG_FILESTATES, &type,
- (void **) &fileStatesList, &count) && fileStatesList) {
+ if (hge(h, RPMTAG_FILESTATES, NULL, (void **) &fileStatesList, NULL) &&
+ fileStatesList != NULL)
+ {
if (fileStatesList[filenum] == RPMFILE_STATE_NOTINSTALLED)
return 0;
}
flags &= ~(omitMask | RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL);
if (flags & RPMVERIFY_MD5) {
- headerGetEntry(h, RPMTAG_FILEMD5S, &type, (void **) &md5List, &count);
+ unsigned char md5sum[40];
+ const char ** md5List;
+ int mdt;
+
+ (void) hge(h, RPMTAG_FILEMD5S, &mdt, (void **) &md5List, NULL);
if (useBrokenMd5) {
rc = mdfileBroken(filespec, md5sum);
} else {
*result |= (RPMVERIFY_READFAIL|RPMVERIFY_MD5);
else if (strcmp(md5sum, md5List[filenum]))
*result |= RPMVERIFY_MD5;
- free(md5List);
+ md5List = hfd(md5List, mdt);
}
+
if (flags & RPMVERIFY_LINKTO) {
- headerGetEntry(h, RPMTAG_FILELINKTOS, &type, (void **) &linktoList, &count);
+ char linkto[1024];
+ int size;
+ const char ** linktoList;
+ int ltt;
+
+ (void) hge(h, RPMTAG_FILELINKTOS, <t, (void **) &linktoList, NULL);
size = readlink(filespec, linkto, sizeof(linkto)-1);
if (size == -1)
*result |= (RPMVERIFY_READLINKFAIL|RPMVERIFY_LINKTO);
if (strcmp(linkto, linktoList[filenum]))
*result |= RPMVERIFY_LINKTO;
}
- free(linktoList);
+ linktoList = hfd(linktoList, ltt);
}
if (flags & RPMVERIFY_FILESIZE) {
- headerGetEntry(h, RPMTAG_FILESIZES, &type, (void **) &sizeList, &count);
+ int_32 * sizeList;
+
+ (void) hge(h, RPMTAG_FILESIZES, NULL, (void **) &sizeList, NULL);
if (sizeList[filenum] != sb.st_size)
*result |= RPMVERIFY_FILESIZE;
}
S_ISBLK(modeList[filenum]) != S_ISBLK(sb.st_mode)) {
*result |= RPMVERIFY_RDEV;
} else if (S_ISDEV(modeList[filenum]) && S_ISDEV(sb.st_mode)) {
- headerGetEntry(h, RPMTAG_FILERDEVS, NULL, (void **) &rdevList,
- NULL);
+ unsigned short * rdevList;
+ (void) hge(h, RPMTAG_FILERDEVS, NULL, (void **) &rdevList, NULL);
if (rdevList[filenum] != sb.st_rdev)
*result |= RPMVERIFY_RDEV;
}
}
if (flags & RPMVERIFY_MTIME) {
- headerGetEntry(h, RPMTAG_FILEMTIMES, NULL, (void **) &mtimeList, NULL);
+ int_32 * mtimeList;
+
+ (void) hge(h, RPMTAG_FILEMTIMES, NULL, (void **) &mtimeList, NULL);
if (mtimeList[filenum] != sb.st_mtime)
*result |= RPMVERIFY_MTIME;
}
if (flags & RPMVERIFY_USER) {
- if (headerGetEntry(h, RPMTAG_FILEUSERNAME, NULL, (void **) &unameList,
- NULL)) {
+ const char * name;
+ const char ** unameList;
+ int_32 * uidList;
+ int unt;
+
+ if (hge(h, RPMTAG_FILEUSERNAME, &unt, (void **) &unameList, NULL)) {
name = uidToUname(sb.st_uid);
if (!name || strcmp(unameList[filenum], name))
*result |= RPMVERIFY_USER;
- free(unameList);
- } else if (headerGetEntry(h, RPMTAG_FILEUIDS, NULL, (void **) &uidList,
- &count)) {
+ unameList = hfd(unameList, unt);
+ } else if (hge(h, RPMTAG_FILEUIDS, NULL, (void **) &uidList, NULL)) {
if (uidList[filenum] != sb.st_uid)
*result |= RPMVERIFY_GROUP;
} else {
}
if (flags & RPMVERIFY_GROUP) {
- if (headerGetEntry(h, RPMTAG_FILEGROUPNAME, NULL, (void **) &gnameList,
- NULL)) {
- rc = gnameToGid(gnameList[filenum],&gid);
+ const char ** gnameList;
+ int_32 * gidList;
+ int gnt;
+ gid_t gid;
+
+ if (hge(h, RPMTAG_FILEGROUPNAME, &gnt, (void **) &gnameList, NULL)) {
+ rc = gnameToGid(gnameList[filenum], &gid);
if (rc || (gid != sb.st_gid))
*result |= RPMVERIFY_GROUP;
- free(gnameList);
- } else if (headerGetEntry(h, RPMTAG_FILEGIDS, NULL, (void **) &gidList,
- &count)) {
+ gnameList = hfd(gnameList, gnt);
+ } else if (hge(h, RPMTAG_FILEGIDS, NULL, (void **) &gidList, NULL)) {
if (gidList[filenum] != sb.st_gid)
*result |= RPMVERIFY_GROUP;
} else {
/* ======================================================================== */
static int verifyHeader(QVA_t *qva, Header h)
{
+ HGE_t hge = (HGE_t)headerGetEntryMinMemory;
char buf[BUFSIZ];
char * t, * te;
te = t = buf;
*te = '\0';
- if (!headerGetEntry(h, RPMTAG_FILEFLAGS, NULL, (void **) &fileFlagsList, NULL))
+ if (!hge(h, RPMTAG_FILEFLAGS, NULL, (void **) &fileFlagsList, NULL))
goto exit;
if (!headerIsEntry(h, RPMTAG_BASENAMES))
int i;
rpmdep = rpmtransCreateSet(rpmdb, NULL);
- rpmtransAddPackage(rpmdep, h, NULL, NULL, 0, NULL);
+ (void) rpmtransAddPackage(rpmdep, h, NULL, NULL, 0, NULL);
- rpmdepCheck(rpmdep, &conflicts, &numConflicts);
+ (void) rpmdepCheck(rpmdep, &conflicts, &numConflicts);
rpmtransFree(rpmdep);
if (numConflicts) {
const char * name, * version, * release;
char * t, * te;
int nb = 512;
- headerNVR(h, &name, &version, &release);
+ (void) headerNVR(h, &name, &version, &release);
for (i = 0; i < numConflicts; i++) {
nb += strlen(conflicts[i].needsName) + sizeof(", ") - 1;
if ((qva->qva_flags & VERIFY_SCRIPT) &&
(rc = rpmVerifyScript(qva->qva_prefix, h, fdo)) != 0)
ec = rc;
- Fclose(fdo);
+ (void) Fclose(fdo);
return ec;
}
rc = rpmQueryVerify(qva, source, arg, rpmdb, showVerifyPackage);
if (rpmdb != NULL)
- rpmdbClose(rpmdb);
+ (void) rpmdbClose(rpmdb);
return rc;
}
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-04-26 16:39-0400\n"
+"POT-Creation-Date: 2001-04-30 18:16-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"
msgid "Building for target %s\n"
msgstr ""
-#: rpm.c:224 rpmqv.c:391
+#: rpm.c:224 rpmqv.c:392
#, c-format
msgid "rpm: %s\n"
msgstr ""
-#: rpm.c:235 rpmqv.c:396
+#: rpm.c:235 rpmqv.c:397
#, c-format
msgid "RPM version %s\n"
msgstr ""
-#: rpm.c:239 rpmqv.c:400
+#: rpm.c:239 rpmqv.c:401
msgid "Copyright (C) 1998-2000 - Red Hat, Inc."
msgstr ""
-#: rpm.c:240 rpmqv.c:401
+#: rpm.c:240 rpmqv.c:402
msgid "This program may be freely redistributed under the terms of the GNU GPL"
msgstr ""
msgid " rpm {--querytags}"
msgstr ""
-#: rpm.c:327 rpmqv.c:476
+#: rpm.c:327 rpmqv.c:477
msgid "Usage:"
msgstr ""
-#: rpm.c:329 rpmqv.c:478
+#: rpm.c:329 rpmqv.c:479
msgid "print this message"
msgstr ""
-#: rpm.c:331 rpmqv.c:128 rpmqv.c:480
+#: rpm.c:331 rpmqv.c:128 rpmqv.c:481
msgid "print the version of rpm being used"
msgstr ""
msgid " --define '<name> <body>'"
msgstr ""
-#: rpm.c:336 rpmqv.c:135 rpmqv.c:485
+#: rpm.c:336 rpmqv.c:135 rpmqv.c:486
msgid "define macro <name> with value <body>"
msgstr ""
msgid " --pipe <cmd> "
msgstr ""
-#: rpm.c:340 rpmqv.c:141 rpmqv.c:489
+#: rpm.c:340 rpmqv.c:141 rpmqv.c:490
msgid "send stdout to <cmd>"
msgstr ""
msgid "use <file> instead of /etc/rpmrc and $HOME/.rpmrc"
msgstr ""
-#: rpm.c:344 rpmqv.c:159 rpmqv.c:493
+#: rpm.c:344 rpmqv.c:159 rpmqv.c:494
msgid "display final rpmrc and macro configuration"
msgstr ""
-#: rpm.c:346 rpmqv.c:501
+#: rpm.c:346 rpmqv.c:502
msgid "be a little more verbose"
msgstr ""
-#: rpm.c:348 rpmqv.c:503
+#: rpm.c:348 rpmqv.c:504
msgid "be incredibly verbose (for debugging)"
msgstr ""
msgid " --ftpproxy <host> "
msgstr ""
-#: rpm.c:354 rpmqv.c:510
+#: rpm.c:354 rpmqv.c:511
msgid "hostname or IP of ftp proxy"
msgstr ""
msgid " --ftpport <port> "
msgstr ""
-#: rpm.c:356 rpmqv.c:512
+#: rpm.c:356 rpmqv.c:513
msgid "port number of ftp server (or proxy)"
msgstr ""
msgid " --httpproxy <host> "
msgstr ""
-#: rpm.c:358 rpmqv.c:514
+#: rpm.c:358 rpmqv.c:515
msgid "hostname or IP of http proxy"
msgstr ""
msgid " --httpport <port> "
msgstr ""
-#: rpm.c:360 rpmqv.c:516
+#: rpm.c:360 rpmqv.c:517
msgid "port number of http server (or proxy)"
msgstr ""
-#: rpm.c:364 rpmqv.c:536
+#: rpm.c:364 rpmqv.c:537
msgid "query mode"
msgstr ""
msgid " --dbpath <dir> "
msgstr ""
-#: rpm.c:366 rpm.c:412 rpm.c:437 rpm.c:489 rpm.c:561 rpmqv.c:496
+#: rpm.c:366 rpm.c:412 rpm.c:437 rpm.c:489 rpm.c:561 rpmqv.c:497
msgid "use <dir> as the directory for the database"
msgstr ""
msgid " --queryformat <qfmt>"
msgstr ""
-#: rpm.c:368 rpmqv.c:538
+#: rpm.c:368 rpmqv.c:539
msgid "use <qfmt> as the header format (implies --info)"
msgstr ""
msgid " --root <dir> "
msgstr ""
-#: rpm.c:370 rpm.c:414 rpm.c:472 rpm.c:501 rpm.c:563 rpmqv.c:144 rpmqv.c:498
+#: rpm.c:370 rpm.c:414 rpm.c:472 rpm.c:501 rpm.c:563 rpmqv.c:144 rpmqv.c:499
msgid "use <dir> as the top level directory"
msgstr ""
msgid " Information selection options:"
msgstr ""
-#: rpm.c:386 rpmqv.c:542
+#: rpm.c:386 rpmqv.c:543
msgid "display package information"
msgstr ""
-#: rpm.c:388 rpmqv.c:544
+#: rpm.c:388 rpmqv.c:545
msgid "display the package's change log"
msgstr ""
-#: rpm.c:390 rpmqv.c:546
+#: rpm.c:390 rpmqv.c:547
msgid "display package file list"
msgstr ""
-#: rpm.c:392 rpmqv.c:548
+#: rpm.c:392 rpmqv.c:549
msgid "show file states (implies -l)"
msgstr ""
-#: rpm.c:394 rpmqv.c:550
+#: rpm.c:394 rpmqv.c:551
msgid "list only documentation files (implies -l)"
msgstr ""
-#: rpm.c:396 rpmqv.c:552
+#: rpm.c:396 rpmqv.c:553
msgid "list only configuration files (implies -l)"
msgstr ""
-#: rpm.c:398 rpmqv.c:554
+#: rpm.c:398 rpmqv.c:555
msgid ""
"show all verifiable information for each file (must be used with -l, -c, or "
"-d)"
msgid "show the trigger scripts contained in the package"
msgstr ""
-#: rpm.c:410 rpmqv.c:565
+#: rpm.c:410 rpmqv.c:566
msgid ""
"verify a package installation using the same same package specification "
"options as -q"
msgstr ""
-#: lib/poptBT.c:187 lib/verify.c:58 rpm.c:416 rpm.c:458 rpm.c:493 rpmqv.c:268
-#: rpmqv.c:567 rpmqv.c:615 rpmqv.c:649
+#: lib/poptBT.c:187 lib/verify.c:60 rpm.c:416 rpm.c:458 rpm.c:493 rpmqv.c:268
+#: rpmqv.c:568 rpmqv.c:616 rpmqv.c:650
msgid "do not verify package dependencies"
msgstr ""
-#: lib/verify.c:64 rpm.c:418 rpmqv.c:208 rpmqv.c:571
+#: lib/verify.c:66 rpm.c:418 rpmqv.c:208 rpmqv.c:572
msgid "do not verify file md5 checksums"
msgstr ""
-#: rpm.c:420 rpmqv.c:569
+#: rpm.c:420 rpmqv.c:570
msgid "do not verify file attributes"
msgstr ""
-#: rpm.c:422 rpmqv.c:576
+#: rpm.c:422 rpmqv.c:577
msgid "list the tags that can be used in a query format"
msgstr ""
msgid " -i <packagefile> "
msgstr ""
-#: rpm.c:427 rpmqv.c:264 rpmqv.c:590
+#: rpm.c:427 rpmqv.c:264 rpmqv.c:591
msgid "install package"
msgstr ""
msgid " --relocate <oldpath>=<newpath>"
msgstr ""
-#: rpm.c:431 rpmqv.c:627
+#: rpm.c:431 rpmqv.c:628
msgid "relocate files from <oldpath> to <newpath>"
msgstr ""
-#: rpm.c:433 rpmqv.c:236 rpmqv.c:595
+#: rpm.c:433 rpmqv.c:236 rpmqv.c:596
msgid "relocate files in non-relocateable package"
msgstr ""
msgid " --prefix <dir> "
msgstr ""
-#: rpm.c:435 rpmqv.c:311 rpmqv.c:625
+#: rpm.c:435 rpmqv.c:311 rpmqv.c:626
msgid "relocate the package to <dir>, if relocatable"
msgstr ""
-#: rpm.c:439 rpmqv.c:242 rpmqv.c:597
+#: rpm.c:439 rpmqv.c:242 rpmqv.c:598
msgid "do not install documentation"
msgstr ""
-#: rpm.c:441 rpmqv.c:247 rpmqv.c:601
+#: rpm.c:441 rpmqv.c:247 rpmqv.c:602
msgid "short hand for --replacepkgs --replacefiles"
msgstr ""
-#: rpm.c:443 rpmqv.c:253 rpmqv.c:603
+#: rpm.c:443 rpmqv.c:253 rpmqv.c:604
msgid "print hash marks as package installs (good with -v)"
msgstr ""
-#: rpm.c:445 rpmqv.c:224 rpmqv.c:592
+#: rpm.c:445 rpmqv.c:224 rpmqv.c:593
msgid "install all files, even configurations which might otherwise be skipped"
msgstr ""
-#: rpm.c:448 rpmqv.c:255 rpmqv.c:605
+#: rpm.c:448 rpmqv.c:255 rpmqv.c:606
msgid "don't verify package architecture"
msgstr ""
-#: rpm.c:450 rpmqv.c:260 rpmqv.c:607
+#: rpm.c:450 rpmqv.c:260 rpmqv.c:608
msgid "don't check disk space before installing"
msgstr ""
-#: rpm.c:452 rpmqv.c:257 rpmqv.c:609
+#: rpm.c:452 rpmqv.c:257 rpmqv.c:610
msgid "don't verify package operating system"
msgstr ""
-#: rpm.c:454 rpmqv.c:262 rpmqv.c:611
+#: rpm.c:454 rpmqv.c:262 rpmqv.c:612
msgid "install documentation"
msgstr ""
-#: rpm.c:456 rpm.c:491 rpmqv.c:266 rpmqv.c:613 rpmqv.c:647
+#: rpm.c:456 rpm.c:491 rpmqv.c:266 rpmqv.c:614 rpmqv.c:648
msgid "update the database, but do not modify the filesystem"
msgstr ""
-#: rpm.c:460 rpm.c:495 rpmqv.c:270 rpmqv.c:617 rpmqv.c:651
+#: rpm.c:460 rpm.c:495 rpmqv.c:270 rpmqv.c:618 rpmqv.c:652
msgid "do not reorder package installation to satisfy dependencies"
msgstr ""
msgid "don't execute any installation scripts"
msgstr ""
-#: rpm.c:464 rpm.c:499 rpmqv.c:655
+#: rpm.c:464 rpm.c:499 rpmqv.c:656
msgid "don't execute any scripts triggered by this package"
msgstr ""
-#: rpm.c:466 rpmqv.c:309 rpmqv.c:623
+#: rpm.c:466 rpmqv.c:309 rpmqv.c:624
msgid "print percentages as package installs"
msgstr ""
-#: rpm.c:468 rpmqv.c:320 rpmqv.c:629
+#: rpm.c:468 rpmqv.c:320 rpmqv.c:630
msgid "install even if the package replaces installed files"
msgstr ""
-#: rpm.c:470 rpmqv.c:322 rpmqv.c:631
+#: rpm.c:470 rpmqv.c:322 rpmqv.c:632
msgid "reinstall if the package is already present"
msgstr ""
-#: rpm.c:474 rpmqv.c:324 rpmqv.c:633
+#: rpm.c:474 rpmqv.c:324 rpmqv.c:634
msgid "don't install, but tell if it would work or not"
msgstr ""
msgid " -U <packagefile> "
msgstr ""
-#: rpm.c:479 rpmqv.c:637
+#: rpm.c:479 rpmqv.c:638
msgid "upgrade package (same options as --install, plus)"
msgstr ""
-#: rpm.c:481 rpmqv.c:306 rpmqv.c:639
+#: rpm.c:481 rpmqv.c:306 rpmqv.c:640
msgid ""
"upgrade to an old version of the package (--force on upgrades does this "
"automatically)"
msgid " -e <package> "
msgstr ""
-#: rpm.c:485 rpmqv.c:240 rpmqv.c:643
+#: rpm.c:485 rpmqv.c:240 rpmqv.c:644
msgid "erase (uninstall) package"
msgstr ""
-#: rpm.c:487 rpmqv.c:227 rpmqv.c:645
+#: rpm.c:487 rpmqv.c:227 rpmqv.c:646
msgid ""
"remove all packages which match <package> (normally an error is generated if "
"<package> specified multiple packages)"
msgstr ""
-#: rpm.c:497 rpmqv.c:653
+#: rpm.c:497 rpmqv.c:654
msgid "do not execute any package specific scripts"
msgstr ""
msgid " --resign <pkg>+ "
msgstr ""
-#: rpm.c:542 rpmqv.c:198 rpmqv.c:661
+#: rpm.c:542 rpmqv.c:198 rpmqv.c:662
msgid "sign a package (discard current signature)"
msgstr ""
msgid " --addsign <pkg>+ "
msgstr ""
-#: rpm.c:544 rpmqv.c:196 rpmqv.c:663
+#: rpm.c:544 rpmqv.c:196 rpmqv.c:664
msgid "add a signature to a package"
msgstr ""
msgid " -K <pkg>+ "
msgstr ""
-#: rpm.c:547 rpmqv.c:202 rpmqv.c:667
+#: rpm.c:547 rpmqv.c:202 rpmqv.c:668
msgid "verify package signature"
msgstr ""
-#: rpm.c:549 rpmqv.c:204 rpmqv.c:669
+#: rpm.c:549 rpmqv.c:204 rpmqv.c:670
msgid "skip any PGP signatures"
msgstr ""
-#: rpm.c:551 rpmqv.c:206 rpmqv.c:671
+#: rpm.c:551 rpmqv.c:206 rpmqv.c:672
msgid "skip any GPG signatures"
msgstr ""
-#: rpm.c:553 rpmqv.c:673
+#: rpm.c:553 rpmqv.c:674
msgid "skip any MD5 signatures"
msgstr ""
msgid "rebuild database from existing database"
msgstr ""
-#: rpm.c:567 rpmqv.c:578
+#: rpm.c:567 rpmqv.c:579
msgid ""
"set the file permissions to those in the package database using the same "
"package specification options as -q"
msgstr ""
-#: rpm.c:570 rpmqv.c:581
+#: rpm.c:570 rpmqv.c:582
msgid ""
"set the file owner and group to those in the package database using the same "
"package specification options as -q"
msgstr ""
#: rpm.c:722 rpm.c:728 rpm.c:737 rpm.c:759 rpm.c:765 rpm.c:772 rpm.c:780
-#: rpm.c:788 rpm.c:809 rpm.c:872 rpmqv.c:866 rpmqv.c:872 rpmqv.c:879
-#: rpmqv.c:885 rpmqv.c:919 rpmqv.c:927 rpmqv.c:933 rpmqv.c:941 rpmqv.c:1008
+#: rpm.c:788 rpm.c:809 rpm.c:872 rpmqv.c:867 rpmqv.c:873 rpmqv.c:880
+#: rpmqv.c:886 rpmqv.c:920 rpmqv.c:928 rpmqv.c:934 rpmqv.c:942 rpmqv.c:1009
msgid "only one major mode may be specified"
msgstr ""
msgid "Use -e or --erase instead.\n"
msgstr ""
-#: rpm.c:815 rpmqv.c:903
+#: rpm.c:815 rpmqv.c:904
msgid "relocations must begin with a /"
msgstr ""
-#: rpm.c:817 rpmqv.c:905
+#: rpm.c:817 rpmqv.c:906
msgid "relocations must contain a ="
msgstr ""
-#: rpm.c:820 rpmqv.c:908
+#: rpm.c:820 rpmqv.c:909
msgid "relocations must have a / following the ="
msgstr ""
-#: rpm.c:829 rpmqv.c:892
+#: rpm.c:829 rpmqv.c:893
msgid "exclude paths must begin with a /"
msgstr ""
-#: rpm.c:838 rpmqv.c:962
+#: rpm.c:838 rpmqv.c:963
msgid "The --rcfile option has been eliminated.\n"
msgstr ""
msgid "Use --macros with a colon separated list of macro files to read.\n"
msgstr ""
-#: rpm.c:844 rpmqv.c:968
+#: rpm.c:844 rpmqv.c:969
#, c-format
msgid "Internal error in argument processing (%d) :-(\n"
msgstr ""
-#: rpm.c:879 rpmqv.c:1023
+#: rpm.c:879 rpmqv.c:1024
msgid "one type of query/verify may be performed at a time"
msgstr ""
-#: rpm.c:884 rpmqv.c:1027
+#: rpm.c:884 rpmqv.c:1028
msgid "unexpected query flags"
msgstr ""
-#: rpm.c:887 rpmqv.c:1030
+#: rpm.c:887 rpmqv.c:1031
msgid "unexpected query format"
msgstr ""
-#: rpm.c:890 rpmqv.c:1033
+#: rpm.c:890 rpmqv.c:1034
msgid "unexpected query source"
msgstr ""
-#: rpm.c:893 rpmqv.c:1043
+#: rpm.c:893 rpmqv.c:1044
msgid "only installation, upgrading, rmsource and rmspec may be forced"
msgstr ""
-#: rpm.c:896 rpmqv.c:1048
+#: rpm.c:896 rpmqv.c:1049
msgid "files may only be relocated during package installation"
msgstr ""
-#: rpm.c:899 rpmqv.c:1051
+#: rpm.c:899 rpmqv.c:1052
msgid "only one of --prefix or --relocate may be used"
msgstr ""
-#: rpm.c:902 rpmqv.c:1054
+#: rpm.c:902 rpmqv.c:1055
msgid ""
"--relocate and --excludepath may only be used when installing new packages"
msgstr ""
-#: rpm.c:905 rpmqv.c:1057
+#: rpm.c:905 rpmqv.c:1058
msgid "--prefix may only be used when installing new packages"
msgstr ""
-#: rpm.c:908 rpmqv.c:1060
+#: rpm.c:908 rpmqv.c:1061
msgid "arguments to --prefix must begin with a /"
msgstr ""
-#: rpm.c:911 rpmqv.c:1063
+#: rpm.c:911 rpmqv.c:1064
msgid "--hash (-h) may only be specified during package installation"
msgstr ""
-#: rpm.c:915 rpmqv.c:1067
+#: rpm.c:915 rpmqv.c:1068
msgid "--percent may only be specified during package installation"
msgstr ""
-#: rpm.c:919 rpmqv.c:1072
+#: rpm.c:919 rpmqv.c:1073
msgid "--replacefiles may only be specified during package installation"
msgstr ""
-#: rpm.c:923 rpmqv.c:1076
+#: rpm.c:923 rpmqv.c:1077
msgid "--replacepkgs may only be specified during package installation"
msgstr ""
-#: rpm.c:927 rpmqv.c:1080
+#: rpm.c:927 rpmqv.c:1081
msgid "--excludedocs may only be specified during package installation"
msgstr ""
-#: rpm.c:931 rpmqv.c:1084
+#: rpm.c:931 rpmqv.c:1085
msgid "--includedocs may only be specified during package installation"
msgstr ""
-#: rpm.c:935 rpmqv.c:1088
+#: rpm.c:935 rpmqv.c:1089
msgid "only one of --excludedocs and --includedocs may be specified"
msgstr ""
-#: rpm.c:939 rpmqv.c:1092
+#: rpm.c:939 rpmqv.c:1093
msgid "--ignorearch may only be specified during package installation"
msgstr ""
-#: rpm.c:943 rpmqv.c:1096
+#: rpm.c:943 rpmqv.c:1097
msgid "--ignoreos may only be specified during package installation"
msgstr ""
-#: rpm.c:947 rpmqv.c:1101
+#: rpm.c:947 rpmqv.c:1102
msgid "--ignoresize may only be specified during package installation"
msgstr ""
-#: rpm.c:951 rpmqv.c:1105
+#: rpm.c:951 rpmqv.c:1106
msgid "--allmatches may only be specified during package erasure"
msgstr ""
-#: rpm.c:955 rpmqv.c:1109
+#: rpm.c:955 rpmqv.c:1110
msgid "--allfiles may only be specified during package installation"
msgstr ""
-#: rpm.c:959 rpmqv.c:1114
+#: rpm.c:959 rpmqv.c:1115
msgid "--justdb may only be specified during package installation and erasure"
msgstr ""
msgid "--apply may only be specified during package installation"
msgstr ""
-#: rpm.c:975 rpmqv.c:1126
+#: rpm.c:975 rpmqv.c:1127
msgid ""
"trigger disabling options may only be specified during package installation "
"and erasure"
msgstr ""
-#: rpm.c:979 rpmqv.c:1130
+#: rpm.c:979 rpmqv.c:1131
msgid ""
"--nodeps may only be specified during package building, rebuilding, "
"recompilation, installation,erasure, and verification"
msgstr ""
-#: rpm.c:984 rpmqv.c:1135
+#: rpm.c:984 rpmqv.c:1136
msgid ""
"--test may only be specified during package installation, erasure, and "
"building"
msgstr ""
-#: rpm.c:988 rpmqv.c:1140
+#: rpm.c:988 rpmqv.c:1141
msgid ""
"--root (-r) may only be specified during installation, erasure, querying, "
"and database rebuilds"
msgstr ""
-#: rpm.c:1000 rpmqv.c:1152
+#: rpm.c:1000 rpmqv.c:1153
msgid "arguments to --root (-r) must begin with a /"
msgstr ""
msgid "--oldpackage may only be used during upgrades"
msgstr ""
-#: rpm.c:1009 rpmqv.c:1159
+#: rpm.c:1009 rpmqv.c:1160
msgid "--nopgp may only be used during signature checking"
msgstr ""
-#: rpm.c:1012 rpmqv.c:1162
+#: rpm.c:1012 rpmqv.c:1163
msgid "--nogpg may only be used during signature checking"
msgstr ""
-#: rpm.c:1015 rpmqv.c:1167
+#: rpm.c:1015 rpmqv.c:1168
msgid ""
"--nomd5 may only be used during signature checking and package verification"
msgstr ""
-#: rpm.c:1026 rpmqv.c:1183
+#: rpm.c:1026 rpmqv.c:1184
msgid "no files to sign\n"
msgstr ""
-#: rpm.c:1031 rpmqv.c:1188
+#: rpm.c:1031 rpmqv.c:1189
#, c-format
msgid "cannot access file %s\n"
msgstr ""
-#: rpm.c:1046 rpmqv.c:1204
+#: rpm.c:1046 rpmqv.c:1208
msgid "pgp not found: "
msgstr ""
-#: rpm.c:1050 rpmqv.c:1208
+#: rpm.c:1050 rpmqv.c:1213
msgid "Enter pass phrase: "
msgstr ""
-#: rpm.c:1052 rpmqv.c:1210
+#: rpm.c:1052 rpmqv.c:1215
msgid "Pass phrase check failed\n"
msgstr ""
-#: rpm.c:1055 rpmqv.c:1213
+#: rpm.c:1055 rpmqv.c:1219
msgid "Pass phrase is good.\n"
msgstr ""
-#: rpm.c:1060 rpmqv.c:1218
+#: rpm.c:1060 rpmqv.c:1224
msgid "Invalid %%_signature spec in macro file.\n"
msgstr ""
-#: rpm.c:1066 rpmqv.c:1224
+#: rpm.c:1066 rpmqv.c:1231
msgid "--sign may only be used during package building"
msgstr ""
-#: rpm.c:1081 rpmqv.c:1240
+#: rpm.c:1081 rpmqv.c:1247
msgid "exec failed\n"
msgstr ""
-#: rpm.c:1100 rpmqv.c:1484
+#: rpm.c:1100 rpmqv.c:1497
msgid "unexpected arguments to --querytags "
msgstr ""
-#: rpm.c:1111 rpmqv.c:1506
+#: rpm.c:1111 rpmqv.c:1521
msgid "no packages given for signature check"
msgstr ""
-#: rpm.c:1122 rpmqv.c:1517
+#: rpm.c:1122 rpmqv.c:1532
msgid "no packages given for signing"
msgstr ""
-#: rpm.c:1138 rpmqv.c:1380
+#: rpm.c:1138 rpmqv.c:1391
msgid "no packages given for uninstall"
msgstr ""
-#: rpm.c:1227 rpmqv.c:1409
+#: rpm.c:1227 rpmqv.c:1420
msgid "no packages given for install"
msgstr ""
-#: rpm.c:1251 rpmqv.c:1450
+#: rpm.c:1251 rpmqv.c:1463
msgid "extra arguments given for query of all packages"
msgstr ""
-#: rpm.c:1256 rpmqv.c:1455
+#: rpm.c:1256 rpmqv.c:1468
msgid "no arguments given for query"
msgstr ""
-#: rpm.c:1273 rpmqv.c:1472
+#: rpm.c:1273 rpmqv.c:1485
msgid "extra arguments given for verify of all packages"
msgstr ""
-#: rpm.c:1277 rpmqv.c:1476
+#: rpm.c:1277 rpmqv.c:1489
msgid "no arguments given for verify"
msgstr ""
msgid "<package>+"
msgstr ""
-#: rpmqv.c:244 rpmqv.c:599
+#: rpmqv.c:244 rpmqv.c:600
msgid "skip files with leading component <path> "
msgstr ""
msgid "Common options for all rpm modes:"
msgstr ""
-#: rpmqv.c:412
+#: rpmqv.c:413
#, c-format
msgid "Usage: %s {--help}\n"
msgstr ""
-#: rpmqv.c:483
+#: rpmqv.c:484
msgid " All modes support the following options:"
msgstr ""
-#: rpmqv.c:484
+#: rpmqv.c:485
msgid " --define '<name> <body>'"
msgstr ""
-#: rpmqv.c:486
+#: rpmqv.c:487
msgid " --eval '<expr>+' "
msgstr ""
-#: rpmqv.c:487
+#: rpmqv.c:488
msgid "print the expansion of macro <expr> to stdout"
msgstr ""
-#: rpmqv.c:488
+#: rpmqv.c:489
msgid " --pipe <cmd> "
msgstr ""
-#: rpmqv.c:490
+#: rpmqv.c:491
msgid " --rcfile <file:...> "
msgstr ""
-#: rpmqv.c:491
+#: rpmqv.c:492
msgid "use <file:...> instead of default list of macro files"
msgstr ""
-#: rpmqv.c:495
+#: rpmqv.c:496
msgid " --dbpath <dir> "
msgstr ""
-#: rpmqv.c:497
+#: rpmqv.c:498
msgid " --root <dir> "
msgstr ""
-#: rpmqv.c:507
+#: rpmqv.c:508
msgid ""
" Install, upgrade and query (with -p) modes allow URL's to be used in place"
msgstr ""
-#: rpmqv.c:508
+#: rpmqv.c:509
msgid " of file names as well as the following options:"
msgstr ""
-#: rpmqv.c:509
+#: rpmqv.c:510
msgid " --ftpproxy <host> "
msgstr ""
-#: rpmqv.c:511
+#: rpmqv.c:512
msgid " --ftpport <port> "
msgstr ""
-#: rpmqv.c:513
+#: rpmqv.c:514
msgid " --httpproxy <host> "
msgstr ""
-#: rpmqv.c:515
+#: rpmqv.c:516
msgid " --httpport <port> "
msgstr ""
-#: rpmqv.c:521
+#: rpmqv.c:522
msgid " Package specification options:"
msgstr ""
-#: lib/poptQV.c:68 rpmqv.c:523
+#: lib/poptQV.c:68 rpmqv.c:524
msgid "query/verify all packages"
msgstr ""
-#: rpmqv.c:524
+#: rpmqv.c:525
msgid " -f <file>+ "
msgstr ""
-#: rpmqv.c:525
+#: rpmqv.c:526
msgid "query/verify package owning <file>"
msgstr ""
-#: rpmqv.c:526
+#: rpmqv.c:527
msgid " -p <packagefile>+ "
msgstr ""
-#: rpmqv.c:527
+#: rpmqv.c:528
msgid "query/verify (uninstalled) package <packagefile>"
msgstr ""
-#: rpmqv.c:528
+#: rpmqv.c:529
msgid " --triggeredby <pkg> "
msgstr ""
-#: rpmqv.c:529
+#: rpmqv.c:530
msgid "query/verify packages triggered by <pkg>"
msgstr ""
-#: rpmqv.c:530
+#: rpmqv.c:531
msgid " --whatprovides <cap> "
msgstr ""
-#: rpmqv.c:531
+#: rpmqv.c:532
msgid "query/verify packages which provide <cap> capability"
msgstr ""
-#: rpmqv.c:532
+#: rpmqv.c:533
msgid " --whatrequires <cap> "
msgstr ""
-#: rpmqv.c:533
+#: rpmqv.c:534
msgid "query/verify packages which require <cap> capability"
msgstr ""
-#: rpmqv.c:537
+#: rpmqv.c:538
msgid " --queryformat <qfmt> "
msgstr ""
-#: rpmqv.c:540
+#: rpmqv.c:541
msgid " Information selection options:"
msgstr ""
-#: rpmqv.c:556
+#: rpmqv.c:557
msgid "list capabilities provided by package"
msgstr ""
-#: rpmqv.c:558
+#: rpmqv.c:559
msgid "list capabilities required by package"
msgstr ""
-#: rpmqv.c:560
+#: rpmqv.c:561
msgid "print the various [un]install scriptlets"
msgstr ""
-#: rpmqv.c:562
+#: rpmqv.c:563
msgid "show the trigger scriptlets contained in the package"
msgstr ""
-#: rpmqv.c:573
+#: rpmqv.c:574
msgid "do not execute scripts (if any)"
msgstr ""
-#: rpmqv.c:588
+#: rpmqv.c:589
msgid " --install <packagefile>"
msgstr ""
-#: rpmqv.c:589
+#: rpmqv.c:590
msgid " -i <packagefile> "
msgstr ""
-#: rpmqv.c:598
+#: rpmqv.c:599
msgid " --excludepath <path> "
msgstr ""
-#: rpmqv.c:619
+#: rpmqv.c:620
msgid "don't execute any installation scriptlets"
msgstr ""
-#: rpmqv.c:621
+#: rpmqv.c:622
msgid "don't execute any scriptlets triggered by this package"
msgstr ""
-#: rpmqv.c:624
+#: rpmqv.c:625
msgid " --prefix <dir> "
msgstr ""
-#: rpmqv.c:626
+#: rpmqv.c:627
msgid " --relocate <oldpath>=<newpath>"
msgstr ""
-#: rpmqv.c:635
+#: rpmqv.c:636
msgid " --upgrade <packagefile>"
msgstr ""
-#: rpmqv.c:636
+#: rpmqv.c:637
msgid " -U <packagefile> "
msgstr ""
-#: rpmqv.c:641
+#: rpmqv.c:642
msgid " --erase <package>"
msgstr ""
-#: rpmqv.c:642
+#: rpmqv.c:643
msgid " -e <package> "
msgstr ""
-#: rpmqv.c:660
+#: rpmqv.c:661
msgid " --resign <pkg>+ "
msgstr ""
-#: rpmqv.c:662
+#: rpmqv.c:663
msgid " --addsign <pkg>+ "
msgstr ""
-#: rpmqv.c:665
+#: rpmqv.c:666
msgid " --checksig <pkg>+"
msgstr ""
-#: rpmqv.c:666
+#: rpmqv.c:667
msgid " -K <pkg>+ "
msgstr ""
-#: rpmqv.c:679
+#: rpmqv.c:680
msgid "initalize database (unnecessary, legacy use)"
msgstr ""
-#: rpmqv.c:681
+#: rpmqv.c:682
msgid "rebuild database indices from existing database headers"
msgstr ""
-#: rpmqv.c:963
+#: rpmqv.c:964
msgid "Use \"--macros <file:...>\" instead.\n"
msgstr ""
-#: rpmqv.c:1037
+#: rpmqv.c:1038
msgid "--dbpath given for operation that does not use a database"
msgstr ""
-#: rpmqv.c:1121
+#: rpmqv.c:1122
msgid ""
"script disabling options may only be specified during package installation "
"and erasure"
msgstr ""
-#: rpmqv.c:1280
+#: rpmqv.c:1289
msgid "no packages files given for rebuild"
msgstr ""
-#: rpmqv.c:1349
+#: rpmqv.c:1358
msgid "no spec files given for build"
msgstr ""
-#: rpmqv.c:1351
+#: rpmqv.c:1360
msgid "no tar files given for build"
msgstr ""
-#: build/build.c:117 build/pack.c:389
+#: build/build.c:117 build/pack.c:390
msgid "Unable to open temp file.\n"
msgstr ""
"RPM build errors:\n"
msgstr ""
-#: build/expression.c:215
+#: build/expression.c:216
msgid "syntax error while parsing ==\n"
msgstr ""
-#: build/expression.c:245
+#: build/expression.c:246
msgid "syntax error while parsing &&\n"
msgstr ""
-#: build/expression.c:254
+#: build/expression.c:255
msgid "syntax error while parsing ||\n"
msgstr ""
-#: build/expression.c:294
+#: build/expression.c:295
msgid "parse error in expression\n"
msgstr ""
-#: build/expression.c:326
+#: build/expression.c:327
msgid "unmatched (\n"
msgstr ""
-#: build/expression.c:356
+#: build/expression.c:357
msgid "- only on numbers\n"
msgstr ""
-#: build/expression.c:372
+#: build/expression.c:373
msgid "! only on numbers\n"
msgstr ""
-#: build/expression.c:414 build/expression.c:462 build/expression.c:520
-#: build/expression.c:612
+#: build/expression.c:415 build/expression.c:463 build/expression.c:521
+#: build/expression.c:613
msgid "types must match\n"
msgstr ""
-#: build/expression.c:427
+#: build/expression.c:428
msgid "* / not suported for strings\n"
msgstr ""
-#: build/expression.c:478
+#: build/expression.c:479
msgid "- not suported for strings\n"
msgstr ""
-#: build/expression.c:625
+#: build/expression.c:626
msgid "&& and || not suported for strings\n"
msgstr ""
-#: build/expression.c:658 build/expression.c:705
+#: build/expression.c:659 build/expression.c:706
msgid "syntax error in expression\n"
msgstr ""
-#: build/files.c:249
+#: build/files.c:255
#, c-format
msgid "TIMECHECK failure: %s\n"
msgstr ""
-#: build/files.c:303 build/files.c:392 build/files.c:570
+#: build/files.c:308 build/files.c:398 build/files.c:576
#, c-format
msgid "Missing '(' in %s %s\n"
msgstr ""
-#: build/files.c:314 build/files.c:515 build/files.c:581
+#: build/files.c:319 build/files.c:521 build/files.c:587
#, c-format
msgid "Missing ')' in %s(%s\n"
msgstr ""
-#: build/files.c:352 build/files.c:540
+#: build/files.c:357 build/files.c:546
#, c-format
msgid "Invalid %s token: %s\n"
msgstr ""
-#: build/files.c:408
+#: build/files.c:414
#, c-format
msgid "Non-white space follows %s(): %s\n"
msgstr ""
-#: build/files.c:446
+#: build/files.c:452
#, c-format
msgid "Bad syntax: %s(%s)\n"
msgstr ""
-#: build/files.c:456
+#: build/files.c:462
#, c-format
msgid "Bad mode spec: %s(%s)\n"
msgstr ""
-#: build/files.c:468
+#: build/files.c:474
#, c-format
msgid "Bad dirmode spec: %s(%s)\n"
msgstr ""
-#: build/files.c:608
+#: build/files.c:614
msgid "Unusual locale length: \"%.*s\" in %%lang(%s)\n"
msgstr ""
-#: build/files.c:618
+#: build/files.c:624
msgid "Duplicate locale %.*s in %%lang(%s)\n"
msgstr ""
-#: build/files.c:756
+#: build/files.c:763
msgid "Hit limit for %%docdir\n"
msgstr ""
-#: build/files.c:762
+#: build/files.c:769
msgid "Only one arg for %%docdir\n"
msgstr ""
#. We already got a file -- error
-#: build/files.c:790
+#: build/files.c:797
#, c-format
msgid "Two files on one line: %s\n"
msgstr ""
-#: build/files.c:804
+#: build/files.c:811
#, c-format
msgid "File must begin with \"/\": %s\n"
msgstr ""
-#: build/files.c:816
+#: build/files.c:823
msgid "Can't mix special %%doc with other forms: %s\n"
msgstr ""
-#: build/files.c:983
+#: build/files.c:990
#, c-format
msgid "File listed twice: %s\n"
msgstr ""
-#: build/files.c:1125
+#: build/files.c:1132
#, c-format
msgid "Symlink points to BuildRoot: %s -> %s\n"
msgstr ""
-#: build/files.c:1312
+#: build/files.c:1316
#, c-format
msgid "File doesn't match prefix (%s): %s\n"
msgstr ""
-#: build/files.c:1322
+#: build/files.c:1326
#, c-format
msgid "File not found: %s\n"
msgstr ""
-#: build/files.c:1365 build/files.c:1892 build/parsePrep.c:44
+#: build/files.c:1369 build/files.c:1896 build/parsePrep.c:44
#, c-format
msgid "Bad owner/group: %s\n"
msgstr ""
-#: build/files.c:1377
+#: build/files.c:1381
#, c-format
msgid "File %4d: %07o %s.%s\t %s\n"
msgstr ""
-#: build/files.c:1455
+#: build/files.c:1459
#, c-format
msgid "File needs leading \"/\": %s\n"
msgstr ""
-#: build/files.c:1485
+#: build/files.c:1489
#, c-format
msgid "File not found by glob: %s\n"
msgstr ""
-#: build/files.c:1539
+#: build/files.c:1545
msgid "Could not open %%files file %s: %s\n"
msgstr ""
-#: build/files.c:1548 build/pack.c:122
+#: build/files.c:1555 build/pack.c:122
#, c-format
msgid "line: %s\n"
msgstr ""
-#: build/files.c:1880
+#: build/files.c:1884
#, c-format
msgid "Bad file: %s: %s\n"
msgstr ""
#. XXX this error message is probably not seen.
-#: build/files.c:1948
+#: build/files.c:1952
#, c-format
msgid "Couldn't exec %s: %s\n"
msgstr ""
-#: build/files.c:1953
+#: build/files.c:1957
#, c-format
msgid "Couldn't fork %s: %s\n"
msgstr ""
-#: build/files.c:2035
+#: build/files.c:2039
#, c-format
msgid "%s failed\n"
msgstr ""
-#: build/files.c:2039
+#: build/files.c:2043
#, c-format
msgid "failed to write all data to %s\n"
msgstr ""
-#: build/files.c:2166
+#: build/files.c:2170
#, c-format
msgid "Finding %s: (using %s)...\n"
msgstr ""
msgid "Failed to find %s:\n"
msgstr ""
-#: build/files.c:2321
+#: build/files.c:2325
#, c-format
msgid "Processing files: %s-%s-%s\n"
msgstr ""
-#: build/names.c:42
+#: build/names.c:41
msgid "getUname: too many uid's\n"
msgstr ""
-#: build/names.c:68
+#: build/names.c:62
msgid "getUnameS: too many uid's\n"
msgstr ""
-#: build/names.c:95
+#: build/names.c:83
msgid "getGname: too many gid's\n"
msgstr ""
-#: build/names.c:121
+#: build/names.c:104
msgid "getGnameS: too many gid's\n"
msgstr ""
-#: build/names.c:155
+#: build/names.c:134
#, c-format
msgid "Could not canonicalize hostname: %s\n"
msgstr ""
-#: build/pack.c:66
+#: build/pack.c:67
#, c-format
msgid "create archive failed on file %s: %s\n"
msgstr ""
msgid "cpio_copy read failed: %s\n"
msgstr ""
-#: build/pack.c:179
+#: build/pack.c:180
#, c-format
msgid "Could not open PreIn file: %s\n"
msgstr ""
-#: build/pack.c:186
+#: build/pack.c:187
#, c-format
msgid "Could not open PreUn file: %s\n"
msgstr ""
-#: build/pack.c:193
+#: build/pack.c:194
#, c-format
msgid "Could not open PostIn file: %s\n"
msgstr ""
-#: build/pack.c:200
+#: build/pack.c:201
#, c-format
msgid "Could not open PostUn file: %s\n"
msgstr ""
-#: build/pack.c:208
+#: build/pack.c:209
#, c-format
msgid "Could not open VerifyScript file: %s\n"
msgstr ""
-#: build/pack.c:223
+#: build/pack.c:224
#, c-format
msgid "Could not open Trigger script file: %s\n"
msgstr ""
-#: build/pack.c:249
+#: build/pack.c:250
#, c-format
msgid "readRPM: open %s: %s\n"
msgstr ""
-#: build/pack.c:259
+#: build/pack.c:260
#, c-format
msgid "readRPM: read %s: %s\n"
msgstr ""
-#: build/pack.c:280
+#: build/pack.c:281
#, c-format
msgid "readRPM: %s is not an RPM package\n"
msgstr ""
-#: build/pack.c:289
+#: build/pack.c:290
#, c-format
msgid "readRPM: reading header from %s\n"
msgstr ""
-#: build/pack.c:401
+#: build/pack.c:402
msgid "Bad CSA data\n"
msgstr ""
-#: build/pack.c:442
+#: build/pack.c:444
#, c-format
msgid "Generating signature: %d\n"
msgstr ""
-#: build/pack.c:452
+#: build/pack.c:454
#, c-format
msgid "Could not open %s: %s\n"
msgstr ""
-#: build/pack.c:489 lib/psm.c:1448
+#: build/pack.c:491 lib/psm.c:1449
#, c-format
msgid "Unable to write package: %s\n"
msgstr ""
-#: build/pack.c:504
+#: build/pack.c:506
#, c-format
msgid "Unable to open sigtarget %s: %s\n"
msgstr ""
-#: build/pack.c:514
+#: build/pack.c:516
#, c-format
msgid "Unable to read header from %s: %s\n"
msgstr ""
-#: build/pack.c:528
+#: build/pack.c:530
#, c-format
msgid "Unable to write header to %s: %s\n"
msgstr ""
-#: build/pack.c:538
+#: build/pack.c:540
#, c-format
msgid "Unable to read payload from %s: %s\n"
msgstr ""
-#: build/pack.c:544
+#: build/pack.c:546
#, c-format
msgid "Unable to write payload to %s: %s\n"
msgstr ""
-#: build/pack.c:571 lib/psm.c:1684
+#: build/pack.c:573 lib/psm.c:1686
#, c-format
msgid "Wrote: %s\n"
msgstr ""
-#: build/pack.c:636
+#: build/pack.c:638
#, c-format
msgid "Could not generate output filename for package %s: %s\n"
msgstr ""
-#: build/pack.c:653
+#: build/pack.c:655
#, c-format
msgid "cannot create %s: %s\n"
msgstr ""
msgid "line %d: Second %%files list\n"
msgstr ""
-#: build/parsePreamble.c:213
+#: build/parsePreamble.c:216
#, c-format
msgid "Architecture is excluded: %s\n"
msgstr ""
-#: build/parsePreamble.c:218
+#: build/parsePreamble.c:221
#, c-format
msgid "Architecture is not included: %s\n"
msgstr ""
-#: build/parsePreamble.c:223
+#: build/parsePreamble.c:226
#, c-format
msgid "OS is excluded: %s\n"
msgstr ""
-#: build/parsePreamble.c:228
+#: build/parsePreamble.c:231
#, c-format
msgid "OS is not included: %s\n"
msgstr ""
-#: build/parsePreamble.c:245
+#: build/parsePreamble.c:248
#, c-format
msgid "%s field must be present in package: %s\n"
msgstr ""
-#: build/parsePreamble.c:272
+#: build/parsePreamble.c:275
#, c-format
msgid "Duplicate %s entries in package: %s\n"
msgstr ""
-#: build/parsePreamble.c:326
+#: build/parsePreamble.c:329
#, c-format
msgid "Unable to open icon %s: %s\n"
msgstr ""
-#: build/parsePreamble.c:344
+#: build/parsePreamble.c:347
#, c-format
msgid "Unable to read icon %s: %s\n"
msgstr ""
-#: build/parsePreamble.c:357
+#: build/parsePreamble.c:360
#, c-format
msgid "Unknown icon type: %s\n"
msgstr ""
-#: build/parsePreamble.c:424
+#: build/parsePreamble.c:431
#, c-format
msgid "line %d: Malformed tag: %s\n"
msgstr ""
#. Empty field
-#: build/parsePreamble.c:432
+#: build/parsePreamble.c:439
#, c-format
msgid "line %d: Empty tag: %s\n"
msgstr ""
-#: build/parsePreamble.c:454 build/parsePreamble.c:461
+#: build/parsePreamble.c:461 build/parsePreamble.c:468
#, c-format
msgid "line %d: Illegal char '-' in %s: %s\n"
msgstr ""
-#: build/parsePreamble.c:518 build/parseSpec.c:388
+#: build/parsePreamble.c:525 build/parseSpec.c:388
#, c-format
msgid "BuildRoot can not be \"/\": %s\n"
msgstr ""
-#: build/parsePreamble.c:531
+#: build/parsePreamble.c:538
#, c-format
msgid "line %d: Prefixes must not end with \"/\": %s\n"
msgstr ""
-#: build/parsePreamble.c:543
+#: build/parsePreamble.c:550
#, c-format
msgid "line %d: Docdir must begin with '/': %s\n"
msgstr ""
-#: build/parsePreamble.c:555
+#: build/parsePreamble.c:562
#, c-format
msgid "line %d: Epoch/Serial field must be a number: %s\n"
msgstr ""
-#: build/parsePreamble.c:595 build/parsePreamble.c:606
+#: build/parsePreamble.c:602 build/parsePreamble.c:613
#, c-format
msgid "line %d: Bad %s: qualifiers: %s\n"
msgstr ""
-#: build/parsePreamble.c:632
+#: build/parsePreamble.c:639
#, c-format
msgid "line %d: Bad BuildArchitecture format: %s\n"
msgstr ""
-#: build/parsePreamble.c:641
+#: build/parsePreamble.c:648
#, c-format
msgid "Internal error: Bogus tag %d\n"
msgstr ""
-#: build/parsePreamble.c:785
+#: build/parsePreamble.c:792
#, c-format
msgid "Bad package specification: %s\n"
msgstr ""
-#: build/parsePreamble.c:791
+#: build/parsePreamble.c:798
#, c-format
msgid "Package already exists: %s\n"
msgstr ""
-#: build/parsePreamble.c:817
+#: build/parsePreamble.c:824
#, c-format
msgid "line %d: Unknown tag: %s\n"
msgstr ""
-#: build/parsePreamble.c:839
+#: build/parsePreamble.c:846
msgid "Spec file can't use BuildRoot\n"
msgstr ""
msgid "No patch number %d\n"
msgstr ""
-#: build/parsePrep.c:167
+#: build/parsePrep.c:168
#, c-format
msgid "No source number %d\n"
msgstr ""
-#: build/parsePrep.c:187
+#: build/parsePrep.c:188
#, c-format
msgid "Couldn't download nosource %s: %s\n"
msgstr ""
-#: build/parsePrep.c:281
+#: build/parsePrep.c:283
msgid "Error parsing %%setup: %s\n"
msgstr ""
-#: build/parsePrep.c:296
+#: build/parsePrep.c:298
msgid "line %d: Bad arg to %%setup %c: %s\n"
msgstr ""
-#: build/parsePrep.c:314
+#: build/parsePrep.c:316
msgid "line %d: Bad %%setup option %s: %s\n"
msgstr ""
-#: build/parsePrep.c:448
+#: build/parsePrep.c:450
msgid "line %d: Need arg to %%patch -b: %s\n"
msgstr ""
-#: build/parsePrep.c:457
+#: build/parsePrep.c:459
msgid "line %d: Need arg to %%patch -z: %s\n"
msgstr ""
-#: build/parsePrep.c:469
+#: build/parsePrep.c:471
msgid "line %d: Need arg to %%patch -p: %s\n"
msgstr ""
-#: build/parsePrep.c:476
+#: build/parsePrep.c:478
msgid "line %d: Bad arg to %%patch -p: %s\n"
msgstr ""
-#: build/parsePrep.c:483
+#: build/parsePrep.c:485
msgid "Too many patches!\n"
msgstr ""
-#: build/parsePrep.c:487
+#: build/parsePrep.c:489
msgid "line %d: Bad arg to %%patch: %s\n"
msgstr ""
msgid "line %d: Bad %s number: %s\n"
msgstr ""
-#: lib/cpio.c:195
+#: lib/cpio.c:185
#, c-format
msgid "(error 0x%x)"
msgstr ""
-#: lib/cpio.c:198
+#: lib/cpio.c:188
msgid "Bad magic"
msgstr ""
-#: lib/cpio.c:199
+#: lib/cpio.c:189
msgid "Bad/unreadable header"
msgstr ""
-#: lib/cpio.c:220
+#: lib/cpio.c:210
msgid "Header size too big"
msgstr ""
-#: lib/cpio.c:221
+#: lib/cpio.c:211
msgid "Unknown file type"
msgstr ""
-#: lib/cpio.c:222
+#: lib/cpio.c:212
msgid "Missing hard link"
msgstr ""
-#: lib/cpio.c:223
+#: lib/cpio.c:213
msgid "MD5 sum mismatch"
msgstr ""
-#: lib/cpio.c:224
+#: lib/cpio.c:214
msgid "Internal error"
msgstr ""
-#: lib/cpio.c:233
+#: lib/cpio.c:223
msgid " failed - "
msgstr ""
-#: lib/db1.c:92 lib/db2.c:117 lib/db3.c:102
+#: lib/db1.c:99 lib/db2.c:117 lib/db3.c:102
#, c-format
msgid "db%d error(%d) from %s: %s\n"
msgstr ""
-#: lib/db1.c:95 lib/db2.c:120 lib/db3.c:105
+#: lib/db1.c:102 lib/db2.c:120 lib/db3.c:105
#, c-format
msgid "db%d error(%d): %s\n"
msgstr ""
-#: lib/db1.c:387
+#: lib/db1.c:414
#, c-format
msgid "closed db file %s\n"
msgstr ""
-#: lib/db1.c:390
+#: lib/db1.c:417
#, c-format
msgid "removed db file %s\n"
msgstr ""
-#: lib/db1.c:421
+#: lib/db1.c:448
#, c-format
msgid "bad db file %s\n"
msgstr ""
-#: lib/db1.c:426
+#: lib/db1.c:453
#, c-format
msgid "opening db file %s mode 0x%x\n"
msgstr ""
#. XXX check errno validity
-#: lib/db1.c:449
+#: lib/db1.c:476
#, c-format
msgid "cannot get %s lock on database\n"
msgstr ""
-#: lib/db1.c:450 lib/db2.c:786 lib/db3.c:771
+#: lib/db1.c:477 lib/db2.c:787 lib/db3.c:778
msgid "exclusive"
msgstr ""
-#: lib/db1.c:450 lib/db2.c:786 lib/db3.c:771
+#: lib/db1.c:477 lib/db2.c:787 lib/db3.c:778
msgid "shared"
msgstr ""
msgid "opening db environment %s/%s %s\n"
msgstr ""
-#: lib/db2.c:588 lib/db3.c:569
+#: lib/db2.c:588 lib/db3.c:575
#, c-format
msgid "closed db index %s/%s\n"
msgstr ""
-#: lib/db2.c:678 lib/db3.c:659
+#: lib/db2.c:679 lib/db3.c:666
#, c-format
msgid "opening db index %s/%s %s mode=0x%x\n"
msgstr ""
-#: lib/db2.c:784 lib/db3.c:769
+#: lib/db2.c:785 lib/db3.c:776
#, c-format
msgid "cannot get %s lock on %s/%s\n"
msgstr ""
-#: lib/db2.c:791 lib/db3.c:776
+#: lib/db2.c:792 lib/db3.c:783
#, c-format
msgid "locked db index %s/%s\n"
msgstr ""
msgstr ""
#. XXX legacy epoch-less requires/conflicts compatibility
-#: lib/depends.c:571
+#: lib/depends.c:563
#, c-format
msgid ""
"the \"B\" dependency needs an epoch (assuming same as \"A\")\n"
"\tA %s\tB %s\n"
msgstr ""
-#: lib/depends.c:600
+#: lib/depends.c:592
#, c-format
msgid " %s A %s\tB %s\n"
msgstr ""
-#: lib/depends.c:601 lib/depends.c:1072 lib/depends.c:1193
+#: lib/depends.c:593 lib/depends.c:1065 lib/depends.c:1188
msgid "YES"
msgstr ""
-#: lib/depends.c:601 lib/depends.c:1072 lib/depends.c:1193
+#: lib/depends.c:593 lib/depends.c:1065 lib/depends.c:1188
msgid "NO "
msgstr ""
-#: lib/depends.c:960
+#: lib/depends.c:953
#, c-format
msgid "%s: %-45s YES (added files)\n"
msgstr ""
-#: lib/depends.c:1019
+#: lib/depends.c:1012
#, c-format
msgid "%s: %-45s YES (added provide)\n"
msgstr ""
-#: lib/depends.c:1071
+#: lib/depends.c:1064
#, c-format
msgid "%s: %-45s %-s (cached)\n"
msgstr ""
-#: lib/depends.c:1090
+#: lib/depends.c:1083
#, c-format
msgid "%s: %-45s YES (rpmrc provides)\n"
msgstr ""
-#: lib/depends.c:1107
+#: lib/depends.c:1100
#, c-format
msgid "%s: %-45s YES (rpmlib provides)\n"
msgstr ""
-#: lib/depends.c:1129
+#: lib/depends.c:1122
#, c-format
msgid "%s: %-45s YES (db files)\n"
msgstr ""
-#: lib/depends.c:1142
+#: lib/depends.c:1135
#, c-format
msgid "%s: %-45s YES (db provides)\n"
msgstr ""
-#: lib/depends.c:1156
+#: lib/depends.c:1149
#, c-format
msgid "%s: %-45s YES (db package)\n"
msgstr ""
-#: lib/depends.c:1172
+#: lib/depends.c:1167
#, c-format
msgid "%s: %-45s NO\n"
msgstr ""
-#: lib/depends.c:1193
+#: lib/depends.c:1188
#, c-format
msgid "%s: (%s, %s) added to Depends cache.\n"
msgstr ""
#. requirements are not satisfied.
-#: lib/depends.c:1255
+#: lib/depends.c:1249
#, c-format
msgid "package %s-%s-%s require not satisfied: %s\n"
msgstr ""
#. conflicts exist.
-#: lib/depends.c:1322
+#: lib/depends.c:1317
#, c-format
msgid "package %s conflicts: %s\n"
msgstr ""
-#: lib/depends.c:1536
+#: lib/depends.c:1532
#, c-format
msgid "removing %s-%s-%s \"%s\" from tsort relations.\n"
msgstr ""
#. Record all relations.
-#: lib/depends.c:1679
+#: lib/depends.c:1675
msgid "========== recording tsort relations\n"
msgstr ""
#. T4. Scan for zeroes.
-#: lib/depends.c:1731
+#: lib/depends.c:1727
msgid ""
"========== tsorting packages (order, #predecessors, #succesors, depth)\n"
msgstr ""
-#: lib/depends.c:1778
+#: lib/depends.c:1776
msgid "========== successors only (presentation order)\n"
msgstr ""
-#: lib/depends.c:1827
+#: lib/depends.c:1825
msgid "LOOP:\n"
msgstr ""
-#: lib/depends.c:1855
+#: lib/depends.c:1853
msgid "========== continuing tsort ...\n"
msgstr ""
-#: lib/falloc.c:141
+#: lib/falloc.c:144
#, c-format
msgid ""
"free list corrupt (%u)- please run\n"
msgstr ""
#: lib/formats.c:28 lib/formats.c:54 lib/formats.c:83 lib/formats.c:124
-#: lib/header.c:2625 lib/header.c:2642 lib/header.c:2662
+#: lib/header.c:2645 lib/header.c:2662 lib/header.c:2682
msgid "(not a number)"
msgstr ""
-#: lib/fs.c:69
+#: lib/fs.c:70
#, c-format
msgid "mntctl() failed to return size: %s\n"
msgstr ""
-#: lib/fs.c:84
+#: lib/fs.c:85
#, c-format
msgid "mntctl() failed to return mount points: %s\n"
msgstr ""
-#: lib/fs.c:104 lib/fs.c:184 lib/fs.c:287
+#: lib/fs.c:105 lib/fs.c:187 lib/fs.c:290
#, c-format
msgid "failed to stat %s: %s\n"
msgstr ""
-#: lib/fs.c:147
+#: lib/fs.c:148
msgid "getting list of mounted filesystems\n"
msgstr ""
-#: lib/fs.c:152 rpmio/url.c:452
+#: lib/fs.c:153 rpmio/url.c:457
#, c-format
msgid "failed to open %s: %s\n"
msgstr ""
-#: lib/fs.c:309
+#: lib/fs.c:312
#, c-format
msgid "file %s is on an unknown device\n"
msgstr ""
-#: lib/fsm.c:272
+#: lib/fsm.c:266
msgid "========= Directories not explictly included in package:\n"
msgstr ""
-#: lib/fsm.c:274
+#: lib/fsm.c:268
#, c-format
msgid "%9d %s\n"
msgstr ""
-#: lib/fsm.c:1044
+#: lib/fsm.c:1052
#, c-format
msgid "%s directory created with perms %04o.\n"
msgstr ""
-#: lib/fsm.c:1346 lib/fsm.c:1463
+#: lib/fsm.c:1359 lib/fsm.c:1480
#, c-format
msgid "%s saved as %s\n"
msgstr ""
-#: lib/fsm.c:1488
+#: lib/fsm.c:1506
#, c-format
msgid "%s rmdir of %s failed: Directory not empty\n"
msgstr ""
-#: lib/fsm.c:1493
+#: lib/fsm.c:1512
#, c-format
msgid "%s rmdir of %s failed: %s\n"
msgstr ""
-#: lib/fsm.c:1502
+#: lib/fsm.c:1522
#, c-format
msgid "%s unlink of %s failed: %s\n"
msgstr ""
-#: lib/fsm.c:1519
+#: lib/fsm.c:1541
#, c-format
msgid "%s created as %s\n"
msgstr ""
#. This should not be allowed
-#: lib/header.c:172
+#: lib/header.c:173
msgid "dataLength() RPM_STRING_TYPE count must be 1.\n"
msgstr ""
-#: lib/header.c:207 lib/header.c:1110 lib/psm.c:378
+#: lib/header.c:208 lib/header.c:1115 lib/psm.c:368
#, c-format
msgid "Data type %d not supported\n"
msgstr ""
-#: lib/header.c:1533
+#: lib/header.c:1540
#, c-format
msgid "Bad count for headerAddEntry(): %d\n"
msgstr ""
#. @-observertrans@
-#: lib/header.c:1978
+#: lib/header.c:1993
#, c-format
msgid "missing { after %"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2008
+#: lib/header.c:2023
msgid "missing } after %{"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2022
+#: lib/header.c:2037
msgid "empty tag format"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2034
+#: lib/header.c:2049
msgid "empty tag name"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2051
+#: lib/header.c:2066
msgid "unknown tag"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2078
+#: lib/header.c:2093
msgid "] expected at end of array"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2096
+#: lib/header.c:2111
msgid "unexpected ]"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2100
+#: lib/header.c:2115
msgid "unexpected }"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2160
+#: lib/header.c:2177
msgid "? expected in expression"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2169
+#: lib/header.c:2186
msgid "{ expected after ? in expression"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2182 lib/header.c:2223
+#: lib/header.c:2199 lib/header.c:2241
msgid "} expected in expression"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2192
+#: lib/header.c:2209
msgid ": expected following ? subexpression"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2208
+#: lib/header.c:2226
msgid "{ expected after : in expression"
msgstr ""
#. @-observertrans@
-#: lib/header.c:2233
+#: lib/header.c:2251
msgid "| expected at end of expression"
msgstr ""
-#: lib/header.c:2404
+#: lib/header.c:2422
msgid "(unknown type)"
msgstr ""
-#: lib/misc.c:338 lib/misc.c:343 lib/misc.c:349
+#: lib/misc.c:330 lib/misc.c:335 lib/misc.c:341
#, c-format
msgid "error creating temporary file %s\n"
msgstr ""
-#: lib/package.c:119
+#: lib/package.c:122
msgid "packaging version 1 is not supported by this version of RPM\n"
msgstr ""
-#: lib/package.c:181
+#: lib/package.c:184
msgid ""
"only packaging with major numbers <= 4 is supported by this version of RPM\n"
msgstr ""
msgid " conflicts with %s-%s-%s\n"
msgstr ""
-#: lib/problems.c:118
+#: lib/problems.c:119
#, c-format
msgid "package %s is for a different architecture"
msgstr ""
-#: lib/problems.c:122
+#: lib/problems.c:124
#, c-format
msgid "package %s is for a different operating system"
msgstr ""
-#: lib/problems.c:126
+#: lib/problems.c:129
#, c-format
msgid "package %s is already installed"
msgstr ""
-#: lib/problems.c:130
+#: lib/problems.c:134
#, c-format
msgid "path %s in package %s is not relocateable"
msgstr ""
-#: lib/problems.c:135
+#: lib/problems.c:139
#, c-format
msgid "file %s conflicts between attempted installs of %s and %s"
msgstr ""
-#: lib/problems.c:140
+#: lib/problems.c:144
#, c-format
msgid "file %s from install of %s conflicts with file from package %s"
msgstr ""
-#: lib/problems.c:145
+#: lib/problems.c:149
#, c-format
msgid "package %s (which is newer than %s) is already installed"
msgstr ""
-#: lib/problems.c:150
+#: lib/problems.c:154
#, c-format
msgid "installing package %s needs %ld%cb on the %s filesystem"
msgstr ""
-#: lib/problems.c:160
+#: lib/problems.c:164
#, c-format
msgid "installing package %s needs %ld inodes on the %s filesystem"
msgstr ""
-#: lib/problems.c:165
+#: lib/problems.c:169
#, c-format
msgid "package %s pre-transaction syscall(s): %s failed: %s"
msgstr ""
-#: lib/problems.c:172
+#: lib/problems.c:176
#, c-format
msgid "unknown error %d encountered while manipulating package %s"
msgstr ""
-#: lib/psm.c:565
+#: lib/psm.c:555
#, c-format
msgid "cannot create %s %s\n"
msgstr ""
-#: lib/psm.c:571
+#: lib/psm.c:561
#, c-format
msgid "cannot write to %s\n"
msgstr ""
-#: lib/psm.c:605
+#: lib/psm.c:598
msgid "source package expected, binary found\n"
msgstr ""
-#: lib/psm.c:707
+#: lib/psm.c:702
msgid "source package contains no .spec file\n"
msgstr ""
-#: lib/psm.c:955
+#: lib/psm.c:951
#, c-format
msgid "execution of %s scriptlet from %s-%s-%s failed, waitpid returned %s\n"
msgstr ""
-#: lib/psm.c:962
+#: lib/psm.c:958
#, c-format
msgid "execution of %s scriptlet from %s-%s-%s failed, exit status %d\n"
msgstr ""
msgid "%s: %s-%s-%s has %d files, test = %d\n"
msgstr ""
-#: lib/psm.c:1379
+#: lib/psm.c:1380
#, c-format
msgid "%s: %s scriptlet failed (%d), skipping %s-%s-%s\n"
msgstr ""
-#: lib/psm.c:1485
+#: lib/psm.c:1486
#, c-format
msgid "user %s does not exist - using root\n"
msgstr ""
-#: lib/psm.c:1494
+#: lib/psm.c:1495
#, c-format
msgid "group %s does not exist - using root\n"
msgstr ""
-#: lib/psm.c:1523
+#: lib/psm.c:1524
#, c-format
msgid "unpacking of archive failed%s%s: %s\n"
msgstr ""
-#: lib/psm.c:1524
+#: lib/psm.c:1525
msgid " on file "
msgstr ""
-#: lib/psm.c:1775
+#: lib/psm.c:1777
#, c-format
msgid "%s: running %s script(s) (if any)\n"
msgstr ""
-#: lib/query.c:121
+#: lib/query.c:113
#, c-format
msgid "incorrect format: %s\n"
msgstr ""
-#: lib/query.c:205
+#: lib/query.c:201
msgid "(contains no files)"
msgstr ""
-#: lib/query.c:256
+#: lib/query.c:249
msgid "normal "
msgstr ""
-#: lib/query.c:258
+#: lib/query.c:251
msgid "replaced "
msgstr ""
-#: lib/query.c:260
+#: lib/query.c:253
msgid "not installed "
msgstr ""
-#: lib/query.c:262
+#: lib/query.c:255
msgid "net shared "
msgstr ""
-#: lib/query.c:264
+#: lib/query.c:257
#, c-format
msgid "(unknown %3d) "
msgstr ""
-#: lib/query.c:269
+#: lib/query.c:262
msgid "(no state) "
msgstr ""
-#: lib/query.c:288 lib/query.c:333
+#: lib/query.c:281 lib/query.c:326
msgid "package has neither file owner or id lists\n"
msgstr ""
-#: lib/query.c:392
+#: lib/query.c:385
#, c-format
msgid "can't query %s: %s\n"
msgstr ""
-#: lib/query.c:514 lib/query.c:546 lib/rpminstall.c:319 lib/rpminstall.c:448
+#: lib/query.c:511 lib/query.c:543 lib/rpminstall.c:313 lib/rpminstall.c:444
#, c-format
msgid "open of %s failed: %s\n"
msgstr ""
-#: lib/query.c:525
+#: lib/query.c:522
#, c-format
msgid "query of %s failed\n"
msgstr ""
-#: lib/query.c:531
+#: lib/query.c:528
msgid "old format source packages cannot be queried\n"
msgstr ""
-#: lib/query.c:556 lib/rpminstall.c:458
+#: lib/query.c:553 lib/rpminstall.c:454
#, c-format
msgid "%s: read manifest failed: %s\n"
msgstr ""
-#: lib/query.c:599
+#: lib/query.c:596
#, c-format
msgid "query of specfile %s failed, can't parse\n"
msgstr ""
-#: lib/query.c:622
+#: lib/query.c:619
msgid "no packages\n"
msgstr ""
-#: lib/query.c:633
+#: lib/query.c:630
#, c-format
msgid "group %s does not contain any packages\n"
msgstr ""
-#: lib/query.c:643
+#: lib/query.c:640
#, c-format
msgid "no package triggers %s\n"
msgstr ""
-#: lib/query.c:653
+#: lib/query.c:650
#, c-format
msgid "no package requires %s\n"
msgstr ""
-#: lib/query.c:664
+#: lib/query.c:661
#, c-format
msgid "no package provides %s\n"
msgstr ""
-#: lib/query.c:695
+#: lib/query.c:692
#, c-format
msgid "file %s: %s\n"
msgstr ""
-#: lib/query.c:699
+#: lib/query.c:696
#, c-format
msgid "file %s is not owned by any package\n"
msgstr ""
-#: lib/query.c:725
+#: lib/query.c:722
#, c-format
msgid "invalid package number: %s\n"
msgstr ""
-#: lib/query.c:728
+#: lib/query.c:725
#, c-format
msgid "package record number: %u\n"
msgstr ""
-#: lib/query.c:733
+#: lib/query.c:730
#, c-format
-msgid "record %d could not be read\n"
+msgid "record %u could not be read\n"
msgstr ""
-#: lib/query.c:744 lib/rpminstall.c:593
+#: lib/query.c:741 lib/rpminstall.c:589
#, c-format
msgid "package %s is not installed\n"
msgstr ""
-#: lib/rpmchecksig.c:38
+#: lib/rpmchecksig.c:39
#, c-format
msgid "%s: open failed: %s\n"
msgstr ""
-#: lib/rpmchecksig.c:49
+#: lib/rpmchecksig.c:51
msgid "makeTempFile failed\n"
msgstr ""
-#: lib/rpmchecksig.c:81
+#: lib/rpmchecksig.c:84
#, c-format
msgid "%s: Fwrite failed: %s\n"
msgstr ""
-#: lib/rpmchecksig.c:87
+#: lib/rpmchecksig.c:90
#, c-format
msgid "%s: Fread failed: %s\n"
msgstr ""
-#: lib/rpmchecksig.c:121 lib/rpmchecksig.c:253
+#: lib/rpmchecksig.c:125 lib/rpmchecksig.c:258
#, c-format
msgid "%s: readLead failed\n"
msgstr ""
-#: lib/rpmchecksig.c:126
+#: lib/rpmchecksig.c:130
#, c-format
msgid "%s: Can't sign v1.0 RPM\n"
msgstr ""
-#: lib/rpmchecksig.c:130
+#: lib/rpmchecksig.c:134
#, c-format
msgid "%s: Can't re-sign v2.0 RPM\n"
msgstr ""
-#: lib/rpmchecksig.c:139 lib/rpmchecksig.c:269
+#: lib/rpmchecksig.c:143 lib/rpmchecksig.c:274
#, c-format
msgid "%s: rpmReadSignature failed\n"
msgstr ""
-#: lib/rpmchecksig.c:143 lib/rpmchecksig.c:274
+#: lib/rpmchecksig.c:147 lib/rpmchecksig.c:279
#, c-format
msgid "%s: No signature available\n"
msgstr ""
-#: lib/rpmchecksig.c:176
+#: lib/rpmchecksig.c:180
#, c-format
msgid "%s: writeLead failed: %s\n"
msgstr ""
-#: lib/rpmchecksig.c:182
+#: lib/rpmchecksig.c:186
#, c-format
msgid "%s: rpmWriteSignature failed: %s\n"
msgstr ""
-#: lib/rpmchecksig.c:259
+#: lib/rpmchecksig.c:264
#, c-format
msgid "%s: No signature available (v1.0 RPM)\n"
msgstr ""
-#: lib/rpmchecksig.c:423
+#: lib/rpmchecksig.c:434
msgid "NOT OK"
msgstr ""
-#: lib/rpmchecksig.c:424 lib/rpmchecksig.c:438
+#: lib/rpmchecksig.c:435 lib/rpmchecksig.c:449
msgid " (MISSING KEYS:"
msgstr ""
-#: lib/rpmchecksig.c:426 lib/rpmchecksig.c:440
+#: lib/rpmchecksig.c:437 lib/rpmchecksig.c:451
msgid ") "
msgstr ""
-#: lib/rpmchecksig.c:427 lib/rpmchecksig.c:441
+#: lib/rpmchecksig.c:438 lib/rpmchecksig.c:452
msgid " (UNTRUSTED KEYS:"
msgstr ""
-#: lib/rpmchecksig.c:429 lib/rpmchecksig.c:443
+#: lib/rpmchecksig.c:440 lib/rpmchecksig.c:454
msgid ")"
msgstr ""
-#: lib/rpmchecksig.c:437
+#: lib/rpmchecksig.c:448
msgid "OK"
msgstr ""
-#: lib/rpmdb.c:101
+#: lib/rpmdb.c:100
#, c-format
msgid "dbiTagsInit: unrecognized tag name: \"%s\" ignored\n"
msgstr ""
-#: lib/rpmdb.c:272
+#: lib/rpmdb.c:270
#, c-format
msgid "cannot open %s index using db%d - %s (%d)\n"
msgstr ""
-#: lib/rpmdb.c:292
+#: lib/rpmdb.c:290
#, c-format
msgid "cannot open %s index\n"
msgstr ""
-#: lib/rpmdb.c:378
+#: lib/rpmdb.c:376
#, c-format
msgid "error(%d) getting \"%s\" records from %s index\n"
msgstr ""
-#: lib/rpmdb.c:499
+#: lib/rpmdb.c:500
#, c-format
msgid "error(%d) storing record %s into %s\n"
msgstr ""
-#: lib/rpmdb.c:509
+#: lib/rpmdb.c:510
#, c-format
msgid "error(%d) removing record %s from %s\n"
msgstr ""
-#: lib/rpmdb.c:742
+#: lib/rpmdb.c:737
msgid "no dbpath has been set\n"
msgstr ""
-#: lib/rpmdb.c:836
+#: lib/rpmdb.c:831
msgid ""
"old format database is present; use --rebuilddb to generate a new format "
"database\n"
msgstr ""
#. error
-#: lib/rpmdb.c:1020
+#: lib/rpmdb.c:1012
#, c-format
msgid "error(%d) counting packages\n"
msgstr ""
-#: lib/rpmdb.c:1076 lib/rpmdb.c:1634
+#: lib/rpmdb.c:1068 lib/rpmdb.c:1626
#, c-format
msgid "%s: cannot read header at 0x%x\n"
msgstr ""
-#: lib/rpmdb.c:1698
+#: lib/rpmdb.c:1333 lib/rpmdb.c:2444
+#, c-format
+msgid "record number %u in database is bad -- skipping.\n"
+msgstr ""
+
+#: lib/rpmdb.c:1689
#, c-format
msgid "removing \"%s\" from %s index.\n"
msgstr ""
-#: lib/rpmdb.c:1707
+#: lib/rpmdb.c:1698
#, c-format
msgid "removing %d entries from %s index.\n"
msgstr ""
-#: lib/rpmdb.c:1890
+#: lib/rpmdb.c:1885
#, c-format
msgid "error(%d) allocating new package instance\n"
msgstr ""
-#: lib/rpmdb.c:1964
+#: lib/rpmdb.c:1958
#, c-format
msgid "adding \"%s\" to %s index.\n"
msgstr ""
-#: lib/rpmdb.c:1973
+#: lib/rpmdb.c:1969
#, c-format
msgid "adding %d entries to %s index.\n"
msgstr ""
-#: lib/rpmdb.c:2342
+#: lib/rpmdb.c:2340
#, c-format
msgid "removing %s after successful db3 rebuild.\n"
msgstr ""
-#: lib/rpmdb.c:2368
+#: lib/rpmdb.c:2366
msgid "no dbpath has been set"
msgstr ""
-#: lib/rpmdb.c:2393
+#: lib/rpmdb.c:2391
#, c-format
msgid "rebuilding database %s into %s\n"
msgstr ""
-#: lib/rpmdb.c:2397
+#: lib/rpmdb.c:2395
#, c-format
msgid "temporary database %s already exists\n"
msgstr ""
-#: lib/rpmdb.c:2403
+#: lib/rpmdb.c:2401
#, c-format
msgid "creating directory %s\n"
msgstr ""
-#: lib/rpmdb.c:2405
+#: lib/rpmdb.c:2403
#, c-format
msgid "creating directory %s: %s\n"
msgstr ""
-#: lib/rpmdb.c:2412
+#: lib/rpmdb.c:2410
#, c-format
msgid "opening old database with dbapi %d\n"
msgstr ""
-#: lib/rpmdb.c:2423
+#: lib/rpmdb.c:2421
#, c-format
msgid "opening new database with dbapi %d\n"
msgstr ""
-#: lib/rpmdb.c:2446
+#: lib/rpmdb.c:2483
#, c-format
-msgid "record number %d in database is bad -- skipping.\n"
+msgid "cannot add record originally at %u\n"
msgstr ""
-#: lib/rpmdb.c:2485
-#, c-format
-msgid "cannot add record originally at %d\n"
-msgstr ""
-
-#: lib/rpmdb.c:2503
+#: lib/rpmdb.c:2501
msgid "failed to rebuild database: original database remains in place\n"
msgstr ""
-#: lib/rpmdb.c:2511
+#: lib/rpmdb.c:2509
msgid "failed to replace old database with new database!\n"
msgstr ""
-#: lib/rpmdb.c:2513
+#: lib/rpmdb.c:2511
#, c-format
msgid "replace files in %s with files from %s to recover"
msgstr ""
-#: lib/rpmdb.c:2523
+#: lib/rpmdb.c:2521
#, c-format
msgid "removing directory %s\n"
msgstr ""
-#: lib/rpmdb.c:2525
+#: lib/rpmdb.c:2523
#, c-format
msgid "failed to remove directory %s: %s\n"
msgstr ""
-#: lib/rpminstall.c:162
+#: lib/rpminstall.c:153
msgid "Preparing..."
msgstr ""
-#: lib/rpminstall.c:164
+#: lib/rpminstall.c:155
msgid "Preparing packages for installation..."
msgstr ""
-#: lib/rpminstall.c:270
+#: lib/rpminstall.c:264
#, c-format
msgid "Retrieving %s\n"
msgstr ""
#. XXX undefined %{name}/%{version}/%{release} here
#. XXX %{_tmpdir} does not exist
-#: lib/rpminstall.c:280
+#: lib/rpminstall.c:274
#, c-format
msgid " ... as %s\n"
msgstr ""
-#: lib/rpminstall.c:284
+#: lib/rpminstall.c:278
#, c-format
msgid "skipping %s - transfer failed - %s\n"
msgstr ""
-#: lib/rpminstall.c:353
+#: lib/rpminstall.c:350
#, c-format
msgid "cannot open Packages database in %s\n"
msgstr ""
-#: lib/rpminstall.c:375
+#: lib/rpminstall.c:372
#, c-format
msgid "package %s is not relocateable\n"
msgstr ""
-#: lib/rpminstall.c:422
+#: lib/rpminstall.c:418
#, c-format
msgid "error reading from file %s\n"
msgstr ""
-#: lib/rpminstall.c:428
+#: lib/rpminstall.c:424
#, c-format
msgid "file %s requires a newer version of RPM\n"
msgstr ""
-#: lib/rpminstall.c:440 lib/rpminstall.c:661
+#: lib/rpminstall.c:436 lib/rpminstall.c:657
#, c-format
msgid "%s cannot be installed\n"
msgstr ""
-#: lib/rpminstall.c:472
+#: lib/rpminstall.c:468
#, c-format
msgid "found %d source and %d binary packages\n"
msgstr ""
-#: lib/rpminstall.c:487
+#: lib/rpminstall.c:483
msgid "failed dependencies:\n"
msgstr ""
-#: lib/rpminstall.c:508
+#: lib/rpminstall.c:504
msgid "installing binary packages\n"
msgstr ""
-#: lib/rpminstall.c:526
+#: lib/rpminstall.c:522
#, c-format
msgid "cannot open file %s: %s\n"
msgstr ""
-#: lib/rpminstall.c:580
+#: lib/rpminstall.c:576
#, c-format
msgid "cannot open %s/packages.rpm\n"
msgstr ""
-#: lib/rpminstall.c:596
+#: lib/rpminstall.c:592
#, c-format
msgid "\"%s\" specifies multiple packages\n"
msgstr ""
-#: lib/rpminstall.c:619
+#: lib/rpminstall.c:615
msgid "removing these packages would break dependencies:\n"
msgstr ""
-#: lib/rpminstall.c:648
+#: lib/rpminstall.c:644
#, c-format
msgid "cannot open %s: %s\n"
msgstr ""
-#: lib/rpminstall.c:654
+#: lib/rpminstall.c:650
#, c-format
msgid "Installing %s\n"
msgstr ""
-#: lib/rpmlead.c:48
+#: lib/rpmlead.c:49
#, c-format
msgid "read failed: %s (%d)\n"
msgstr ""
msgid "Bad arch/os number: %s (%s:%d)\n"
msgstr ""
-#: lib/rpmrc.c:354
+#: lib/rpmrc.c:357
#, c-format
msgid "Incomplete default line at %s:%d\n"
msgstr ""
-#: lib/rpmrc.c:359
+#: lib/rpmrc.c:362
#, c-format
msgid "Too many args in default line at %s:%d\n"
msgstr ""
-#: lib/rpmrc.c:549
+#: lib/rpmrc.c:555
#, c-format
msgid "Cannot expand %s\n"
msgstr ""
-#: lib/rpmrc.c:554
+#: lib/rpmrc.c:560
#, c-format
msgid "Cannot read %s, HOME is too large.\n"
msgstr ""
-#: lib/rpmrc.c:571
+#: lib/rpmrc.c:577
#, c-format
msgid "Unable to open %s for reading: %s.\n"
msgstr ""
#. XXX Feof(fd)
-#: lib/rpmrc.c:616
+#: lib/rpmrc.c:622
#, c-format
msgid "Failed to read %s: %s.\n"
msgstr ""
-#: lib/rpmrc.c:653
+#: lib/rpmrc.c:659
#, c-format
msgid "missing ':' (found 0x%02x) at %s:%d\n"
msgstr ""
-#: lib/rpmrc.c:670 lib/rpmrc.c:744
+#: lib/rpmrc.c:676 lib/rpmrc.c:750
#, c-format
msgid "missing argument for %s at %s:%d\n"
msgstr ""
-#: lib/rpmrc.c:687 lib/rpmrc.c:709
+#: lib/rpmrc.c:693 lib/rpmrc.c:715
#, c-format
msgid "%s expansion failed at %s:%d \"%s\"\n"
msgstr ""
-#: lib/rpmrc.c:696
+#: lib/rpmrc.c:702
#, c-format
msgid "cannot open %s at %s:%d: %s\n"
msgstr ""
-#: lib/rpmrc.c:736
+#: lib/rpmrc.c:742
#, c-format
msgid "missing architecture for %s at %s:%d\n"
msgstr ""
-#: lib/rpmrc.c:803
+#: lib/rpmrc.c:809
#, c-format
msgid "bad option '%s' at %s:%d\n"
msgstr ""
-#: lib/rpmrc.c:1350
+#: lib/rpmrc.c:1352
#, c-format
msgid "Unknown system: %s\n"
msgstr ""
-#: lib/rpmrc.c:1351
+#: lib/rpmrc.c:1353
msgid "Please contact rpm-list@redhat.com\n"
msgstr ""
msgid "You must set \"%%_pgp_name\" in your macro file\n"
msgstr ""
-#: lib/transaction.c:420
+#: lib/transaction.c:414
msgid "========== relocations\n"
msgstr ""
-#: lib/transaction.c:423
+#: lib/transaction.c:417
#, c-format
msgid "%5d exclude %s\n"
msgstr ""
-#: lib/transaction.c:426
+#: lib/transaction.c:420
#, c-format
msgid "%5d relocate %s -> %s\n"
msgstr ""
-#: lib/transaction.c:495
+#: lib/transaction.c:489
#, c-format
msgid "excluding multilib path %s%s\n"
msgstr ""
-#: lib/transaction.c:557
+#: lib/transaction.c:551
#, c-format
msgid "excluding %s %s\n"
msgstr ""
-#: lib/transaction.c:567
+#: lib/transaction.c:561
#, c-format
msgid "relocating %s to %s\n"
msgstr ""
-#: lib/transaction.c:642
+#: lib/transaction.c:636
#, c-format
msgid "relocating directory %s to %s\n"
msgstr ""
-#: lib/transaction.c:771
+#: lib/transaction.c:765
#, c-format
msgid "%s skipped due to missingok flag\n"
msgstr ""
-#: lib/transaction.c:1358
+#: lib/transaction.c:1352
#, c-format
msgid "excluding directory %s\n"
msgstr ""
-#: lib/verify.c:61
+#: lib/verify.c:63
msgid "don't verify files in package"
msgstr ""
-#: lib/verify.c:67
+#: lib/verify.c:69
msgid "do not execute %verifyscript (if any)"
msgstr ""
-#: lib/verify.c:257
+#: lib/verify.c:265
msgid "package lacks both user name and id lists (this should never happen)\n"
msgstr ""
-#: lib/verify.c:275
+#: lib/verify.c:286
msgid "package lacks both group name and id lists (this should never happen)\n"
msgstr ""
-#: lib/verify.c:348
+#: lib/verify.c:360
#, c-format
msgid "missing %s"
msgstr ""
-#: lib/verify.c:429
+#: lib/verify.c:441
#, c-format
msgid "Unsatisfied dependencies for %s-%s-%s: "
msgstr ""
msgstr ""
#. XXX just in case
-#: rpmio/macro.c:301
+#: rpmio/macro.c:303
#, c-format
msgid "%3d>%*s(empty)"
msgstr ""
-#: rpmio/macro.c:342
+#: rpmio/macro.c:344
#, c-format
msgid "%3d<%*s(empty)\n"
msgstr ""
-#: rpmio/macro.c:556
+#: rpmio/macro.c:560
msgid "Macro %%%s has unterminated body\n"
msgstr ""
-#: rpmio/macro.c:583
+#: rpmio/macro.c:587
msgid "Macro %%%s has illegal name (%%define)\n"
msgstr ""
-#: rpmio/macro.c:590
+#: rpmio/macro.c:594
msgid "Macro %%%s has unterminated opts\n"
msgstr ""
-#: rpmio/macro.c:595
+#: rpmio/macro.c:599
msgid "Macro %%%s has empty body\n"
msgstr ""
-#: rpmio/macro.c:600
+#: rpmio/macro.c:604
msgid "Macro %%%s failed to expand\n"
msgstr ""
-#: rpmio/macro.c:632
+#: rpmio/macro.c:636
msgid "Macro %%%s has illegal name (%%undefine)\n"
msgstr ""
-#: rpmio/macro.c:726
+#: rpmio/macro.c:732
msgid "Macro %%%s (%s) was not used below level %d\n"
msgstr ""
-#: rpmio/macro.c:819
+#: rpmio/macro.c:825
#, c-format
msgid "Unknown option %c in %s(%s)\n"
msgstr ""
-#: rpmio/macro.c:999
+#: rpmio/macro.c:1005
#, c-format
msgid "Recursion depth(%d) greater than max(%d)\n"
msgstr ""
-#: rpmio/macro.c:1066 rpmio/macro.c:1083
+#: rpmio/macro.c:1072 rpmio/macro.c:1089
#, c-format
msgid "Unterminated %c: %s\n"
msgstr ""
-#: rpmio/macro.c:1124
+#: rpmio/macro.c:1130
msgid "A %% is followed by an unparseable macro\n"
msgstr ""
-#: rpmio/macro.c:1251
+#: rpmio/macro.c:1257
msgid "Macro %%%.*s not found, skipping\n"
msgstr ""
-#: rpmio/macro.c:1322
+#: rpmio/macro.c:1334
msgid "Target buffer overflow\n"
msgstr ""
#. XXX Fstrerror
-#: rpmio/macro.c:1502 rpmio/macro.c:1508
+#: rpmio/macro.c:1522 rpmio/macro.c:1528
#, c-format
msgid "File %s: %s\n"
msgstr ""
-#: rpmio/macro.c:1511
+#: rpmio/macro.c:1531
#, c-format
msgid "File %s is smaller than %u bytes\n"
msgstr ""
-#: rpmio/rpmio.c:535
+#: rpmio/rpmio.c:549
msgid "Success"
msgstr ""
-#: rpmio/rpmio.c:538
+#: rpmio/rpmio.c:552
msgid "Bad server response"
msgstr ""
-#: rpmio/rpmio.c:541
+#: rpmio/rpmio.c:555
msgid "Server I/O error"
msgstr ""
-#: rpmio/rpmio.c:544
+#: rpmio/rpmio.c:558
msgid "Server timeout"
msgstr ""
-#: rpmio/rpmio.c:547
+#: rpmio/rpmio.c:561
msgid "Unable to lookup server host address"
msgstr ""
-#: rpmio/rpmio.c:550
+#: rpmio/rpmio.c:564
msgid "Unable to lookup server host name"
msgstr ""
-#: rpmio/rpmio.c:553
+#: rpmio/rpmio.c:567
msgid "Failed to connect to server"
msgstr ""
-#: rpmio/rpmio.c:556
+#: rpmio/rpmio.c:570
msgid "Failed to establish data connection to server"
msgstr ""
-#: rpmio/rpmio.c:559
+#: rpmio/rpmio.c:573
msgid "I/O error to local file"
msgstr ""
-#: rpmio/rpmio.c:562
+#: rpmio/rpmio.c:576
msgid "Error setting remote server to passive mode"
msgstr ""
-#: rpmio/rpmio.c:565
+#: rpmio/rpmio.c:579
msgid "File not found on server"
msgstr ""
-#: rpmio/rpmio.c:568
+#: rpmio/rpmio.c:582
msgid "Abort in progress"
msgstr ""
-#: rpmio/rpmio.c:572
+#: rpmio/rpmio.c:586
msgid "Unknown or unexpected error"
msgstr ""
-#: rpmio/rpmio.c:1167
+#: rpmio/rpmio.c:1194
#, c-format
msgid "logging into %s as %s, pw %s\n"
msgstr ""
msgid "warning: uCache[%d] %p nrefs(%d) != 1 (%s %s)\n"
msgstr ""
-#: rpmio/url.c:224
+#: rpmio/url.c:229
#, c-format
msgid "Password for %s@%s: "
msgstr ""
-#: rpmio/url.c:248 rpmio/url.c:274
+#: rpmio/url.c:253 rpmio/url.c:279
#, c-format
msgid "error: %sport must be a number\n"
msgstr ""
-#: rpmio/url.c:412
+#: rpmio/url.c:417
msgid "url port must be a number\n"
msgstr ""
#. XXX Fstrerror
-#: rpmio/url.c:469
+#: rpmio/url.c:474
#, c-format
msgid "failed to create %s: %s\n"
msgstr ""
# don't-bother-me-yet parameters
#-branchstate
-#-immediatetrans
-mustfree
-#-observertrans
-#-statictrans
# not-yet normal parameters
-boolops # w->n
--fixedformalarray
--null
+#-null
-predboolint # w->n
--predboolothers # w->n
--retvalint # w->n
-type
# don't-bother-me-yet parameters
-branchstate # ~43 occurences
-#-immediatetrans
--mustfree # alloca is painful
-#-observertrans
-#-statictrans
+-mustfree # ~122 alloca is painful
# not-yet normal parameters
--boolops # w->n
-#-fixedformalarray
--null # ugh
--predboolint # w->n ~144
-#-predboolothers # w->n ~8
--retvalint # w->n ~48
--type # ~449
+-boolops # ~244 w->n
+#-null # ~84
+-predboolint # ~147 w->n
+-type # ~373
-# not-yet -weak paramaters
+# -weak paramaters
#+boolint
#-boolops
#+ignorequals
/* Process data in ctx->datalen chunks */
for (; len >= ctx->datalen; buf += ctx->datalen, len -= ctx->datalen) {
+ /*@-mayaliasunique@*/
memcpy(ctx->in, buf, ctx->datalen);
+ /*@=mayaliasunique@*/
if (ctx->doByteReverse)
byteReverse(ctx->in, ctx->datalen);
ctx->transform(ctx);
}
/* Handle any remaining bytes of data. */
+ /*@-mayaliasunique@*/
memcpy(ctx->in, buf, len);
+ /*@=mayaliasunique@*/
}
void
key = &keybuf;
memset(key, 0, sizeof(*key));
+ /*@-temptrans@*/
key->name = (char *)name;
+ /*@=temptrans@*/
ret = (MacroEntry **)bsearch(&key, mc->macroTable, mc->firstFree,
sizeof(*(mc->macroTable)), compareMacroName);
/* XXX TODO: find 1st empty slot and return that */
tbuf = alloca(ulen + 1);
memset(tbuf, 0, (ulen + 1));
+ /*@-temptrans@*/
mb->s = u;
+ /*@=temptrans@*/
mb->t = tbuf;
mb->nb = ulen;
rc = expandMacro(mb);
return 1;
while(mb->nb > 0 && (c = fgetc(shf)) != EOF)
SAVECHAR(mb, c);
- pclose(shf);
+ (void) pclose(shf);
/* XXX delete trailing \r \n */
while (iseol(mb->t[-1])) {
if (me) {
/* XXX cast to workaround const */
+ /*@-onlytrans@*/
if ((*mep = me->prev) == NULL)
FREE(me->name);
FREE(me->opts);
FREE(me->body);
FREE(me);
+ /*@=onlytrans@*/
}
}
while((c = getopt(argc, (char **)argv, opts)) != -1) {
if (c == '?' || (o = strchr(opts, c)) == NULL) {
rpmError(RPMERR_BADSPEC, _("Unknown option %c in %s(%s)\n"),
- c, me->name, opts);
+ (char)c, me->name, opts);
return se;
}
*be++ = '-';
strncpy(buf, msg, msglen);
buf[msglen] = '\0';
- expandU(mb, buf, sizeof(buf));
+ (void) expandU(mb, buf, sizeof(buf));
if (waserror)
rpmError(RPMERR_BADSPEC, "%s\n", buf);
else
if (g) {
strncpy(buf, g, glen);
buf[glen] = '\0';
- expandU(mb, buf, sizeof(buf));
+ (void) expandU(mb, buf, sizeof(buf));
}
if (STREQ("basename", f, fn)) {
if ((b = strrchr(buf, '/')) == NULL)
be++;
*be++ = '\0';
#ifndef DEBUG_MACROS
- isCompressed(b, &compressed);
+ (void) isCompressed(b, &compressed);
#endif
switch(compressed) {
default:
}
if (b) {
- expandT(mb, b, strlen(b));
+ (void) expandT(mb, b, strlen(b));
}
}
case '(': /* %(...) shell escape */
if ((se = matchchar(s, c, ')')) == NULL) {
rpmError(RPMERR_BADSPEC,
- _("Unterminated %c: %s\n"), c, s);
+ _("Unterminated %c: %s\n"), (char)c, s);
rc = 1;
continue;
}
case '{': /* %{...}/%{...:...} substitution */
if ((se = matchchar(s, c, '}')) == NULL) {
rpmError(RPMERR_BADSPEC,
- _("Unterminated %c: %s\n"), c, s);
+ _("Unterminated %c: %s\n"), (char)c, s);
rc = 1;
continue;
}
/* Recursively expand body of macro */
if (me->body && *me->body) {
+ /*@-onlytrans@*/
mb->s = me->body;
+ /*@=onlytrans@*/
rc = expandMacro(mb);
if (rc == 0)
me->used++; /* Mark macro as used */
tbuf = alloca(slen + 1);
memset(tbuf, 0, (slen + 1));
+ /*@-temptrans@*/
mb->s = s;
+ /*@=temptrans@*/
mb->t = tbuf;
mb->nb = slen;
mb->depth = 0;
mb->macro_trace = print_macro_trace;
mb->expand_trace = print_expand_trace;
+ /*@-temptrans@*/
mb->spec = spec; /* (future) %file expansion info */
mb->mc = mc;
+ /*@=temptrans@*/
rc = expandMacro(mb);
memset(mb, 0, sizeof(*mb));
/* XXX just enough to get by */
+ /*@-temptrans@*/
mb->mc = (mc ? mc : &rpmGlobalMacroContext);
+ /*@=temptrans@*/
(void)doDefine(mb, macro, level, 0);
return 0;
}
fd = Fopen(buf, "r.fpio");
if (fd == NULL || Ferror(fd)) {
- if (fd) Fclose(fd);
+ if (fd) (void) Fclose(fd);
continue;
}
n++; /* skip % */
(void)rpmDefineMacro(NULL, n, RMIL_MACROFILES);
}
- Fclose(fd);
+ (void) Fclose(fd);
}
- if (m)
+ if (m) {
free(m);
+ m = NULL;
+ }
/* Reload cmdline macros */
rpmLoadMacros(&rpmCLIMacroContext, RMIL_CMDLINE);
}
+/*@-globstate@*/
void
rpmFreeMacros(MacroContext *mc)
{
MacroEntry *me;
while ((me = mc->macroTable[i]) != NULL) {
/* XXX cast to workaround const */
+ /*@-onlytrans@*/
if ((mc->macroTable[i] = me->prev) == NULL)
FREE(me->name);
+ /*@=onlytrans@*/
FREE(me->opts);
FREE(me->body);
FREE(me);
FREE(mc->macroTable);
memset(mc, 0, sizeof(*mc));
}
+/*@=globstate@*/
/* =============================================================== */
int isCompressed(const char *file, rpmCompressedMagic *compressed)
if (fd == NULL || Ferror(fd)) {
/* XXX Fstrerror */
rpmError(RPMERR_BADSPEC, _("File %s: %s\n"), file, Fstrerror(fd));
- if (fd) Fclose(fd);
+ if (fd) (void) Fclose(fd);
return 1;
}
nb = Fread(magic, sizeof(char), sizeof(magic), fd);
file, (unsigned)sizeof(magic));
rc = 0;
}
- Fclose(fd);
+ (void) Fclose(fd);
if (rc >= 0)
return rc;
while ((s = va_arg(ap, const char *)) != NULL)
pe = stpcpy(pe, s);
va_end(ap);
- expandMacros(NULL, NULL, buf, sizeof(buf));
+ (void) expandMacros(NULL, NULL, buf, sizeof(buf));
return xstrdup(buf);
}
*t = '\0';
/*fprintf(stderr, "\t%s\n", path); */
- return path;
+ /*@-temptrans@*/ return path; /*@=temptrans@*/
}
/* Return concatenated and expanded canonical path. */
*te = '\0';
}
va_end(ap);
- expandMacros(NULL, NULL, buf, sizeof(buf));
+ (void) expandMacros(NULL, NULL, buf, sizeof(buf));
(void) rpmCleanPath(buf);
return xstrdup(buf); /* XXX xstrdup has side effects. */
fd->errcookie = NULL;
fd->stats = xcalloc(1, sizeof(*fd->stats));
fd->digest = NULL;
- gettimeofday(&fd->stats->create, NULL);
+ (void) gettimeofday(&fd->stats->create, NULL);
fd->stats->begin = fd->stats->create; /* structure assignment */
fd->ftpFileDoneNeeded = 0;
rc = lseek(fdFileno(fd), p, whence);
fdstat_exit(fd, FDSTAT_SEEK, rc);
-DBGIO(fd, (stderr, "==>\tfdSeek(%p,%ld,%d) rc %lx %s\n", cookie, (long)p, whence, (long)rc, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\tfdSeek(%p,%ld,%d) rc %lx %s\n", cookie, (long)p, whence, (unsigned long)rc, fdbg(fd)));
return rc;
}
rc = ((fdno >= 0) ? close(fdno) : -2);
fdstat_exit(fd, FDSTAT_CLOSE, rc);
-DBGIO(fd, (stderr, "==>\tfdClose(%p) rc %lx %s\n", fd, (long)rc, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\tfdClose(%p) rc %lx %s\n", fd, (unsigned long)rc, fdbg(fd)));
fd = fdFree(fd, "open (fdClose)");
return rc;
fd = fdNew("open (fdOpen)");
fdSetFdno(fd, fdno);
fd->flags = flags;
-DBGIO(fd, (stderr, "==>\tfdOpen(\"%s\",%x,0%o) %s\n", path, flags, (unsigned)mode, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\tfdOpen(\"%s\",%x,0%o) %s\n", path, (unsigned)flags, (unsigned)mode, fdbg(fd)));
/*@-refcounttrans@*/ return fd; /*@=refcounttrans@*/
}
tvp->tv_usec = 0;
}
errno = 0;
+ /*@-compdef@*/
rc = select(fdno + 1, NULL, &wrfds, NULL, tvp);
+ /*@=compdef@*/
if (_rpmio_debug && !(rc == 1 && errno == 0))
fprintf(stderr, "*** fdWritable fdno %d rc %d %s\n", fdno, rc, strerror(errno));
tvp->tv_usec = 0;
}
errno = 0;
+ /*@-compdef@*/
rc = select(fdno + 1, &rdfds, NULL, NULL, tvp);
+ /*@=compdef@*/
if (rc < 0) {
switch (errno) {
static int getHostAddress(const char * host, struct in_addr * address)
{
if (xisdigit(host[0])) {
- if (! /*@-unrecog@*/ inet_aton(host, address) /*@=unrecog@*/ ) {
- return FTPERR_BAD_HOST_ADDR;
- }
+ if (! /*@-unrecog@*/ inet_aton(host, address) /*@=unrecog@*/ )
+ return FTPERR_BAD_HOST_ADDR;
} else {
- if (mygethostbyname(host, address)) {
- errno = h_errno;
- return FTPERR_BAD_HOSTNAME;
- }
+ if (mygethostbyname(host, address)) {
+ errno = /*@-unrecog@*/ h_errno /*@=unrecog@*/;
+ return FTPERR_BAD_HOSTNAME;
+ }
}
return 0;
}
-static int tcpConnect(FD_t ctrl, const char *host, int port)
+static int tcpConnect(FD_t ctrl, const char * host, int port)
{
struct sockaddr_in sin;
int fdno = -1;
int rc;
+ memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_port = htons(port);
sin.sin_addr.s_addr = INADDR_ANY;
return 0;
errxit:
+ /*@-observertrans@*/
fdSetSyserrno(ctrl, errno, ftpStrerror(rc));
+ /*@=observertrans@*/
if (fdno >= 0)
- close(fdno);
+ (void) close(fdno);
return rc;
}
}
if (fdFileno(u->ctrl) >= 0 && fdWritable(u->ctrl, 0) < 1)
- fdClose(u->ctrl);
+ /*@-refcounttrans@*/ (void) fdClose(u->ctrl); /*@=refcounttrans@*/
+/*@-usereleased@*/
if (fdFileno(u->ctrl) < 0) {
rc = tcpConnect(u->ctrl, host, port);
if (rc < 0)
if ((rc = ftpCommand(u, NULL, "TYPE", "I", NULL)))
goto errxit;
+ /*@-compdef@*/
return 0;
+ /*@=compdef@*/
errxit:
+ /*@-observertrans@*/
fdSetSyserrno(u->ctrl, errno, ftpStrerror(rc));
+ /*@=observertrans@*/
errxit2:
if (fdFileno(u->ctrl) >= 0)
- fdClose(u->ctrl);
+ /*@-refcounttrans@*/ (void) fdClose(u->ctrl); /*@=refcounttrans@*/
+ /*@-compdef@*/
return rc;
+ /*@=compdef@*/
+/*@=usereleased@*/
}
int ftpReq(FD_t data, const char * ftpCmd, const char * ftpArg)
port number portion */
{ int i, j;
+ memset(&dataAddress, 0, sizeof(dataAddress));
dataAddress.sin_family = AF_INET;
if (sscanf(chptr, "%d,%d", &i, &j) != 2) {
rc = FTPERR_PASSIVE_ERROR;
return 0;
errxit:
+ /*@-observertrans@*/
fdSetSyserrno(u->ctrl, errno, ftpStrerror(rc));
+ /*@=observertrans@*/
if (fdFileno(data) >= 0)
- fdClose(data);
+ /*@-refcounttrans@*/ (void) fdClose(data); /*@=refcounttrans@*/
return rc;
}
FDSANE(sfd);
FDSANE(tfd);
rc = ufdCopy(sfd, tfd);
- Fclose(sfd);
+ (void) Fclose(sfd);
if (rc > 0) /* XXX ufdCopy now returns no. bytes copied */
rc = 0;
return rc;
DBGIO(0, (stderr, "-> ABOR\n"));
+/*@-usereleased -compdef@*/
if (send(fdFileno(ctrl), ipbuf, sizeof(ipbuf), MSG_OOB) != sizeof(ipbuf)) {
- fdClose(ctrl);
+ /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
return FTPERR_SERVER_IO_ERROR;
}
sprintf(u->buf, "%cABOR\r\n",(char) DM);
if (fdWrite(ctrl, u->buf, 7) != 7) {
- fdClose(ctrl);
+ /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
return FTPERR_SERVER_IO_ERROR;
}
}
data->rd_timeoutsecs = tosecs;
/* XXX ftp abort needs to close the data channel to receive status */
- shutdown(fdFileno(data), SHUT_RDWR);
- close(fdFileno(data));
+ (void) shutdown(fdFileno(data), SHUT_RDWR);
+ (void) close(fdFileno(data));
data->fps[0].fdno = -1; /* XXX WRONG but expedient */
}
u->ctrl->rd_timeoutsecs = tosecs;
return rc;
+/*@=usereleased =compdef@*/
}
static int ftpFileDone(urlinfo u, FD_t data)
reopen:
if (fdFileno(ctrl) >= 0 && (rc = fdWritable(ctrl, 0)) < 1) {
- fdClose(ctrl);
+ /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
}
+/*@-usereleased@*/
if (fdFileno(ctrl) < 0) {
rc = tcpConnect(ctrl, host, port);
if (rc < 0)
if (rc) {
if (!retrying) { /* not HTTP_OK */
retrying = 1;
- fdClose(ctrl);
+ /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
goto reopen;
}
goto errxit;
return 0;
errxit:
+ /*@-observertrans@*/
fdSetSyserrno(ctrl, errno, ftpStrerror(rc));
+ /*@=observertrans@*/
errxit2:
if (fdFileno(ctrl) >= 0)
- fdClose(ctrl);
+ /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
return rc;
+/*@=usereleased@*/
}
/* XXX DYING: unused */
if (fdGetIo(fd) == fdio) {
struct stat sb;
int fdno = fdFileno(fd);
- fstat(fdno, &sb);
+ (void) fstat(fdno, &sb);
if (S_ISREG(sb.st_mode))
return fdRead(fd, buf, count);
}
#ifdef NOTYET
if (fdGetIo(fd) == fdio) {
struct stat sb;
- fstat(fdGetFdno(fd), &sb);
+ (void) fstat(fdGetFdno(fd), &sb);
if (S_ISREG(sb.st_mode))
return fdWrite(fd, buf, count);
}
if (fd->bytesRemain > 0) {
if (fd->ftpFileDoneNeeded) {
if (fdReadable(u->ctrl, 0) > 0)
- ftpFileDone(u, fd);
+ (void) ftpFileDone(u, fd);
else
- ftpAbort(u, fd);
+ (void) ftpAbort(u, fd);
}
} else {
int rc;
assert(fd->ftpFileDoneNeeded != 0);
#endif
if (fd->ftpFileDoneNeeded)
- ftpFileDone(u, fd);
+ (void) ftpFileDone(u, fd);
return rc;
}
}
return fd;
}
-static /*@null@*/ FD_t httpOpen(const char *url, int flags, mode_t mode,
- /*@out@*/ urlinfo *uret)
+static /*@null@*/ FD_t httpOpen(const char * url, /*@unused@*/ int flags,
+ /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
{
urlinfo u = NULL;
FD_t fd = NULL;
urltype urlType = urlPath(url, &path);
if (_rpmio_debug)
-fprintf(stderr, "*** ufdOpen(%s,0x%x,0%o)\n", url, flags, (unsigned)mode);
+fprintf(stderr, "*** ufdOpen(%s,0x%x,0%o)\n", url, (unsigned)flags, (unsigned)mode);
switch (urlType) {
case URL_IS_FTP:
if (fd == NULL) return NULL;
fd->urlType = urlType;
if (Fileno(fd) < 0) {
- ufdClose(fd);
+ (void) ufdClose(fd);
return NULL;
}
-DBGIO(fd, (stderr, "==>\tufdOpen(\"%s\",%x,0%o) %s\n", url, flags, (unsigned)mode, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\tufdOpen(\"%s\",%x,0%o) %s\n", url, (unsigned)flags, (unsigned)mode, fdbg(fd)));
return fd;
}
gzfile = gzdFileno(fd);
fdstat_enter(fd, FDSTAT_READ);
rc = gzread(gzfile, buf, count);
-DBGIO(fd, (stderr, "==>\tgzdRead(%p,%p,%u) rc %lx %s\n", cookie, buf, (unsigned)count, (long)rc, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\tgzdRead(%p,%p,%u) rc %lx %s\n", cookie, buf, (unsigned)count, (unsigned long)rc, fdbg(fd)));
if (rc < 0) {
int zerror = 0;
fd->errcookie = gzerror(gzfile, &zerror);
gzfile = gzdFileno(fd);
fdstat_enter(fd, FDSTAT_WRITE);
rc = gzwrite(gzfile, (void *)buf, count);
-DBGIO(fd, (stderr, "==>\tgzdWrite(%p,%p,%u) rc %lx %s\n", cookie, buf, (unsigned)count, (long)rc, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\tgzdWrite(%p,%p,%u) rc %lx %s\n", cookie, buf, (unsigned)count, (unsigned long)rc, fdbg(fd)));
if (rc < 0) {
int zerror = 0;
fd->errcookie = gzerror(gzfile, &zerror);
gzfile = gzdFileno(fd);
fdstat_enter(fd, FDSTAT_SEEK);
rc = gzseek(gzfile, p, whence);
-DBGIO(fd, (stderr, "==>\tgzdSeek(%p,%ld,%d) rc %lx %s\n", cookie, (long)p, whence, (long)rc, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\tgzdSeek(%p,%ld,%d) rc %lx %s\n", cookie, (long)p, whence, (unsigned long)rc, fdbg(fd)));
if (rc < 0) {
int zerror = 0;
fd->errcookie = gzerror(gzfile, &zerror);
}
}
-DBGIO(fd, (stderr, "==>\tgzdClose(%p) rc %lx %s\n", cookie, (long)rc, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\tgzdClose(%p) rc %lx %s\n", cookie, (unsigned long)rc, fdbg(fd)));
if (_rpmio_debug || rpmIsDebug()) fdstat_print(fd, "GZDIO", stderr);
if (rc == 0)
}
}
-DBGIO(fd, (stderr, "==>\tbzdClose(%p) rc %lx %s\n", cookie, (long)rc, fdbg(fd)));
+DBGIO(fd, (stderr, "==>\tbzdClose(%p) rc %lx %s\n", cookie, (unsigned long)rc, fdbg(fd)));
if (_rpmio_debug || rpmIsDebug()) fdstat_print(fd, "BZDIO", stderr);
if (rc == 0)
fd->fps[fd->nfps-1].fp == fp &&
fd->fps[fd->nfps-1].fdno >= 0)
{
- fflush(fp);
+ (void) fflush(fp);
fd->nfps--;
+ /*@-refcounttrans@*/
rc = ufdClose(fd);
+ /*@=refcounttrans@*/
+/*@-usereleased@*/
if (fdGetFdno(fd) >= 0)
break;
fdSetFp(fd, NULL);
}
fd = fdFree(fd, "Fclose");
return ec;
+/*@=usereleased@*/
}
/*
strncat(zstdio, other, sizeof(zstdio) - strlen(zstdio));
if (end == NULL && other[0] == '\0')
- return fd;
+ /*@-refcounttrans@*/ return fd; /*@=refcounttrans@*/
if (end && *end) {
if (!strcmp(end, "fdio")) {
if (noLibio) {
int fdno = Fileno(fd);
FILE * fp = fdopen(fdno, stdio);
+/*@+voidabstract@*/
if (_rpmio_debug)
-fprintf(stderr, "*** Fdopen fpio fp %p\n", fp);
+fprintf(stderr, "*** Fdopen fpio fp %p\n", (void *)fp);
+/*@=voidabstract@*/
if (fp == NULL)
return NULL;
/* XXX gzdio/bzdio use fp for private data */
+ /*@+voidabstract@*/
if (fdGetFp(fd) == NULL)
fdSetFp(fd, fp);
fdPush(fd, fpio, fp, fdno); /* Push fpio onto stack */
+ /*@=voidabstract@*/
}
}
} else if (other[0] != '\0') {
}
}
if (iof == NULL)
- return fd;
+ /*@-refcounttrans@*/ return fd; /*@=refcounttrans@*/
if (!noLibio) {
FILE * fp = NULL;
if (fp) {
/* XXX gzdio/bzdio use fp for private data */
+ /*@+voidabstract@*/
if (fdGetFp(fd) == NULL)
fdSetFp(fd, fp);
fdPush(fd, fpio, fp, fileno(fp)); /* Push fpio onto stack */
+ /*@=voidabstract@*/
fd = fdLink(fd, "fopencookie");
}
}
DBGIO(fd, (stderr, "==> Fdopen(%p,\"%s\") returns fd %p %s\n", ofd, fmode, fd, fdbg(fd)));
- return fd;
+ /*@-refcounttrans@*/ return fd; /*@=refcounttrans@*/
}
FD_t Fopen(const char *path, const char *fmode)
fprintf(stderr, "*** Fopen fdio path %s fmode %s\n", path, fmode);
fd = fdOpen(path, flags, perms);
if (fdFileno(fd) < 0) {
- fdClose(fd);
+ (void) fdClose(fd);
return NULL;
}
} else if (!strcmp(end, "fadio")) {
fprintf(stderr, "*** Fopen fadio path %s fmode %s\n", path, fmode);
fd = fadio->_open(path, flags, perms);
if (fdFileno(fd) < 0) {
- fdClose(fd);
+ /*@-refcounttrans@*/ (void) fdClose(fd); /*@=refcounttrans@*/
return NULL;
}
} else {
/* XXX persistent HTTP/1.1 returns the previously opened fp */
if (isHTTP && ((fp = fdGetFp(fd)) != NULL) && ((fdno = fdGetFdno(fd)) >= 0)) {
+ /*@+voidabstract@*/
fdPush(fd, fpio, fp, fileno(fp)); /* Push fpio onto stack */
+ /*@=voidabstract@*/
return fd;
}
}
/*@access FD_t@*/
+/*@-redef@*/
+int fdFileno(void * cookie); /* Yet Another Prototype. */
int fdFileno(void * cookie) {
FD_t fd;
if (cookie == NULL) return -2;
fd = c2f(cookie);
return fd->fps[0].fdno;
}
+/*@=redef@*/
{
if (fd->stats == NULL) return;
fd->stats->ops[opx].count++;
- gettimeofday(&fd->stats->begin, NULL);
+ (void) gettimeofday(&fd->stats->begin, NULL);
}
/** \ingroup rpmio
struct timeval end;
if (rc == -1) fd->syserrno = errno;
if (fd->stats == NULL) return;
- gettimeofday(&end, NULL);
+ (void) gettimeofday(&end, NULL);
if (rc >= 0) {
switch(opx) {
case FDSTAT_SEEK:
}
if (rpmlogMsgPrefix[pri] && *rpmlogMsgPrefix[pri])
- fputs(_(rpmlogMsgPrefix[pri]), msgout);
+ (void) fputs(_(rpmlogMsgPrefix[pri]), msgout);
- fputs(msg, msgout);
- fflush(msgout);
+ (void) fputs(msg, msgout);
+ (void) fflush(msgout);
if (freeMsgbuf)
free(msgbuf);
if (pri <= RPMLOG_CRIT)
is_dos_date(char *str)
{
if (strlen(str) == 8 && str[2] == str[5] && strchr("\\-/", (int)str[2]) != NULL)
- return (1);
+ return 1;
- return (0);
+ return 0;
}
static int
-is_week (char *str, struct tm *tim)
+is_week (const char * str, /*@out@*/ struct tm * tim)
{
- static char *week = "SunMonTueWedThuFriSat";
- char *pos;
+/*@observer@*/ static const char * week = "SunMonTueWedThuFriSat";
+ const char * pos;
- if((pos=strstr(week, str)) != NULL){
- if(tim != NULL)
+ /*@-observertrans -mayaliasunique@*/
+ if ((pos=strstr(week, str)) != NULL) {
+ /*@=observertrans =mayaliasunique@*/
+ if (tim != NULL)
tim->tm_wday = (pos - week)/3;
- return (1);
+ return 1;
}
- return (0);
+ return 0;
}
static int
-is_month (char *str, struct tm *tim)
+is_month (const char * str, /*@out@*/ struct tm * tim)
{
- static char *month = "JanFebMarAprMayJunJulAugSepOctNovDec";
- char *pos;
+/*@observer@*/ static const char * month = "JanFebMarAprMayJunJulAugSepOctNovDec";
+ const char * pos;
- if((pos=strstr(month, str)) != NULL){
- if(tim != NULL)
+ /*@-observertrans -mayaliasunique@*/
+ if ((pos=strstr(month, str)) != NULL) {
+ /*@=observertrans -mayaliasunique@*/
+ if (tim != NULL)
tim->tm_mon = (pos - month)/3;
- return (1);
+ return 1;
}
- return (0);
+ return 0;
}
static int
-is_time (char *str, struct tm *tim)
+is_time (const char * str, /*@out@*/ struct tm * tim)
{
- char *p, *p2;
+ const char * p, * p2;
if ((p=strchr(str, ':')) && (p2=strrchr(str, ':'))) {
if (p != p2) {
if (sscanf (str, "%2d:%2d:%2d", &tim->tm_hour, &tim->tm_min, &tim->tm_sec) != 3)
- return (0);
+ return 0;
}
else {
if (sscanf (str, "%2d:%2d", &tim->tm_hour, &tim->tm_min) != 2)
- return (0);
+ return 0;
}
}
else
- return (0);
+ return 0;
- return (1);
+ return 1;
}
-static int is_year(char *str, struct tm *tim)
+static int is_year(const char * str, /*@out@*/ struct tm * tim)
{
long year;
if (strchr(str,':'))
- return (0);
+ return 0;
if (strlen(str)!=4)
- return (0);
+ return 0;
if (sscanf(str, "%ld", &year) != 1)
- return (0);
+ return 0;
if (year < 1900 || year > 3000)
- return (0);
+ return 0;
tim->tm_year = (int) (year - 1900);
- return (1);
+ return 1;
}
/*
static int
vfs_parse_filetype (char c)
{
- switch (c){
+ switch (c) {
case 'd': return S_IFDIR;
case 'b': return S_IFBLK;
case 'c': return S_IFCHR;
}
}
-static int vfs_parse_filemode (char *p)
+static int vfs_parse_filemode (const char *p)
{ /* converts rw-rw-rw- into 0666 */
int res = 0;
- switch (*(p++)){
+ switch (*(p++)) {
case 'r': res |= 0400; break;
case '-': break;
default: return -1;
}
- switch (*(p++)){
+ switch (*(p++)) {
case 'w': res |= 0200; break;
case '-': break;
default: return -1;
}
- switch (*(p++)){
+ switch (*(p++)) {
case 'x': res |= 0100; break;
case 's': res |= 0100 | S_ISUID; break;
case 'S': res |= S_ISUID; break;
case '-': break;
default: return -1;
}
- switch (*(p++)){
+ switch (*(p++)) {
case 'r': res |= 0040; break;
case '-': break;
default: return -1;
}
- switch (*(p++)){
+ switch (*(p++)) {
case 'w': res |= 0020; break;
case '-': break;
default: return -1;
}
- switch (*(p++)){
+ switch (*(p++)) {
case 'x': res |= 0010; break;
case 's': res |= 0010 | S_ISGID; break;
case 'l': /* Solaris produces these */
case '-': break;
default: return -1;
}
- switch (*(p++)){
+ switch (*(p++)) {
case 'r': res |= 0004; break;
case '-': break;
default: return -1;
}
- switch (*(p++)){
+ switch (*(p++)) {
case 'w': res |= 0002; break;
case '-': break;
default: return -1;
}
- switch (*(p++)){
+ switch (*(p++)) {
case 'x': res |= 0001; break;
case 't': res |= 0001 | S_ISVTX; break;
case 'T': res |= S_ISVTX; break;
if (is_dos_date(p)){
p[2] = p[5] = '-';
- if(sscanf(p, "%2d-%2d-%2d", &d[0], &d[1], &d[2]) == 3){
+ memset(d, 0, sizeof(d));
+ if (sscanf(p, "%2d-%2d-%2d", &d[0], &d[1], &d[2]) == 3){
/* We expect to get:
1. MM-DD-YY
2. DD-MM-YY
}
static int
-vfs_parse_ls_lga (char *p, struct stat *st, char **filename, char **linkname)
+vfs_parse_ls_lga (char * p, /*@out@*/ struct stat * st,
+ /*@out@*/ const char ** filename,
+ /*@out@*/ const char ** linkname)
{
int idx, idx2, num_cols;
int i;
if (strlen (p) <= 8 || p [8] != ']')
goto error;
/* Should parse here the Notwell permissions :) */
+ /*@-unrecog@*/
if (S_ISDIR (st->st_mode))
st->st_mode |= (S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IXUSR | S_IXGRP | S_IXOTH);
else
st->st_mode |= (S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR);
p += 9;
+ /*@=unrecog@*/
} else {
if ((i = vfs_parse_filemode(p)) == -1)
goto error;
#ifdef HACK
st->st_uid = finduid (columns [1]);
#else
- unameToUid (columns [1], &st->st_uid);
+ (void) unameToUid (columns [1], &st->st_uid);
#endif
else
st->st_uid = (uid_t) atol (columns [1]);
#ifdef HACK
st->st_gid = findgid (columns [2]);
#else
- gnameToGid (columns [1], &st->st_gid);
+ (void) gnameToGid (columns [1], &st->st_gid);
#endif
idx2 = 3;
}
}
#endif
+ /*@-usereleased@*/
if (p_copy != p) /* Carefull! */
+ /*@=usereleased@*/
g_free (p_copy);
return 0;
}
#define alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s))
static int ftpNLST(const char * url, ftpSysCall_t ftpSysCall,
- struct stat * st, char * rlbuf, size_t rlbufsiz)
+ /*@out@*/ struct stat * st, char * rlbuf, size_t rlbufsiz)
{
FD_t fd;
const char * path;
}
exit:
- ufdClose(fd);
+ (void) ufdClose(fd);
return rc;
}
-static int ftpStat(const char * path, struct stat *st)
+static int ftpStat(const char * path, /*@out@*/ struct stat *st)
{
return ftpNLST(path, DO_FTP_STAT, st, NULL, 0);
}
-static int ftpLstat(const char * path, struct stat *st) {
+static int ftpLstat(const char * path, /*@out@*/ struct stat *st) {
int rc;
rc = ftpNLST(path, DO_FTP_LSTAT, st, NULL, 0);
if (_rpmio_debug)
}
static int ftpGlob(const char * path, int flags,
- int errfunc(const char * epath, int eerno), glob_t * pglob)
+ int errfunc(const char * epath, int eerno),
+ /*@out@*/ glob_t * pglob)
{
int rc;
if (pglob == NULL)
return -2;
rc = ftpNLST(path, DO_FTP_GLOB, NULL, NULL, 0);
+/*@-castfcnptr@*/
if (_rpmio_debug)
-fprintf(stderr, "*** ftpGlob(%s,0x%x,%p,%p) ftpNLST rc %d\n", path, (unsigned)flags, errfunc, pglob, rc);
+fprintf(stderr, "*** ftpGlob(%s,0x%x,%p,%p) ftpNLST rc %d\n", path, (unsigned)flags, (void *)errfunc, pglob, rc);
+/*@=castfcnptr@*/
if (rc)
return rc;
rc = poptParseArgvString(ftpBuf, &pglob->gl_pathc, (const char ***)&pglob->gl_pathv);
static void ftpGlobfree(glob_t * pglob) {
if (_rpmio_debug)
fprintf(stderr, "*** ftpGlobfree(%p)\n", pglob);
- if (pglob->gl_offs == -1) /* XXX HACK HACK HACK */
+ if (pglob->gl_offs == -1) { /* XXX HACK HACK HACK */
free((void *)pglob->gl_pathv);
+ pglob->gl_pathv = NULL;
+ }
}
int Stat(const char * path, struct stat * st) {
const char * lpath;
int ut = urlPath(path, &lpath);
+/*@-castfcnptr@*/
if (_rpmio_debug)
-fprintf(stderr, "*** Glob(%s,0x%x,%p,%p)\n", path, (unsigned)flags, errfunc, pglob);
+fprintf(stderr, "*** Glob(%s,0x%x,%p,%p)\n", path, (unsigned)flags, (void *)errfunc, pglob);
+/*@=castfcnptr@*/
switch (ut) {
case URL_IS_FTP: /* XXX WRONG WRONG WRONG */
return ftpGlob(path, flags, errfunc, pglob);
return opendir(path);
}
+/*@+voidabstract@*/
struct dirent * Readdir(DIR * dir)
{
if (_rpmio_debug)
-fprintf(stderr, "*** Readdir(%p)\n", dir);
+fprintf(stderr, "*** Readdir(%p)\n", (void *)dir);
return readdir(dir);
}
int Closedir(DIR * dir)
{
if (_rpmio_debug)
-fprintf(stderr, "*** Closedir(%p)\n", dir);
+fprintf(stderr, "*** Closedir(%p)\n", (void *)dir);
return closedir(dir);
}
+/*@=voidabstract@*/
void * fp = fdGetFp(u->ctrl);
if (fp) {
fdPush(u->ctrl, fpio, fp, -1); /* Push fpio onto stack */
- Fclose(u->ctrl);
+ (void) Fclose(u->ctrl);
} else if (fdio->_fileno(u->ctrl) >= 0)
fdio->close(u->ctrl);
#else
- Fclose(u->ctrl);
+ (void) Fclose(u->ctrl);
#endif
u->ctrl = fdio->_fdderef(u->ctrl, "persist ctrl (urlFree)", file, line);
void * fp = fdGetFp(u->data);
if (fp) {
fdPush(u->data, fpio, fp, -1); /* Push fpio onto stack */
- Fclose(u->data);
+ (void) Fclose(u->data);
} else if (fdio->_fileno(u->data) >= 0)
fdio->close(u->data);
#else
- Fclose(u->ctrl);
+ (void) Fclose(u->ctrl);
#endif
u->data = fdio->_fdderef(u->data, "persist data (urlFree)", file, line);
u = urlLink(uCache[ucx], "uCache");
*uret = u;
+ /*@-usereleased@*/
u = urlFree(u, "uCache (urlFind)");
+ /*@=usereleased@*/
/* Zap proxy host and port in case they have been reset */
u->proxyp = -1;
- if (u->proxyh) free((void *)u->proxyh);
+ if (u->proxyh) {
+ free((void *)u->proxyh);
+ u->proxyh = NULL;
+ }
/* Perform one-time FTP initialization */
if (u->urltype == URL_IS_FTP) {
case URL_IS_DASH:
case URL_IS_UNKNOWN:
if ((rc = ufdGetFile(sfd, tfd))) {
- Unlink(dest);
+ (void) Unlink(dest);
/* XXX FIXME: sfd possibly closed by copyData */
- /*@-usereleased@*/ Fclose(sfd) /*@=usereleased@*/ ;
+ /*@-usereleased@*/ (void) Fclose(sfd) /*@=usereleased@*/ ;
}
sfd = NULL; /* XXX Fclose(sfd) done by ufdGetFile */
break;
exit:
if (tfd)
- Fclose(tfd);
+ (void) Fclose(tfd);
if (sfd)
- Fclose(sfd);
+ (void) Fclose(sfd);
return rc;
}
}
+#if defined(IAM_RPMBT) || defined(IAM_RPMK)
exit:
+#endif /* IAM_RPMBT || IAM_RPMK */
poptFreeContext(optCon);
rpmFreeMacros(NULL);
rpmFreeMacros(&rpmCLIMacroContext);