Commit 1eb30965 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.19.2

parent 30942304
...@@ -5971,7 +5971,7 @@ epm_remove() ...@@ -5971,7 +5971,7 @@ epm_remove()
if [ -z "$pkg_names" ] ; then if [ -z "$pkg_names" ] ; then
warning "no package(s) to remove." warning "no package(s) to remove."
exit 0 return
fi fi
# remove according current arch (if x86_64) by default # remove according current arch (if x86_64) by default
pkg_names="$(echo $pkg_names | exp_with_arch_suffix)" pkg_names="$(echo $pkg_names | exp_with_arch_suffix)"
...@@ -8714,7 +8714,7 @@ epm_upgrade() ...@@ -8714,7 +8714,7 @@ epm_upgrade()
[ -n "$verbose" ] && info "Packages to upgrade: $installlist" [ -n "$verbose" ] && info "Packages to upgrade: $installlist"
if [ -z "$installlist" ] ; then if [ -z "$installlist" ] ; then
warning "There is no installed packages for upgrade from task $*" warning "There is no installed packages for upgrade from task $*"
exit 22 return 22
fi fi
try_change_alt_repo try_change_alt_repo
...@@ -9057,9 +9057,13 @@ case $DISTRIB_ID in ...@@ -9057,9 +9057,13 @@ case $DISTRIB_ID in
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg #which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
hascommand snappy && CMD=snappy hascommand snappy && CMD=snappy
;; ;;
Mandriva|ROSA) Mandriva)
CMD="urpm-rpm" CMD="urpm-rpm"
;; ;;
ROSA)
CMD="dnf-rpm"
[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/2020" ] && CMD="urpm-rpm"
;;
FreeBSD|NetBSD|OpenBSD|Solaris) FreeBSD|NetBSD|OpenBSD|Solaris)
CMD="pkgsrc" CMD="pkgsrc"
which pkg 2>/dev/null >/dev/null && CMD=pkgng which pkg 2>/dev/null >/dev/null && CMD=pkgng
...@@ -9072,8 +9076,8 @@ case $DISTRIB_ID in ...@@ -9072,8 +9076,8 @@ case $DISTRIB_ID in
;; ;;
Fedora|CentOS|OracleLinux|RockyLinux|AlmaLinux|RHEL|Scientific|GosLinux|Amzn|RedOS) Fedora|CentOS|OracleLinux|RockyLinux|AlmaLinux|RHEL|Scientific|GosLinux|Amzn|RedOS)
CMD="dnf-rpm" CMD="dnf-rpm"
hascommand dnf || CMD=yum-rpm hascommand dnf || CMD="yum-rpm"
[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "CentOS/7" ] && CMD=yum-rpm [ "$DISTRIB_ID/$DISTRIB_RELEASE" = "CentOS/7" ] && CMD="yum-rpm"
;; ;;
Slackware) Slackware)
CMD="slackpkg" CMD="slackpkg"
...@@ -9188,6 +9192,9 @@ normalize_name() ...@@ -9188,6 +9192,9 @@ normalize_name()
"RedHatEnterpriseLinuxServer") "RedHatEnterpriseLinuxServer")
echo "RHEL" echo "RHEL"
;; ;;
"ROSA Enterprise Linux Desktop"|"ROSA Enterprise Linux Server")
echo "ROSA"
;;
*) *)
#echo "${1// /}" #echo "${1// /}"
echo "$1" | sed -e "s/ //g" echo "$1" | sed -e "s/ //g"
...@@ -9195,6 +9202,8 @@ normalize_name() ...@@ -9195,6 +9202,8 @@ normalize_name()
esac esac
} }
fill_distr_info()
{
# Default values # Default values
PRETTY_NAME="" PRETTY_NAME=""
DISTRIB_ID="" DISTRIB_ID=""
...@@ -9222,6 +9231,10 @@ elif distro lsb-release ; then ...@@ -9222,6 +9231,10 @@ elif distro lsb-release ; then
PRETTY_NAME=$(cat $DISTROFILE | get_var DISTRIB_DESCRIPTION) PRETTY_NAME=$(cat $DISTROFILE | get_var DISTRIB_DESCRIPTION)
fi fi
# TODO:
#if [ -n "$DISTRIB_ID" ] ; then
# # don't check obsoleted ways
# ;
# ALT Linux based # ALT Linux based
if distro altlinux-release ; then if distro altlinux-release ; then
DISTRIB_ID="ALTLinux" DISTRIB_ID="ALTLinux"
...@@ -9436,7 +9449,9 @@ fi ...@@ -9436,7 +9449,9 @@ fi
if [ -z "$PRETTY_NAME" ] ; then if [ -z "$PRETTY_NAME" ] ; then
PRETTY_NAME="$DISTRIB_ID $DISTRIB_RELEASE" PRETTY_NAME="$DISTRIB_ID $DISTRIB_RELEASE"
fi fi
}
fill_distr_info
get_uname() get_uname()
{ {
...@@ -10771,7 +10786,7 @@ Examples: ...@@ -10771,7 +10786,7 @@ Examples:
print_version() print_version()
{ {
echo "EPM package manager version 3.19.1 https://wiki.etersoft.ru/Epm" echo "EPM package manager version 3.19.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."
...@@ -10781,7 +10796,7 @@ print_version() ...@@ -10781,7 +10796,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.1 EPMVERSION=3.19.2
verbose=$EPM_VERBOSE verbose=$EPM_VERBOSE
quiet= quiet=
nodeps= nodeps=
......
...@@ -1384,9 +1384,13 @@ case $DISTRIB_ID in ...@@ -1384,9 +1384,13 @@ case $DISTRIB_ID in
#which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg #which aptitude 2>/dev/null >/dev/null && CMD=aptitude-dpkg
hascommand snappy && CMD=snappy hascommand snappy && CMD=snappy
;; ;;
Mandriva|ROSA) Mandriva)
CMD="urpm-rpm" CMD="urpm-rpm"
;; ;;
ROSA)
CMD="dnf-rpm"
[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "ROSA/2020" ] && CMD="urpm-rpm"
;;
FreeBSD|NetBSD|OpenBSD|Solaris) FreeBSD|NetBSD|OpenBSD|Solaris)
CMD="pkgsrc" CMD="pkgsrc"
which pkg 2>/dev/null >/dev/null && CMD=pkgng which pkg 2>/dev/null >/dev/null && CMD=pkgng
...@@ -1399,8 +1403,8 @@ case $DISTRIB_ID in ...@@ -1399,8 +1403,8 @@ case $DISTRIB_ID in
;; ;;
Fedora|CentOS|OracleLinux|RockyLinux|AlmaLinux|RHEL|Scientific|GosLinux|Amzn|RedOS) Fedora|CentOS|OracleLinux|RockyLinux|AlmaLinux|RHEL|Scientific|GosLinux|Amzn|RedOS)
CMD="dnf-rpm" CMD="dnf-rpm"
hascommand dnf || CMD=yum-rpm hascommand dnf || CMD="yum-rpm"
[ "$DISTRIB_ID/$DISTRIB_RELEASE" = "CentOS/7" ] && CMD=yum-rpm [ "$DISTRIB_ID/$DISTRIB_RELEASE" = "CentOS/7" ] && CMD="yum-rpm"
;; ;;
Slackware) Slackware)
CMD="slackpkg" CMD="slackpkg"
...@@ -1515,6 +1519,9 @@ normalize_name() ...@@ -1515,6 +1519,9 @@ normalize_name()
"RedHatEnterpriseLinuxServer") "RedHatEnterpriseLinuxServer")
echo "RHEL" echo "RHEL"
;; ;;
"ROSA Enterprise Linux Desktop"|"ROSA Enterprise Linux Server")
echo "ROSA"
;;
*) *)
#echo "${1// /}" #echo "${1// /}"
echo "$1" | sed -e "s/ //g" echo "$1" | sed -e "s/ //g"
...@@ -1522,6 +1529,8 @@ normalize_name() ...@@ -1522,6 +1529,8 @@ normalize_name()
esac esac
} }
fill_distr_info()
{
# Default values # Default values
PRETTY_NAME="" PRETTY_NAME=""
DISTRIB_ID="" DISTRIB_ID=""
...@@ -1549,6 +1558,10 @@ elif distro lsb-release ; then ...@@ -1549,6 +1558,10 @@ elif distro lsb-release ; then
PRETTY_NAME=$(cat $DISTROFILE | get_var DISTRIB_DESCRIPTION) PRETTY_NAME=$(cat $DISTROFILE | get_var DISTRIB_DESCRIPTION)
fi fi
# TODO:
#if [ -n "$DISTRIB_ID" ] ; then
# # don't check obsoleted ways
# ;
# ALT Linux based # ALT Linux based
if distro altlinux-release ; then if distro altlinux-release ; then
DISTRIB_ID="ALTLinux" DISTRIB_ID="ALTLinux"
...@@ -1763,7 +1776,9 @@ fi ...@@ -1763,7 +1776,9 @@ fi
if [ -z "$PRETTY_NAME" ] ; then if [ -z "$PRETTY_NAME" ] ; then
PRETTY_NAME="$DISTRIB_ID $DISTRIB_RELEASE" PRETTY_NAME="$DISTRIB_ID $DISTRIB_RELEASE"
fi fi
}
fill_distr_info
get_uname() get_uname()
{ {
...@@ -2241,7 +2256,7 @@ print_version() ...@@ -2241,7 +2256,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.1 https://wiki.etersoft.ru/Epm" echo "Service manager version 3.19.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