From: Michael Tremer Date: Tue, 23 Dec 2008 09:22:13 +0000 (+0100) Subject: Hardlink equal python bytecode files. X-Git-Tag: v3.0-alpha1~347 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb62326a4c784f0492e7dbf9dbf49f0d1ab36b9f;p=ipfire-3.x.git Hardlink equal python bytecode files. --- diff --git a/lfs/strip b/lfs/strip index 51ba05540..64f9b441d 100644 --- a/lfs/strip +++ b/lfs/strip @@ -55,6 +55,14 @@ ifeq "$(STAGE)" "toolchain" endif ifeq "$(STAGE)" "packages" + ## If the pyc and pyo files are the same, we can hardlink them + for pyc in $$(find /usr/lib/python* -type f -name "*.pyc"); do \ + pyo=$$(echo "$$pyc" | sed "s/.pyc$$/.pyo/"); \ + if cmp -s "$$pyc" "$$pyo"; then \ + ln -f "$$pyc" "$$pyo"; \ + fi; \ + done + -$(TOOLS_DIR)/bin/find $(LFS)/{,usr/}{bin,lib,sbin} -type f -exec \ $(TOOLS_DIR)/bin/strip --strip-debug '{}' ';' &>/dev/null -$(TOOLS_DIR)/bin/find $(LFS)/{,usr/}{bin,sbin} -type f -exec \