[pacman-dev] Comments with `)' are either broken or disallowed

Michael Witten mfwitten at gmail.com
Sun May 11 22:47:14 EDT 2014


In `makepkg' (that is, in `scripts/makepkg.sh.in'), the following exist:

  	local provides_list=()
  	eval $(awk '/^[[:space:]]*provides=/,/\)/' "$BUILDFILE" | \
  		sed -e "s/provides=/provides_list+=/" -e "s/#.*//" -e 's/\\$//')
  ...
  	local backup_list=()
  	eval $(awk '/^[[:space:]]*backup=/,/\)/' "$BUILDFILE" | \
  		sed -e "s/backup=/backup_list+=/" -e "s/#.*//" -e 's/\\$//')
  ...
  	local optdepends_list=()
  	eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(#.*)?$/' "$BUILDFILE" | \
  		sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//')
  ...
  	local known kopt options_list
  	eval $(awk '/^[[:space:]]*options=/,/\)/' "$BUILDFILE" | \
  		sed -e "s/options=/options_list+=/" -e "s/#.*//" -e 's/\\$//')

Perhaps there are more.

As you can plainly see, this ruins the ability to include comments that use
the `)' character, as in the following:

  options=(
    '!strip'
    '!makeflags' # Apparently, there are issues with concurrency (`-j2', etc.)
  )

Sincerely,
Michael Witten


More information about the pacman-dev mailing list