summaryrefslogtreecommitdiff
path: root/build/parsePrep.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-01-15 23:09:42 +0000
committerjbj <devnull@localhost>2001-01-15 23:09:42 +0000
commitc74cc1df1c51f0c2a99de94cb0a0b1e9448499f2 (patch)
tree68ccc4b1ad6388c283f56cf9c932b2712efc29ed /build/parsePrep.c
parent082ccecf35f3fb73c2a58b9052f102e5d9386fc4 (diff)
downloadrpm-c74cc1df1c51f0c2a99de94cb0a0b1e9448499f2.tar.gz
rpm-c74cc1df1c51f0c2a99de94cb0a0b1e9448499f2.tar.bz2
rpm-c74cc1df1c51f0c2a99de94cb0a0b1e9448499f2.zip
- fix: extra newline in many error messages (#23947).
- fix: rpm -Va with db1 needs per-iterator, not per-index, offset. - add install/remove transaction id tags. CVS patchset: 4441 CVS date: 2001/01/15 23:09:42
Diffstat (limited to 'build/parsePrep.c')
-rw-r--r--build/parsePrep.c43
1 files changed, 24 insertions, 19 deletions
diff --git a/build/parsePrep.c b/build/parsePrep.c
index f1aa47039..99e170438 100644
--- a/build/parsePrep.c
+++ b/build/parsePrep.c
@@ -34,11 +34,12 @@ static int checkOwners(const char *urlfn)
struct stat sb;
if (Lstat(urlfn, &sb)) {
- rpmError(RPMERR_BADSPEC, _("Bad source: %s: %s"), urlfn, strerror(errno));
+ rpmError(RPMERR_BADSPEC, _("Bad source: %s: %s\n"),
+ urlfn, strerror(errno));
return RPMERR_BADSPEC;
}
if (!getUname(sb.st_uid) || !getGname(sb.st_gid)) {
- rpmError(RPMERR_BADSPEC, _("Bad owner/group: %s"), urlfn);
+ rpmError(RPMERR_BADSPEC, _("Bad owner/group: %s\n"), urlfn);
return RPMERR_BADSPEC;
}
@@ -71,7 +72,7 @@ static int checkOwners(const char *urlfn)
}
}
if (sp == NULL) {
- rpmError(RPMERR_BADSPEC, _("No patch number %d"), c);
+ rpmError(RPMERR_BADSPEC, _("No patch number %d\n"), c);
return NULL;
}
@@ -161,7 +162,7 @@ static int checkOwners(const char *urlfn)
}
}
if (sp == NULL) {
- rpmError(RPMERR_BADSPEC, _("No source number %d"), c);
+ rpmError(RPMERR_BADSPEC, _("No source number %d\n"), c);
return NULL;
}
@@ -180,8 +181,9 @@ static int checkOwners(const char *urlfn)
if (Lstat(urlfn, &st) != 0 && errno == ENOENT &&
urlIsUrl(sp->fullSource) != URL_IS_UNKNOWN) {
if ((rc = urlGetFile(sp->fullSource, urlfn)) != 0) {
- rpmError(RPMERR_BADFILENAME, _("Couldn't download nosource %s: %s"),
- sp->fullSource, ftpStrerror(rc));
+ rpmError(RPMERR_BADFILENAME,
+ _("Couldn't download nosource %s: %s\n"),
+ sp->fullSource, ftpStrerror(rc));
return NULL;
}
}
@@ -274,7 +276,7 @@ static int doSetupMacro(Spec spec, char *line)
dirName = NULL;
if ((rc = poptParseArgvString(line, &argc, &argv))) {
- rpmError(RPMERR_BADSPEC, _("Error parsing %%setup: %s"),
+ rpmError(RPMERR_BADSPEC, _("Error parsing %%setup: %s\n"),
poptStrerror(rc));
return RPMERR_BADSPEC;
}
@@ -289,7 +291,7 @@ static int doSetupMacro(Spec spec, char *line)
/* We only parse -a and -b here */
if (parseNum(optArg, &num)) {
- rpmError(RPMERR_BADSPEC, _("line %d: Bad arg to %%setup %c: %s"),
+ rpmError(RPMERR_BADSPEC, _("line %d: Bad arg to %%setup %c: %s\n"),
spec->lineNum, num, optArg);
free(argv);
freeStringBuf(before);
@@ -307,7 +309,7 @@ static int doSetupMacro(Spec spec, char *line)
}
if (arg < -1) {
- rpmError(RPMERR_BADSPEC, _("line %d: Bad %%setup option %s: %s"),
+ rpmError(RPMERR_BADSPEC, _("line %d: Bad %%setup option %s: %s\n"),
spec->lineNum,
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
poptStrerror(arg));
@@ -440,16 +442,18 @@ static int doPatchMacro(Spec spec, char *line)
/* orig suffix */
opt_b = strtok(NULL, " \t\n");
if (! opt_b) {
- rpmError(RPMERR_BADSPEC, _("line %d: Need arg to %%patch -b: %s"),
- spec->lineNum, spec->line);
+ rpmError(RPMERR_BADSPEC,
+ _("line %d: Need arg to %%patch -b: %s\n"),
+ spec->lineNum, spec->line);
return RPMERR_BADSPEC;
}
} else if (!strcmp(s, "-z")) {
/* orig suffix */
opt_b = strtok(NULL, " \t\n");
if (! opt_b) {
- rpmError(RPMERR_BADSPEC, _("line %d: Need arg to %%patch -z: %s"),
- spec->lineNum, spec->line);
+ rpmError(RPMERR_BADSPEC,
+ _("line %d: Need arg to %%patch -z: %s\n"),
+ spec->lineNum, spec->line);
return RPMERR_BADSPEC;
}
} else if (!strncmp(s, "-p", sizeof("-p")-1)) {
@@ -460,24 +464,25 @@ static int doPatchMacro(Spec spec, char *line)
s = strtok(NULL, " \t\n");
if (s == NULL) {
rpmError(RPMERR_BADSPEC,
- _("line %d: Need arg to %%patch -p: %s"),
+ _("line %d: Need arg to %%patch -p: %s\n"),
spec->lineNum, spec->line);
return RPMERR_BADSPEC;
}
}
if (parseNum(s, &opt_p)) {
- rpmError(RPMERR_BADSPEC, _("line %d: Bad arg to %%patch -p: %s"),
- spec->lineNum, spec->line);
+ rpmError(RPMERR_BADSPEC,
+ _("line %d: Bad arg to %%patch -p: %s\n"),
+ spec->lineNum, spec->line);
return RPMERR_BADSPEC;
}
} else {
/* Must be a patch num */
if (patch_index == 1024) {
- rpmError(RPMERR_BADSPEC, _("Too many patches!"));
+ rpmError(RPMERR_BADSPEC, _("Too many patches!\n"));
return RPMERR_BADSPEC;
}
if (parseNum(s, &(patch_nums[patch_index]))) {
- rpmError(RPMERR_BADSPEC, _("line %d: Bad arg to %%patch: %s"),
+ rpmError(RPMERR_BADSPEC, _("line %d: Bad arg to %%patch: %s\n"),
spec->lineNum, spec->line);
return RPMERR_BADSPEC;
}
@@ -513,7 +518,7 @@ int parsePrep(Spec spec)
char **lines, **saveLines;
if (spec->prep != NULL) {
- rpmError(RPMERR_BADSPEC, _("line %d: second %%prep"), spec->lineNum);
+ rpmError(RPMERR_BADSPEC, _("line %d: second %%prep\n"), spec->lineNum);
return RPMERR_BADSPEC;
}