- prefix payload paths with "./", otherwise "/" can't be represented.

- fix: compressFilelist broke when fed '/'.
- fix: typo in --last popt alias (#12690).
- fix: clean file paths before performing -qf (#12493).

CVS patchset: 3930
CVS date: 2000/07/09 23:10:25
This commit is contained in:
jbj 2000-07-09 23:10:25 +00:00
parent 10eb9f2c5d
commit db3190176b
17 changed files with 349 additions and 442 deletions

View File

@ -71,6 +71,12 @@
- multilib patch, take 1.
- add pre-transaction syscall's to handle /etc/init.d change.
- don't bother saving '/' as fingerprint subdir.
- eliminate legacy RPMTAG_{OBSOLETES,PROVIDES,CAPABILITY}.
- eliminate unused headerGz{Read,Write}.
- prefix payload paths with "./", otherwise "/" can't be represented.
- fix: compressFilelist broke when fed '/'.
- fix: typo in --last popt alias (#12690).
- fix: clean file paths before performing -qf (#12493).
3.0.4 -> 3.0.5
- handle version 4 packaging as input.
@ -91,6 +97,7 @@
- internalize --freshen (Gordon Messmer <yinyang@eburg.com>).
- support for separate source/binary compression policy.
- support for bzip payloads.
- fix: payload compression tag not nul terminated.
3.0.3 -> 3.0.4
- use compressed filenames on install side.

View File

@ -821,7 +821,11 @@ static void genCpioListAndHeader(struct FileList *fl,
/* Make the cpio list */
if (! (flp->flags & RPMFILE_GHOST)) {
clp->fsPath = xstrdup(flp->diskURL);
clp->archivePath = xstrdup(flp->fileURL + skipLen);
{ char * t = buf;
t = stpcpy(t, "./");
t = stpcpy(t, (flp->fileURL + skipLen));
clp->archivePath = xstrdup(buf);
}
clp->finalMode = flp->fl_mode;
clp->finalUid = flp->fl_uid;
clp->finalGid = flp->fl_gid;
@ -984,6 +988,10 @@ static int addFile(struct FileList *fl, const char * diskURL, struct stat *statp
fileURL += strlen(fl->buildRootURL);
}
/* XXX make sure '/' can be packaged also */
if (*fileURL == '\0')
fileURL = "/";
/* If we are using a prefix, validate the file */
if (!fl->inFtw && fl->prefix) {
const char *prefixTest;
@ -1054,12 +1062,10 @@ static int addFile(struct FileList *fl, const char * diskURL, struct stat *statp
}
#else
/* Default user/group to builder's user/group */
if (fileUname == NULL) {
if (fileUname == NULL)
fileUname = getUname(getuid());
}
if (fileGname == NULL) {
if (fileGname == NULL)
fileGname = getGname(getgid());
}
#endif
rpmMessage(RPMMESS_DEBUG, _("File %4d: %07o %s.%s\t %s\n"), fl->fileCount,

View File

@ -333,8 +333,9 @@ int writeRPM(Header h, const char *fileName, int type,
RPMSENSE_PREREQ|(RPMSENSE_GREATER|RPMSENSE_EQUAL),
"rpm", "3.0.5", 0);
}
(void) stpncpy(buf, rpmio_flags+1, (s - rpmio_flags - 1));
headerAddEntry(h, RPMTAG_PAYLOADFLAGS, RPM_STRING_TYPE, buf, 1);
strcpy(buf, rpmio_flags);
buf[s - rpmio_flags] = '\0';
headerAddEntry(h, RPMTAG_PAYLOADFLAGS, RPM_STRING_TYPE, buf+1, 1);
}
/* Create and add the cookie */
@ -536,11 +537,6 @@ int packageBinaries(Spec spec)
headerAddEntry(pkg->header, RPMTAG_BUILDTIME,
RPM_INT32_TYPE, getBuildTime(), 1);
{ int capability = 0;
headerAddEntry(pkg->header, RPMTAG_CAPABILITY, RPM_INT32_TYPE,
&capability, 1);
}
providePackageNVR(pkg->header);
{ const char * optflags = rpmExpand("%{optflags}", NULL);
@ -619,11 +615,6 @@ int packageSources(Spec spec)
headerAddEntry(spec->sourceHeader, RPMTAG_BUILDTIME,
RPM_INT32_TYPE, getBuildTime(), 1);
{ int capability = 0;
headerAddEntry(spec->sourceHeader, RPMTAG_CAPABILITY, RPM_INT32_TYPE,
&capability, 1);
}
genSourceRpmName(spec);
FREE(spec->cookie);

View File

@ -502,7 +502,7 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro,
if ((rc = parseNoSource(spec, field, tag)))
return rc;
break;
case RPMTAG_OBSOLETES:
case RPMTAG_OBSOLETEFLAGS:
case RPMTAG_PROVIDEFLAGS:
case RPMTAG_BUILDREQUIRES:
case RPMTAG_BUILDCONFLICTS:
@ -592,7 +592,7 @@ static struct PreambleRec {
{RPMTAG_REQUIREFLAGS, 0, 0, "requires"},
{RPMTAG_PREREQ, 0, 0, "prereq"},
{RPMTAG_CONFLICTFLAGS, 0, 0, "conflicts"},
{RPMTAG_OBSOLETES, 0, 0, "obsoletes"},
{RPMTAG_OBSOLETEFLAGS, 0, 0, "obsoletes"},
{RPMTAG_PREFIXES, 0, 0, "prefixes"},
{RPMTAG_PREFIXES, 0, 0, "prefix"},
{RPMTAG_BUILDROOT, 0, 0, "buildroot"},

View File

@ -41,7 +41,7 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, int tag,
tagflags |= RPMSENSE_PROVIDES;
h = pkg->header;
break;
case RPMTAG_OBSOLETES:
case RPMTAG_OBSOLETEFLAGS:
tagflags |= RPMSENSE_OBSOLETES;
h = pkg->header;
break;
@ -101,7 +101,7 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, int tag,
/* Don't permit file names as args for certain tags */
switch (tag) {
case RPMTAG_OBSOLETES:
case RPMTAG_OBSOLETEFLAGS:
case RPMTAG_CONFLICTFLAGS:
case RPMTAG_BUILDCONFLICTS:
if (r[0] == '/') {
@ -145,8 +145,8 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, int tag,
switch(tag) {
case RPMTAG_BUILDPREREQ:
case RPMTAG_PREREQ:
case RPMTAG_PROVIDES:
case RPMTAG_OBSOLETES:
case RPMTAG_PROVIDEFLAGS:
case RPMTAG_OBSOLETEFLAGS:
/* Add prereq on rpm version that implements versioning */
addReqProv(spec, h,
RPMSENSE_PREREQ|(RPMSENSE_GREATER|RPMSENSE_EQUAL),

View File

@ -23,7 +23,7 @@ int addReqProv(/*@unused@*/ Spec spec, Header h,
versiontag = RPMTAG_PROVIDEVERSION;
flagtag = RPMTAG_PROVIDEFLAGS;
} else if (flag & RPMSENSE_OBSOLETES) {
nametag = RPMTAG_OBSOLETES;
nametag = RPMTAG_OBSOLETENAME;
versiontag = RPMTAG_OBSOLETEVERSION;
flagtag = RPMTAG_OBSOLETEFLAGS;
} else if (flag & RPMSENSE_CONFLICTS) {
@ -63,9 +63,9 @@ int addReqProv(/*@unused@*/ Spec spec, Header h,
headerGetEntry(h, versiontag, NULL, (void **) &versions, NULL);
headerGetEntry(h, flagtag, NULL, (void **) &flags, NULL);
}
if (indextag) {
if (indextag)
headerGetEntry(h, indextag, NULL, (void **) &indexes, NULL);
}
while (len > 0) {
len--;
if (strcmp(names[len], name))
@ -100,10 +100,8 @@ int addReqProv(/*@unused@*/ Spec spec, Header h,
headerAddOrAppendEntry(h, flagtag,
RPM_INT32_TYPE, &flag, 1);
}
if (indextag) {
headerAddOrAppendEntry(h, indextag,
RPM_INT32_TYPE, &index, 1);
}
if (indextag)
headerAddOrAppendEntry(h, indextag, RPM_INT32_TYPE, &index, 1);
return 0;
}

View File

@ -220,10 +220,13 @@ static int getNextHeader(FD_t cfd, struct cpioHeader * hdr)
/** */
int cpioFileMapCmp(const void * a, const void * b)
{
const struct cpioFileMapping * first = a;
const struct cpioFileMapping * second = b;
const char * afn = ((const struct cpioFileMapping *)a)->archivePath;
const char * bfn = ((const struct cpioFileMapping *)b)->archivePath;
return (strcmp(first->archivePath, second->archivePath));
if (afn[0] == '.' && afn[1] == '/') afn += 2;
if (bfn[0] == '.' && bfn[1] == '/') bfn += 2;
return strcmp(afn, bfn);
}
/* This could trash files in the path! I'm not sure that's a good thing */
@ -338,7 +341,7 @@ static int inline checkDirectory(const char * filename)
}
/** */
static int expandRegular(FD_t cfd, struct cpioHeader * hdr,
static int expandRegular(FD_t cfd, const struct cpioHeader * hdr,
cpioCallback cb, void * cbData)
{
FD_t ofd;
@ -404,7 +407,7 @@ static int expandRegular(FD_t cfd, struct cpioHeader * hdr,
}
/** */
static int expandSymlink(FD_t cfd, struct cpioHeader * hdr)
static int expandSymlink(FD_t cfd, const struct cpioHeader * hdr)
{
char buf[2048], buf2[2048];
struct stat sb;
@ -439,7 +442,7 @@ static int expandSymlink(FD_t cfd, struct cpioHeader * hdr)
}
/** */
static int expandFifo( /*@unused@*/ FD_t cfd, struct cpioHeader * hdr)
static int expandFifo( /*@unused@*/ FD_t cfd, const struct cpioHeader * hdr)
{
struct stat sb;
@ -457,7 +460,7 @@ static int expandFifo( /*@unused@*/ FD_t cfd, struct cpioHeader * hdr)
}
/** */
static int expandDevice( /*@unused@*/ FD_t cfd, struct cpioHeader * hdr)
static int expandDevice( /*@unused@*/ FD_t cfd, const struct cpioHeader * hdr)
{
const struct stat * st = &hdr->sb;
struct stat sb;

View File

@ -651,19 +651,11 @@ int rpmtransAddPackage(rpmTransactionSet rpmdep, Header h, FD_t fd,
int count;
const char ** obsoletes;
int alNum;
int * caps;
/* XXX binary rpms always have RPMTAG_SOURCERPM, source rpms do not */
if (headerIsEntry(h, RPMTAG_SOURCEPACKAGE))
return 1;
/* Make sure we've implemented all of the capabilities we need */
if (headerGetEntry(h, RPMTAG_CAPABILITY, NULL, (void **)&caps, &count)) {
if (count != 1 || *caps) {
return 2;
}
}
/* FIXME: handling upgrades like this is *almost* okay. It doesn't
check to make sure we're upgrading to a newer version, and it
makes it difficult to generate a return code based on the number of
@ -1127,8 +1119,8 @@ static int checkPackageDeps(rpmTransactionSet rpmdep, struct problemsSet * psp,
case 0: /* requirements are satisfied. */
break;
case 1: /* requirements are not satisfied. */
rpmMessage(RPMMESS_DEBUG, _("package %s require not satisfied: %s\n"),
name, keyDepend+2);
rpmMessage(RPMMESS_DEBUG, _("package %s-%s-%s require not satisfied: %s\n"),
name, version, release, keyDepend+2);
if (psp->num == psp->alloced) {
psp->alloced += 5;
@ -1300,25 +1292,24 @@ static int addOrderedPack(rpmTransactionSet rpmdep,
int packageNum = package - rpmdep->addedPackages.list;
int i;
struct availablePackage * match;
char * errorString;
const char ** stack;
int rc = 0;
*errorStack++ = package->name;
if (selected[packageNum] > 0) {
const char * errorString;
const char ** stack;
char * t;
i = 0;
stack = errorStack - 1;
while (*(--stack)) {
while (*(--stack))
i += strlen(*stack) + 1;
}
errorString = alloca(i + 2);
*errorString = '\0';
errorString = t = alloca(i + 2);
while ((++stack) < errorStack) {
strcat(errorString, *stack);
strcat(errorString, " ");
t = stpcpy(t, *stack);
*t++ = ' ';
}
rpmError(RPMMESS_PREREQLOOP, _("loop in prerequisite chain: %s"),
@ -1375,15 +1366,9 @@ static int addOrderedPack(rpmTransactionSet rpmdep,
static int orderListIndexCmp(const void * one, const void * two)
{
const struct orderListIndex * a = one;
const struct orderListIndex * b = two;
if (a->alIndex < b->alIndex)
return -1;
if (a->alIndex > b->alIndex)
return 1;
return 0;
int a = ((const struct orderListIndex *)one)->alIndex;
int b = ((const struct orderListIndex *)two)->alIndex;
return (a - b);
}
int rpmdepOrder(rpmTransactionSet rpmdep)

View File

@ -137,9 +137,6 @@ static fingerPrint doLookup(fingerPrintCache cache,
(fp.subDir[0] == '/' && fp.subDir[1] == '\0'))
fp.subDir = NULL;
fp.baseName = baseName;
fprintf(stderr, "*** found (%x,%x) %s %s %s\n",
(unsigned) fp.entry->dev, (unsigned) fp.entry->ino,
fp.entry->dirName, fp.subDir, fp.baseName);
if (!scareMemory && fp.subDir != NULL)
fp.subDir = xstrdup(fp.subDir);
return fp;

View File

@ -171,14 +171,14 @@ static void copyEntry(struct indexEntry * entry, /*@out@*/ int_32 * type,
/* Now look it up */
switch (entry->info.type) {
case RPM_STRING_TYPE:
case RPM_STRING_TYPE:
if (entry->info.count == 1) {
*p = entry->data;
break;
}
/*@fallthrough@*/
case RPM_STRING_ARRAY_TYPE:
case RPM_I18NSTRING_TYPE:
case RPM_STRING_ARRAY_TYPE:
case RPM_I18NSTRING_TYPE:
i = entry->info.count;
tableSize = i * sizeof(char *);
if (minimizeMemory) {
@ -196,7 +196,7 @@ static void copyEntry(struct indexEntry * entry, /*@out@*/ int_32 * type,
}
break;
default:
default:
*p = entry->data;
break;
}
@ -209,7 +209,7 @@ static int dataLength(int_32 type, const void * p, int_32 count, int onDisk)
length = 0;
switch (type) {
case RPM_STRING_TYPE:
case RPM_STRING_TYPE:
if (count == 1) {
/* Special case -- p is just the string */
length = strlen(p) + 1;
@ -220,8 +220,8 @@ static int dataLength(int_32 type, const void * p, int_32 count, int onDisk)
exit(EXIT_FAILURE);
/*@notreached@*/ break;
case RPM_STRING_ARRAY_TYPE:
case RPM_I18NSTRING_TYPE:
case RPM_STRING_ARRAY_TYPE:
case RPM_I18NSTRING_TYPE:
/* This is like RPM_STRING_TYPE, except it's *always* an array */
/* Compute sum of length of all strings, including null terminators */
i = count;
@ -243,7 +243,7 @@ static int dataLength(int_32 type, const void * p, int_32 count, int onDisk)
}
break;
default:
default:
if (typeSizes[type] != -1)
length = typeSizes[type] * count;
else {
@ -291,14 +291,13 @@ int headerNextIterator(HeaderIterator iter,
Header h = iter->h;
int slot = iter->next_index;
if (slot == h->indexUsed) {
if (slot == h->indexUsed)
return 0;
}
iter->next_index++;
if (tag) {
if (tag)
*tag = h->index[slot].info.tag;
}
copyEntry(h->index + slot, type, p, c, 0);
return 1;
@ -306,18 +305,10 @@ int headerNextIterator(HeaderIterator iter,
static int indexCmp(const void *ap, const void *bp)
{
int_32 a, b;
int_32 a = ((const struct indexEntry *)ap)->info.tag;
int_32 b = ((const struct indexEntry *)bp)->info.tag;
a = ((struct indexEntry *)ap)->info.tag;
b = ((struct indexEntry *)bp)->info.tag;
if (a > b) {
return 1;
} else if (a < b) {
return -1;
} else {
return 0;
}
return (a - b);
}
void headerSort(Header h)
@ -408,7 +399,7 @@ Header headerLoad(void *pv)
/* copy data w/ endian conversions */
switch (entry->info.type) {
case RPM_INT32_TYPE:
case RPM_INT32_TYPE:
count = entry->info.count;
while (count--) {
*((int_32 *)dst) = htonl(*((int_32 *)src));
@ -417,7 +408,7 @@ Header headerLoad(void *pv)
}
break;
case RPM_INT16_TYPE:
case RPM_INT16_TYPE:
count = entry->info.count;
while (count--) {
*((int_16 *)dst) = htons(*((int_16 *)src));
@ -426,7 +417,7 @@ Header headerLoad(void *pv)
}
break;
default:
default:
memcpy(dst, src, entry->length);
break;
}
@ -479,7 +470,7 @@ static void *doHeaderUnload(Header h, /*@out@*/int * lengthPtr)
/* copy data w/ endian conversions */
switch (entry->info.type) {
case RPM_INT32_TYPE:
case RPM_INT32_TYPE:
count = entry->info.count;
src = entry->data;
while (count--) {
@ -489,7 +480,7 @@ static void *doHeaderUnload(Header h, /*@out@*/int * lengthPtr)
}
break;
case RPM_INT16_TYPE:
case RPM_INT16_TYPE:
count = entry->info.count;
src = entry->data;
while (count--) {
@ -499,7 +490,7 @@ static void *doHeaderUnload(Header h, /*@out@*/int * lengthPtr)
}
break;
default:
default:
memcpy(chptr, entry->data, entry->length);
chptr += entry->length;
break;
@ -579,9 +570,8 @@ Header headerRead(FD_t fd, int magicp)
if (magicp == HEADER_MAGIC_YES) {
magic = block[i++];
if (memcmp(&magic, header_magic, sizeof(magic))) {
if (memcmp(&magic, header_magic, sizeof(magic)))
return NULL;
}
reserved = block[i++];
}
@ -613,90 +603,6 @@ Header headerRead(FD_t fd, int magicp)
return h;
}
int headerGzWrite(FD_t fd, Header h, int magicp)
{
void * p;
int length;
int_32 l;
ssize_t nb;
p = doHeaderUnload(h, &length);
if (magicp) {
nb = Fwrite(header_magic, sizeof(char), sizeof(header_magic), fd);
if (nb != sizeof(header_magic)) {
free(p);
return 1;
}
l = htonl(0);
nb = Fwrite(&l, sizeof(char), sizeof(l), fd);
if (nb != sizeof(l)) {
free(p);
return 1;
}
}
nb = Fwrite(p, sizeof(char), length, fd);
if (nb != length) {
free(p);
return 1;
}
free(p);
return 0;
}
Header headerGzRead(FD_t fd, int magicp)
{
int_32 reserved;
int_32 * p;
int_32 il, dl;
int_32 magic;
Header h;
void * block;
int totalSize;
if (magicp == HEADER_MAGIC_YES) {
if (Fread(&magic, sizeof(char), sizeof(magic), fd) != sizeof(magic))
return NULL;
if (memcmp(&magic, header_magic, sizeof(magic))) {
return NULL;
}
if (Fread(&reserved, sizeof(char), sizeof(reserved), fd) != sizeof(reserved))
return NULL;
}
/* First read the index length (count of index entries) */
if (Fread(&il, sizeof(char), sizeof(il), fd) != sizeof(il))
return NULL;
il = ntohl(il);
/* Then read the data length (number of bytes) */
if (Fread(&dl, sizeof(char), sizeof(dl), fd) != sizeof(dl))
return NULL;
dl = ntohl(dl);
totalSize = sizeof(int_32) + sizeof(int_32) +
(il * sizeof(struct entryInfo)) + dl;
block = p = xmalloc(totalSize);
*p++ = htonl(il);
*p++ = htonl(dl);
totalSize -= sizeof(int_32) + sizeof(int_32);
if (Fread(p, sizeof(char), totalSize, fd) != totalSize)
return NULL;
h = headerLoad(block);
free(block);
return h;
}
/********************************************************************/
/* */
/* Header dumping */
@ -721,17 +627,17 @@ void headerDump(Header h, FILE *f, int flags,
" OFSET COUNT\n");
for (i = 0; i < h->indexUsed; i++) {
switch (p->info.type) {
case RPM_NULL_TYPE: type = "NULL_TYPE"; break;
case RPM_CHAR_TYPE: type = "CHAR_TYPE"; break;
case RPM_BIN_TYPE: type = "BIN_TYPE"; break;
case RPM_INT8_TYPE: type = "INT8_TYPE"; break;
case RPM_INT16_TYPE: type = "INT16_TYPE"; break;
case RPM_INT32_TYPE: type = "INT32_TYPE"; break;
/*case RPM_INT64_TYPE: type = "INT64_TYPE"; break;*/
case RPM_STRING_TYPE: type = "STRING_TYPE"; break;
case RPM_STRING_ARRAY_TYPE: type = "STRING_ARRAY_TYPE"; break;
case RPM_I18NSTRING_TYPE: type = "I18N_STRING_TYPE"; break;
default: type = "(unknown)"; break;
case RPM_NULL_TYPE: type = "NULL_TYPE"; break;
case RPM_CHAR_TYPE: type = "CHAR_TYPE"; break;
case RPM_BIN_TYPE: type = "BIN_TYPE"; break;
case RPM_INT8_TYPE: type = "INT8_TYPE"; break;
case RPM_INT16_TYPE: type = "INT16_TYPE"; break;
case RPM_INT32_TYPE: type = "INT32_TYPE"; break;
/*case RPM_INT64_TYPE: type = "INT64_TYPE"; break;*/
case RPM_STRING_TYPE: type = "STRING_TYPE"; break;
case RPM_STRING_ARRAY_TYPE: type = "STRING_ARRAY_TYPE"; break;
case RPM_I18NSTRING_TYPE: type = "I18N_STRING_TYPE"; break;
default: type = "(unknown)"; break;
}
tage = tags;
@ -1096,18 +1002,16 @@ unsigned int headerSizeof(Header h, int magicp)
size = sizeof(int_32); /* count of index entries */
size += sizeof(int_32); /* length of data */
size += sizeof(struct entryInfo) * h->indexUsed;
if (magicp) {
if (magicp)
size += 8;
}
for (i = 0; i < h->indexUsed; i++) {
/* Alignment */
type = h->index[i].info.type;
if (typeSizes[type] > 1) {
diff = typeSizes[type] - (size % typeSizes[type]);
if (diff != typeSizes[type]) {
if (diff != typeSizes[type])
size += diff;
}
}
size += h->index[i].length;
@ -1124,8 +1028,8 @@ static void copyData(int_32 type, /*@out@*/void * dstPtr, const void * srcPtr, i
int i, len;
switch (type) {
case RPM_STRING_ARRAY_TYPE:
case RPM_I18NSTRING_TYPE:
case RPM_STRING_ARRAY_TYPE:
case RPM_I18NSTRING_TYPE:
/* Otherwise, p is char** */
i = c;
src = (const char **) srcPtr;
@ -1138,7 +1042,7 @@ static void copyData(int_32 type, /*@out@*/void * dstPtr, const void * srcPtr, i
}
break;
default:
default:
memcpy(dstPtr, srcPtr, dataLength);
break;
}
@ -1230,9 +1134,8 @@ int headerAddI18NString(Header h, int_32 tag, const char * string, const char *
table = findEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE);
entry = findEntry(h, tag, RPM_I18NSTRING_TYPE);
if (!table && entry) {
if (!table && entry)
return 0; /* this shouldn't ever happen!! */
}
if (!table && !entry) {
const char * charArray[2];
@ -1330,9 +1233,8 @@ int headerModifyEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c)
/* First find the tag */
entry = findEntry(h, tag, type);
if (!entry) {
if (!entry)
return 0;
}
/* make sure entry points to the first occurence of this tag */
while (entry > h->index && (entry - 1)->info.tag == tag)
@ -1368,9 +1270,8 @@ int headerAppendEntry(Header h, int_32 tag, int_32 type, void * p, int_32 c)
/* First find the tag */
entry = findEntry(h, tag, type);
if (!entry) {
if (!entry)
return 0;
}
if (type == RPM_STRING_TYPE || type == RPM_I18NSTRING_TYPE) {
/* we can't do this */
@ -1424,15 +1325,14 @@ int headerRemoveEntry(Header h, int_32 tag)
static char escapedChar(const char ch)
{
switch (ch) {
case 'a': return '\a';
case 'b': return '\b';
case 'f': return '\f';
case 'n': return '\n';
case 'r': return '\r';
case 't': return '\t';
case 'v': return '\v';
default: return ch;
case 'a': return '\a';
case 'b': return '\b';
case 'f': return '\f';
case 'n': return '\n';
case 'r': return '\r';
case 't': return '\t';
case 'v': return '\v';
default: return ch;
}
}
@ -1541,7 +1441,7 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
currToken = -1;
while (*start && !done) {
switch (*start) {
case '%':
case '%':
/* handle %% */
if (*(start + 1) == '%') {
if (currToken < 0 || format[currToken].type != PTOK_STRING) {
@ -1571,93 +1471,94 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
return 1;
}
start = newEnd;
} else {
format[currToken].u.tag.format = start;
format[currToken].u.tag.pad = 0;
format[currToken].u.tag.justOne = 0;
format[currToken].u.tag.arrayCount = 0;
chptr = start;
while (*chptr && *chptr != '{' && *chptr != '%') chptr++;
if (!*chptr || *chptr == '%') {
*error = _("missing { after %");
freeFormat(format, numTokens);
return 1;
}
*chptr++ = '\0';
while (start < chptr) {
if (isdigit(*start)) {
i = strtoul(start, &start, 10);
format[currToken].u.tag.pad += i;
} else {
start++;
}
}
if (*start == '=') {
format[currToken].u.tag.justOne = 1;
start++;
} else if (*start == '#') {
format[currToken].u.tag.justOne = 1;
format[currToken].u.tag.arrayCount = 1;
start++;
}
next = start;
while (*next && *next != '}') next++;
if (!*next) {
*error = _("missing } after %{");
freeFormat(format, numTokens);
return 1;
}
*next++ = '\0';
chptr = start;
while (*chptr && *chptr != ':') chptr++;
if (*chptr) {
*chptr++ = '\0';
if (!*chptr) {
*error = _("empty tag format");
freeFormat(format, numTokens);
return 1;
}
format[currToken].u.tag.type = chptr;
} else {
format[currToken].u.tag.type = NULL;
}
if (!*start) {
*error = _("empty tag name");
freeFormat(format, numTokens);
return 1;
}
i = 0;
findTag(start, tags, extensions, &tag, &ext);
if (tag) {
format[currToken].u.tag.ext = NULL;
format[currToken].u.tag.tag = tag->val;
} else if (ext) {
format[currToken].u.tag.ext = ext->u.tagFunction;
format[currToken].u.tag.extNum = ext - extensions;
} else {
*error = _("unknown tag");
freeFormat(format, numTokens);
return 1;
}
format[currToken].type = PTOK_TAG;
start = next;
break; /* out of switch */
}
format[currToken].u.tag.format = start;
format[currToken].u.tag.pad = 0;
format[currToken].u.tag.justOne = 0;
format[currToken].u.tag.arrayCount = 0;
chptr = start;
while (*chptr && *chptr != '{' && *chptr != '%') chptr++;
if (!*chptr || *chptr == '%') {
*error = _("missing { after %");
freeFormat(format, numTokens);
return 1;
}
*chptr++ = '\0';
while (start < chptr) {
if (isdigit(*start)) {
i = strtoul(start, &start, 10);
format[currToken].u.tag.pad += i;
} else {
start++;
}
}
if (*start == '=') {
format[currToken].u.tag.justOne = 1;
start++;
} else if (*start == '#') {
format[currToken].u.tag.justOne = 1;
format[currToken].u.tag.arrayCount = 1;
start++;
}
next = start;
while (*next && *next != '}') next++;
if (!*next) {
*error = _("missing } after %{");
freeFormat(format, numTokens);
return 1;
}
*next++ = '\0';
chptr = start;
while (*chptr && *chptr != ':') chptr++;
if (*chptr) {
*chptr++ = '\0';
if (!*chptr) {
*error = _("empty tag format");
freeFormat(format, numTokens);
return 1;
}
format[currToken].u.tag.type = chptr;
} else {
format[currToken].u.tag.type = NULL;
}
if (!*start) {
*error = _("empty tag name");
freeFormat(format, numTokens);
return 1;
}
i = 0;
findTag(start, tags, extensions, &tag, &ext);
if (tag) {
format[currToken].u.tag.ext = NULL;
format[currToken].u.tag.tag = tag->val;
} else if (ext) {
format[currToken].u.tag.ext = ext->u.tagFunction;
format[currToken].u.tag.extNum = ext - extensions;
} else {
*error = _("unknown tag");
freeFormat(format, numTokens);
return 1;
}
format[currToken].type = PTOK_TAG;
start = next;
break;
case '[':
case '[':
*dst++ = '\0';
*start++ = '\0';
currToken++;
@ -1682,8 +1583,8 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
break;
case ']':
case '}':
case ']':
case '}':
if ((*start == ']' && state != PARSER_IN_ARRAY) ||
(*start == '}' && state != PARSER_IN_EXPR)) {
if (*start == ']')
@ -1698,7 +1599,7 @@ static int parseFormat(char * str, const struct headerTagTableEntry * tags,
done = 1;
break;
default:
default:
if (currToken < 0 || format[currToken].type != PTOK_STRING) {
currToken++;
format[currToken].type = PTOK_STRING;
@ -1734,9 +1635,10 @@ static int parseExpression(struct sprintfToken * token, char * str,
const struct headerSprintfExtension * extensions,
/*@out@*/ char ** endPtr, /*@out@*/ const char ** error)
{
char * chptr, * end;
const struct headerTagTableEntry * tag;
const struct headerSprintfExtension * ext;
char * chptr;
char * end;
*error = NULL;
chptr = str;
@ -1759,6 +1661,7 @@ static int parseExpression(struct sprintfToken * token, char * str,
if (parseFormat(chptr, tags, extensions, &token->u.cond.ifFormat,
&token->u.cond.numIfTokens, &end, PARSER_IN_EXPR, error))
return 1;
if (!*end) {
*error = _("} expected in expression");
freeFormat(token->u.cond.ifFormat, token->u.cond.numIfTokens);
@ -1913,12 +1816,11 @@ static char * formatValue(struct sprintfTag * tag, Header h,
}
switch (type) {
case RPM_STRING_ARRAY_TYPE:
case RPM_STRING_ARRAY_TYPE:
strarray = (const char **)data;
if (tagtype) {
if (tagtype)
val = tagtype(RPM_STRING_TYPE, strarray[element], buf, tag->pad, 0);
}
if (!val) {
strcat(buf, "s");
@ -1932,10 +1834,9 @@ static char * formatValue(struct sprintfTag * tag, Header h,
break;
case RPM_STRING_TYPE:
if (tagtype) {
case RPM_STRING_TYPE:
if (tagtype)
val = tagtype(RPM_STRING_ARRAY_TYPE, data, buf, tag->pad, 0);
}
if (!val) {
strcat(buf, "s");
@ -1946,21 +1847,20 @@ static char * formatValue(struct sprintfTag * tag, Header h,
}
break;
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
case RPM_INT16_TYPE:
case RPM_INT32_TYPE:
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE:
case RPM_INT16_TYPE:
case RPM_INT32_TYPE:
switch (type) {
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE: intVal = *(((int_8 *) data) + element); break;
case RPM_INT16_TYPE: intVal = *(((uint_16 *) data) + element); break;
default: /* keep -Wall quiet */
case RPM_INT32_TYPE: intVal = *(((int_32 *) data) + element);
case RPM_CHAR_TYPE:
case RPM_INT8_TYPE: intVal = *(((int_8 *) data) + element); break;
case RPM_INT16_TYPE: intVal = *(((uint_16 *) data) + element); break;
default: /* keep -Wall quiet */
case RPM_INT32_TYPE: intVal = *(((int_32 *) data) + element);
}
if (tagtype) {
if (tagtype)
val = tagtype(RPM_INT32_TYPE, &intVal, buf, tag->pad, element);
}
if (!val) {
strcat(buf, "d");
@ -1970,7 +1870,7 @@ static char * formatValue(struct sprintfTag * tag, Header h,
}
break;
default:
default:
val = xstrdup(_("(unknown type)"));
break;
}
@ -1978,11 +1878,12 @@ static char * formatValue(struct sprintfTag * tag, Header h,
return val;
}
static char * singleSprintf(Header h, struct sprintfToken * token,
static const char * singleSprintf(Header h, struct sprintfToken * token,
const struct headerSprintfExtension * extensions,
struct extensionCache * extCache, int element)
{
char * val, * thisItem;
char * val;
const char * thisItem;
int thisItemLen;
int len, alloced;
int i, j;
@ -1994,20 +1895,20 @@ static char * singleSprintf(Header h, struct sprintfToken * token,
/* we assume the token and header have been validated already! */
switch (token->type) {
case PTOK_NONE:
case PTOK_NONE:
break;
case PTOK_STRING:
case PTOK_STRING:
val = xmalloc(token->u.string.len + 1);
strcpy(val, token->u.string.string);
break;
case PTOK_TAG:
case PTOK_TAG:
val = formatValue(&token->u.tag, h, extensions, extCache,
token->u.tag.justOne ? 0 : element);
break;
case PTOK_COND:
case PTOK_COND:
if (token->u.cond.tag.ext ||
headerIsEntry(h, token->u.cond.tag.tag)) {
condFormat = token->u.cond.ifFormat;
@ -2032,12 +1933,12 @@ static char * singleSprintf(Header h, struct sprintfToken * token,
}
strcat(val, thisItem);
len += thisItemLen;
free(thisItem);
free((void *)thisItem);
}
break;
case PTOK_ARRAY:
case PTOK_ARRAY:
numElements = -1;
for (i = 0; i < token->u.array.numTokens; i++) {
if (token->u.array.format[i].type != PTOK_TAG ||
@ -2079,7 +1980,7 @@ static char * singleSprintf(Header h, struct sprintfToken * token,
}
strcat(val, thisItem);
len += thisItemLen;
free(thisItem);
free((void *)thisItem);
}
}
}
@ -2135,10 +2036,8 @@ char * headerSprintf(Header h, const char * origFmt,
struct sprintfToken * format;
int numTokens;
char * answer;
const char * piece;
int answerLength;
int answerAlloced;
int pieceLength;
int i;
struct extensionCache * extCache;
@ -2159,6 +2058,9 @@ char * headerSprintf(Header h, const char * origFmt,
*answer = '\0';
for (i = 0; i < numTokens; i++) {
const char * piece;
int pieceLength;
piece = singleSprintf(h, format + i, extensions, extCache, 0);
if (piece) {
pieceLength = strlen(piece);

View File

@ -256,15 +256,15 @@ int showQueryPackage(QVA_t *qva, /*@unused@*/rpmdb rpmdb, Header h)
if (queryFlags & QUERY_FOR_STATE) {
if (fileStatesList) {
switch (fileStatesList[i]) {
case RPMFILE_STATE_NORMAL:
case RPMFILE_STATE_NORMAL:
fputs(_("normal "), fp); break;
case RPMFILE_STATE_REPLACED:
case RPMFILE_STATE_REPLACED:
fputs(_("replaced "), fp); break;
case RPMFILE_STATE_NOTINSTALLED:
case RPMFILE_STATE_NOTINSTALLED:
fputs(_("not installed "), fp); break;
case RPMFILE_STATE_NETSHARED:
case RPMFILE_STATE_NETSHARED:
fputs(_("net shared "), fp); break;
default:
default:
fprintf(fp, _("(unknown %3d) "),
(int)fileStatesList[i]);
}
@ -627,24 +627,39 @@ int rpmQueryVerify(QVA_t *qva, enum rpmQVSources source, const char * arg,
}
/*@fallthrough@*/
case RPMQV_PATH:
mi = rpmdbInitIterator(rpmdb, RPMTAG_BASENAMES, arg, 0);
{ const char * s;
char * fn;
for (s = arg; *s; s++)
if (!(*s == '.' || *s == '/')) break;
if (*s == '\0') {
char fnbuf[PATH_MAX];
fn = /*@-unrecog@*/ realpath(arg, fnbuf) /*@=unrecog@*/;
fn = xstrdup( (fn ? fn : arg) );
} else
fn = xstrdup(arg);
rpmCleanPath(fn);
mi = rpmdbInitIterator(rpmdb, RPMTAG_BASENAMES, fn, 0);
if (mi == NULL) {
int myerrno = 0;
if (access(arg, F_OK) != 0)
if (access(fn, F_OK) != 0)
myerrno = errno;
switch (myerrno) {
default:
fprintf(stderr, _("file %s: %s\n"), arg, strerror(myerrno));
fprintf(stderr, _("file %s: %s\n"), fn, strerror(myerrno));
break;
case 0:
fprintf(stderr, _("file %s is not owned by any package\n"), arg);
fprintf(stderr, _("file %s is not owned by any package\n"), fn);
break;
}
retcode = 1;
} else {
retcode = showMatches(qva, mi, showPackage);
}
break;
xfree(fn);
} break;
case RPMQV_DBOFFSET:
{ int mybase = 10;

View File

@ -55,7 +55,7 @@ extern const int rpmTagTableSize;
/* this chains to headerDefaultFormats[] */
extern const struct headerSprintfExtension rpmHeaderFormats[];
/* these pseudo-tags are used in the dbi interface */
/* these pseudo-tags are used by the dbi iterator interface */
#define RPMDBI_PACKAGES 0
#define RPMDBI_DEPENDS 1
#define RPMDBI_LABEL 2 /* XXX remove rpmdbFindByLabel from API */
@ -71,7 +71,6 @@ extern const struct headerSprintfExtension rpmHeaderFormats[];
#define RPMTAG_VERSION 1001
#define RPMTAG_RELEASE 1002
#define RPMTAG_EPOCH 1003
#define RPMTAG_SERIAL RPMTAG_EPOCH /* backward comaptibility */
#define RPMTAG_SUMMARY 1004
#define RPMTAG_DESCRIPTION 1005
#define RPMTAG_BUILDTIME 1006
@ -83,7 +82,6 @@ extern const struct headerSprintfExtension rpmHeaderFormats[];
#define RPMTAG_GIF 1012
#define RPMTAG_XPM 1013
#define RPMTAG_LICENSE 1014
#define RPMTAG_COPYRIGHT RPMTAG_LICENSE /* backward comaptibility */
#define RPMTAG_PACKAGER 1015
#define RPMTAG_GROUP 1016
#define RPMTAG_CHANGELOG 1017 /* internal */
@ -117,7 +115,6 @@ extern const struct headerSprintfExtension rpmHeaderFormats[];
#define RPMTAG_FILEVERIFYFLAGS 1045
#define RPMTAG_ARCHIVESIZE 1046
#define RPMTAG_PROVIDENAME 1047
#define RPMTAG_PROVIDES RPMTAG_PROVIDENAME /* backward comaptibility */
#define RPMTAG_REQUIREFLAGS 1048
#define RPMTAG_REQUIRENAME 1049
#define RPMTAG_REQUIREVERSION 1050
@ -152,7 +149,6 @@ extern const struct headerSprintfExtension rpmHeaderFormats[];
#define RPMTAG_POSTUNPROG 1088
#define RPMTAG_BUILDARCHS 1089
#define RPMTAG_OBSOLETENAME 1090
#define RPMTAG_OBSOLETES RPMTAG_OBSOLETENAME /* backward comaptibility */
#define RPMTAG_VERIFYSCRIPTPROG 1091
#define RPMTAG_TRIGGERSCRIPTPROG 1092
#define RPMTAG_DOCDIR 1093 /* internal */
@ -167,7 +163,7 @@ extern const struct headerSprintfExtension rpmHeaderFormats[];
#define RPMTAG_TRIGGERPOSTUN 1102 /* internal */
#define RPMTAG_AUTOREQ 1103 /* internal */
#define RPMTAG_AUTOPROV 1104 /* internal */
#define RPMTAG_CAPABILITY 1105 /* unused */
#define RPMTAG_CAPABILITY 1105 /* unused internal */
#define RPMTAG_SOURCEPACKAGE 1106 /* internal */
#define RPMTAG_OLDORIGFILENAMES 1107 /* obsolete */
#define RPMTAG_BUILDPREREQ 1108 /* internal */
@ -191,7 +187,7 @@ extern const struct headerSprintfExtension rpmHeaderFormats[];
#define RPMTAG_PAYLOADFLAGS 1126
#define RPMTAG_MULTILIBS 1127
#define RPMTAG_PRETRANSACTION 1128
#define RPMTAG_POSTTRANSACTION 1129
#define RPMTAG_POSTTRANSACTION 1129 /*unused */
#define RPMTAG_FIRSTFREE_TAG 1130 /* internal */
#define RPMTAG_EXTERNAL_TAG 1000000

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-07-09 11:09-0400\n"
"POT-Creation-Date: 2000-07-09 18:45-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"
@ -849,7 +849,7 @@ msgid " --checksig <pkg>+"
msgstr ""
#: rpm.c:508
msgid " -K <pkg>+ "
msgid " -K <pkg>+ "
msgstr ""
#: rpm.c:509 rpmqv.c:616
@ -1307,7 +1307,7 @@ msgid "query/verify all packages"
msgstr ""
#: rpmqv.c:433
msgid " -f <file>+ "
msgid " -f <file>+ "
msgstr ""
#: rpmqv.c:434
@ -1315,7 +1315,7 @@ msgid "query/verify package owning <file>"
msgstr ""
#: rpmqv.c:435
msgid " -p <packagefile>+ "
msgid " -p <packagefile>+ "
msgstr ""
#: rpmqv.c:436
@ -1323,7 +1323,7 @@ msgid "query/verify (uninstalled) package <packagefile>"
msgstr ""
#: rpmqv.c:437
msgid " --triggeredby <pkg> "
msgid " --triggeredby <pkg> "
msgstr ""
#: rpmqv.c:438
@ -1487,7 +1487,7 @@ msgstr ""
msgid "no tar files given for build"
msgstr ""
#: build/build.c:110 build/pack.c:349
#: build/build.c:110 build/pack.c:350
msgid "Unable to open temp file."
msgstr ""
@ -1635,92 +1635,92 @@ msgstr ""
msgid "File listed twice: %s"
msgstr ""
#: build/files.c:913
#: build/files.c:917
#, c-format
msgid "Symlink points to BuildRoot: %s -> %s"
msgstr ""
#: build/files.c:998
#: build/files.c:1006
#, c-format
msgid "File doesn't match prefix (%s): %s"
msgstr ""
#: build/files.c:1008
#: build/files.c:1016
#, c-format
msgid "File not found: %s"
msgstr ""
#: build/files.c:1051
#: build/files.c:1059
#, c-format
msgid "Bad owner/group: %s\n"
msgstr ""
#: build/files.c:1065
#: build/files.c:1071
#, c-format
msgid "File %4d: %07o %s.%s\t %s\n"
msgstr ""
#: build/files.c:1139
#: build/files.c:1145
#, c-format
msgid "File needs leading \"/\": %s"
msgstr ""
#: build/files.c:1168
#: build/files.c:1174
#, c-format
msgid "File not found by glob: %s"
msgstr ""
#: build/files.c:1221
#: build/files.c:1227
msgid "Could not open %%files file %s: %s"
msgstr ""
#: build/files.c:1228 build/pack.c:100
#: build/files.c:1234 build/pack.c:100
#, c-format
msgid "line: %s"
msgstr ""
#: build/files.c:1555
#: build/files.c:1561
#, c-format
msgid "Bad file: %s: %s"
msgstr ""
#: build/files.c:1567 build/parsePrep.c:34
#: build/files.c:1573 build/parsePrep.c:34
#, c-format
msgid "Bad owner/group: %s"
msgstr ""
#. XXX this error message is probably not seen.
#: build/files.c:1622
#: build/files.c:1628
#, c-format
msgid "Couldn't exec %s: %s"
msgstr ""
#: build/files.c:1627
#: build/files.c:1633
#, c-format
msgid "Couldn't fork %s: %s"
msgstr ""
#: build/files.c:1709
#: build/files.c:1715
#, c-format
msgid "%s failed"
msgstr ""
#: build/files.c:1713
#: build/files.c:1719
#, c-format
msgid "failed to write all data to %s"
msgstr ""
#: build/files.c:1809
#: build/files.c:1815
#, c-format
msgid "Finding %s: (using %s)...\n"
msgstr ""
#: build/files.c:1837 build/files.c:1847
#: build/files.c:1843 build/files.c:1853
#, c-format
msgid "Failed to find %s:"
msgstr ""
#: build/files.c:1957
#: build/files.c:1963
#, c-format
msgid "Processing files: %s-%s-%s\n"
msgstr ""
@ -1803,51 +1803,51 @@ msgstr ""
msgid "readRPM: reading header from %s\n"
msgstr ""
#: build/pack.c:361
#: build/pack.c:362
msgid "Bad CSA data"
msgstr ""
#: build/pack.c:397
#: build/pack.c:398
#, c-format
msgid "Could not open %s: %s\n"
msgstr ""
#: build/pack.c:429
#: build/pack.c:430
#, c-format
msgid "Unable to write package: %s"
msgstr ""
#: build/pack.c:444
#: build/pack.c:445
#, c-format
msgid "Generating signature: %d\n"
msgstr ""
#: build/pack.c:460
#: build/pack.c:461
#, c-format
msgid "Unable to open sigtarget %s: %s"
msgstr ""
#: build/pack.c:470
#: build/pack.c:471
#, c-format
msgid "Unable to read sigtarget %s: %s"
msgstr ""
#: build/pack.c:480
#: build/pack.c:481
#, c-format
msgid "Unable to write package %s: %s"
msgstr ""
#: build/pack.c:495
#: build/pack.c:496
#, c-format
msgid "Wrote: %s\n"
msgstr ""
#: build/pack.c:564
#: build/pack.c:560
#, c-format
msgid "Could not generate output filename for package %s: %s\n"
msgstr ""
#: build/pack.c:581
#: build/pack.c:577
#, c-format
msgid "cannot create %s: %s\n"
msgstr ""
@ -2191,51 +2191,51 @@ msgstr ""
msgid "line %d: Bad %s number: %s\n"
msgstr ""
#: lib/cpio.c:358
#: lib/cpio.c:363
#, c-format
msgid "can't rename %s to %s: %s\n"
msgstr ""
#: lib/cpio.c:364
#: lib/cpio.c:369
#, c-format
msgid "can't unlink %s: %s\n"
msgstr ""
#: lib/cpio.c:608
#: lib/cpio.c:616
#, c-format
msgid "getNextHeader: %s\n"
msgstr ""
#: lib/cpio.c:1069
#: lib/cpio.c:1078
#, c-format
msgid "(error 0x%x)"
msgstr ""
#: lib/cpio.c:1072
#: lib/cpio.c:1081
msgid "Bad magic"
msgstr ""
#: lib/cpio.c:1073
#: lib/cpio.c:1082
msgid "Bad/unreadable header"
msgstr ""
#: lib/cpio.c:1091
#: lib/cpio.c:1100
msgid "Header size too big"
msgstr ""
#: lib/cpio.c:1092
#: lib/cpio.c:1101
msgid "Unknown file type"
msgstr ""
#: lib/cpio.c:1093
#: lib/cpio.c:1102
msgid "Missing hard link"
msgstr ""
#: lib/cpio.c:1094
#: lib/cpio.c:1103
msgid "Internal error"
msgstr ""
#: lib/cpio.c:1103
#: lib/cpio.c:1112
msgid " failed - "
msgstr ""
@ -2252,79 +2252,79 @@ msgstr ""
msgid " %s A %s\tB %s\n"
msgstr ""
#: lib/depends.c:844
#: lib/depends.c:836
#, c-format
msgid "%s: %-45s YES (added files)\n"
msgstr ""
#: lib/depends.c:893
#: lib/depends.c:885
#, c-format
msgid "%s: %-45s YES (added package)\n"
msgstr ""
#: lib/depends.c:897
#: lib/depends.c:889
#, c-format
msgid "%s: %-45s YES (added package, SHOULDN'T HAPPEN)\n"
msgstr ""
#: lib/depends.c:916
#: lib/depends.c:908
#, c-format
msgid "%s: %-45s YES (added provide)\n"
msgstr ""
#: lib/depends.c:960
#: lib/depends.c:952
#, c-format
msgid "%s: %-45s %-3s (cached)\n"
msgstr ""
#: lib/depends.c:977
#: lib/depends.c:969
#, c-format
msgid "%s: %-45s YES (rpmrc provides)\n"
msgstr ""
#: lib/depends.c:1000
#: lib/depends.c:992
#, c-format
msgid "%s: %-45s YES (db files)\n"
msgstr ""
#: lib/depends.c:1013
#: lib/depends.c:1005
#, c-format
msgid "%s: %-45s YES (db provides)\n"
msgstr ""
#: lib/depends.c:1027
#: lib/depends.c:1019
#, c-format
msgid "%s: %-45s YES (db packages)\n"
msgstr ""
#: lib/depends.c:1044
#: lib/depends.c:1036
#, c-format
msgid "%s: %-45s YES (rpmlib version)\n"
msgstr ""
#: lib/depends.c:1055
#: lib/depends.c:1047
#, c-format
msgid "%s: %-45s NO\n"
msgstr ""
#: lib/depends.c:1076
#: lib/depends.c:1068
#, c-format
msgid "%s: (%s, %s) added to Depends cache.\n"
msgstr ""
#. requirements are not satisfied.
#: lib/depends.c:1130
#: lib/depends.c:1122
#, c-format
msgid "package %s require not satisfied: %s\n"
msgid "package %s-%s-%s require not satisfied: %s\n"
msgstr ""
#. conflicts exist.
#: lib/depends.c:1197
#: lib/depends.c:1189
#, c-format
msgid "package %s conflicts: %s\n"
msgstr ""
#: lib/depends.c:1324
#: lib/depends.c:1315
#, c-format
msgid "loop in prerequisite chain: %s"
msgstr ""
@ -2468,7 +2468,7 @@ msgid ""
msgstr ""
#: lib/formats.c:69 lib/formats.c:86 lib/formats.c:106 lib/formats.c:138
#: lib/header.c:2190 lib/header.c:2206 lib/header.c:2225
#: lib/header.c:2092 lib/header.c:2108 lib/header.c:2127
msgid "(not a number)"
msgstr ""
@ -2501,74 +2501,74 @@ msgstr ""
msgid "grabData() RPM_STRING_TYPE count must be 1.\n"
msgstr ""
#: lib/header.c:250 lib/header.c:815 lib/install.c:323
#: lib/header.c:250 lib/header.c:721 lib/install.c:323
#, c-format
msgid "Data type %d not supported\n"
msgstr ""
#: lib/header.c:1174
#: lib/header.c:1078
#, c-format
msgid "Bad count for headerAddEntry(): %d\n"
msgstr ""
#: lib/header.c:1583
#: lib/header.c:1485
#, c-format
msgid "missing { after %"
msgstr ""
#: lib/header.c:1611
#: lib/header.c:1513
msgid "missing } after %{"
msgstr ""
#: lib/header.c:1623
#: lib/header.c:1525
msgid "empty tag format"
msgstr ""
#: lib/header.c:1633
#: lib/header.c:1535
msgid "empty tag name"
msgstr ""
#: lib/header.c:1648
#: lib/header.c:1550
msgid "unknown tag"
msgstr ""
#: lib/header.c:1674
#: lib/header.c:1575
msgid "] expected at end of array"
msgstr ""
#: lib/header.c:1690
#: lib/header.c:1591
msgid "unexpected ]"
msgstr ""
#: lib/header.c:1692
#: lib/header.c:1593
msgid "unexpected }"
msgstr ""
#: lib/header.c:1746
#: lib/header.c:1648
msgid "? expected in expression"
msgstr ""
#: lib/header.c:1753
#: lib/header.c:1655
msgid "{ expected after ? in expression"
msgstr ""
#: lib/header.c:1763 lib/header.c:1798
#: lib/header.c:1666 lib/header.c:1701
msgid "} expected in expression"
msgstr ""
#: lib/header.c:1771
#: lib/header.c:1674
msgid ": expected following ? subexpression"
msgstr ""
#: lib/header.c:1785
#: lib/header.c:1688
msgid "{ expected after : in expression"
msgstr ""
#: lib/header.c:1806
#: lib/header.c:1709
msgid "| expected at end of expression"
msgstr ""
#: lib/header.c:1974
#: lib/header.c:1874
msgid "(unknown type)"
msgstr ""
@ -3029,32 +3029,32 @@ msgstr ""
msgid "no package provides %s\n"
msgstr ""
#: lib/query.c:637
#: lib/query.c:651
#, c-format
msgid "file %s: %s\n"
msgstr ""
#: lib/query.c:640
#: lib/query.c:654
#, c-format
msgid "file %s is not owned by any package\n"
msgstr ""
#: lib/query.c:665
#: lib/query.c:680
#, c-format
msgid "invalid package number: %s\n"
msgstr ""
#: lib/query.c:668
#: lib/query.c:683
#, c-format
msgid "package record number: %u\n"
msgstr ""
#: lib/query.c:672
#: lib/query.c:687
#, c-format
msgid "record %d could not be read\n"
msgstr ""
#: lib/query.c:683 lib/rpminstall.c:448
#: lib/query.c:698 lib/rpminstall.c:448
#, c-format
msgid "package %s is not installed\n"
msgstr ""

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-05-31 21:46-0400\n"
"POT-Creation-Date: 2000-07-09 15:05-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"

2
rpm.c
View File

@ -342,7 +342,7 @@ static void printHelp(void) {
printHelpLine(_(" --whatrequires <cap>"),
_("query packages which require <cap> capability"));
puts( _(" Information selection options:"));
printHelpLine( " -i, --info ",
printHelpLine( " -i, --info ",
_("display package information"));
printHelpLine( " --changelog ",
_("display the package's change log"));

View File

@ -5,7 +5,7 @@ Summary: The Red Hat package management system.
Name: rpm
%define version 4.0
Version: %{version}
Release: 0.46
Release: 0.47
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/rpm-%{version}.tar.gz
Copyright: GPL
@ -257,6 +257,13 @@ fi
* Sun Jul 9 2000 Jeff Johnson <jbj@redhat.com>
- add pre-transaction syscall's to handle /etc/init.d change.
- don't bother saving '/' as fingerprint subdir.
- eliminate legacy RPMTAG_{OBSOLETES,PROVIDES,CAPABILITY}.
- eliminate unused headerGz{Read,Write}.
- fix: payload compression tag not nul terminated.
- prefix payload paths with "./", otherwise "/" can't be represented.
- fix: compressFilelist broke when fed '/'.
- fix: typo in --last popt alias (#12690).
- fix: clean file paths before performing -qf (#12493).
* Wed Jul 5 2000 Jeff Johnson <jbj@redhat.com>
- change optflags for i386.

View File

@ -63,8 +63,8 @@ rpm alias --triggerscripts --qf '\
%{TRIGGERSCRIPTS}\n]'
rpm alias --triggers --triggerscripts
rpm alias --last --qf ''%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
--pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-35s %-s\n\", $1, substr($0,length($1)+2))}' "
rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
--pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' "
rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]'
@ -245,8 +245,8 @@ rpmq alias --triggerscripts --qf '\
%{TRIGGERSCRIPTS}\n]'
rpmq alias --triggers --triggerscripts
rpmq alias --last --qf ''%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
--pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-35s %-s\n\", $1, substr($0,length($1)+2))}' "
rpmq alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \
--pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' "
rpmq alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]'
#==============================================================================