8.2-RELEASE: usr.bin/tar 8.3-RELEASE: contrib/libarchive/tar There is a problem with fixing crappy bsd-tar (in which I''ve spotted numerous sloppy coding, some reported some not as I recall): Because this tar doesnt notice & error on missing files, this using tar (as an example of many others) works OK: cd /usr/ports/textproc/intltool; make package whereas it should error with No such file or directory File: /usr/src/usr.bin/tar/util.c, Line 295, Ret 395 so as tar failsto detect, numerous errors in FreeBSD-8.2-RELEASE have not been detected & fixed. As I dont want to personaly fix & send-pr sll those errors, I leave tar broken, & I don''t apply my fix below. *** 8.1_and_8.0-RELEASE-generic/src/usr.bin/tar/util.c Mon Jun 14 04:09:06 2010 --- generic+jhs_error_detect/src/usr.bin/tar/util.c Mon Jan 31 05:42:32 2011 *************** *** 234,239 **** --- 234,241 ---- exit(eval); } + /* Get confirmation from user to do something, eg add/ copy // JHS + Return: 1=yes, 0=no */ // JHS int yes(const char *fmt, ...) { *************** *** 249,254 **** --- 251,263 ---- fflush(stderr); l = read(2, buff, sizeof(buff) - 1); + if (l < 0) // JHS + { // JHS + perror(NULL) ; // JHS + fprintf(stderr,"Failed to read yes/no\n" ); // JHS + fprintf(stderr,"File: %s, Line %d, Ret %d\n", // JHS + __FILE__, __LINE__, (int)l ); // JHS + } // JHS if (l <= 0) return (0); buff[l] = 0; *************** *** 307,312 **** --- 316,331 ---- /* Get some more data into the buffer. */ bytes_wanted = buff + buff_length - buff_end; bytes_read = fread(buff_end, 1, bytes_wanted, f); + if ( // JHS + ( bytes_read < bytes_wanted ) // JHS + || // JHS + (bytes_read = 0) // JHS + ) { // JHS + perror(NULL) ; // JHS + fprintf(stderr, // JHS + "File: %s, Line %d, Ret %d\n", // JHS + __FILE__, __LINE__, (int)bytes_read ); // JHS + } // JHS buff_end += bytes_read; /* Process all complete lines in the buffer. */ while (line_end < buff_end) {