#!/bin/bash
+# Disable globbing because "-*" and such is valid as a use flag.
+set -f
# $Header$
# 5: ebuild IUSE, 6: use.mask, 7: use.force,
# 9: flags indicated active by emerge --info (get_portageuseflags)
get_useflags() {
+ set +f
if [[ -z ${ACTIVE_FLAGS[4]} && ( $SCOPE == "local" || -z $SCOPE ) ]]; then
# Parse through /etc/portage/package.use
if [[ -d ${PACKAGE_USE_PATH} ]]; then
| sed -re "/^#.*$/ {d}"))
USE_FLAGS_CALCULATED=1
+ set -f
} # }}}
# Function: get_portageuseflags # {{{
echo "!!! to generate metadata for your overlays" >&2
return 1
fi
- append=$(ls $portdir/metadata/cache/${1}-* \
+ append=$(set +f; ls $portdir/metadata/cache/${1}-* \
| egrep "${1}-[0-9.]+" \
| sed -e "s:$portdir/metadata/cache/${1}-::g" \
| while read -d $'\n' version; do
local found_one
local args
- set -f
args="${*:-*}"
if [ -z "${SCOPE}" ]; then
[ "${SCOPE}" == "global" ] && echo "global use flags (searching: ${args})"
[ "${SCOPE}" == "local" ] && echo "local use flags (searching: ${args})"
echo "************************************************************"
- set +f
if [ "${args}" == "*" ]; then
args="${useflags[*]}"
fi
##### main program comes now #####
-# disable globbing as it fucks up with args=*
-set -f
parse_arguments "$@"
check_sanity
-set +f
eval ${MODE} ${ARGUMENTS}