Changeset View
Changeset View
Standalone View
Standalone View
Mk/Scripts/do-depends.sh
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | if [ -z "${libfile}" ]; then | ||||
return 1 | return 1 | ||||
fi | fi | ||||
echo " - found (${libfile})" | echo " - found (${libfile})" | ||||
} | } | ||||
anynotfound=0 | anynotfound=0 | ||||
err=0 | err=0 | ||||
for _line in ${dp_RAWDEPENDS} ; do | for _line in ${dp_RAWDEPENDS} ; do | ||||
# ensure we never leak flavors | |||||
unset FLAVOR | |||||
myifs=${IFS} | myifs=${IFS} | ||||
IFS=: | IFS=: | ||||
set -- ${_line} | set -- ${_line} | ||||
IFS=${myifs} | IFS=${myifs} | ||||
if [ $# -lt 2 -o $# -gt 3 ]; then | if [ $# -lt 2 -o $# -gt 3 ]; then | ||||
echo "Error: bad dependency syntax in ${dp_DEPTYPE}" >&2 | echo "Error: bad dependency syntax in ${dp_DEPTYPE}" >&2 | ||||
echo "expecting: pattern:origin[:target]" >&2 | echo "expecting: pattern:origin[@flavour][:target]" >&2 | ||||
echo "got: ${_line}" >&2 | echo "got: ${_line}" >&2 | ||||
err=1 | err=1 | ||||
continue | continue | ||||
fi | fi | ||||
pattern=$1 | pattern=$1 | ||||
origin=$2 | origin=$2 | ||||
last=${3:-} | last=${3:-} | ||||
if [ -z "${pattern}" ]; then | if [ -z "${pattern}" ]; then | ||||
echo "Error: there is an empty port dependency in ${dp_DEPTYPE}" >&2 | echo "Error: there is an empty port dependency in ${dp_DEPTYPE}" >&2 | ||||
err=1 | err=1 | ||||
continue | continue | ||||
fi | fi | ||||
if [ -z "${origin}" ]; then | if [ -z "${origin}" ]; then | ||||
echo "Error: a dependency has an empty origin in ${dp_DEPTYPE}" >&2 | echo "Error: a dependency has an empty origin in ${dp_DEPTYPE}" >&2 | ||||
err=1 | err=1 | ||||
continue | continue | ||||
fi | fi | ||||
case "${origin}" in | case "${origin}" in | ||||
bdrewery: Here is what I used for testing poudriere with @ syntax:
```
Index: Mk/Scripts/do-depends.sh… | |||||
/*) ;; | /*) ;; | ||||
*) origin="${PORTSDIR}/${origin}" ;; | *) origin="${PORTSDIR}/${origin}" ;; | ||||
esac | |||||
case "${origin}" in | |||||
*@*/*) ;; # Ignore @ in the path which would not be a flavor | |||||
*@*) | |||||
export FLAVOR="${origin##*@}" | |||||
origin=${origin%@*} | |||||
;; | |||||
esac | esac | ||||
depends_args="${dp_DEPENDS_ARGS}" | depends_args="${dp_DEPENDS_ARGS}" | ||||
target=${dp_DEPENDS_TARGET} | target=${dp_DEPENDS_TARGET} | ||||
if [ -n "${last}" ]; then | if [ -n "${last}" ]; then | ||||
target=${last} | target=${last} | ||||
if [ -n "${dp_DEPENDS_PRECLEAN}" ]; then | if [ -n "${dp_DEPENDS_PRECLEAN}" ]; then | ||||
target="clean ${target}" | target="clean ${target}" | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |
Here is what I used for testing poudriere with @ syntax: