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