From 691b06f7a6f08e82967b188cc31d1dcb6737bce5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 19 Jul 2011 10:59:15 +0200 Subject: Numbering embedded hooks. --- share/hooks/001-update-apt-xapian-index.chroot | 14 ++++++++++++++ share/hooks/002-update-mlocate-database.chroot | 14 ++++++++++++++ share/hooks/003-remove-gnome-icon-cache.chroot | 9 +++++++++ share/hooks/004-remove-python-py.chroot | 7 +++++++ share/hooks/remove-gnome-icon-cache.chroot | 9 --------- share/hooks/remove-python-py.chroot | 7 ------- share/hooks/update-apt-xapian-index.chroot | 14 -------------- share/hooks/update-mlocate-database.chroot | 14 -------------- 8 files changed, 44 insertions(+), 44 deletions(-) create mode 100755 share/hooks/001-update-apt-xapian-index.chroot create mode 100755 share/hooks/002-update-mlocate-database.chroot create mode 100755 share/hooks/003-remove-gnome-icon-cache.chroot create mode 100755 share/hooks/004-remove-python-py.chroot delete mode 100755 share/hooks/remove-gnome-icon-cache.chroot delete mode 100755 share/hooks/remove-python-py.chroot delete mode 100755 share/hooks/update-apt-xapian-index.chroot delete mode 100755 share/hooks/update-mlocate-database.chroot (limited to 'share') diff --git a/share/hooks/001-update-apt-xapian-index.chroot b/share/hooks/001-update-apt-xapian-index.chroot new file mode 100755 index 000000000..dcb39b261 --- /dev/null +++ b/share/hooks/001-update-apt-xapian-index.chroot @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# Update the Apt Xapian index. +# +# The package would do this itself, but (a) it checks policy-rc.d which says it +# is not allowed to, and (b) it wants to build the index in the background which +# will be racy in the context of live-build. + +if [ -x /usr/sbin/update-apt-xapian-index ] +then + PYTHONDONTWRITEBYTECODE=1 /usr/sbin/update-apt-xapian-index --force --quiet +fi diff --git a/share/hooks/002-update-mlocate-database.chroot b/share/hooks/002-update-mlocate-database.chroot new file mode 100755 index 000000000..6bfdb3d4f --- /dev/null +++ b/share/hooks/002-update-mlocate-database.chroot @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# Update the mlocate database. +# +# It is convenient for this to be already up to date on the live system, and it +# means that if the live system is later installed to a hard disk then less +# work will be required after installation. + +if [ -x /usr/bin/updatedb.mlocate ] +then + updatedb.mlocate +fi diff --git a/share/hooks/003-remove-gnome-icon-cache.chroot b/share/hooks/003-remove-gnome-icon-cache.chroot new file mode 100755 index 000000000..f562fd939 --- /dev/null +++ b/share/hooks/003-remove-gnome-icon-cache.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Remove GNOME icon cache. +# +# This saves space some space (e.g. on Kubuntu). + +rm -f /usr/share/icons/*/icon-theme.cache diff --git a/share/hooks/004-remove-python-py.chroot b/share/hooks/004-remove-python-py.chroot new file mode 100755 index 000000000..a8ff40ae5 --- /dev/null +++ b/share/hooks/004-remove-python-py.chroot @@ -0,0 +1,7 @@ +#!/bin/sh + +# Remove Python *.py files. +# +# This removes byte-compiled Python modules to save some space. + +find /usr -name "*.pyc" -print0 | xargs -0r rm -f diff --git a/share/hooks/remove-gnome-icon-cache.chroot b/share/hooks/remove-gnome-icon-cache.chroot deleted file mode 100755 index f562fd939..000000000 --- a/share/hooks/remove-gnome-icon-cache.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -# Remove GNOME icon cache. -# -# This saves space some space (e.g. on Kubuntu). - -rm -f /usr/share/icons/*/icon-theme.cache diff --git a/share/hooks/remove-python-py.chroot b/share/hooks/remove-python-py.chroot deleted file mode 100755 index a8ff40ae5..000000000 --- a/share/hooks/remove-python-py.chroot +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# Remove Python *.py files. -# -# This removes byte-compiled Python modules to save some space. - -find /usr -name "*.pyc" -print0 | xargs -0r rm -f diff --git a/share/hooks/update-apt-xapian-index.chroot b/share/hooks/update-apt-xapian-index.chroot deleted file mode 100755 index dcb39b261..000000000 --- a/share/hooks/update-apt-xapian-index.chroot +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -# Update the Apt Xapian index. -# -# The package would do this itself, but (a) it checks policy-rc.d which says it -# is not allowed to, and (b) it wants to build the index in the background which -# will be racy in the context of live-build. - -if [ -x /usr/sbin/update-apt-xapian-index ] -then - PYTHONDONTWRITEBYTECODE=1 /usr/sbin/update-apt-xapian-index --force --quiet -fi diff --git a/share/hooks/update-mlocate-database.chroot b/share/hooks/update-mlocate-database.chroot deleted file mode 100755 index 6bfdb3d4f..000000000 --- a/share/hooks/update-mlocate-database.chroot +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -# Update the mlocate database. -# -# It is convenient for this to be already up to date on the live system, and it -# means that if the live system is later installed to a hard disk then less -# work will be required after installation. - -if [ -x /usr/bin/updatedb.mlocate ] -then - updatedb.mlocate -fi -- cgit v1.2.3