Commit 47540fac authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.55.3

parent 6d05bb85
...@@ -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.55.2" EPMVERSION="3.55.3"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -380,6 +380,7 @@ set_sudo() ...@@ -380,6 +380,7 @@ set_sudo()
if ! is_command $SUDO_CMD ; then if ! is_command $SUDO_CMD ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'Can't find sudo. Please install and tune sudo ('# epm install sudo') or run epm under root.'" [ "$nofail" = "nofail" ] || SUDO="fatal 'Can't find sudo. Please install and tune sudo ('# epm install sudo') or run epm under root.'"
SUDO_TESTED="2"
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
...@@ -389,6 +390,7 @@ set_sudo() ...@@ -389,6 +390,7 @@ set_sudo()
info "Please enter sudo user password to use sudo in the current session." info "Please enter sudo user password to use sudo in the current session."
if ! $SUDO_CMD -l >/dev/null ; then if ! $SUDO_CMD -l >/dev/null ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported in non interactive using). Please run epm under root.'" [ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported in non interactive using). Please run epm under root.'"
SUDO_TESTED="3"
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
fi fi
...@@ -396,6 +398,7 @@ set_sudo() ...@@ -396,6 +398,7 @@ set_sudo()
# use sudo if one is tuned and tuned without password # use sudo if one is tuned and tuned without password
if ! $SUDO_CMD -l -n >/dev/null 2>/dev/null ; then if ! $SUDO_CMD -l -n >/dev/null 2>/dev/null ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported). Please run epm under root or check http://altlinux.org/sudo '" [ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported). Please run epm under root or check http://altlinux.org/sudo '"
SUDO_TESTED="4"
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
fi fi
...@@ -3618,6 +3621,11 @@ epm_install_names() ...@@ -3618,6 +3621,11 @@ epm_install_names()
return return
fi fi
if [ -n "$dryrun" ] ; then
epm simulate "$@"
return
fi
if [ -n "$non_interactive" ] ; then if [ -n "$non_interactive" ] ; then
epm_ni_install_names "$@" epm_ni_install_names "$@"
return return
...@@ -8098,6 +8106,7 @@ epm_remove() ...@@ -8098,6 +8106,7 @@ epm_remove()
APTOPTIONS="--simulate" APTOPTIONS="--simulate"
;; ;;
*) *)
fatal "don't yet support --simulate for $PMTYPE"
return return
;; ;;
esac esac
...@@ -11977,8 +11986,15 @@ epm_upgrade() ...@@ -11977,8 +11986,15 @@ epm_upgrade()
return return
fi fi
# if possible, it will put pkg_urls into pkg_files and reconstruct pkg_filenames
if [ -n "$pkg_urls" ] ; then
info "Downloading packages assigned to upgrade ..."
__handle_pkg_urls_to_install
fi
info "Running command for upgrade packages" info "Running command for upgrade packages"
case $PMTYPE in case $PMTYPE in
*-rpm) *-rpm)
# upgrade only install files from the list # upgrade only install files from the list
...@@ -13364,7 +13380,7 @@ eget() ...@@ -13364,7 +13380,7 @@ eget()
{ {
if [ -n "$EPMMODE" ] ; then if [ -n "$EPMMODE" ] ; then
# if embedded in epm # if embedded in epm
(unset EGET_IPFS_GATEWAY; unset EGET_IPFS_API ; unset EGET_IPFS_DB ; internal_tools_eget "$@" ) (unset EGET_IPFS_GATEWAY; unset EGET_IPFS_API ; unset EGET_IPFS_DB ; EGET_BACKEND=$ORIG_EGET_BACKEND internal_tools_eget "$@" )
return return
fi fi
...@@ -13373,7 +13389,7 @@ eget() ...@@ -13373,7 +13389,7 @@ eget()
local bashopt='' local bashopt=''
#[ -n "$verbose" ] && bashopt='-x' #[ -n "$verbose" ] && bashopt='-x'
(unset EGET_IPFS_GATEWAY; unset EGET_IPFS_API ; unset EGET_IPFS_DB ; $CMDSHELL $bashopt $PROGDIR/$PROGNAME "$@" ) (unset EGET_IPFS_GATEWAY; unset EGET_IPFS_API ; unset EGET_IPFS_DB ; EGET_BACKEND=$ORIG_EGET_BACKEND $CMDSHELL $bashopt $PROGDIR/$PROGNAME "$@" )
} }
# TODO: # TODO:
...@@ -14070,7 +14086,8 @@ fi ...@@ -14070,7 +14086,8 @@ fi
WGET="$(print_command_path wget)" WGET="$(print_command_path wget)"
CURL="$(print_command_path curl)" CURL="$(print_command_path curl)"
ORIG_EGET_BACKEND="$EGET_BACKEND"
# override backend
if is_fileurl "$1" ; then if is_fileurl "$1" ; then
EGET_BACKEND="file" EGET_BACKEND="file"
elif is_ipfsurl "$1" ; then elif is_ipfsurl "$1" ; then
...@@ -14291,7 +14308,8 @@ url_get_response() ...@@ -14291,7 +14308,8 @@ url_get_response()
echo "$answer" echo "$answer"
} }
else
fatal "Unknown EGET_BACKEND '$EGET_BACKEND', logical error."
fi fi
...@@ -14570,8 +14588,9 @@ get_github_urls() ...@@ -14570,8 +14588,9 @@ get_github_urls()
[ -n "$owner" ] || fatal "Can't get owner from $1" [ -n "$owner" ] || fatal "Can't get owner from $1"
[ -n "$project" ] || fatal "Can't get project from $1" [ -n "$project" ] || fatal "Can't get project from $1"
local URL="https://api.github.com/repos/$owner/$project/releases" local URL="https://api.github.com/repos/$owner/$project/releases"
scat $URL | \ # api sometime returns unformatted json
grep -i -o -E '"browser_download_url": "https://.*"' | cut -d'"' -f4 scat $URL | sed -e 's|,\(["{]\)|,\n\1|g' | \
grep -i -o -E '"browser_download_url": *"https://.*"' | cut -d'"' -f4
} }
# drop file path from URL # drop file path from URL
......
...@@ -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.55.2" EPMVERSION="3.55.3"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -378,6 +378,7 @@ set_sudo() ...@@ -378,6 +378,7 @@ set_sudo()
if ! is_command $SUDO_CMD ; then if ! is_command $SUDO_CMD ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'Can't find sudo. Please install and tune sudo ('# epm install sudo') or run epm under root.'" [ "$nofail" = "nofail" ] || SUDO="fatal 'Can't find sudo. Please install and tune sudo ('# epm install sudo') or run epm under root.'"
SUDO_TESTED="2"
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
...@@ -387,6 +388,7 @@ set_sudo() ...@@ -387,6 +388,7 @@ set_sudo()
info "Please enter sudo user password to use sudo in the current session." info "Please enter sudo user password to use sudo in the current session."
if ! $SUDO_CMD -l >/dev/null ; then if ! $SUDO_CMD -l >/dev/null ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported in non interactive using). Please run epm under root.'" [ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported in non interactive using). Please run epm under root.'"
SUDO_TESTED="3"
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
fi fi
...@@ -394,6 +396,7 @@ set_sudo() ...@@ -394,6 +396,7 @@ set_sudo()
# use sudo if one is tuned and tuned without password # use sudo if one is tuned and tuned without password
if ! $SUDO_CMD -l -n >/dev/null 2>/dev/null ; then if ! $SUDO_CMD -l -n >/dev/null 2>/dev/null ; then
[ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported). Please run epm under root or check http://altlinux.org/sudo '" [ "$nofail" = "nofail" ] || SUDO="fatal 'Can't use sudo (only passwordless sudo is supported). Please run epm under root or check http://altlinux.org/sudo '"
SUDO_TESTED="4"
return "$SUDO_TESTED" return "$SUDO_TESTED"
fi fi
fi fi
......
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