return 1;
}
-static char *findLastChar(char *s)
+static inline char * findLastChar(char * s)
{
char *res = s;
int num, rc, len;
/* Find the start of the "field" and strip trailing space */
- while ((*field) && (*field != ':')) {
+ while ((*field) && (*field != ':'))
field++;
- }
if (*field != ':') {
rpmError(RPMERR_BADSPEC, _("line %d: Malformed tag: %s"),
spec->lineNum, spec->line);
(void) urlPath(specURL, (const char **)&field);
if (*field == '\0') field = "/";
buildRootURL = rpmGenPath(spec->rootURL, field, NULL);
- field = spec->buildRootURL = buildRootURL;
+ spec->buildRootURL = buildRootURL;
+ field = (char *) buildRootURL;
if (_debug)
fprintf(stderr, "*** PPA BuildRoot %s set from field\n", buildRootURL);
}
{RPMTAG_RELEASE, 0, 0, "release"},
{RPMTAG_EPOCH, 0, 0, "epoch"},
{RPMTAG_EPOCH, 0, 0, "serial"},
-/* {RPMTAG_DESCRIPTION, 0, 0, "description"}, */
{RPMTAG_SUMMARY, 0, 1, "summary"},
{RPMTAG_LICENSE, 0, 0, "copyright"},
{RPMTAG_LICENSE, 0, 0, "license"},
{RPMTAG_GROUP, 0, 1, "group"},
{RPMTAG_PACKAGER, 0, 0, "packager"},
{RPMTAG_URL, 0, 0, "url"},
-/* {RPMTAG_ROOT, 0, 0, "root"}, */
{RPMTAG_SOURCE, 0, 0, "source"},
{RPMTAG_PATCH, 0, 0, "patch"},
{RPMTAG_NOSOURCE, 0, 0, "nosource"},
{RPMTAG_EXCLUSIVEARCH, 0, 0, "exclusivearch"},
{RPMTAG_EXCLUDEOS, 0, 0, "excludeos"},
{RPMTAG_EXCLUSIVEOS, 0, 0, "exclusiveos"},
-/* {RPMTAG_EXCLUDE, 0, 0, "exclude"}, */
-/* {RPMTAG_EXCLUSIVE, 0, 0, "exclusive"}, */
{RPMTAG_ICON, 0, 0, "icon"},
{RPMTAG_PROVIDEFLAGS, 0, 0, "provides"},
{RPMTAG_REQUIREFLAGS, 0, 0, "requires"},
{0, 0, 0, 0}
};
-static void initPreambleList(void)
+static inline void initPreambleList(void)
{
- struct PreambleRec *p = preambleList;
-
- while (p->token) {
+ struct PreambleRec *p;
+ for (p = preambleList; p->token; p++)
p->len = strlen(p->token);
- p++;
- }
}
static int findPreambleTag(Spec spec, /*@out@*/int *tag, /*@out@*/char **macro, char *lang)
{
char *s;
- struct PreambleRec *p = preambleList;
+ struct PreambleRec *p;
- if (! p->len) {
+ if (preambleList[0].len == 0)
initPreambleList();
- }
- while (p->token && strncasecmp(spec->line, p->token, p->len)) {
- p++;
+ for (p = preambleList; p->token; p++) {
+ if (!strncasecmp(spec->line, p->token, p->len))
+ break;
}
- if (!p->token) {
+ if (p->token == NULL)
return 1;
- }
s = spec->line + p->len;
SKIPSPACE(s);
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-11-26 16:52-0500\n"
+"POT-Creation-Date: 1999-11-26 17:29-0500\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 "Unknown icon type: %s"
msgstr ""
-#: build/parsePreamble.c:339
+#: build/parsePreamble.c:338
#, c-format
msgid "line %d: Malformed tag: %s"
msgstr ""
#. Empty field
-#: build/parsePreamble.c:347
+#: build/parsePreamble.c:346
#, c-format
msgid "line %d: Empty tag: %s"
msgstr ""
-#: build/parsePreamble.c:370 build/parsePreamble.c:377
+#: build/parsePreamble.c:369 build/parsePreamble.c:376
#, c-format
msgid "line %d: Illegal char '-' in %s: %s"
msgstr ""
msgid "Internal error: Bogus tag %d"
msgstr ""
-#: build/parsePreamble.c:696
+#: build/parsePreamble.c:688
#, c-format
msgid "Bad package specification: %s"
msgstr ""
-#: build/parsePreamble.c:702
+#: build/parsePreamble.c:694
#, c-format
msgid "Package already exists: %s"
msgstr ""
-#: build/parsePreamble.c:729
+#: build/parsePreamble.c:721
#, c-format
msgid "line %d: Unknown tag: %s"
msgstr ""
-#: build/parsePreamble.c:754
+#: build/parsePreamble.c:746
msgid "Spec file can't use BuildRoot"
msgstr ""
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
-#include <rpm/rpmlib.h>
-#include <rpm/header.h>
#include <string.h>
+#include <glob.h> /* XXX rpmio.h */
+#include <dirent.h> /* XXX rpmio.h */
+
+#include <rpmlib.h>
+
#include "hash.h"
#include "upgrade.h"
pack = bsearch(&keyaddr, psp->packages, psp->numPackages,
sizeof(*psp->packages), (void *)pkgCompare);
if (!pack) {
- if (headerGetEntry(h, RPMTAG_FILENAMES, NULL,
+ if (headerGetEntry(h, RPMTAG_OLDFILENAMES, NULL,
(void **) &installedFiles, &installedFileCount)) {
compareFileList(0, NULL, installedFileCount,
installedFiles, ht);
DEBUG (("UPGRADE\n"))
(*pip)->selected = 1;
- if (!headerGetEntry(h, RPMTAG_FILENAMES, NULL,
+ if (!headerGetEntry(h, RPMTAG_OLDFILENAMES, NULL,
(void **) &availFiles, &availFileCount)) {
availFiles = NULL;
availFileCount = 0;
/* Compare the file lists */
installedHeader =
rpmdbGetRecord(db, matches.recs[i].recOffset);
- if (!headerGetEntry(installedHeader, RPMTAG_FILENAMES, NULL,
+ if (!headerGetEntry(installedHeader, RPMTAG_OLDFILENAMES, NULL,
(void **) &installedFiles,
&installedFileCount)) {
installedFiles = NULL;
name = NULL;
headerGetEntry(h, RPMTAG_NAME, NULL, (void **) &name, NULL);
- if (!headerGetEntry(h, RPMTAG_FILENAMES, NULL,
+ if (!headerGetEntry(h, RPMTAG_OLDFILENAMES, NULL,
(void **) &availFiles, &availFileCount)) {
availFiles = NULL;
availFileCount = 0;
availFiles = NULL;
availFileCount = 0;
- if (headerGetEntry(h, RPMTAG_FILENAMES, NULL,
+ if (headerGetEntry(h, RPMTAG_OLDFILENAMES, NULL,
(void **) &availFiles, &availFileCount)) {
for (i = 0; i < availFileCount; i++) {
if ((file = htInTable(ht, availFiles[i]))) {