- use rpmfi in showQueryPackage(), eliminating headerGetEntry().

CVS patchset: 5538
CVS date: 2002/07/03 14:01:49
This commit is contained in:
jbj 2002-07-03 14:01:49 +00:00
parent e5fb770e7d
commit af3c677f06
76 changed files with 16363 additions and 16101 deletions

View File

@ -155,6 +155,7 @@
- warn only once for each NOKEY/UNTRUSTED key id.
- factor common options into table, add rpmcliInit() and rpmcliFini().
- add preliminary rpmgraph(8) and rpmcache(8) executables to rpm-devel.
- use rpmfi in showQueryPackage(), eliminating headerGetEntry().
4.0.3 -> 4.0.4:
- solaris: translate i86pc to i386 (#57182).

View File

@ -30,6 +30,7 @@
*/
static int strntoul(const char *str, /*@out@*/char **endptr, int base, int num)
/*@modifies *endptr @*/
/*@requires maxSet(endptr) >= 0 @*/
{
char * buf, * end;
unsigned long ret;
@ -39,18 +40,20 @@ static int strntoul(const char *str, /*@out@*/char **endptr, int base, int num)
buf[num] = '\0';
ret = strtoul(buf, &end, base);
/*@-boundswrite@*/
/*@-boundsread@*/ /* LCL: strtoul annotations */
if (*end != '\0')
*endptr = ((char *)str) + (end - buf); /* XXX discards const */
else
*endptr = ((char *)str) + strlen(buf);
/*@=boundswrite@*/
/*@=boundsread@*/
return ret;
}
#define GET_NUM_FIELD(phys, log) \
/*@-boundswrite@*/ \
log = strntoul(phys, &end, 16, sizeof(phys)); \
/*@=boundswrite@*/ \
if ( (end - phys) != sizeof(phys) ) return CPIOERR_BAD_HEADER;
#define SET_NUM_FIELD(phys, val, space) \
sprintf(space, "%8.8lx", (unsigned long) (val)); \

View File

@ -2172,7 +2172,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
rc = cpioHeaderWrite(fsm, st); /* Write next payload header. */
break;
case FSM_DREAD:
/*@-boundswrite@*/
fsm->rdnb = Fread(fsm->wrbuf, sizeof(*fsm->wrbuf), fsm->wrlen, fsm->cfd);
/*@=boundswrite@*/
if (_fsm_debug && (stage & FSM_SYSCALL))
rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, cfd)\trdnb %d\n",
cur, (fsm->wrbuf == fsm->wrb ? "wrbuf" : "mmap"),
@ -2207,7 +2209,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
fsm->path, fsm->rfd, fsm->rdbuf);
break;
case FSM_READ:
/*@-boundswrite@*/
fsm->rdnb = Fread(fsm->rdbuf, sizeof(*fsm->rdbuf), fsm->rdlen, fsm->rfd);
/*@=boundswrite@*/
if (_fsm_debug && (stage & FSM_SYSCALL))
rpmMessage(RPMMESS_DEBUG, " %8s (rdbuf, %d, rfd)\trdnb %d\n",
cur, (int)fsm->rdlen, (int)fsm->rdnb);

View File

@ -48,7 +48,6 @@
/*@access rpmte @*/ /* XXX rpmInstallSourcePackage */
/*@access alKey @*/
/*@access rpmds @*/
int rpmVersionCompare(Header first, Header second)
{
@ -1009,18 +1008,16 @@ static int handleOneTrigger(const PSM_t psm, Header sourceH, Header triggeredH,
const char * sourceName;
rpmRC rc = RPMRC_OK;
int xx;
int i;
xx = headerNVR(sourceH, &sourceName, NULL, NULL);
trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem));
if (trigger != NULL)
while (rpmdsNext(trigger) >= 0) {
while ((i = rpmdsNext(trigger)) >= 0) {
rpmTagType tit, tst, tpt;
const char * Name;
int_32 Flags = rpmdsFlags(trigger);
#ifdef LEGACY
int skip;
#endif
if ((Name = rpmdsN(trigger)) == NULL)
continue; /* XXX can't happen */
@ -1030,21 +1027,6 @@ static int handleOneTrigger(const PSM_t psm, Header sourceH, Header triggeredH,
if (!(Flags & psm->sense))
continue;
#ifdef LEGACY
/*
* For some reason, the TRIGGERVERSION stuff includes the name of
* the package which the trigger is based on. We need to skip
* over that here. I suspect that we'll change our minds on this
* and remove that, so I'm going to just 'do the right thing'.
*/
skip = strlen(Name);
if (!strncmp(trigger->EVR[trigger->i], trigger->N[trigger->i], skip) &&
(trigger->EVR[trigger->i][skip] == '-'))
skip++;
else
skip = 0;
#endif
if (!headerMatchesDepFlags(sourceH, trigger))
continue;
@ -1066,7 +1048,7 @@ static int handleOneTrigger(const PSM_t psm, Header sourceH, Header triggeredH,
rc = RPMRC_FAIL;
} else {
arg1 += psm->countCorrection;
index = triggerIndices[trigger->i];
index = triggerIndices[i];
if (triggersAlreadyRun == NULL ||
triggersAlreadyRun[index] == 0)
{

View File

@ -17,6 +17,7 @@
#include "rpmdb.h"
#include "rpmps.h"
#include "rpmfi.h"
#include "rpmts.h"
#include "manifest.h"
@ -34,11 +35,11 @@ static void printFileInfo(char * te, const char * name,
unsigned int mtime,
unsigned short rdev, unsigned int nlink,
const char * owner, const char * group,
int uid, int gid, const char * linkto)
const char * linkto)
/*@modifies *te @*/
{
char sizefield[15];
char ownerfield[9], groupfield[9];
char ownerfield[8+1], groupfield[8+1];
char timefield[100];
time_t when = mtime; /* important if sizeof(int_32) ! sizeof(time_t) */
struct tm * tm;
@ -56,17 +57,11 @@ static void printFileInfo(char * te, const char * name,
/*@=boundsread@*/
}
if (owner)
strncpy(ownerfield, owner, 8);
else
sprintf(ownerfield, "%-8d", uid);
ownerfield[8] = '\0';
strncpy(ownerfield, owner, sizeof(ownerfield));
ownerfield[sizeof(ownerfield)-1] = '\0';
if (group)
strncpy(groupfield, group, 8);
else
sprintf(groupfield, "%-8d", gid);
groupfield[8] = '\0';
strncpy(groupfield, group, sizeof(groupfield));
groupfield[sizeof(groupfield)-1] = '\0';
/* this is normally right */
sprintf(sizefield, "%12u", size);
@ -130,74 +125,30 @@ static inline /*@null@*/ const char * queryHeader(Header h, const char * qfmt)
return str;
}
/**
*/
/*@-boundsread@*/
static int countLinks(int_16 * fileRdevList, int_32 * fileInodeList, int nfiles,
int xfile)
/*@*/
{
int nlink = 0;
/* XXX rpm-3.3.12 has not RPMTAG_FILEINODES */
if (!(fileRdevList[xfile] != 0 && fileRdevList &&
fileInodeList[xfile] != 0 && fileInodeList && nfiles > 0))
return 1;
while (nfiles-- > 0) {
if (fileRdevList[nfiles] == 0)
continue;
if (fileRdevList[nfiles] != fileRdevList[xfile])
continue;
if (fileInodeList[nfiles] == 0)
continue;
if (fileInodeList[nfiles] != fileInodeList[xfile])
continue;
nlink++;
}
if (nlink == 0) nlink = 1;
return nlink;
}
/*@=boundsread@*/
/*@-boundswrite@*/
int showQueryPackage(QVA_t qva, /*@unused@*/ rpmts ts, Header h)
{
HGE_t hge = (HGE_t)headerGetEntryMinMemory;
HFD_t hfd = headerFreeData;
int scareMem = 1;
rpmfi fi = NULL;
char * t, * te;
rpmTagType type;
int_32 count;
char * prefix = NULL;
const char ** dirNames = NULL;
const char ** baseNames = NULL;
rpmTagType bnt, dnt;
const char ** fileMD5List = NULL;
const char ** fileOwnerList = NULL;
const char ** fileGroupList = NULL;
const char ** fileLinktoList = NULL;
rpmTagType m5t, fot, fgt, ltt;
const char * fileStatesList;
int_32 * fileFlagsList, * fileMTimeList, * fileSizeList;
int_32 * fileUIDList = NULL;
int_32 * fileGIDList = NULL;
int_32 * fileInodeList = NULL;
uint_16 * fileModeList;
uint_16 * fileRdevList;
int_32 * dirIndexes;
int rc = 0; /* XXX FIXME: need real return code */
int nonewline = 0;
int i;
te = t = xmalloc(BUFSIZ);
/*@-boundswrite@*/
*te = '\0';
/*@=boundswrite@*/
if (!(qva->qva_flags & _QUERY_FOR_BITS) && qva->qva_queryFormat == NULL)
{
const char * name, * version, * release;
(void) headerNVR(h, &name, &version, &release);
/*@-boundswrite@*/
te = stpcpy(te, name);
te = stpcpy( stpcpy(te, "-"), version);
te = stpcpy( stpcpy(te, "-"), release);
/*@=boundswrite@*/
goto exit;
}
@ -213,9 +164,11 @@ int showQueryPackage(QVA_t qva, /*@unused@*/ rpmts ts, Header h)
t = xrealloc(t, BUFSIZ+sb);
te = t + tb;
}
/*@-boundswrite@*/
/*@-usereleased@*/
te = stpcpy(te, str);
/*@=usereleased@*/
/*@=boundswrite@*/
str = _free(str);
}
/*@=branchstate@*/
@ -224,171 +177,151 @@ int showQueryPackage(QVA_t qva, /*@unused@*/ rpmts ts, Header h)
if (!(qva->qva_flags & QUERY_FOR_LIST))
goto exit;
if (!hge(h, RPMTAG_BASENAMES, &bnt, (void **) &baseNames, &count)) {
fi = rpmfiNew(ts, NULL, h, RPMTAG_BASENAMES, scareMem);
if (rpmfiFC(fi) <= 0) {
/*@-boundswrite@*/
te = stpcpy(te, _("(contains no files)"));
/*@=boundswrite@*/
goto exit;
}
if (!hge(h, RPMTAG_FILESTATES, &type, (void **) &fileStatesList, NULL))
fileStatesList = NULL;
if (!hge(h, RPMTAG_DIRNAMES, &dnt, (void **) &dirNames, NULL))
dirNames = NULL;
if (!hge(h, RPMTAG_DIRINDEXES, NULL, (void **) &dirIndexes, NULL))
dirIndexes = NULL;
if (!hge(h, RPMTAG_FILEFLAGS, &type, (void **) &fileFlagsList, NULL))
fileFlagsList = NULL;
if (!hge(h, RPMTAG_FILESIZES, &type, (void **) &fileSizeList, NULL))
fileSizeList = NULL;
if (!hge(h, RPMTAG_FILEMODES, &type, (void **) &fileModeList, NULL))
fileModeList = NULL;
if (!hge(h, RPMTAG_FILEMTIMES, &type, (void **) &fileMTimeList, NULL))
fileMTimeList = NULL;
if (!hge(h, RPMTAG_FILERDEVS, &type, (void **) &fileRdevList, NULL))
fileRdevList = NULL;
if (!hge(h, RPMTAG_FILEINODES, &type, (void **) &fileInodeList, NULL))
fileInodeList = NULL;
if (!hge(h, RPMTAG_FILELINKTOS, &ltt, (void **) &fileLinktoList, NULL))
fileLinktoList = NULL;
if (!hge(h, RPMTAG_FILEMD5S, &m5t, (void **) &fileMD5List, NULL))
fileMD5List = NULL;
if (!hge(h, RPMTAG_FILEUIDS, &type, (void **) &fileUIDList, NULL))
fileUIDList = NULL;
if (!hge(h, RPMTAG_FILEGIDS, &type, (void **) &fileGIDList, NULL))
fileGIDList = NULL;
if (!hge(h, RPMTAG_FILEUSERNAME, &fot, (void **) &fileOwnerList, NULL))
fileOwnerList = NULL;
if (!hge(h, RPMTAG_FILEGROUPNAME, &fgt, (void **) &fileGroupList, NULL))
fileGroupList = NULL;
for (i = 0; i < count; i++) {
fi = rpmfiInit(fi, 0);
if (fi != NULL)
while ((i = rpmfiNext(fi)) >= 0) {
rpmfileAttrs fflags;
unsigned short fmode;
unsigned short frdev;
unsigned int fmtime;
rpmfileState fstate;
size_t fsize;
const char * fn;
char fmd5[32+1];
const char * fuser;
const char * fgroup;
const char * flink;
int_32 fnlink;
fflags = rpmfiFFlags(fi);
fmode = rpmfiFMode(fi);
frdev = rpmfiFRdev(fi);
fmtime = rpmfiFMtime(fi);
fstate = rpmfiFState(fi);
fsize = rpmfiFSize(fi);
fn = rpmfiFN(fi);
/*@-bounds@*/
{ static char hex[] = "0123456789abcdef";
const char * s = rpmfiMD5(fi);
char * p = fmd5;
int j;
for (j = 0; j < 16; j++) {
unsigned k = *s++;
*p++ = hex[ (k >> 4) & 0xf ];
*p++ = hex[ (k ) & 0xf ];
}
*p = '\0';
}
/*@=bounds@*/
fuser = rpmfiFUser(fi);
fgroup = rpmfiFGroup(fi);
flink = rpmfiFLink(fi);
fnlink = rpmfiFNlink(fi);
/* If querying only docs, skip non-doc files. */
if ((qva->qva_flags & QUERY_FOR_DOCS)
&& !(fileFlagsList[i] & RPMFILE_DOC))
if ((qva->qva_flags & QUERY_FOR_DOCS) && !(fflags & RPMFILE_DOC))
continue;
/* If querying only configs, skip non-config files. */
if ((qva->qva_flags & QUERY_FOR_CONFIG)
&& !(fileFlagsList[i] & RPMFILE_CONFIG))
if ((qva->qva_flags & QUERY_FOR_CONFIG) && !(fflags & RPMFILE_CONFIG))
continue;
/* If not querying %ghost, skip ghost files. */
if (!(qva->qva_fflags & RPMFILE_GHOST)
&& (fileFlagsList[i] & RPMFILE_GHOST))
if (!(qva->qva_fflags & RPMFILE_GHOST) && (fflags & RPMFILE_GHOST))
continue;
/*@-internalglobs@*/ /* FIX: shrug */
/*@-boundswrite@*/
if (!rpmIsVerbose() && prefix)
te = stpcpy(te, prefix);
/*@=internalglobs@*/
if (qva->qva_flags & QUERY_FOR_STATE) {
if (fileStatesList) {
rpmfileState fstate = fileStatesList[i];
switch (fstate) {
case RPMFILE_STATE_NORMAL:
te = stpcpy(te, _("normal "));
/*@switchbreak@*/ break;
case RPMFILE_STATE_REPLACED:
te = stpcpy(te, _("replaced "));
/*@switchbreak@*/ break;
case RPMFILE_STATE_NOTINSTALLED:
te = stpcpy(te, _("not installed "));
/*@switchbreak@*/ break;
case RPMFILE_STATE_NETSHARED:
te = stpcpy(te, _("net shared "));
/*@switchbreak@*/ break;
default:
sprintf(te, _("(unknown %3d) "), (int)fileStatesList[i]);
te += strlen(te);
/*@switchbreak@*/ break;
}
} else {
switch (fstate) {
case RPMFILE_STATE_NORMAL:
te = stpcpy(te, _("normal "));
/*@switchbreak@*/ break;
case RPMFILE_STATE_REPLACED:
te = stpcpy(te, _("replaced "));
/*@switchbreak@*/ break;
case RPMFILE_STATE_NOTINSTALLED:
te = stpcpy(te, _("not installed "));
/*@switchbreak@*/ break;
case RPMFILE_STATE_NETSHARED:
te = stpcpy(te, _("net shared "));
/*@switchbreak@*/ break;
case RPMFILE_STATE_MISSING:
te = stpcpy(te, _("(no state) "));
/*@switchbreak@*/ break;
default:
sprintf(te, _("(unknown %3d) "), fstate);
te += strlen(te);
/*@switchbreak@*/ break;
}
}
/*@=boundswrite@*/
if (qva->qva_flags & QUERY_FOR_DUMPFILES) {
sprintf(te, "%s%s %d %d %s 0%o ",
dirNames[dirIndexes[i]], baseNames[i],
fileSizeList[i], fileMTimeList[i],
fileMD5List[i], (unsigned) fileModeList[i]);
sprintf(te, "%s %d %d %s 0%o ", fn, fsize, fmtime, fmd5, fmode);
te += strlen(te);
if (fileOwnerList && fileGroupList) {
sprintf(te, "%s %s", fileOwnerList[i], fileGroupList[i]);
te += strlen(te);
} else if (fileUIDList && fileGIDList) {
sprintf(te, "%d %d", fileUIDList[i], fileGIDList[i]);
if (fuser && fgroup) {
/*@-nullpass@*/
sprintf(te, "%s %s", fuser, fgroup);
/*@=nullpass@*/
te += strlen(te);
} else {
rpmError(RPMERR_INTERNAL,
_("package has neither file owner or id lists\n"));
_("package has not file owner/group lists\n"));
}
sprintf(te, " %s %s %u ",
fileFlagsList[i] & RPMFILE_CONFIG ? "1" : "0",
fileFlagsList[i] & RPMFILE_DOC ? "1" : "0",
(unsigned) fileRdevList[i]);
fflags & RPMFILE_CONFIG ? "1" : "0",
fflags & RPMFILE_DOC ? "1" : "0",
frdev);
te += strlen(te);
if (strlen(fileLinktoList[i]))
sprintf(te, "%s", fileLinktoList[i]);
else
sprintf(te, "X");
sprintf(te, "%s", (flink && *flink ? flink : "X"));
te += strlen(te);
} else
/*@-internalglobs@*/ /* FIX: shrug */
if (!rpmIsVerbose()) {
te = stpcpy(te, dirNames[dirIndexes[i]]);
te = stpcpy(te, baseNames[i]);
/*@-boundswrite@*/
te = stpcpy(te, fn);
/*@=boundswrite@*/
}
/*@=internalglobs@*/
else {
char * filespec;
int nlink;
size_t fileSize;
filespec = xmalloc(strlen(dirNames[dirIndexes[i]])
+ strlen(baseNames[i]) + 1);
strcpy(filespec, dirNames[dirIndexes[i]]);
strcat(filespec, baseNames[i]);
fileSize = fileSizeList[i];
nlink = countLinks(fileRdevList, fileInodeList, count, i);
/* XXX Adjust directory link count and size for display output. */
if (S_ISDIR(fmode)) {
fnlink++;
fsize = 0;
}
if (S_ISDIR(fileModeList[i])) {
nlink++;
fileSize = 0;
}
if (fileOwnerList && fileGroupList) {
printFileInfo(te, filespec, fileSize,
fileModeList[i], fileMTimeList[i],
fileRdevList[i], nlink,
fileOwnerList[i],
fileGroupList[i], -1,
-1, fileLinktoList[i]);
te += strlen(te);
} else if (fileUIDList && fileGIDList) {
printFileInfo(te, filespec, fileSize,
fileModeList[i], fileMTimeList[i],
fileRdevList[i], nlink,
NULL, NULL, fileUIDList[i],
fileGIDList[i],
fileLinktoList[i]);
if (fuser && fgroup) {
/*@-nullpass@*/
printFileInfo(te, fn, fsize, fmode, fmtime, frdev, fnlink,
fuser, fgroup, flink);
/*@=nullpass@*/
te += strlen(te);
} else {
rpmError(RPMERR_INTERNAL,
_("package has neither file owner or id lists\n"));
}
filespec = _free(filespec);
}
if (te > t) {
/*@-boundswrite@*/
*te++ = '\n';
*te = '\0';
rpmMessage(RPMMESS_NORMAL, "%s", t);
te = t;
*t = '\0';
/*@=boundswrite@*/
}
}
@ -397,21 +330,18 @@ if (S_ISDIR(fileModeList[i])) {
exit:
if (te > t) {
if (!nonewline) {
/*@-boundswrite@*/
*te++ = '\n';
*te = '\0';
/*@=boundswrite@*/
}
rpmMessage(RPMMESS_NORMAL, "%s", t);
}
t = _free(t);
dirNames = hfd(dirNames, dnt);
baseNames = hfd(baseNames, bnt);
fileLinktoList = hfd(fileLinktoList, ltt);
fileMD5List = hfd(fileMD5List, m5t);
fileOwnerList = hfd(fileOwnerList, fot);
fileGroupList = hfd(fileGroupList, fgt);
fi = rpmfiFree(fi, 1);
return rc;
}
/*@=boundswrite@*/
/**
*/
@ -597,7 +527,7 @@ int (*parseSpecVec) (Spec *specp, const char *specFile, const char *rootdir,
/*@null@*/ Spec (*freeSpecVec) (Spec spec) = NULL;
/*@=redecl@*/
/*@-bounds@*/
/*@-bounds@*/ /* LCL: segfault */
int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
{
const char ** av = NULL;
@ -1021,11 +951,13 @@ int rpmcliQuery(rpmts ts, QVA_t qva, const char ** argv)
ec = rpmQueryVerify(qva, ts, (const char *) argv);
/*@=nullpass@*/
} else {
/*@-boundsread@*/
if (argv != NULL)
while ((arg = *argv++) != NULL) {
ec += rpmQueryVerify(qva, ts, arg);
rpmtsClean(ts);
}
/*@=boundsread@*/
}
(void) rpmtsSetVerifySigFlags(ts, 0);

View File

@ -343,7 +343,8 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
* @return 0 always
*/
int showQueryPackage(QVA_t qva, rpmts ts, Header h)
/*@modifies ts @*/;
/*@globals internalState @*/
/*@modifies ts, h, internalState @*/;
/** \ingroup rpmcli
* Display package information.
@ -364,14 +365,17 @@ int rpmcliQuery(rpmts ts, QVA_t qva, /*@null@*/ const char ** argv)
* @todo gnorpm and python bindings prevent this from being static.
* @param ts transaction set
* @param fi file info (with linked header and current file index)
* @retval result address of bit(s) returned to indicate failure
* @retval res address of bit(s) returned to indicate failure
* @param omitMask bit(s) to disable verify checks
* @return 0 on success (or not installed), 1 on error
*/
/*@-incondefs@*/
int rpmVerifyFile(const rpmts ts, rpmfi fi,
/*@out@*/ rpmVerifyAttrs * result, rpmVerifyAttrs omitMask)
/*@out@*/ rpmVerifyAttrs * res, rpmVerifyAttrs omitMask)
/*@globals fileSystem @*/
/*@modifies fi, *result, fileSystem @*/;
/*@modifies fi, *res, fileSystem @*/
/*@requires maxSet(res) >= 0 @*/;
/*@=incondefs@*/
/** \ingroup rpmcli
* Display results of package verify.
@ -392,8 +396,7 @@ int showVerifyPackage(QVA_t qva, rpmts ts, Header h)
* @param fn package file name
* @return 0 on success, 1 on failure
*/
int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
const char * fn)
int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd, const char * fn)
/*@globals fileSystem, internalState @*/
/*@modifies qva, ts, fd,
fileSystem, internalState @*/;

View File

@ -189,7 +189,7 @@ int_16 rpmfiFMode(rpmfi fi)
rpmfileState rpmfiFState(rpmfi fi)
{
char fstate = 0;
rpmfileState fstate = RPMFILE_STATE_MISSING;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
/*@-boundsread@*/
@ -252,6 +252,41 @@ int_16 rpmfiFRdev(rpmfi fi)
return frdev;
}
int_32 rpmfiFInode(rpmfi fi)
{
int_32 finode = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
/*@-boundsread@*/
if (fi->finodes != NULL)
finode = fi->finodes[fi->i];
/*@=boundsread@*/
}
return finode;
}
int_32 rpmfiFNlink(rpmfi fi)
{
int_32 nlink = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
/* XXX rpm-2.3.12 has not RPMTAG_FILEINODES */
/*@-boundsread@*/
if (fi->finodes && fi->frdevs) {
int_32 finode = fi->finodes[fi->i];
int_16 frdev = fi->frdevs[fi->i];
int j;
for (j = 0; j < fi->fc; j++) {
if (fi->frdevs[j] == frdev && fi->finodes[j] == finode)
nlink++;
}
}
/*@=boundsread@*/
}
return nlink;
}
int_32 rpmfiFMtime(rpmfi fi)
{
int_32 fmtime = 0;
@ -269,6 +304,7 @@ const char * rpmfiFUser(rpmfi fi)
{
const char * fuser = NULL;
/* XXX add support for ancient RPMTAG_FILEUIDS? */
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
/*@-boundsread@*/
if (fi->fuser != NULL)
@ -282,6 +318,7 @@ const char * rpmfiFGroup(rpmfi fi)
{
const char * fgroup = NULL;
/* XXX add support for ancient RPMTAG_FILEGIDS? */
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
/*@-boundsread@*/
if (fi->fgroup != NULL)
@ -880,6 +917,7 @@ fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, fi->Type, fi->fc);
fi->vflags = _free(fi->vflags);
fi->fsizes = _free(fi->fsizes);
fi->frdevs = _free(fi->frdevs);
fi->finodes = _free(fi->finodes);
fi->dil = _free(fi->dil);
}
/*@=evalorder@*/
@ -1047,9 +1085,10 @@ if (fi->actions == NULL)
}
fi->fmd5s = hfd(fi->fmd5s, -1);
/* XXX TR_REMOVED doesn;t need fmtimes or frdevs */
/* XXX TR_REMOVED doesn;t need fmtimes, frdevs or finodes */
xx = hge(h, RPMTAG_FILEMTIMES, NULL, (void **) &fi->fmtimes, NULL);
xx = hge(h, RPMTAG_FILERDEVS, NULL, (void **) &fi->frdevs, NULL);
xx = hge(h, RPMTAG_FILEINODES, NULL, (void **) &fi->finodes, NULL);
fi->replacedSizes = xcalloc(fi->fc, sizeof(*fi->replacedSizes));
@ -1076,6 +1115,7 @@ if (fi->actions == NULL)
if (!scareMem) {
_fdupe(fi, fmtimes);
_fdupe(fi, frdevs);
_fdupe(fi, finodes);
_fdupe(fi, fsizes);
_fdupe(fi, fflags);
_fdupe(fi, vflags);

View File

@ -63,6 +63,8 @@ struct rpmfi_s {
uint_16 * fmodes; /*!< File mode(s) (from header) */
/*@only@*/ /*?null?*/
const uint_16 * frdevs; /*!< File rdev(s) (from header) */
/*@only@*/ /*?null?*/
const uint_32 * finodes; /*!< File inodes(s) (from header) */
/*@only@*/ /*@null@*/
const char ** fuser; /*!< File owner(s) (from header) */
@ -324,6 +326,22 @@ int_32 rpmfiFSize(/*@null@*/ rpmfi fi)
int_16 rpmfiFRdev(/*@null@*/ rpmfi fi)
/*@*/;
/**
* Return current file inode from file info set.
* @param fi file info set
* @return current file inode, 0 on invalid
*/
int_32 rpmfiFInode(/*@null@*/ rpmfi fi)
/*@*/;
/**
* Return (calculated) current file nlink count from file info set.
* @param fi file info set
* @return current file nlink count, 0 on invalid
*/
int_32 rpmfiFNlink(/*@null@*/ rpmfi fi)
/*@*/;
/**
* Return current file modify time from file info set.
* @param fi file info set

View File

@ -35,8 +35,10 @@ int writeLead(FD_t fd, const struct rpmlead *lead)
l.osnum = htons(l.osnum);
l.signature_type = htons(l.signature_type);
/*@-boundswrite@*/
if (Fwrite(&l, 1, sizeof(l), fd) != sizeof(l))
return 1;
/*@=boundswrite@*/
return 0;
}

View File

@ -401,6 +401,7 @@ typedef enum rpmfileState_e {
RPMFILE_STATE_NOTINSTALLED = 2,
RPMFILE_STATE_NETSHARED = 3
} rpmfileState;
#define RPMFILE_STATE_MISSING -1 /* XXX used for unavailable data */
/**
* File Attributes.

View File

@ -242,8 +242,10 @@ int rpmWriteSignature(FD_t fd, Header h)
sigSize = headerSizeof(h, HEADER_MAGIC_YES);
pad = (8 - (sigSize % 8)) % 8;
if (pad) {
/*@-boundswrite@*/
if (Fwrite(buf, sizeof(buf[0]), pad, fd) != pad)
rc = 1;
/*@=boundswrite@*/
}
rpmMessage(RPMMESS_DEBUG, _("Signature: size(%d)+pad(%d)\n"), sigSize, pad);
return rc;

View File

@ -28,7 +28,7 @@
#define S_ISDEV(m) (S_ISBLK((m)) || S_ISCHR((m)))
int rpmVerifyFile(const rpmts ts, const rpmfi fi,
rpmVerifyAttrs * result, rpmVerifyAttrs omitMask)
rpmVerifyAttrs * res, rpmVerifyAttrs omitMask)
{
unsigned short fmode = rpmfiFMode(fi);
rpmfileAttrs fileAttrs = rpmfiFFlags(fi);
@ -59,9 +59,7 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
}
/*@=bounds@*/
/*@-boundswrite@*/
*result = RPMVERIFY_NONE;
/*@=boundswrite@*/
*res = RPMVERIFY_NONE;
/*
* Check to see if the file was installed - if not pretend all is OK.
@ -77,9 +75,7 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
}
if (fn == NULL || Lstat(fn, &sb) != 0) {
/*@-bounds@*/
*result |= RPMVERIFY_LSTATFAIL;
/*@=bounds@*/
*res |= RPMVERIFY_LSTATFAIL;
return 1;
}
@ -120,7 +116,6 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
*/
flags &= ~(omitMask | RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL);
/*@-bounds@*/
if (flags & RPMVERIFY_MD5) {
unsigned char md5sum[16];
size_t fsize;
@ -129,31 +124,31 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
rc = domd5(fn, md5sum, 0, &fsize);
sb.st_size = fsize;
if (rc)
*result |= (RPMVERIFY_READFAIL|RPMVERIFY_MD5);
*res |= (RPMVERIFY_READFAIL|RPMVERIFY_MD5);
else {
const unsigned char * md5 = rpmfiMD5(fi);
if (md5 == NULL || memcmp(md5sum, md5, sizeof(md5sum)))
*result |= RPMVERIFY_MD5;
*res |= RPMVERIFY_MD5;
}
}
if (flags & RPMVERIFY_LINKTO) {
char linkto[1024];
char linkto[1024+1];
int size = 0;
if ((size = Readlink(fn, linkto, sizeof(linkto)-1)) == -1)
*result |= (RPMVERIFY_READLINKFAIL|RPMVERIFY_LINKTO);
*res |= (RPMVERIFY_READLINKFAIL|RPMVERIFY_LINKTO);
else {
const char * flink = rpmfiFLink(fi);
linkto[size] = '\0';
if (flink == NULL || strcmp(linkto, flink))
*result |= RPMVERIFY_LINKTO;
*res |= RPMVERIFY_LINKTO;
}
}
if (flags & RPMVERIFY_FILESIZE) {
if (sb.st_size != rpmfiFSize(fi))
*result |= RPMVERIFY_FILESIZE;
*res |= RPMVERIFY_FILESIZE;
}
if (flags & RPMVERIFY_MODE) {
@ -175,41 +170,40 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
}
if (metamode != filemode)
*result |= RPMVERIFY_MODE;
*res |= RPMVERIFY_MODE;
}
if (flags & RPMVERIFY_RDEV) {
if (S_ISCHR(fmode) != S_ISCHR(sb.st_mode)
|| S_ISBLK(fmode) != S_ISBLK(sb.st_mode))
{
*result |= RPMVERIFY_RDEV;
*res |= RPMVERIFY_RDEV;
} else if (S_ISDEV(fmode) && S_ISDEV(sb.st_mode)) {
uint_16 st_rdev = (sb.st_rdev & 0xffff);
uint_16 frdev = (rpmfiFRdev(fi) & 0xffff);
if (st_rdev != frdev)
*result |= RPMVERIFY_RDEV;
*res |= RPMVERIFY_RDEV;
}
}
if (flags & RPMVERIFY_MTIME) {
if (sb.st_mtime != rpmfiFMtime(fi))
*result |= RPMVERIFY_MTIME;
*res |= RPMVERIFY_MTIME;
}
if (flags & RPMVERIFY_USER) {
const char * name = uidToUname(sb.st_uid);
const char * fuser = rpmfiFUser(fi);
if (name == NULL || fuser == NULL || strcmp(name, fuser))
*result |= RPMVERIFY_USER;
*res |= RPMVERIFY_USER;
}
if (flags & RPMVERIFY_GROUP) {
const char * name = gidToGname(sb.st_gid);
const char * fgroup = rpmfiFGroup(fi);
if (name == NULL || fgroup == NULL || strcmp(name, fgroup))
*result |= RPMVERIFY_GROUP;
*res |= RPMVERIFY_GROUP;
}
/*@=bounds@*/
return 0;
}
@ -273,7 +267,6 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
int ec = 0; /* assume no problems */
int i;
/*@-boundswrite@*/
te = t = buf;
*te = '\0';
@ -291,7 +284,9 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
&& (fileAttrs & RPMFILE_GHOST))
continue;
/*@-boundswrite@*/
rc = rpmVerifyFile(ts, fi, &verifyResult, omitMask);
/*@=boundswrite@*/
if (rc) {
if (!(fileAttrs & RPMFILE_MISSINGOK) || rpmIsVerbose()) {
sprintf(te, _("missing %s"), rpmfiFN(fi));
@ -339,6 +334,7 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
te += strlen(te);
}
/*@-boundswrite@*/
if (te > t) {
*te++ = '\n';
*te = '\0';
@ -346,8 +342,8 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
te = t = buf;
*t = '\0';
}
}
/*@=boundswrite@*/
}
fi = rpmfiUnlink(fi, "verifyHeader");
return ec;

1031
po/cs.po

File diff suppressed because it is too large Load Diff

1031
po/da.po

File diff suppressed because it is too large Load Diff

1031
po/de.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1028
po/es.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1031
po/fi.po

File diff suppressed because it is too large Load Diff

1031
po/fr.po

File diff suppressed because it is too large Load Diff

1028
po/gl.po

File diff suppressed because it is too large Load Diff

1028
po/hu.po

File diff suppressed because it is too large Load Diff

1028
po/id.po

File diff suppressed because it is too large Load Diff

1028
po/is.po

File diff suppressed because it is too large Load Diff

1028
po/it.po

File diff suppressed because it is too large Load Diff

1031
po/ja.po

File diff suppressed because it is too large Load Diff

1031
po/ko.po

File diff suppressed because it is too large Load Diff

1031
po/no.po

File diff suppressed because it is too large Load Diff

1031
po/pl.po

File diff suppressed because it is too large Load Diff

1031
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1028
po/ro.po

File diff suppressed because it is too large Load Diff

1028
po/rpm.pot

File diff suppressed because it is too large Load Diff

1031
po/ru.po

File diff suppressed because it is too large Load Diff

1031
po/sk.po

File diff suppressed because it is too large Load Diff

1033
po/sl.po

File diff suppressed because it is too large Load Diff

1031
po/sr.po

File diff suppressed because it is too large Load Diff

1031
po/sv.po

File diff suppressed because it is too large Load Diff

1031
po/tr.po

File diff suppressed because it is too large Load Diff

1028
po/uk.po

File diff suppressed because it is too large Load Diff

1028
po/wa.po

File diff suppressed because it is too large Load Diff

1028
po/zh.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2001-07-24 00:03+0100\n"
"Last-Translator: Milan Kerslager <kerslage@linux.cz>\n"
"Language-Team: Czech <cs@li.org>\n"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: Sun Jan 21 2001 04:30:32+0200\n"
"Last-Translator: Martin Hansen <mah@k64.dk>\n"
"Language-Team: Dansk <dansk@klid.dk>\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Leandro Lucarella <luca@linuxmendoza.org.ar>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2001-01-17 01:01+0100\n"
"Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n"
"Language-Team: Galician <trasno@ceu.fi.udc.es>\n"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2000-08-03 23:26+0200\n"
"Last-Translator: László Németh <nemeth@qwertynet.hu>\n"
"Language-Team: Hungarian\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2001-06-08 01:35+0000\n"
"Last-Translator: Richard Allen <ra@hp.is>\n"
"Language-Team: is <kde-isl@mmedia.is>\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2001-09-06 20:06+0900\n"
"Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n"
"Language-Team: GNU Translation project <ko@li.org>\n"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2001-06-27 11:05+0200\n"
"Last-Translator: Kjartan Maraas <kmaraas@online.no>\n"
"Language-Team: Norwegian <no@li.org>\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2002-02-13 18:32+0000\n"
"Last-Translator: Pedro Morais <morais@kde.org>\n"
"Language-Team: pt <morais@kde.org>\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2000-06-14 23:23+EST\n"
"Last-Translator: Cristian Gafton <gafton@redhat.com>\n"
"Language-Team: Romanian <ro@li.org>\n"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2001-07-05 21:00-0500\n"
"Last-Translator: Eugene Kanter <eugene@blackcatlinux.com>\n"
"Language-Team: Black Cat Linux Team <blackcat-support@blackcatlinux.com>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 1999-08-04 21:40+0200\n"
"Last-Translator: Stanislav Meduna <stano@eunet.sk>\n"
"Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2000-09-05 12:30+0200\n"
"Last-Translator: Roman Maurer <roman.maurer@hermes.si>\n"
"Language-Team: Slovenian <sl@li.org>\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2001-07-12 22:26+0100\n"
"Last-Translator: Christian Rose <menthos@menthos.com>\n"
"Language-Team: Swedish <sv@li.org>\n"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 2000-02-11 13:01+0200\n"
"Last-Translator: Nilgun Belma Buguner <nilgun@technologist.com>\n"
"Language-Team: Turkish <tr@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 1999-09-30 16:54+0200\n"
"Last-Translator: Yuri Syrota <rasta@renome.rovno.ua>\n"
"Language-Team: Ukrainian <uk@li.org>\n"

View File

@ -9,7 +9,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 1999-03-18 23:11+0100\n"
"Last-Translator: Nobody yet\n"
"Language-Team: walon <linux-wa@chanae.alphanet.ch>\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-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"

View File

@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: popt 1.6.3\n"
"POT-Creation-Date: 2002-06-24 13:05-0400\n"
"POT-Creation-Date: 2002-07-03 09:55-0400\n"
"PO-Revision-Date: 1999-11-11 05:04+0800\n"
"Last-Translator: Dillion Chen <dillon.chen@turbolinux.com.cn>\n"
"Language-Team: TLDN\n"

View File

@ -17,7 +17,7 @@ Name: rpm
%define version @VERSION@
Version: %{version}
%{expand: %%define rpm_version %{version}}
Release: 0.38
Release: 0.39
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
Copyright: GPL
@ -514,6 +514,9 @@ fi
%{__prefix}/include/popt.h
%changelog
* Wed Jul 3 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.39
- use rpmfi in showQueryPackage(), eliminating headerGetEntry().
* Sun Jun 30 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.38
- turn off annoying gpg secmem warning.
- warn only once for each NOKEY/UNTRUSTED key id.

View File

@ -542,6 +542,7 @@ static /*@only@*/ /*@null@*/ void * doHeaderUnload(Header h,
/*@out@*/ int * lengthPtr)
/*@modifies h, *lengthPtr @*/
/*@requires maxSet(lengthPtr) >= 0 @*/
/*@ensures maxRead(result) == (*lengthPtr) @*/
{
int_32 * ei = NULL;
entryInfo pe;
@ -1279,9 +1280,11 @@ int headerWrite(FD_t fd, /*@null@*/ Header h, enum hMagic magicp)
return 1;
switch (magicp) {
case HEADER_MAGIC_YES:
/*@-boundsread@*/
/*@-sizeoftype@*/
nb = Fwrite(header_magic, sizeof(char), sizeof(header_magic), fd);
/*@=sizeoftype@*/
/*@=boundsread@*/
if (nb != sizeof(header_magic))
goto exit;
break;

View File

@ -61,7 +61,7 @@ typedef ssize_t (*fdio_read_function_t) (void *cookie, char *buf, size_t nbytes)
/*@globals errno, fileSystem @*/
/*@modifies *cookie, errno, fileSystem @*/
/*@requires maxSet(buf) >= (nbytes - 1) @*/
/*@ensures maxRead(buf) >= nbytes @*/ ;
/*@ensures maxRead(buf) == result @*/ ;
/**
*/
@ -235,16 +235,23 @@ struct FDIO_s {
/**
* fread(3) clone.
*/
/*@-incondefs@*/
size_t Fread(/*@out@*/ void * buf, size_t size, size_t nmemb, FD_t fd)
/*@globals fileSystem @*/
/*@modifies fd, *buf, fileSystem @*/;
/*@modifies fd, *buf, fileSystem @*/
/*@requires maxSet(buf) >= (nmemb - 1) @*/
/*@ensures maxRead(buf) == result @*/;
/*@=incondefs@*/
/**
* fwrite(3) clone.
*/
/*@-incondefs@*/
size_t Fwrite(const void * buf, size_t size, size_t nmemb, FD_t fd)
/*@globals fileSystem @*/
/*@modifies fd, fileSystem @*/;
/*@modifies fd, fileSystem @*/
/*@requires maxRead(buf) >= nmemb @*/;
/*@=incondefs@*/
/**
* fseek(3) clone.
@ -360,7 +367,7 @@ int Readlink(const char * path, /*@out@*/ char * buf, size_t bufsiz)
/*@globals errno, fileSystem @*/
/*@modifies *buf, errno, fileSystem @*/
/*@requires maxSet(buf) >= (bufsiz - 1) @*/
/*@ensures result <= bufsiz @*/;
/*@ensures maxRead(buf) <= bufsiz @*/;
/*@=incondefs@*/
/**
@ -474,7 +481,7 @@ ssize_t fdRead(void * cookie, /*@out@*/ char * buf, size_t count)
/*@globals errno, fileSystem @*/
/*@modifies *cookie, *buf, errno, fileSystem @*/
/*@requires maxSet(buf) >= (count - 1) @*/
/*@ensures maxRead(buf) >= count @*/ ;
/*@ensures maxRead(buf) == result @*/ ;
#define fdRead(_fd, _buf, _count) fdio->read((_fd), (_buf), (_count))
/*@=incondefs@*/