The version of 'tar' supplied with UnTarBZ2 doesn't cope with filenames > 99 chars
Jeffrey Lee (213) 6048 posts |
A lot of people have been reporting problems with extracting source archives using UnTarBZ2. After trying it myself today, I’ve been able to recreate the issues, and it looks like it all comes down to the fact that the version of tar supplied with UnTarBZ2 doesn’t contain any workarounds for the 100 character file name limit inherent in the tar format It looks like there are two seperate issues with file name lengths which will cause problems:
Interestingly, WinRAR copes fine with #1, but fails with #2 (although my copy of WinRAR is 6 years old anyway, so there’s a good chance that bug has been fixed by now). It looks like there are multiple different tar format variants available, presumably all of them designed to cope with limitations like the 100 character name limit. E.g. the version of GNU tar on the riscos.info site supports the following formats:
Unfortunately we can’t simply switch to the version of tar that’s on riscos.info because it’s broken :( (It doesn’t seem to swap /’s for .’s properly, resulting in directories called “TungstenDev/bsd”, etc.) Plus it would probably need a patch for handling the ,xxx filetype extensions anyway. So, two questions:
|
Jeffrey Lee (213) 6048 posts |
After playing with the latest riscos.info tar a bit more, it looks like this problem can be easily solved with the following: *set UnixEnv$tar$sfix "" This will allow the tar to be extracted correctly, apart from the ,xxx extensions not being handled. But that can easily be dealt with with a simple BASIC script, or maybe an improved version of EraseCVS. The riscos.info version of tar can also un-bzip the file on-the-fly, which will surely save a bit of time/disc space (especially for people using SCSIFS on their beagles). |
Jeffrey Lee (213) 6048 posts |
Except it can’t, because I’ve just tried it :( It relies in the bzip2 utility being present, and just pipes the output between the two tools (which for unixlib seems to have been implemented by just writing a temporary file to the scrap folder). |
Steve Revill (20) 1361 posts |
I suspect replacing the tar utility in UnTarBZ2 with the current one from riscos.info and adding a stage to fix-up the ,xxx suffixes into filetypes might be the way forward. I’ll add it to my ToDo list. |