Closed cemkeylan closed 4 years ago
I think we just call sbase/
ubase` a write-off and forget they exist entirely. They're so limited compared to literally every implementation of whatever they provide. It keeps causing me a headache.
I'll spend some time going over your changes, from first glance they look OK. Thank you for tackling the strip-components issue, I appreciate it!
Yeah, Michael himself recommended against using sbase tar
, and the maintainer of ubase cannot be reached anymore.
Obviously these patches can be improved, but I have yet to see an issue.
Is the tar -opts
usage more portable than the tar opts
usage we're currently using? Any kind of source or rationale for this change?
Talking about this commit: https://github.com/CarbsLinux/kiss/commit/46819119907121b5f5e58c0f75c7f91323cc8b32
Yes, older implementations (and sbase, heh) do not accept options without -
. Newer tar implementations don't have an issue with this. If I recall, this was implemented by GNU and others followed it.
Sorry, turns out it was the opposite. GNU implemented flags. Older implementations do not accept flags, but older implementations do not have required keys (like p
). sbase
doesn't accept usage without flags, but it's not usable either way. I will revert the changes.
Pushed my changes and added a 4th patch to the issue :+1:
The p
flag is unneeded (from what I understand): https://github.com/kisslinux/kiss/commit/1933a19e105d83a512c9312022ba1d57bc04fd73
Oh man. Busybox tar actually just ignores p
. We were never actually using it:
///////:-p - accepted but ignored, restores mode (aliases in GNU tar: --preserve-permissions, --same-permissions)
Oh wow, I feel betrayed.
Well, at least we now know that this will work with old implementations as well.
Now, on my fork I have finally got rid of strip components with these three commits:
I have tested it with packages that use multiple tarball sources (like
gst-plugins
) and tested it with toybox tar.NOTES:
sbase
tar still doesn't work as it doesn't have a-p
option (This is an issue for installing packages rather than building).tar -tf
and the other fortar -xf
, which slows down the operation. I have tested the speed withlinux-headers
as it is one of the biggest tar archives in the core repository. It took 11 seconds to do akiss b linux-headers
with strip-components, it now takes 16 seconds to do it with this new method.