Commit 20afea58 authored by Vitaly Lipatov's avatar Vitaly Lipatov

cleanup, add default rule on deb for replace -devel to -dev

parent 8f5d0c4d
......@@ -23,11 +23,17 @@ tolocal_anyrepl()
#REPLRULE=`echo $REPLRULE | sed -r -e 's,|,!,g'`
ALTPKGNAME=`echo $REPLRULE | cut -d"|" -f1 | sed -e "s|\+|\\\\\+|g"`
TARGETPKGNAME=`echo $REPLRULE | cut -d"|" -f2 | sed -e "s|\+|\\\\\+|g"`
# for compatibility
REPLRULE1=$ALTPKGNAME
REPLRULE2=$TARGETPKGNAME
test -n "$REPLRULE" && return 0
done
# Hack for default replace -devel to -dev on Deb target
if [ "$TARGET" = "deb" ] ; then
local NEWRESULT=`echo $GREP | sed -e "s|^ *\(.*\)-devel *\$|\1-dev|g"`
[ "$NEWRESULT" = "$GREP" ] && return 1
ALTPKGNAME=$GREP
TARGETPKGNAME="$NEWRESULT"
return 0
fi
return 1
}
......@@ -87,11 +93,12 @@ print_grprepl_list()
# Prints out buildreqs in target notation for SPEC (1st arg)
print_target_buildreq()
{
local i
local i SPACE="" TARGETPKGNAME
# Build list in target ($VENDOR) notation for package's buildreqs
for i in `print_buildreq ${1}` ; do
# get target name or just print out original one
tolocal_anyrepl $i `print_pkgrepl_list` || echo -n "$i "
echo -n "$TARGETPKGNAME "
tolocal_anyrepl $i `print_pkgrepl_list` || TARGETPKGNAME="$i"
echo -n "$SPACE${TARGETPKGNAME}"
SPACE=" "
done
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment