Support list of items for conditionals in package lists

This patch allows giving a list of items for the conditionals in package
lists. For example, it's possible to specify some packages for more than one
architecture in the same conditional block:

 package01
 #if ARCHITECTURE i386 amd64
 package02
 package03
 #endif
 package04

where package01 and package04 are available for all architectures, but
package02 and package03 are available only for i386 and amd64 architectures.
This commit is contained in:
Tiago Bortoletto Vaz 2008-04-27 19:16:39 -03:00
parent 14ffd3f15f
commit 64b7d8cb86
1 changed files with 3 additions and 2 deletions

View File

@ -49,9 +49,10 @@ Expand_packagelist ()
_LH_NESTED=1
_LH_VAR="$(echo "${_LH_LINE}" | cut -d' ' -f2)"
_LH_VAL="$(echo "${_LH_LINE}" | cut -d' ' -f3)"
_LH_VAL="$(echo "${_LH_LINE}" | cut -d' ' -f3-)"
_LH_MATCH="$(echo ${_LH_VAL} |grep "\(^\| \)$(eval "echo \$LH_${_LH_VAR}")\($\| \)")" || true
if [ -n "${_LH_VAR}" ] && [ "$(eval "echo \$LH_${_LH_VAR}")" != "${_LH_VAL}" ]
if [ -n "${_LH_VAR}" ] && [ -z "${_LH_MATCH}" ]
then
_LH_ENABLED=0
fi