From 68e8fd157e6a2c934def80dc9055c9b6d685d1b6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 23 Nov 2010 12:31:15 +0100 Subject: Renaming 'packages lists' to 'package lists' all over the place. --- functions/defaults.sh | 22 +++++------ functions/packagelists.sh | 98 ++++++++++++++++++++++++++++++++++++++++++++++ functions/packageslists.sh | 98 ---------------------------------------------- 3 files changed, 109 insertions(+), 109 deletions(-) create mode 100755 functions/packagelists.sh delete mode 100755 functions/packageslists.sh (limited to 'functions') diff --git a/functions/defaults.sh b/functions/defaults.sh index c801656e7..42d18bcc4 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -682,7 +682,7 @@ Set_defaults () ;; *) - LB_PACKAGES_LISTS="${LB_PACKAGES_LISTS:-standard}" + LB_PACKAGE_LISTS="${LB_PACKAGE_LISTS:-standard}" ;; esac @@ -700,7 +700,7 @@ Set_defaults () esac # Setting tasks string - for LIST in ${LB_PACKAGES_LISTS} + for LIST in ${LB_PACKAGE_LISTS} do case "${LIST}" in stripped|minimal) @@ -708,7 +708,7 @@ Set_defaults () ;; gnome-desktop) - LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's|gnome-desktop||') standard-x11" + LB_PACKAGE_LISTS="$(echo ${LB_PACKAGE_LISTS} | sed -e 's|gnome-desktop||') standard-x11" case "${LB_DISTRIBUTION}" in lenny) LB_TASKS="$(echo ${LB_TASKS} | sed -e 's|standard||' -e 's|gnome-desktop||' -e 's|desktop||') standard gnome-desktop desktop" @@ -721,7 +721,7 @@ Set_defaults () ;; kde-desktop) - LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's|kde-desktop||') standard-x11" + LB_PACKAGE_LISTS="$(echo ${LB_PACKAGE_LISTS} | sed -e 's|kde-desktop||') standard-x11" case "${LB_DISTRIBUTION}" in lenny) @@ -734,7 +734,7 @@ Set_defaults () ;; lxde-desktop) - LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's|lxde-desktop||') standard-x11" + LB_PACKAGE_LISTS="$(echo ${LB_PACKAGE_LISTS} | sed -e 's|lxde-desktop||') standard-x11" case "${LB_DISTRIBUTION}" in lenny) @@ -748,7 +748,7 @@ Set_defaults () ;; xfce-desktop) - LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's|xfce-desktop||') standard-x11" + LB_PACKAGE_LISTS="$(echo ${LB_PACKAGE_LISTS} | sed -e 's|xfce-desktop||') standard-x11" case "${LB_DISTRIBUTION}" in lenny) @@ -763,7 +763,7 @@ Set_defaults () esac done - LB_PACKAGES_LISTS="$(echo ${LB_PACKAGES_LISTS} | sed -e 's| ||g')" + LB_PACKAGE_LISTS="$(echo ${LB_PACKAGE_LISTS} | sed -e 's| ||g')" LB_TASKS="$(echo ${LB_TASKS} | sed -e 's| ||g')" # Setting security updates option @@ -818,7 +818,7 @@ Set_defaults () esac # Setting apt indices - if echo ${LB_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b" + if echo ${LB_PACKAGE_LISTS} | grep -qs -E "(stripped|minimal)\b" then LB_APT_INDICES="${LB_APT_INDICES:-none}" else @@ -1112,12 +1112,12 @@ Check_defaults () fi fi - if echo ${LB_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b" + if echo ${LB_PACKAGE_LISTS} | grep -qs -E "(stripped|minimal)\b" then # aptitude + stripped|minimal if [ "${LB_APT}" = "aptitude" ] then - Echo_warning "You selected LB_PACKAGES_LISTS='%s' and LB_APT='aptitude'" "${LB_PACKAGES_LIST}. This configuration is potentially unsafe, as aptitude is not used in the stripped/minimal package lists." + Echo_warning "You selected LB_PACKAGE_LISTS='%s' and LB_APT='aptitude'" "${LB_PACKAGE_LIST}. This configuration is potentially unsafe, as aptitude is not used in the stripped/minimal package lists." fi fi @@ -1174,7 +1174,7 @@ Check_defaults () Echo_warning "You have specified a value of LB_ISO_VOLUME that is too long; the maximum length is 32 characters." fi - if echo ${LB_PACKAGES_LISTS} | grep -qs -E "(stripped|minimal)\b" + if echo ${LB_PACKAGE_LISTS} | grep -qs -E "(stripped|minimal)\b" then if [ "${LB_APT_INDICES}" = "true" ] then diff --git a/functions/packagelists.sh b/functions/packagelists.sh new file mode 100755 index 000000000..94f016fbf --- /dev/null +++ b/functions/packagelists.sh @@ -0,0 +1,98 @@ +#!/bin/sh + +## live-build(7) - System Build Scripts +## Copyright (C) 2006-2010 Daniel Baumann +## +## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +Expand_packagelist () +{ + _LB_EXPAND_QUEUE="$(basename "${1}")" + + shift + + while [ -n "${_LB_EXPAND_QUEUE}" ] + do + _LB_LIST_NAME="$(echo ${_LB_EXPAND_QUEUE} | cut -d" " -f1)" + _LB_EXPAND_QUEUE="$(echo ${_LB_EXPAND_QUEUE} | cut -s -d" " -f2-)" + _LB_LIST_LOCATION="" + _LB_NESTED=0 + _LB_ENABLED=1 + + for _LB_SEARCH_PATH in ${@} config/lists "${LB_BASE:-/usr/share/live/build}/lists" + do + if [ -e "${_LB_SEARCH_PATH}/${_LB_LIST_NAME}" ] + then + _LB_LIST_LOCATION="${_LB_SEARCH_PATH}/${_LB_LIST_NAME}" + break + fi + done + + if [ -z "${_LB_LIST_LOCATION}" ] + then + echo "W: Unknown package list '${_LB_LIST_NAME}'" >&2 + continue + fi + + while read _LB_LINE + do + case "${_LB_LINE}" in + \#if\ *) + if [ ${_LB_NESTED} -eq 1 ] + then + echo "E: Nesting conditionals is not supported" >&2 + exit 1 + fi + _LB_NESTED=1 + + _LB_NEEDLE="$(echo "${_LB_LINE}" | cut -d' ' -f3-)" + _LB_HAYSTACK="$(eval "echo \$LB_$(echo "${_LB_LINE}" | cut -d' ' -f2)")" + + _LB_ENABLED=0 + for _LB_NEEDLE_PART in ${_LB_NEEDLE} + do + for _LB_HAYSTACK_PART in ${_LB_HAYSTACK} + do + if [ "${_LB_NEEDLE_PART}" = "${_LB_HAYSTACK_PART}" ] + then + _LB_ENABLED=1 + fi + done + done + ;; + + \#endif*) + _LB_NESTED=0 + _LB_ENABLED=1 + ;; + + \#*) + if [ ${_LB_ENABLED} -ne 1 ] + then + continue + fi + + # Find includes + _LB_INCLUDES="$(echo "${_LB_LINE}" | sed -n \ + -e 's|^# \([^ ]*\)|\1|gp' \ + -e 's|^#include <\([^ ]*\)>|\1|gp')" + + # Add to queue + _LB_EXPAND_QUEUE="$(echo ${_LB_EXPAND_QUEUE} ${_LB_INCLUDES} | + sed -e 's|[ ]*$||' -e 's|^[ ]*||')" + ;; + + *) + if [ ${_LB_ENABLED} -eq 1 ] + then + echo "${_LB_LINE}" + fi + ;; + + esac + done < "${_LB_LIST_LOCATION}" + done +} diff --git a/functions/packageslists.sh b/functions/packageslists.sh deleted file mode 100755 index 94f016fbf..000000000 --- a/functions/packageslists.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh - -## live-build(7) - System Build Scripts -## Copyright (C) 2006-2010 Daniel Baumann -## -## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING. -## This is free software, and you are welcome to redistribute it -## under certain conditions; see COPYING for details. - - -Expand_packagelist () -{ - _LB_EXPAND_QUEUE="$(basename "${1}")" - - shift - - while [ -n "${_LB_EXPAND_QUEUE}" ] - do - _LB_LIST_NAME="$(echo ${_LB_EXPAND_QUEUE} | cut -d" " -f1)" - _LB_EXPAND_QUEUE="$(echo ${_LB_EXPAND_QUEUE} | cut -s -d" " -f2-)" - _LB_LIST_LOCATION="" - _LB_NESTED=0 - _LB_ENABLED=1 - - for _LB_SEARCH_PATH in ${@} config/lists "${LB_BASE:-/usr/share/live/build}/lists" - do - if [ -e "${_LB_SEARCH_PATH}/${_LB_LIST_NAME}" ] - then - _LB_LIST_LOCATION="${_LB_SEARCH_PATH}/${_LB_LIST_NAME}" - break - fi - done - - if [ -z "${_LB_LIST_LOCATION}" ] - then - echo "W: Unknown package list '${_LB_LIST_NAME}'" >&2 - continue - fi - - while read _LB_LINE - do - case "${_LB_LINE}" in - \#if\ *) - if [ ${_LB_NESTED} -eq 1 ] - then - echo "E: Nesting conditionals is not supported" >&2 - exit 1 - fi - _LB_NESTED=1 - - _LB_NEEDLE="$(echo "${_LB_LINE}" | cut -d' ' -f3-)" - _LB_HAYSTACK="$(eval "echo \$LB_$(echo "${_LB_LINE}" | cut -d' ' -f2)")" - - _LB_ENABLED=0 - for _LB_NEEDLE_PART in ${_LB_NEEDLE} - do - for _LB_HAYSTACK_PART in ${_LB_HAYSTACK} - do - if [ "${_LB_NEEDLE_PART}" = "${_LB_HAYSTACK_PART}" ] - then - _LB_ENABLED=1 - fi - done - done - ;; - - \#endif*) - _LB_NESTED=0 - _LB_ENABLED=1 - ;; - - \#*) - if [ ${_LB_ENABLED} -ne 1 ] - then - continue - fi - - # Find includes - _LB_INCLUDES="$(echo "${_LB_LINE}" | sed -n \ - -e 's|^# \([^ ]*\)|\1|gp' \ - -e 's|^#include <\([^ ]*\)>|\1|gp')" - - # Add to queue - _LB_EXPAND_QUEUE="$(echo ${_LB_EXPAND_QUEUE} ${_LB_INCLUDES} | - sed -e 's|[ ]*$||' -e 's|^[ ]*||')" - ;; - - *) - if [ ${_LB_ENABLED} -eq 1 ] - then - echo "${_LB_LINE}" - fi - ;; - - esac - done < "${_LB_LIST_LOCATION}" - done -} -- cgit v1.2.3