2 # Filename: /etc/grml/fai/config/scripts/GRMLBASE/95-package-information
3 # Purpose: store package information of chroot system
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2 or any later version.
7 # Latest change: Fri Dec 21 23:22:17 CET 2007 [mika]
8 ################################################################################
11 [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
12 [ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
13 [ -n "$HOSTNAME" ] || HOSTNAME=grml
14 PACKAGE_LOG=/var/log/fai/"$HOSTNAME"/last/
16 # generate the package list and store it on the ISO itself for grml-docs:
17 [ -d $target/usr/share/doc/grml-docs/packages ] || mkdir $target/usr/share/doc/grml-docs/packages
18 COLUMNS=200 $ROOTCMD dpkg --list > $target/usr/share/doc/grml-docs/packages/dpkg_list
20 if ! [ -w "$PACKAGE_LOG" ] ; then
21 echo "Error: can not write to ${PACKAGE_LOG}. Exiting.">&2
24 # store package list for the build process logs as well:
25 COLUMNS=200 $ROOTCMD dpkg --list > "${PACKAGE_LOG}"/dpkg.list
26 COLUMNS=200 $ROOTCMD dpkg --get-selections > "${PACKAGE_LOG}"/dpkg.selections
27 # store list of packages sorted by size:
28 if [ -x $target/usr/bin/dpkg-query ] ; then
29 $ROOTCMD dpkg-query -W --showformat='${Package}\t${Installed-Size;10}\n' > \
30 "${PACKAGE_LOG}"/packages.size
34 ## END OF FILE #################################################################