Commit 14082b32 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: print description only for applications with supported arch (ALT bug 43932)

parent 3fe7766c
......@@ -124,9 +124,10 @@ __list_installed_packages()
}
# args: script, host arch
__get_app_description()
{
__run_script "$1" --description 2>/dev/null
__run_script "$1" --description "$2" 2>/dev/null
}
__check_play_script()
......@@ -182,18 +183,20 @@ __epm_play_list()
local psdir="$1"
local i
local IGNOREi586
[ "$($DISTRVENDOR -a)" = "x86_64" ] && IGNOREi586='' || IGNOREi586=1
local arch="$($DISTRVENDOR -a)"
[ "$arch" = "x86_64" ] && IGNOREi586='' || IGNOREi586=1
if [ -n "$short" ] ; then
for i in $(__list_all_app) ; do
local desc="$(__get_app_description $i)"
local desc="$(__get_app_description $i $arch)"
[ -n "$desc" ] || continue
echo "$i"
done
exit
fi
for i in $(__list_all_app) ; do
local desc="$(__get_app_description $i)"
local desc="$(__get_app_description $i $arch)"
[ -n "$desc" ] || continue
[ -n "$quiet" ] || echo -n " "
printf "%-20s - %s\n" "$i" "$desc"
......
......@@ -12,6 +12,16 @@ check_url_is_accessible()
epm tool eget --check "$1"
}
is_supported_arch()
{
local i
[ -n "$SUPPORTEDARCHES" ] || return 0
for i in $SUPPORTEDARCHES ; do
[ "$i" = "$1" ] && return 0
done
return 1
}
# update URL variable
update_url_if_need_mirrored()
{
......@@ -83,6 +93,7 @@ case "$1" in
exit
;;
"--description")
is_supported_arch "$2" || exit 0
echo "$DESCRIPTION"
exit
;;
......
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