[pacman-dev] [PATCH] [Idea] makepkg: Extract from any file bsdtar can recognize

Andres P aepd87 at gmail.com
Sat May 29 17:22:19 EDT 2010


On Sat, May 29, 2010 at 04:17:16PM -0500, Dan McGee wrote:
> > If bsdtar -tf is deemed as reliable, then it should make the file(1)
> > check redundant, seeing that makepkg uses bsdtar to extract.
> 
> Except you've now introduced the overhead of reading every archive
> twice which is really stupid, since 95% of files will pass the "file"
> check.
> 
I realized that it was slower before I mentioned it:
    $ time for i in {1..1000}; do file -bizL neon-0.29.3-2-i686.pkg.tar.xz >/dev/null; done
    real    0m20.664s
    $ time for i in {1..1000}; do bsdtar -tf neon-0.29.3-2-i686.pkg.tar.xz >/dev/null; done
    real    1m16.193s

But it greatly simplifies code :/

It's the python dilemma...

Andres P


More information about the pacman-dev mailing list