Commit 537247fd authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.21.2

parent 6775305b
...@@ -3104,19 +3104,25 @@ epm_install_files() ...@@ -3104,19 +3104,25 @@ epm_install_files()
__epm_check_if_try_install_rpm $@ && return __epm_check_if_try_install_rpm $@ && return
# FIXME: return false in case no install and in case install with broken deps # TODO: if dpkg can't install due missed deps, trying with apt (as for now, --refuse-depends, --refuse-breaks don't help me)
sudocmd dpkg $DPKGOPTIONS -i $@
local RES=$?
# if run with --nodeps, do not fallback on hi level in any case if [ -n "$nodeps" ] ; then
[ -n "$nodeps" ] && return $RES sudocmd dpkg $DPKGOPTIONS -i $@
# return OK if all is OK return
[ "$RES" = "0" ] && return $RES fi
# are there apt that don't support dpkg files to install? # are there apt that don't support dpkg files to install?
epm_install_names $(make_filepath "$@") epm_install_names $(make_filepath "$@")
return return
# old way:
sudocmd dpkg $DPKGOPTIONS -i $@
local RES=$?
# return OK if all is OK
[ "$RES" = "0" ] && return $RES
# TODO: workaround with epm-check needed only for very old apt # TODO: workaround with epm-check needed only for very old apt
# run apt -f install if there are were some errors during install # run apt -f install if there are were some errors during install
...@@ -4208,26 +4214,31 @@ print_binpkgfilelist() ...@@ -4208,26 +4214,31 @@ print_binpkgfilelist()
| xargs -n1 -I "{}" echo -n "$PKGDIR/{} " | xargs -n1 -I "{}" echo -n "$PKGDIR/{} "
} }
PKGNAMEMASK4="6\(.*\)[_-]\([^_-]*\)[_-]\(.*[0-9].*\):\(.*\)$"
PKGNAMEMASK3="^\(.*\)[_-]\([^_-]*\)[_-]\(.*[0-9].*\)$"
PKGNAMEMASK="\(.*\)-\([0-9].*\)-\(.*[0-9].*\)\.\(.*\)\.\(.*\)" PKGNAMEMASK="\(.*\)-\([0-9].*\)-\(.*[0-9].*\)\.\(.*\)\.\(.*\)"
print_name() print_name()
{ {
echo "$@" | xargs -n1 echo | sed -e "s|$PKGNAMEMASK|\1|g" echo "$@" | xargs -n1 echo | sed -e "s|$PKGNAMEMASK4|\1-\2-\3|" -e "s|$PKGNAMEMASK3|\1|"
} }
print_version() print_version()
{ {
echo "$1" | xargs -n1 echo | sed -e "s|$PKGNAMEMASK|\2|g" echo "$1" | xargs -n1 echo | sed -e "s|$PKGNAMEMASK4|\1-\2-\3|" -e "s|$PKGNAMEMASK3|\2|"
} }
print_release() print_release()
{ {
echo "$1" | xargs -n1 echo | sed -e "s|$PKGNAMEMASK|\3|g" echo "$1" | xargs -n1 echo | sed -e "s|$PKGNAMEMASK4|\1-\2-\3|" -e "s|$PKGNAMEMASK3|\3|"
} }
print_version_release() print_version_release()
{ {
echo "$1" | xargs -n1 echo | sed -e "s|$PKGNAMEMASK|\2-\3|g" echo "$1" | xargs -n1 echo | sed -e "s|$PKGNAMEMASK4|\1-\2-\3|" -e "s|$PKGNAMEMASK3|\2-\3|"
} }
print_pkgname() print_pkgname()
...@@ -9205,7 +9216,7 @@ case $DISTRIB_ID in ...@@ -9205,7 +9216,7 @@ case $DISTRIB_ID in
Ubuntu|Debian|Mint|AstraLinux|Elbrus) Ubuntu|Debian|Mint|AstraLinux|Elbrus)
CMD="apt-dpkg" CMD="apt-dpkg"
#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) Mandriva)
CMD="urpm-rpm" CMD="urpm-rpm"
...@@ -9342,7 +9353,7 @@ normalize_name() ...@@ -9342,7 +9353,7 @@ normalize_name()
"Fedora Linux") "Fedora Linux")
echo "Fedora" echo "Fedora"
;; ;;
"RedHatEnterpriseLinuxServer") "Red Hat Enterprise Linux Server")
echo "RHEL" echo "RHEL"
;; ;;
"ROSA Enterprise Linux Desktop"|"ROSA Enterprise Linux Server") "ROSA Enterprise Linux Desktop"|"ROSA Enterprise Linux Server")
...@@ -10909,7 +10920,7 @@ Examples: ...@@ -10909,7 +10920,7 @@ Examples:
print_version() print_version()
{ {
echo "EPM package manager version 3.21.1 https://wiki.etersoft.ru/Epm" echo "EPM package manager version 3.21.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."
...@@ -10919,7 +10930,7 @@ print_version() ...@@ -10919,7 +10930,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.21.1 EPMVERSION=3.21.2
verbose=$EPM_VERBOSE verbose=$EPM_VERBOSE
quiet= quiet=
nodeps= nodeps=
......
...@@ -1400,7 +1400,7 @@ case $DISTRIB_ID in ...@@ -1400,7 +1400,7 @@ case $DISTRIB_ID in
Ubuntu|Debian|Mint|AstraLinux|Elbrus) Ubuntu|Debian|Mint|AstraLinux|Elbrus)
CMD="apt-dpkg" CMD="apt-dpkg"
#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) Mandriva)
CMD="urpm-rpm" CMD="urpm-rpm"
...@@ -1537,7 +1537,7 @@ normalize_name() ...@@ -1537,7 +1537,7 @@ normalize_name()
"Fedora Linux") "Fedora Linux")
echo "Fedora" echo "Fedora"
;; ;;
"RedHatEnterpriseLinuxServer") "Red Hat Enterprise Linux Server")
echo "RHEL" echo "RHEL"
;; ;;
"ROSA Enterprise Linux Desktop"|"ROSA Enterprise Linux Server") "ROSA Enterprise Linux Desktop"|"ROSA Enterprise Linux Server")
...@@ -2247,7 +2247,7 @@ print_version() ...@@ -2247,7 +2247,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.21.1 https://wiki.etersoft.ru/Epm" echo "Service manager version 3.21.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