1 |
On 04/22/13 13:03, Tobias Klausmann wrote: |
2 |
> Hi! |
3 |
> |
4 |
> Since we probably will have to fix the files coming out of |
5 |
> tarballs until the various upstreams have fixed them, I propose |
6 |
> running a PNG fixer during or after the install phase. Since |
7 |
> having pngcrush as dep for everything is not exactly lightweight, |
8 |
> I hacked together a PNG file fixer in pure(ish, see below) |
9 |
> Python: |
10 |
No please, this real should stay really far from any package manager. |
11 |
There are only two sane options: |
12 |
1) fix libpng to be backward compatible |
13 |
2) fix the package, and re-package / add a package for broken images |
14 |
|
15 |
But please don't push on all our user systems something like this. |
16 |
|
17 |
> |
18 |
> http://git.schwarzvogel.de/?p=pngfixer;a=summary |
19 |
> |
20 |
> Feel free to send patches |
21 |
> |
22 |
> Note that all I wrote is the mind-numbingly simple pngfixer.py |
23 |
> script. The rest of the Python code is excised from PIL |
24 |
> (http://www.pythonware.com/products/pil/index.htm). I didn't have |
25 |
> to change anything there. |
26 |
> |
27 |
> Also note that it is not _strictly_ pure Python I'm using: the |
28 |
> PIL components use Python's zlib.so and therefore are subject to |
29 |
> bugs in _that_ code. |
30 |
|
31 |
Thanks for taking the time to write this it could be useful for |
32 |
developers, but hopefully not as initially intended ;-) |
33 |
|
34 |
> |
35 |
> Still needed: |
36 |
> |
37 |
> - How do we ship this? |
38 |
> - How do we run it for every ebuild? (probably something like |
39 |
> find /var/tmp/portage/.../image/ -iname \*.png -exec {...}\;) |
40 |
> |
41 |
> Regards, |
42 |
> Tobias |
43 |
Regards, |
44 |
Francesco |