David R. Morrison wrote: [] > Anyway, my conclusion from all of this is that the two-exit-code > status of tar is here to stay, at least for now. And while Apple is > currently using tar-1.15.x, we have no control over when they might > change to tar-1.16.x. Thus, switching to /usr/bin/tar surrenders any > control we might have over the problem, and patching tar itself dooms > us to continue patching tar forever.
I agree with your conclusion. Just one minor correction: The tar exit codes themselves did not change between 1.15 and 1.16, only their use did. Both versions have #define TAREXIT_SUCCESS 0 #define TAREXIT_DIFFERS 1 #define TAREXIT_FAILURE 2 So if we patch dpkg to crash only for exit code 2, it will work with the older version, too. There are two situations where the use of the exit codes has changed between 1.15 and 1.16: The first is when a file truncation has been detected. In 1.15 this gave exit code 2, and this was changed to 1 in 1.16 in order to distinguish it from more serious fatal errors. This is what the message http://lists.gnu.org/archive/html/bug-tar/2006-10/msg00024.html talks about, and from the message it is clear that the author at that time (1.15) already thought that exit code 1 was not to be considered a fatal error. Thus dpkg's handling of error codes was already flawed for that version of tar. It could get away with it, because exit code 1 was practically unused in 1.15, and completely unused in tar archive creation. The file truncation situation seems to be extremely rare. The second is when a ctime change has been detected. In 1.15 this gave a warning with exit code 0 (no error), and this was changed - without any discussion or explanation I can find - to 1 in 1.16. In addition, the test for file size increase was introduced at the same place, again without explanation. Actually, according to the ChangeLog, the "file changed as we read it" was downgraded from an error to a warning sometime in 2003. Its re-upgrade to an error (although a minor one with exit code 1) was decided on a whim and not properly documented in the ChangeLog. So much for being "conservative". In conclusion I think while morally tar is to blame here, dpkg can safely be patched to fail only for tar exit code 2, and this will be correct for tar 1.15 and 1.16, so we don't need to depend on a specific tar version for this. -- Martin ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-devel