[arch-dev-public] Namcap/XZ compatibility (was: Accept any *.pkg.tar.* package file name)
Am Montag, 22. Februar 2010 05:33:56 schrieb Dan McGee:
Another thing: it was mentionned on the IRC channel that namcap doesn't work with the new xz packages. It would be nice to have xz support in namcap before we start pushing these changes out.
Yeah, this is IMHO a blocker to going gung-ho on this. It is not going to be super-easy either as we use python's built-in archive support that doesn't know about XZ as far as I know...
Why not? Just call bsdtar to extract the tar somewhere. This way you don#t have to worry how the package is compressed.
Maybe you can get away with this in a shell script, but no one is happy with this BS in a python program. Or at least I wouldn't be, but feel free to send a patch to the namcap maintainer since it is so easy. I'll be impressed when you fix every check that uses tar.getmembers() too...
What's wrong with you? That was meant as a serious question. I am not familiar with the namcap python code. Sorry if I came across as snarky, but it drives me crazy when people make unfeasible suggestions without looking at the completely open code first. Namcap does a lot more than simply look at an extracted set of files, a lot of which requires access to the tar metadata. My
I don't really want to drop the idea of xz compressed packages just because python does not support it. I'm not advocating that, I can assure you. I am glad Allan came up with that link showing that XZ support in Python does have some
On Sun, Feb 21, 2010 at 11:15 PM, Pierre Schmitz <pierre@archlinux.de> wrote: point was only to say "this isn't as easy as you make it out to be". traction upstream.
It might sound silly but the probably easiest solution might be to modify namcap to support uncompressed tar archives. Then we can add a simple Bash wrapper script which uncompresses the package and calls namcap with the pure tar. Looking at the code, there is nothing preventing this right now- we just use a generic tar interface which will support any compression or no compression at all.
-Dan
Am Montag, 22. Februar 2010 06:55:03 schrieb Dan McGee:
Looking at the code, there is nothing preventing this right now- we just use a generic tar interface which will support any compression or no compression at all.
It checks if the extension is .tar.gz in at least two places. Adjusting those should make it work. I'll provide a patch for this so we can use namcap with any compression right now and don't need to wait until this becomes available in python. -- Pierre Schmitz, https://users.archlinux.de/~pierre
Am Montag, 22. Februar 2010 07:00:15 schrieb Pierre Schmitz:
I'll provide a patch for this
Here it is: http://bugs.archlinux.org/task/18424 This patch should work fine as a drop in replacement. (It even seems to be faster than letting python uncompress that tar; does it this for every call of a test?) -- Pierre Schmitz, https://users.archlinux.de/~pierre
Am Montag, 22. Februar 2010 06:55:03 schrieb Dan McGee:
It might sound silly but the probably easiest solution might be to modify namcap to support uncompressed tar archives. Then we can add a simple Bash wrapper script which uncompresses the package and calls namcap with the pure tar.
Looking at the code, there is nothing preventing this right now- we just use a generic tar interface which will support any compression or no compression at all.
For those who want to check their xz packages before the next namcap released I have added the relevant patches to namcap 2.4: https://users.archlinux.de/~pierre/packages/namcap-2.4-1.1-i686.pkg.tar.xz https://users.archlinux.de/~pierre/packages/namcap-2.4-1.1-x86_64.pkg.tar.xz And the PKGBUILD including the patches can be found at https://users.archlinux.de/~pierre/packages/namcap-2.4-1.1.src.tar.gz Greetings, Pierre -- Pierre Schmitz, https://users.archlinux.de/~pierre
participants (2)
-
Dan McGee
-
Pierre Schmitz