Advertising
- rockzman
- Monday, February 5th, 2007 at 6:39:06pm UTC
- #! /bin/sh -e
- if [ "$1" = configure ]; then
- (
- cd /usr/lib/python2.5
- files=$(dpkg -L python2.5-minimal | sed -n '/\.py$/s,^/usr/lib/python2.5/,,p')
- /usr/bin/python2.5 /usr/lib/python2.5/py_compile.py $files
- if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
- /usr/bin/python2.5 -O /usr/lib/python2.5/py_compile.py $files
- fi
- )
- if [ -z "$2" ] || dpkg --compare-versions "$2" lt 2.5-3 \
- || [ -f /var/lib/python/python2.5_installed ] \
- || grep -sq '^supported-versions[^#]*python2.5' /usr/share/python/debian_defaults
- then
- # new installation or installation of first version with hook support
- if [ "$DEBIAN_FRONTEND" != noninteractive ]; then
- echo "Linking and byte-compiling packages for runtime python2.5..."
- fi
- version=$(dpkg -s python2.5-minimal | awk '/^Version:/ {print $2}')
- for hook in /usr/share/python/runtime.d/*.rtinstall; do
- [ -x $hook ] || continue
- $hook rtinstall python2.5 "$2" "$version"
- done
- if [ -f /var/lib/python/python2.5_installed ]; then
- rm -f /var/lib/python/python2.5_installed
- rmdir --ignore-fail-on-non-empty /var/lib/python 2>/dev/null
- fi
- fi
- fi
- case "$1" in
- configure)
- # Create empty directories in /usr/local
- if [ ! -e /usr/local/lib/python2.5 ]; then
- mkdir -p /usr/local/lib/python2.5 2> /dev/null || true
- chmod 2775 /usr/local/lib/python2.5 2> /dev/null || true
- chown root:staff /usr/local/lib/python2.5 2> /dev/null || true
- fi
- if [ ! -e /usr/local/lib/python2.5/site-packages ]; then
- mkdir -p /usr/local/lib/python2.5/site-packages 2> /dev/null || true
- chmod 2775 /usr/local/lib/python2.5/site-packages 2> /dev/null || true
- chown root:staff /usr/local/lib/python2.5/site-packages 2> /dev/null || true
- fi
- ;;
- esac
- exit 0
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.