Gnu tar sometimes prints a "tar: Record size = 16" message, breaking
rpmbuild -ta.

--- ./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);
        }
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to