Commit 519ff561 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-play: add new __list_app_packages_table implementation

parent 5246a784
...@@ -66,9 +66,36 @@ __list_all_packages() ...@@ -66,9 +66,36 @@ __list_all_packages()
done done
} }
# pkg app # TODO: wrong, missed some packages (f.i., kubo
__list_app_packages_table() __list_app_packages_table()
{ {
local arch="$SYSTEMARCH"
local IGNOREi586
local tmplist
tmplist="$(mktemp)" || fatal
remove_on_exit $tmplist
local tmplist1
tmplist1="$(mktemp)" || fatal
remove_on_exit $tmplist1
[ "$arch" = "x86_64" ] && IGNOREi586='NoNo' || IGNOREi586='i586-'
__get_fast_short_list_app $arch | LC_ALL=C sort -k1,1 >$tmplist
grep -l -E "^SUPPORTEDARCHES=(''|\"\"|.*\<$arch\>)" $psdir/*.sh | xargs grep -oP "^PKGNAME=[\"']*\K[^\"']+" | sed -e "s|.*/\(.*\).sh:|\1 |" | grep -v -E "(^$IGNOREi586|^common|#.*$)" | LC_ALL=C sort -k1,1 >$tmplist1
# tmplist - app
# tmplist1 - app package
LC_ALL=C join -j 1 -a 1 $tmplist $tmplist1 | while read -r app package ; do
[ -n "$package" ] || package="$(__get_app_package $app </dev/null)"
echo "$package $app"
done
}
# pkg app
__list_app_packages_table_old()
{
local name local name
for name in $(__list_all_app) ; do for name in $(__list_all_app) ; do
local pkg local pkg
...@@ -415,6 +442,10 @@ case "$1" in ...@@ -415,6 +442,10 @@ case "$1" in
__list_installed_packages __list_installed_packages
exit exit
;; ;;
--list-all-packages)
__list_all_packages
exit
;;
--list|--list-installed) --list|--list-installed)
__epm_play_list_installed __epm_play_list_installed
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