Handle ports FLAVOR better. (+minor polish)

This commit is contained in:
Poul-Henning Kamp 2020-12-30 16:04:32 +00:00
parent b6d54565c2
commit 07b0027f6c

View File

@ -196,11 +196,14 @@ ports_recurse() (
echo "$t" >> /tmp/_.plist.tdone
for d
do
if [ "x$d" == "xpatch" ] ; then
continue
fi
fl=""
if [ ! -d $d ] ; then
fl=FLAVOR=`expr $d : '.*@\(.*\)'`
bd=`expr $d : '\(.*\)@.*'`
if [ ! -d $bd ] ; then
if [ ! -d "$bd" ] ; then
echo "Missing port $d ($t) (fl $fl) (bd $bd)" 1>&2
continue
fi
@ -485,7 +488,7 @@ if $do_world ; then
rm -rf /usr/obj
(cd /freebsd && mkdir -p ${OBJ_PATH} && ln -s ${OBJ_PATH} /usr/obj)
else
rm -rf /usr/obj
rm -rf /usr/obj/*
mkdir -p /usr/obj
fi
fi
@ -496,6 +499,10 @@ for i in ${PORTS_WE_WANT}
do
(
cd /usr/ports
if [ ! -d $i ] ; then
fl=FLAVOR=`expr $i : '.*@\(.*\)'`
i=`expr $i : '\(.*\)@.*'`
fi
if [ ! -d $i ] ; then
echo "Port $i not found" 1>&2
exit 2