Description: Add hook to remove .pyc files Author: Colin Watson Bug-Debian: TODO Forwarded: TODO Last-Update: 2011-06-22 Index: b/examples/hooks/all_chroot_pyc-purge.sh =================================================================== --- /dev/null +++ b/examples/hooks/all_chroot_pyc-purge.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# This is a hook for live-build(7) to remove byte-compiled Python modules. +# To enable it, copy or symlink this hook into your config/chroot_local-hooks +# directory. + +find /usr -name \*.pyc -print0 | xargs -0r rm -f Index: b/scripts/build/lb_chroot_hacks =================================================================== --- a/scripts/build/lb_chroot_hacks +++ b/scripts/build/lb_chroot_hacks @@ -227,7 +227,7 @@ # build the index in the background which will be racy in the context of # live-build. if [ -x chroot/usr/sbin/update-apt-xapian-index ]; then - Chroot chroot /usr/sbin/update-apt-xapian-index --force --quiet + Chroot chroot PYTHONDONTWRITEBYTECODE=1 /usr/sbin/update-apt-xapian-index --force --quiet fi # Remove build systems clock drift