rpm/tarrecordsize.diff
OBS User autobuild b4494b17ad Accepting request 37534 from Base:System
Copy from Base:System/rpm based on submit request 37534 from user mlschroe

OBS-URL: https://build.opensuse.org/request/show/37534
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=96
2010-04-13 19:06:36 +00:00

18 lines
623 B
Diff

--- ./build.c.orig 2010-04-07 14:56:36.000000000 +0000
+++ ./build.c 2010-04-07 14:58:52.000000000 +0000
@@ -126,7 +126,13 @@ static char * getTarSpec(const char *arg
if (!(fp = popen(cmd, "r"))) {
rpmlog(RPMLOG_ERR, _("Failed to open tar pipe: %m\n"));
} else {
- char *fok = fgets(tarbuf, sizeof(tarbuf) - 1, fp);
+ char *fok;
+ for (;;) {
+ fok = fgets(tarbuf, sizeof(tarbuf) - 1, fp);
+ /* tar sometimes prints "tar: Record size = 16" messages */
+ if (!fok || strncmp(fok, "tar: ", 5) != 0)
+ break;
+ }
pclose(fp);
gotspec = (fok != NULL) && isSpecFile(tmpSpecFile);
}