Commit 41bdf0bc authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.16.2

parent 2d1737d4
...@@ -3632,6 +3632,7 @@ docmd $CMD | __fo_pfn ...@@ -3632,6 +3632,7 @@ docmd $CMD | __fo_pfn
epm_vardir=/var/lib/eepm epm_vardir=/var/lib/eepm
__save_installed_app() __save_installed_app()
{ {
[ -d "$epm_vardir" ] || return 0 [ -d "$epm_vardir" ] || return 0
...@@ -3660,6 +3661,11 @@ __list_installed_app() ...@@ -3660,6 +3661,11 @@ __list_installed_app()
cat $epm_vardir/installed-app 2>/dev/null cat $epm_vardir/installed-app 2>/dev/null
} }
__get_app_description()
{
[ -x "$1" ] || return
$1 --description 2>/dev/null
}
__epm_play_run() __epm_play_run()
{ {
...@@ -3701,6 +3707,7 @@ EOF ...@@ -3701,6 +3707,7 @@ EOF
exit exit
fi fi
if [ "$1" = "--remove" ] ; then if [ "$1" = "--remove" ] ; then
shift shift
#__check_installed_app "$1" || warning "$1 is not installed" #__check_installed_app "$1" || warning "$1 is not installed"
...@@ -3711,6 +3718,7 @@ if [ "$1" = "--remove" ] ; then ...@@ -3711,6 +3718,7 @@ if [ "$1" = "--remove" ] ; then
exit exit
fi fi
if [ "$1" = "--update" ] ; then if [ "$1" = "--update" ] ; then
shift shift
if [ "$1" = "all" ] ; then if [ "$1" = "all" ] ; then
...@@ -3723,7 +3731,7 @@ if [ "$1" = "--update" ] ; then ...@@ -3723,7 +3731,7 @@ if [ "$1" = "--update" ] ; then
exit exit
fi fi
if [ -z "$1" ] ; then if [ -z "$1" ] ; then
fatal "run --update with 'all' or project name" fatal "run --update with 'all' or a project name"
fi fi
__check_installed_app "$1" || fatal "$1 is not installed" __check_installed_app "$1" || fatal "$1 is not installed"
prescription="$1" prescription="$1"
...@@ -3732,6 +3740,7 @@ if [ "$1" = "--update" ] ; then ...@@ -3732,6 +3740,7 @@ if [ "$1" = "--update" ] ; then
exit exit
fi fi
if [ "$1" = "--list" ] || [ "$1" = "--installed" ] ; then if [ "$1" = "--list" ] || [ "$1" = "--installed" ] ; then
shift shift
local i local i
...@@ -3743,37 +3752,42 @@ if [ "$1" = "--list" ] || [ "$1" = "--installed" ] ; then ...@@ -3743,37 +3752,42 @@ if [ "$1" = "--list" ] || [ "$1" = "--installed" ] ; then
fi fi
echo "Installed:" echo "Installed:"
for i in $(__list_installed_app) ; do for i in $(__list_installed_app) ; do
printf " %-20s - %s\n" "$i" "$($psdir/$i.sh --description 2>/dev/null)" local desc="$(__get_app_description $psdir/$i.sh)"
[ -n "$desc" ] || continue
printf " %-20s - %s\n" "$i" "$desc"
done done
exit exit
fi fi
[ "($DISTRVENDOR -a)" = "x86_64" ] && IGNOREi586='' || IGNOREi586=1 [ "$($DISTRVENDOR -a)" = "x86_64" ] && IGNOREi586='' || IGNOREi586=1
if [ "$1" = "--list-all" ] || [ -z "$*" ] ; then if [ "$1" = "--list-all" ] || [ -z "$*" ] ; then
echo "Run with a name of a play script to run:"
local i local i
local desc
if [ -n "$short" ] ; then if [ -n "$short" ] ; then
for i in $psdir/*.sh ; do for i in $psdir/*.sh ; do
# print all
#desc="$($i --description 2>/dev/null)"
#[ -z "$desc" ] && continue
local name=$(basename $i .sh) local name=$(basename $i .sh)
[ -n "$IGNOREi586" ] && rhas "$name" "^i586-" && continue [ -n "$IGNOREi586" ] && rhas "$name" "^i586-" && continue
rhas "$name" "^common" && continue
echo "$name" echo "$name"
done done
exit exit
fi fi
echo "Run with a name of a play script to run:"
for i in $psdir/*.sh ; do for i in $psdir/*.sh ; do
desc="$($i --description 2>/dev/null)" local desc="$(__get_app_description $i)"
[ -z "$desc" ] && continue [ -n "$desc" ] || continue
local name=$(basename $i .sh) local name=$(basename $i .sh)
[ -n "$IGNOREi586" ] && rhas "$name" "^i586-" && continue [ -n "$IGNOREi586" ] && rhas "$name" "^i586-" && continue
rhas "$name" "^common" && continue
printf " %-20s - %s\n" "$name" "$desc" printf " %-20s - %s\n" "$name" "$desc"
done done
echo echo
echo "run epm play --list to list installed only, or --remove to remove one, or --update to update [all] installed apps" echo "run epm play"
echo " --list - to list installed only"
echo " --list-all (default) - to list all app"
echo " --remove <app> - to remove app"
echo " --update <app|all> - to update app or all installed apps"
echo " --short (with --list) - list names only"
exit exit
fi fi
...@@ -3841,16 +3855,30 @@ local psdir="$CONFIGDIR/prescription.d" ...@@ -3841,16 +3855,30 @@ local psdir="$CONFIGDIR/prescription.d"
if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
cat <<EOF cat <<EOF
Options: Options:
receipt - run receipt <receipt> - run receipt
--list-all - list all available receipts --list-all - list all available receipts
EOF EOF
exit exit
fi fi
[ "$($DISTRVENDOR -a)" = "x86_64" ] && IGNOREi586='' || IGNOREi586=1
if [ "$1" == "--list-all" ] || [ -z "$*" ] ; then if [ "$1" == "--list-all" ] || [ -z "$*" ] ; then
if [ -n "$short" ] ; then
for i in $psdir/*.sh ; do
local name=$(basename $i .sh)
[ -n "$IGNOREi586" ] && rhas "$name" "^i586-" && continue
rhas "$name" "^common" && continue
echo "$name"
done
exit
fi
echo "Run with a name of a prescription to run:" echo "Run with a name of a prescription to run:"
for i in $psdir/*.sh ; do for i in $psdir/*.sh ; do
printf " %-20s - %s\n" "$(basename $i .sh)" "$($i --description 2>/dev/null)" local name=$(basename $i .sh)
[ -n "$IGNOREi586" ] && rhas "$name" "^i586-" && continue
rhas "$name" "^common" && continue
printf " %-20s - %s\n" "$name" "$($i --description 2>/dev/null)"
done done
echo echo
exit exit
...@@ -6259,7 +6287,7 @@ __epm_repack_to_rpm() ...@@ -6259,7 +6287,7 @@ __epm_repack_to_rpm()
[ -n "$VERSION" ] && chmod -R a+rX $tmpbuilddir/$subdir/* [ -n "$VERSION" ] && chmod -R a+rX $tmpbuilddir/$subdir/*
__fix_spec $pkgname $tmpbuilddir/$subdir $spec __fix_spec $pkgname $tmpbuilddir/$subdir $spec
__apply_fix_code "common" $tmpbuilddir/$subdir $spec __apply_fix_code "generic" $tmpbuilddir/$subdir $spec
__apply_fix_code $pkgname $tmpbuilddir/$subdir $spec __apply_fix_code $pkgname $tmpbuilddir/$subdir $spec
# TODO: we need these dirs to be created # TODO: we need these dirs to be created
to_remove_pkg_dirs="$to_remove_pkg_dirs $HOME/RPM/BUILD $HOME/RPM" to_remove_pkg_dirs="$to_remove_pkg_dirs $HOME/RPM/BUILD $HOME/RPM"
...@@ -10322,7 +10350,7 @@ Examples: ...@@ -10322,7 +10350,7 @@ Examples:
print_version() print_version()
{ {
echo "EPM package manager version 3.16.1 https://wiki.etersoft.ru/Epm" echo "EPM package manager version 3.16.2 https://wiki.etersoft.ru/Epm"
echo "Running on $($DISTRVENDOR -e) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)" echo "Running on $($DISTRVENDOR -e) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)"
echo "Copyright (c) Etersoft 2012-2021" echo "Copyright (c) Etersoft 2012-2021"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
...@@ -10332,7 +10360,7 @@ print_version() ...@@ -10332,7 +10360,7 @@ print_version()
Usage="Usage: epm [options] <command> [package name(s), package files]..." Usage="Usage: epm [options] <command> [package name(s), package files]..."
Descr="epm - EPM package manager" Descr="epm - EPM package manager"
EPMVERSION=3.16.1 EPMVERSION=3.16.2
verbose=$EPM_VERBOSE verbose=$EPM_VERBOSE
quiet= quiet=
nodeps= nodeps=
......
...@@ -2982,7 +2982,7 @@ print_version() ...@@ -2982,7 +2982,7 @@ print_version()
local on_text="(host system)" local on_text="(host system)"
local virt="$($DISTRVENDOR -i)" local virt="$($DISTRVENDOR -i)"
[ "$virt" = "(unknown)" ] || [ "$virt" = "(host system)" ] || on_text="(under $virt)" [ "$virt" = "(unknown)" ] || [ "$virt" = "(host system)" ] || on_text="(under $virt)"
echo "Service manager version 3.16.1 https://wiki.etersoft.ru/Epm" echo "Service manager version 3.16.2 https://wiki.etersoft.ru/Epm"
echo "Running on $($DISTRVENDOR -e) $on_text with $SERVICETYPE" echo "Running on $($DISTRVENDOR -e) $on_text with $SERVICETYPE"
echo "Copyright (c) Etersoft 2012-2021" echo "Copyright (c) Etersoft 2012-2021"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
......
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