[Fedora-packaging] Hardlinking *.pyc and *.pyo

Ville Skyttä ville.skytta at iki.fi
Wed Jun 13 18:51:54 UTC 2007

On Tuesday 03 April 2007, Ville Skyttä wrote:
> Hello,
> Related to recent space saving discussions, I came across PLD's
> rpm-build-macros package recently, and found that they hardlink
> identical *.pyc and *.pyo.
> The PLD implementation looks like this:
> The use of "cmp" would require diffutils installed.  Or the above
> could be converted to use hardlink instead (which would have to be made
> sure to be around) or maybe sha1sum (in coreutils, pretty much always
> around in buildroots).
> I suppose something like the above could be easily added to
> redhat-rpm-config or rpm, eg. embedded in brp-python-bytecompile
> or run after it in %__os_install_post.

Jeremy pinged me about resurrecting this thread, so here goes, the original 
threads starts at 
http://www.redhat.com/archives/fedora-packaging/2007-April/msg00003.html for 
those who missed it.

Anyway, attached is a patch against rpm.org hg for discussion - seems somewhat 
clumsy to use sha1sum for this but I guess it could be acceptable.  Tested on 
just a few python packages on F-7.  Better implementations certainly exist, 
and are welcome :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hardlink-pyo.patch
Type: text/x-diff
Size: 849 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20070613/e98fe987/attachment.bin>

More information about the Fedora-packaging mailing list