Commit d3f4bce1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.19.3

parent 922d5cb0
...@@ -3753,6 +3753,14 @@ __check_installed_app() ...@@ -3753,6 +3753,14 @@ __check_installed_app()
grep -q -- "^$1\$" $epm_vardir/installed-app grep -q -- "^$1\$" $epm_vardir/installed-app
} }
__get_app_version()
{
local script="$psdir/$1.sh"
[ -x "$script" ] || return
$script --installed-version
return
}
__list_all_app() __list_all_app()
{ {
for i in $psdir/*.sh ; do for i in $psdir/*.sh ; do
...@@ -3960,6 +3968,19 @@ if [ "$1" = "--installed" ] || [ "$1" = "installed" ] ; then ...@@ -3960,6 +3968,19 @@ if [ "$1" = "--installed" ] || [ "$1" = "installed" ] ; then
exit exit
fi fi
if [ "$1" = "--installed-version" ] || [ "$1" = "installed-version" ] ; then
shift
__get_app_version "$1"
#[ -n "$quiet" ] && exit
exit
fi
if [ "$1" = "--package-name" ] || [ "$1" = "package-name" ] ; then
shift
__get_app_package "$1"
exit
fi
if [ "$1" = "--list" ] || [ "$1" = "--list-installed" ] || [ "$1" = "list" ] || [ "$1" = "list-installed" ] ; then if [ "$1" = "--list" ] || [ "$1" = "--list-installed" ] || [ "$1" = "list" ] || [ "$1" = "list-installed" ] ; then
__epm_play_list_installed __epm_play_list_installed
exit exit
...@@ -6953,10 +6974,10 @@ case $PMTYPE in ...@@ -6953,10 +6974,10 @@ case $PMTYPE in
print_apt_sources_list print_apt_sources_list
;; ;;
yum-rpm) yum-rpm)
docmd yum repolist -v docmd yum repolist $verbose
;; ;;
dnf-rpm) dnf-rpm)
docmd dnf repolist -v docmd dnf repolist $verbose
;; ;;
urpm-rpm) urpm-rpm)
docmd urpmq --list-url docmd urpmq --list-url
...@@ -8966,7 +8987,7 @@ internal_distr_info() ...@@ -8966,7 +8987,7 @@ internal_distr_info()
# You can set ROOTDIR to root system dir # You can set ROOTDIR to root system dir
#ROOTDIR= #ROOTDIR=
PROGVERSION="20220323" PROGVERSION="20220713"
# TODO: check /etc/system-release # TODO: check /etc/system-release
...@@ -9062,6 +9083,8 @@ case $DISTRIB_ID in ...@@ -9062,6 +9083,8 @@ case $DISTRIB_ID in
;; ;;
ROSA) ROSA)
CMD="dnf-rpm" CMD="dnf-rpm"
hascommand dnf || CMD="yum-rpm"
[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/7" ] && CMD="yum-rpm"
[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/2020" ] && CMD="urpm-rpm" [ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/2020" ] && CMD="urpm-rpm"
;; ;;
FreeBSD|NetBSD|OpenBSD|Solaris) FreeBSD|NetBSD|OpenBSD|Solaris)
...@@ -9120,10 +9143,11 @@ case $DISTRIB_ID in ...@@ -9120,10 +9143,11 @@ case $DISTRIB_ID in
*) *)
# try detect firstly # try detect firstly
if hascommand "rpm" ; then if hascommand "rpm" ; then
hascommand "urpmi" && echo "urpmi-rpm" && return
hascommand "zypper" && echo "zypper-rpm" && return hascommand "zypper" && echo "zypper-rpm" && return
hascommand "apt-get" && echo "apt-rpm" && return hascommand "apt-get" && echo "apt-rpm" && return
hascommand "dnf" && echo "dnf-rpm" && return hascommand "dnf" && echo "dnf-rpm" && return
hascommand "yum" && echo "yum-rpm" && return
hascommand "urpmi" && echo "urpmi-rpm" && return
fi fi
if hascommand "dpkg" ; then if hascommand "dpkg" ; then
hascommand "apt" && echo "apt-dpkg" && return hascommand "apt" && echo "apt-dpkg" && return
...@@ -10786,7 +10810,7 @@ Examples: ...@@ -10786,7 +10810,7 @@ Examples:
print_version() print_version()
{ {
echo "EPM package manager version 3.19.2 https://wiki.etersoft.ru/Epm" echo "EPM package manager version 3.19.3 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."
...@@ -10796,7 +10820,7 @@ print_version() ...@@ -10796,7 +10820,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.19.2 EPMVERSION=3.19.3
verbose=$EPM_VERBOSE verbose=$EPM_VERBOSE
quiet= quiet=
nodeps= nodeps=
......
...@@ -1293,7 +1293,7 @@ internal_distr_info() ...@@ -1293,7 +1293,7 @@ internal_distr_info()
# You can set ROOTDIR to root system dir # You can set ROOTDIR to root system dir
#ROOTDIR= #ROOTDIR=
PROGVERSION="20220323" PROGVERSION="20220713"
# TODO: check /etc/system-release # TODO: check /etc/system-release
...@@ -1389,6 +1389,8 @@ case $DISTRIB_ID in ...@@ -1389,6 +1389,8 @@ case $DISTRIB_ID in
;; ;;
ROSA) ROSA)
CMD="dnf-rpm" CMD="dnf-rpm"
hascommand dnf || CMD="yum-rpm"
[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/7" ] && CMD="yum-rpm"
[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/2020" ] && CMD="urpm-rpm" [ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/2020" ] && CMD="urpm-rpm"
;; ;;
FreeBSD|NetBSD|OpenBSD|Solaris) FreeBSD|NetBSD|OpenBSD|Solaris)
...@@ -1447,10 +1449,11 @@ case $DISTRIB_ID in ...@@ -1447,10 +1449,11 @@ case $DISTRIB_ID in
*) *)
# try detect firstly # try detect firstly
if hascommand "rpm" ; then if hascommand "rpm" ; then
hascommand "urpmi" && echo "urpmi-rpm" && return
hascommand "zypper" && echo "zypper-rpm" && return hascommand "zypper" && echo "zypper-rpm" && return
hascommand "apt-get" && echo "apt-rpm" && return hascommand "apt-get" && echo "apt-rpm" && return
hascommand "dnf" && echo "dnf-rpm" && return hascommand "dnf" && echo "dnf-rpm" && return
hascommand "yum" && echo "yum-rpm" && return
hascommand "urpmi" && echo "urpmi-rpm" && return
fi fi
if hascommand "dpkg" ; then if hascommand "dpkg" ; then
hascommand "apt" && echo "apt-dpkg" && return hascommand "apt" && echo "apt-dpkg" && return
...@@ -2256,7 +2259,7 @@ print_version() ...@@ -2256,7 +2259,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.19.2 https://wiki.etersoft.ru/Epm" echo "Service manager version 3.19.3 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