Commit 1905b30f authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play.d/common.sh: fix PKGNAME detection

parent 43fbb68b
......@@ -66,10 +66,19 @@ get_pkgvendor()
epm print field Vendor for package $1
}
get_first()
{
echo "$1"
}
check_alternative_pkgname()
{
[ -n "$BASEPKGNAME" ] || BASEPKGNAME="$PKGNAME"
# default: with first entry in $PEODUCTALT
PKGNAME="$BASEPKGNAME-$(get_first $PRODUCTALT)"
# override with VERSION
local i
for i in $PRODUCTALT ; do
if [ "$i" = "''" ] ; then
......@@ -82,9 +91,12 @@ check_alternative_pkgname()
return
fi
done
# when VERSION is not in PRODUCTALT
# when VERSION is not in PRODUCTALT, check installed package
for i in $PRODUCTALT ; do
[ "$i" = "''" ] && continue
if [ "$i" = "''" ] ; then
continue
fi
if epm installed $BASEPKGNAME-$i ; then
PKGNAME=$BASEPKGNAME-$i
break
......
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