Commit ba7a55a9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.52.4

parent 936d9fe6
...@@ -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.52.3" EPMVERSION="3.52.4"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -536,7 +536,15 @@ disabled_eget() ...@@ -536,7 +536,15 @@ disabled_eget()
disabled_erc() disabled_erc()
{ {
local ERC
if ! is_command patool ; then
if is_command 7z || is_command 7za || is_command 7zr || is_command 7zz ; then
:
else
epm install p7zip
fi
fi
# use internal eget only if exists # use internal eget only if exists
if [ -s $SHAREDIR/tools_erc ] ; then if [ -s $SHAREDIR/tools_erc ] ; then
$SHAREDIR/tools_erc "$@" $SHAREDIR/tools_erc "$@"
...@@ -547,6 +555,7 @@ disabled_erc() ...@@ -547,6 +555,7 @@ disabled_erc()
# FIXME: we need disable output here, ercat can be used for get output # FIXME: we need disable output here, ercat can be used for get output
assure_exists_erc >/dev/null assure_exists_erc >/dev/null
# run external command, not the function # run external command, not the function
local ERC
ERC=$(print_command_path erc) || fatal "Missed command erc from installed package erc" ERC=$(print_command_path erc) || fatal "Missed command erc from installed package erc"
$ERC "$@" $ERC "$@"
} }
...@@ -683,6 +692,10 @@ set_pm_type() ...@@ -683,6 +692,10 @@ set_pm_type()
set_distro_info set_distro_info
set_target_pkg_env set_target_pkg_env
if [ -n "$EPM_BACKEND" ] ; then
PMTYPE=$EPM_BACKEND
return
fi
if [ -n "$FORCEPM" ] ; then if [ -n "$FORCEPM" ] ; then
PMTYPE=$FORCEPM PMTYPE=$FORCEPM
return return
...@@ -970,12 +983,13 @@ __epm_addrepo_altlinux_help() ...@@ -970,12 +983,13 @@ __epm_addrepo_altlinux_help()
cat <<EOF cat <<EOF
epm repo add - add branch repo. Use follow params: epm repo add - add branch repo. Use follow params:
etersoft - for LINUX@Etersoft repo"
basealt - for BaseALT repo" basealt - for BaseALT repo"
yandex - for BaseALT repo mirror hosted by Yandex (recommended)" yandex - for BaseALT repo mirror hosted by Yandex (recommended)"
altsp - add ALT SP repo" altsp - add ALT SP repo"
autoimports - for BaseALT autoimports repo" autoimports - for BaseALT autoimports repo"
altlinuxclub - for altlinuxclub repo (http://altlinuxclub.ru/)" altlinuxclub - for altlinuxclub repo (http://altlinuxclub.ru/)"
etersoft - for LINUX@Etersoft repo"
korinf - for Korinf repo"
<task number> - add task repo" <task number> - add task repo"
archive 2018/02/09 - add archive of the repo from that date" archive 2018/02/09 - add archive of the repo from that date"
/dir/to/repo [component] - add repo dir generated with epm repo index --init" /dir/to/repo [component] - add repo dir generated with epm repo index --init"
...@@ -1046,6 +1060,12 @@ __epm_addrepo_altlinux() ...@@ -1046,6 +1060,12 @@ __epm_addrepo_altlinux()
autoimports.*|altlinuxclub.*) autoimports.*|altlinuxclub.*)
repo="$1" repo="$1"
;; ;;
korinf)
local http="http"
epm installed apt-https && http="https"
epm repo add "rpm $http://download.etersoft.ru/pub Korinf/ALTLinux/$DISTRVERSION main"
return 0
;;
archive) archive)
datestr="$2" datestr="$2"
echo "$datestr" | grep -Eq "^20[0-2][0-9]/[01][0-9]/[0-3][0-9]$" || fatal "use follow date format: 2017/12/31" echo "$datestr" | grep -Eq "^20[0-2][0-9]/[01][0-9]/[0-3][0-9]$" || fatal "use follow date format: 2017/12/31"
...@@ -7242,7 +7262,7 @@ get_fix_release_pkg() ...@@ -7242,7 +7262,7 @@ get_fix_release_pkg()
# apt-conf-sisyphus and apt-conf-branch conflicts # apt-conf-sisyphus and apt-conf-branch conflicts
epm installed apt-conf-branch && echo "apt-conf-branch-" epm installed apt-conf-branch && echo "apt-conf-branch-"
else else
epm installed apt-conf-branch && echo "apt-conf-branch apt-conf-sisyphus-" epm installed apt-conf-branch && echo "apt-conf-branch" && epm installed apt-conf-sisyphus && echo "apt-conf-sisyphus-"
fi fi
if [ "$FORCE" = "--force" ] ; then if [ "$FORCE" = "--force" ] ; then
...@@ -8195,6 +8215,10 @@ __epm_removerepo_alt() ...@@ -8195,6 +8215,10 @@ __epm_removerepo_alt()
info "remove archive repos" info "remove archive repos"
__epm_removerepo_alt_grepremove "archive/" __epm_removerepo_alt_grepremove "archive/"
;; ;;
korinf)
info "remove korinf repo"
__epm_removerepo_alt_grepremove "Korinf/"
;;
tasks) tasks)
info "remove task repos" info "remove task repos"
__epm_removerepo_alt_grepremove " repo/[0-9]+/" __epm_removerepo_alt_grepremove " repo/[0-9]+/"
...@@ -8800,7 +8824,7 @@ epm_repo() ...@@ -8800,7 +8824,7 @@ epm_repo()
epm_addrepo "$@" epm_addrepo "$@"
epm update epm update
;; ;;
rm|remove) # HELPCMD: remove repository from the sources lists (epm repo remove all for all) rm|del|remove) # HELPCMD: remove repository from the sources lists (epm repo remove all for all)
epm_removerepo "$@" epm_removerepo "$@"
;; ;;
...@@ -14497,6 +14521,15 @@ cmd="$1" ...@@ -14497,6 +14521,15 @@ cmd="$1"
eval lastarg=\${$#} eval lastarg=\${$#}
# Just printout help if run without args
if [ -z "$cmd" ] ; then
print_version
echo
fatal "Run $ $progname --help for get help"
fi
# if the first arg is some archive, suggest extract # if the first arg is some archive, suggest extract
if get_archive_type "$cmd" 2>/dev/null >/dev/null ; then if get_archive_type "$cmd" 2>/dev/null >/dev/null ; then
if is_target_format $lastarg ; then if is_target_format $lastarg ; then
...@@ -14518,13 +14551,6 @@ else ...@@ -14518,13 +14551,6 @@ else
fi fi
# Just printout help if run without args
if [ -z "$cmd" ] ; then
print_version
echo
fatal "Run $ $progname --help for get help"
fi
# TODO: Если программа-архиватор не установлена, предлагать установку с помощью epm # TODO: Если программа-архиватор не установлена, предлагать установку с помощью epm
case $cmd in case $cmd in
...@@ -15528,7 +15554,7 @@ check_command() ...@@ -15528,7 +15554,7 @@ check_command()
epm_cmd=packages epm_cmd=packages
direct_args=1 direct_args=1
;; ;;
list) # HELPCMD: print list of packages list) # HELPCMD: print list of packages (see epm list --help)
epm_cmd=list epm_cmd=list
direct_args=1 direct_args=1
;; ;;
...@@ -15569,7 +15595,7 @@ check_command() ...@@ -15569,7 +15595,7 @@ check_command()
epm_cmd=removerepo epm_cmd=removerepo
direct_args=1 direct_args=1
;; ;;
repo) # HELPCMD: manipulate with repository list (run epm repo --help to help) repo) # HELPCMD: manipulate with repository list (see epm repo --help)
epm_cmd=repo epm_cmd=repo
direct_args=1 direct_args=1
;; ;;
...@@ -15614,7 +15640,7 @@ check_command() ...@@ -15614,7 +15640,7 @@ check_command()
epm_cmd=mark epm_cmd=mark
direct_args=1 direct_args=1
;; ;;
history) # HELPCMD: show a log of actions taken by the software management history) # HELPCMD: show a log of actions taken by the software management (see epm history --help)
epm_cmd=history epm_cmd=history
direct_args=1 direct_args=1
;; ;;
...@@ -15656,14 +15682,14 @@ check_command() ...@@ -15656,14 +15682,14 @@ check_command()
epm_cmd=print epm_cmd=print
direct_args=1 direct_args=1
;; ;;
tool) # HELPCMD: run embedded tool (f.i., epm tool eget) tool) # HELPCMD: run embedded tool (see epm tool --help)
epm_cmd=tool epm_cmd=tool
direct_args=1 direct_args=1
;; ;;
repack) # HELPCMD: repack rpm to local compatibility repack) # HELPCMD: repack rpm to local compatibility
epm_cmd=repack epm_cmd=repack
;; ;;
pack) # HELPCMD: pack tarball or dir to a rpm package pack) # HELPCMD: pack tarball or dir to a rpm package
epm_cmd=pack epm_cmd=pack
direct_args=1 direct_args=1
;; ;;
......
...@@ -511,7 +511,15 @@ disabled_eget() ...@@ -511,7 +511,15 @@ disabled_eget()
disabled_erc() disabled_erc()
{ {
local ERC
if ! is_command patool ; then
if is_command 7z || is_command 7za || is_command 7zr || is_command 7zz ; then
:
else
epm install p7zip
fi
fi
# use internal eget only if exists # use internal eget only if exists
if [ -s $SHAREDIR/tools_erc ] ; then if [ -s $SHAREDIR/tools_erc ] ; then
$SHAREDIR/tools_erc "$@" $SHAREDIR/tools_erc "$@"
...@@ -522,6 +530,7 @@ disabled_erc() ...@@ -522,6 +530,7 @@ disabled_erc()
# FIXME: we need disable output here, ercat can be used for get output # FIXME: we need disable output here, ercat can be used for get output
assure_exists_erc >/dev/null assure_exists_erc >/dev/null
# run external command, not the function # run external command, not the function
local ERC
ERC=$(print_command_path erc) || fatal "Missed command erc from installed package erc" ERC=$(print_command_path erc) || fatal "Missed command erc from installed package erc"
$ERC "$@" $ERC "$@"
} }
...@@ -658,6 +667,10 @@ set_pm_type() ...@@ -658,6 +667,10 @@ set_pm_type()
set_distro_info set_distro_info
set_target_pkg_env set_target_pkg_env
if [ -n "$EPM_BACKEND" ] ; then
PMTYPE=$EPM_BACKEND
return
fi
if [ -n "$FORCEPM" ] ; then if [ -n "$FORCEPM" ] ; then
PMTYPE=$FORCEPM PMTYPE=$FORCEPM
return return
...@@ -2563,6 +2576,8 @@ case "$DISTRCONTROL" in ...@@ -2563,6 +2576,8 @@ case "$DISTRCONTROL" in
esac esac
# override system control detection result # override system control detection result
[ -n "$SERV_BACKEND" ] && CMD="$SERV_BACKEND"
# obsoleted
[ -n "$FORCESERVICE" ] && CMD="$FORCESERVICE" [ -n "$FORCESERVICE" ] && CMD="$FORCESERVICE"
SERVICETYPE="$CMD" SERVICETYPE="$CMD"
...@@ -2598,7 +2613,7 @@ print_version() ...@@ -2598,7 +2613,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.52.3 https://wiki.etersoft.ru/Epm" echo "Service manager version 3.52.4 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