Commit 6e34f082 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.51.2

parent 3ee79450
...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR ...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install # will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.51.1" EPMVERSION="3.51.2"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -5164,7 +5164,7 @@ case $PMTYPE in ...@@ -5164,7 +5164,7 @@ case $PMTYPE in
# FIXME: strong equal # FIXME: strong equal
CMD="rpm -qa" CMD="rpm -qa"
[ -n "$short" ] && CMD="rpm -qa --queryformat %{name}\n" [ -n "$short" ] && CMD="rpm -qa --queryformat %{name}\n"
docmd $CMD "$@" docmd $CMD "$@" | __fo_pfn "$@"
return ;; return ;;
packagekit) packagekit)
docmd pkcon get-packages --filter installed docmd pkcon get-packages --filter installed
...@@ -6392,12 +6392,12 @@ _shortquery_via_packages_list() ...@@ -6392,12 +6392,12 @@ _shortquery_via_packages_list()
# Note: double call due stderr redirect # Note: double call due stderr redirect
# Note: we use short=1 here due grep by ^name$ # Note: we use short=1 here due grep by ^name$
# separate first line for print out command # separate first line for print out command
(short=1 pkg_filenames=$firstpkg epm_packages | grep -- "$grepexp") && res=0 || res=1 (short=1 epm_packages $firstpkg | grep -- "$grepexp") && res=0 || res=1
local pkg local pkg
for pkg in "$@" ; do for pkg in "$@" ; do
grepexp=$(_get_grep_exp $pkg) grepexp=$(_get_grep_exp $pkg)
(short=1 pkg_filenames=$pkg epm_packages 2>/dev/null) | grep -- "$grepexp" || res=1 (short=1 epm_packages $pkg 2>/dev/null) | grep -- "$grepexp" || res=1
done done
# TODO: print in query (for user): 'warning: package $pkg is not installed' # TODO: print in query (for user): 'warning: package $pkg is not installed'
...@@ -6418,12 +6418,12 @@ _query_via_packages_list() ...@@ -6418,12 +6418,12 @@ _query_via_packages_list()
# Note: double call due stderr redirect # Note: double call due stderr redirect
# Note: we use short=1 here due grep by ^name$ # Note: we use short=1 here due grep by ^name$
# separate first line for print out command # separate first line for print out command
(short=1 pkg_filenames=$firstpkg epm_packages) | grep -q -- "$grepexp" && (quiet=1 pkg_filenames=$firstpkg epm_packages) && res=0 || res=1 (short=1 epm_packages $firstpkg) | grep -q -- "$grepexp" && (quiet=1 epm_packages $firstpkg) && res=0 || res=1
local pkg local pkg
for pkg in "$@" ; do for pkg in "$@" ; do
grepexp=$(_get_grep_exp $pkg) grepexp=$(_get_grep_exp $pkg)
(short=1 pkg_filenames=$pkg epm_packages 2>/dev/null) | grep -q -- "$grepexp" && (quiet=1 pkg_filenames=$pkg epm_packages) || res=1 (short=1 epm_packages $pkg 2>/dev/null) | grep -q -- "$grepexp" && (quiet=1 epm_packages $pkg) || res=1
done done
return $res return $res
...@@ -6831,7 +6831,7 @@ epm_query_package() ...@@ -6831,7 +6831,7 @@ epm_query_package()
MGS=$(eval __epm_search_make_grep $quoted_args) MGS=$(eval __epm_search_make_grep $quoted_args)
EXTRA_SHOWDOCMD=$MGS EXTRA_SHOWDOCMD=$MGS
# Note: get all packages list and do grep # Note: get all packages list and do grep
(eval "pkg_filenames='' epm_packages \"$(eval get_firstarg $quoted_args)\" $MGS") eval "epm_packages $MGS"
} }
# File bin/epm-reinstall: # File bin/epm-reinstall:
...@@ -10859,8 +10859,9 @@ is_warmup_allowed() ...@@ -10859,8 +10859,9 @@ is_warmup_allowed()
[ -n "$warmup" ] || return 1 [ -n "$warmup" ] || return 1
MEM="$($DISTRVENDOR -m)" MEM="$($DISTRVENDOR -m)"
# disable warm if have no enough memory # disable warm if have no enough memory
[ "$MEM" -le 1024 ] && return 1 [ "$MEM" -ge 1024 ] && return 0
return 0 warning "Skipping warmup bases due low memory size"
return 1
} }
__warmup_files() __warmup_files()
...@@ -10875,13 +10876,13 @@ __warmup_files() ...@@ -10875,13 +10876,13 @@ __warmup_files()
warmup_rpmbase() warmup_rpmbase()
{ {
is_warmup_allowed || { warning "Skipping warmup bases due low memory size" ; return ; } is_warmup_allowed || return 0
__warmup_files "rpm" "/var/lib/rpm/*" __warmup_files "rpm" "/var/lib/rpm/*"
} }
warmup_dpkgbase() warmup_dpkgbase()
{ {
is_warmup_allowed || { warning "Skipping warmup bases due low memory size" ; return ; } is_warmup_allowed || return 0
__warmup_files "dpkg" "/var/lib/dpkg/*" __warmup_files "dpkg" "/var/lib/dpkg/*"
} }
...@@ -13020,6 +13021,8 @@ WGETNOSSLCHECK='' ...@@ -13020,6 +13021,8 @@ WGETNOSSLCHECK=''
CURLNOSSLCHECK='' CURLNOSSLCHECK=''
WGETUSERAGENT='' WGETUSERAGENT=''
CURLUSERAGENT='' CURLUSERAGENT=''
WGETCOMPRESSED=''
CURLCOMPRESSED=''
WGETQ='' #-q WGETQ='' #-q
CURLQ='' #-s CURLQ='' #-s
# TODO: aria2c # TODO: aria2c
...@@ -13061,6 +13064,7 @@ Options: ...@@ -13061,6 +13064,7 @@ Options:
--verbose - verbose mode --verbose - verbose mode
-k|--no-check-certificate - skip SSL certificate chain support -k|--no-check-certificate - skip SSL certificate chain support
-U|-A|--user-agent - send browser like UserAgent -U|-A|--user-agent - send browser like UserAgent
--compressed - request a compressed response and automatically decompress the content
-4|--ipv4|--inet4-only - use only IPV4 -4|--ipv4|--inet4-only - use only IPV4
-6|--ipv6|--inet6-only - use only IPV6 -6|--ipv6|--inet6-only - use only IPV6
-O-|-O - - output downloaded file to stdout -O-|-O - - output downloaded file to stdout
...@@ -13124,6 +13128,10 @@ while [ -n "$1" ] ; do ...@@ -13124,6 +13128,10 @@ while [ -n "$1" ] ; do
WGETUSERAGENT="-U '$user_agent'" WGETUSERAGENT="-U '$user_agent'"
CURLUSERAGENT="-A '$user_agent'" CURLUSERAGENT="-A '$user_agent'"
;; ;;
--compressed)
CURLCOMPRESSED='--compressed'
WGETCOMPRESSED='--compression=auto'
;;
-4|--ipv4|--inet4-only) -4|--ipv4|--inet4-only)
FORCEIPV="-4" FORCEIPV="-4"
;; ;;
...@@ -13584,9 +13592,9 @@ elif [ "$EGET_BACKEND" = "wget" ] ; then ...@@ -13584,9 +13592,9 @@ elif [ "$EGET_BACKEND" = "wget" ] ; then
__wget() __wget()
{ {
if [ -n "$WGETUSERAGENT" ] ; then if [ -n "$WGETUSERAGENT" ] ; then
docmd $WGET $FORCEIPV $WGETQ $WGETNOSSLCHECK "$WGETUSERAGENT" "$@" docmd $WGET $FORCEIPV $WGETQ $WGETCOMPRESSED $WGETNOSSLCHECK "$WGETUSERAGENT" "$@"
else else
docmd $WGET $FORCEIPV $WGETQ $WGETNOSSLCHECK "$@" docmd $WGET $FORCEIPV $WGETQ $WGETCOMPRESSED $WGETNOSSLCHECK "$@"
fi fi
} }
...@@ -13633,9 +13641,9 @@ elif [ "$EGET_BACKEND" = "curl" ] ; then ...@@ -13633,9 +13641,9 @@ elif [ "$EGET_BACKEND" = "curl" ] ; then
__curl() __curl()
{ {
if [ -n "$CURLUSERAGENT" ] ; then if [ -n "$CURLUSERAGENT" ] ; then
docmd $CURL $FORCEIPV --fail -L $CURLQ "$CURLUSERAGENT" $CURLNOSSLCHECK "$@" docmd $CURL $FORCEIPV --fail -L $CURLQ $CURLCOMPRESSED "$CURLUSERAGENT" $CURLNOSSLCHECK "$@"
else else
docmd $CURL $FORCEIPV --fail -L $CURLQ $CURLNOSSLCHECK "$@" docmd $CURL $FORCEIPV --fail -L $CURLQ $CURLCOMPRESSED $CURLNOSSLCHECK "$@"
fi fi
} }
# put remote content to stdout # put remote content to stdout
......
...@@ -2570,7 +2570,7 @@ print_version() ...@@ -2570,7 +2570,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.51.1 https://wiki.etersoft.ru/Epm" echo "Service manager version 3.51.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