You need to sign in or sign up before continuing.
Commit 235e5802 authored by Boria138's avatar Boria138 Committed by Vitaly Lipatov

Replaced all double quotes with single quotes for proper processing of variables

parent ed6f325d
...@@ -50,11 +50,11 @@ load_helper() ...@@ -50,11 +50,11 @@ load_helper()
{ {
local shieldname="loaded$(echo "$1" | sed -e 's|-||g')" local shieldname="loaded$(echo "$1" | sed -e 's|-||g')"
# already loaded # already loaded
eval "[ -n \"\$$shieldname\" ]" && debug "Already loaded $1" && return eval "[ -n \"\$$shieldname\" ]" && debug 'Already loaded $1' && return
local CMD="$SHAREDIR/$1" local CMD="$SHAREDIR/$1"
# do not use fatal() here, it can be initial state # do not use fatal() here, it can be initial state
[ -r "$CMD" ] || { message "FATAL: Have no $CMD helper file" ; exit 1; } [ -r "$CMD" ] || { message 'FATAL: Have no $CMD helper file' ; exit 1; }
eval "$shieldname=1" eval "$shieldname=1"
# shellcheck disable=SC1090 # shellcheck disable=SC1090
. $CMD . $CMD
...@@ -598,21 +598,21 @@ check_filenames() ...@@ -598,21 +598,21 @@ check_filenames()
for opt in "$@" ; do for opt in "$@" ; do
# files can be with full path or have extension via . # files can be with full path or have extension via .
if [ -f "$opt" ] && rhas "$opt" "[/\.]" ; then if [ -f "$opt" ] && rhas "$opt" "[/\.]" ; then
has_space "$opt" && warning "There are space(s) in filename '$opt', it is not supported. Skipped" && continue has_space "$opt" && warning 'There are space(s) in filename $opt, it is not supported. Skipped' && continue
[ -n "$pkg_files" ] && pkg_files="$pkg_files $opt" || pkg_files="$opt" [ -n "$pkg_files" ] && pkg_files="$pkg_files $opt" || pkg_files="$opt"
elif [ -d "$opt" ] ; then elif [ -d "$opt" ] ; then
has_space "$opt" && warning "There are space(s) in directory path '$opt', it is not supported. Skipped" && continue has_space "$opt" && warning 'There are space(s) in directory path $opt, it is not supported. Skipped' && continue
[ -n "$pkg_dirs" ] && pkg_dirs="$pkg_dirs $opt" || pkg_dirs="$opt" [ -n "$pkg_dirs" ] && pkg_dirs="$pkg_dirs $opt" || pkg_dirs="$opt"
elif is_url "$opt" ; then elif is_url "$opt" ; then
has_space "$opt" && warning "There are space(s) in URL '$opt', it is not supported. Skipped" && continue has_space "$opt" && warning 'There are space(s) in URL $opt, it is not supported. Skipped' && continue
[ -n "$pkg_urls" ] && pkg_urls="$pkg_urls $opt" || pkg_urls="$opt" [ -n "$pkg_urls" ] && pkg_urls="$pkg_urls $opt" || pkg_urls="$opt"
# hack, TODO: reasons # hack, TODO: reasons
elif rhas "$opt" "[/]" && ! rhas "$opt" "[()]" ; then elif rhas "$opt" "[/]" && ! rhas "$opt" "[()]" ; then
has_space "$opt" && warning "There are space(s) in filename '$opt', it is not supported. Skipped" && continue has_space "$opt" && warning 'There are space(s) in filename $opt, it is not supported. Skipped' && continue
[ -n "$pkg_files" ] && pkg_files="$pkg_files $opt" || pkg_files="$opt" [ -n "$pkg_files" ] && pkg_files="$pkg_files $opt" || pkg_files="$opt"
else else
has_space "$opt" && warning "There are space(s) in package name '$opt', it is not supported. Skipped." && continue has_space "$opt" && warning 'There are space(s) in package name $opt, it is not supported. Skipped.' && continue
rhas "$opt" "[*]" && warning "There are forbidden symbols in package name '$opt'. Skipped." && continue rhas "$opt" "[*]" && warning 'There are forbidden symbols in package name $opt. Skipped.' && continue
[ -n "$pkg_names" ] && pkg_names="$pkg_names $opt" || pkg_names="$opt" [ -n "$pkg_names" ] && pkg_names="$pkg_names $opt" || pkg_names="$opt"
fi fi
[ -n "$quoted_args" ] && quoted_args="$quoted_args \"$opt\"" || quoted_args="\"$opt\"" [ -n "$quoted_args" ] && quoted_args="$quoted_args \"$opt\"" || quoted_args="\"$opt\""
...@@ -692,9 +692,9 @@ Popular commands: ...@@ -692,9 +692,9 @@ Popular commands:
if [ -z "$epm_cmd" ] ; then if [ -z "$epm_cmd" ] ; then
print_version >&2 print_version >&2
echo >&2 echo >&2
fatstr="Unrecognized command in '$*' arg(s)" fatstr=$(eval_gettext 'Unrecognized command in $* arg(s)')
if [ -z "$*" ] ; then if [ -z "$*" ] ; then
fatstr="That program needs be running with some command" fatstr=$(eval_gettext "That program needs be running with some command")
print_short_help >&2 print_short_help >&2
fi fi
echo "Run $(echocmd "$PROGNAME --help") to get help." >&2 echo "Run $(echocmd "$PROGNAME --help") to get help." >&2
......
...@@ -360,7 +360,7 @@ __epm_addrepo_astra() ...@@ -360,7 +360,7 @@ __epm_addrepo_astra()
return return
;; ;;
astra-*) astra-*)
fatal "Unsupported distro version $1-$reponame, see '# epm print info' output." fatal 'Unsupported distro version $1-$reponame, see # epm print info output.'
;; ;;
esac esac
...@@ -493,7 +493,7 @@ case $PMTYPE in ...@@ -493,7 +493,7 @@ case $PMTYPE in
info "You need manually add repo to /etc/slackpkg/mirrors" info "You need manually add repo to /etc/slackpkg/mirrors"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2013-2016 Etersoft # Copyright (C) 2013-2016 Etersoft
# Copyright (C) 2013-2016 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2013-2016 Vitaly Lipatov <lav@etersoft.ru>
...@@ -55,7 +55,7 @@ __epm_assure_checking() ...@@ -55,7 +55,7 @@ __epm_assure_checking()
# TODO: check for /usr/bin, /bin, /usr/sbin, /sbin # TODO: check for /usr/bin, /bin, /usr/sbin, /sbin
if [ -e "$CMD" ] ; then if [ -e "$CMD" ] ; then
if [ -n "$verbose" ] ; then if [ -n "$verbose" ] ; then
info "File or directory $CMD is already exists." info 'File or directory $CMD is already exists.'
epm qf "$CMD" >&2 epm qf "$CMD" >&2
fi fi
return 0 return 0
...@@ -68,7 +68,7 @@ __epm_assure_checking() ...@@ -68,7 +68,7 @@ __epm_assure_checking()
if __check_command_in_path "$CMD" >/dev/null ; then if __check_command_in_path "$CMD" >/dev/null ; then
if [ -n "$verbose" ] ; then if [ -n "$verbose" ] ; then
local compath="$(__check_command_in_path "$1")" local compath="$(__check_command_in_path "$1")"
info "Command $CMD is exists: $compath" info 'Command $CMD is exists: $compath'
epm qf "$compath" >&2 epm qf "$compath" >&2
fi fi
return 0 return 0
...@@ -96,7 +96,7 @@ epm_assure() ...@@ -96,7 +96,7 @@ epm_assure()
__epm_assure_checking $CMD $PACKAGE $PACKAGEVERSION && return 0 __epm_assure_checking $CMD $PACKAGE $PACKAGEVERSION && return 0
info "Installing appropriate package for $CMD command..." info 'Installing appropriate package for $CMD command...'
__epm_need_update $PACKAGE $PACKAGEVERSION || return 0 __epm_need_update $PACKAGE $PACKAGEVERSION || return 0
# can't be used in epm ei case # can't be used in epm ei case
...@@ -117,6 +117,6 @@ epm_assure() ...@@ -117,6 +117,6 @@ epm_assure()
local textpackage local textpackage
[ -n "$PACKAGEVERSION" ] && textpackage=" >= $PACKAGEVERSION" [ -n "$PACKAGEVERSION" ] && textpackage=" >= $PACKAGEVERSION"
warning "Can't assure in '$CMD' command from $PACKAGE$textpackage package" warning 'Cant assure in $CMD command from $PACKAGE$textpackage package'
return 1 return 1
} }
...@@ -30,7 +30,7 @@ case $PMTYPE in ...@@ -30,7 +30,7 @@ case $PMTYPE in
sudocmd apk audit sudocmd apk audit
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -47,14 +47,14 @@ case $BASEDISTRNAME in ...@@ -47,14 +47,14 @@ case $BASEDISTRNAME in
info "Retrieving packages installed via epm play ..." info "Retrieving packages installed via epm play ..."
local play_installed="$(epm play --list-installed-packages)" local play_installed="$(epm play --list-installed-packages)"
if [ -n "$play_installed" ] ; then if [ -n "$play_installed" ] ; then
message "Skip follow packages installed via epm play: $(echo $play_installed | xargs -n1000 echo)" message "Skip follow packages installed via epm play:" $(echo $play_installed | xargs -n1000 echo)
PKGLIST="$(estrlist exclude "$play_installed" "$PKGLIST")" PKGLIST="$(estrlist exclude "$play_installed" "$PKGLIST")"
fi fi
# TODO: implement for other PMTYPE # TODO: implement for other PMTYPE
local hold_packages="$(epm mark --short showhold)" local hold_packages="$(epm mark --short showhold)"
if [ -n "$hold_packages" ] ; then if [ -n "$hold_packages" ] ; then
message "Skip follow packages on hold: $(echo $hold_packages | xargs -n1000 echo)" message "Skip follow packages on hold:" $(echo $hold_packages | xargs -n1000 echo)
PKGLIST="$(estrlist exclude "$hold_packages" "$PKGLIST")" PKGLIST="$(estrlist exclude "$hold_packages" "$PKGLIST")"
fi fi
...@@ -148,7 +148,7 @@ case $PMTYPE in ...@@ -148,7 +148,7 @@ case $PMTYPE in
fi fi
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -356,7 +356,7 @@ case $PMTYPE in ...@@ -356,7 +356,7 @@ case $PMTYPE in
fi fi
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -41,7 +41,7 @@ __epm_changelog_files() ...@@ -41,7 +41,7 @@ __epm_changelog_files()
# #
# ;; # ;;
*) *)
fatal "Have no suitable command for $1" fatal 'Have no suitable command for $1'
;; ;;
esac esac
} }
...@@ -65,7 +65,7 @@ __epm_changelog_local_names() ...@@ -65,7 +65,7 @@ __epm_changelog_local_names()
docmd pacman -Qc $1 docmd pacman -Qc $1
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -96,7 +96,7 @@ __epm_changelog_unlocal_names() ...@@ -96,7 +96,7 @@ __epm_changelog_unlocal_names()
docmd equery changes -f "$1" docmd equery changes -f "$1"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE. Try install the package firstly." fatal 'Have no suitable command for $PMTYPE. Try install the package firstly.'
;; ;;
esac esac
......
...@@ -80,7 +80,7 @@ case $PMTYPE in ...@@ -80,7 +80,7 @@ case $PMTYPE in
sudocmd apk fix sudocmd apk fix
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -129,7 +129,7 @@ update_repo_if_needed() ...@@ -129,7 +129,7 @@ update_repo_if_needed()
esac esac
days="$(__epm_check_apt_db_days)" && return days="$(__epm_check_apt_db_days)" && return
warning "APT database is $days, please run 'epm update'!" warning 'APT database is $days, please run epm update!'
# TODO: enable __is_repo_info_downloaded # TODO: enable __is_repo_info_downloaded
......
...@@ -102,7 +102,7 @@ case $PMTYPE in ...@@ -102,7 +102,7 @@ case $PMTYPE in
sudocmd eopkg check $@ sudocmd eopkg check $@
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -27,7 +27,7 @@ __alt_fix_triggers() ...@@ -27,7 +27,7 @@ __alt_fix_triggers()
assure_exists time assure_exists time
touch $TDIR/added touch $TDIR/added
for ft in $(ls /usr/lib/rpm/*.filetrigger | sort) ; do for ft in $(ls /usr/lib/rpm/*.filetrigger | sort) ; do
message "Try run $ft ..." message 'Try run $ft ...'
echo $TDIR/added $TDIR/removed | a='' time $ft echo $TDIR/added $TDIR/removed | a='' time $ft
done done
rm -f $TDIR/added fatal rm -f $TDIR/added fatal
...@@ -60,7 +60,7 @@ case $BASEDISTRNAME in ...@@ -60,7 +60,7 @@ case $BASEDISTRNAME in
epm_checksystem_$DISTRNAME epm_checksystem_$DISTRNAME
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -95,7 +95,7 @@ case $PMTYPE in ...@@ -95,7 +95,7 @@ case $PMTYPE in
sudocmd pkg clean sudocmd pkg clean
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
info "Note: Also you can try (with CAUTION) '# epm autoremove' and '# epm autoorphans' commands to remove obsoleted and unused packages." info "Note: Also you can try (with CAUTION) '# epm autoremove' and '# epm autoorphans' commands to remove obsoleted and unused packages."
......
...@@ -32,7 +32,7 @@ epm_conflicts_files() ...@@ -32,7 +32,7 @@ epm_conflicts_files()
# a= docmd dpkg -I $pkg_files | grep "^ *Depends:" | sed "s|^ *Depends:||g" # a= docmd dpkg -I $pkg_files | grep "^ *Depends:" | sed "s|^ *Depends:||g"
# ;; # ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -88,7 +88,7 @@ case $PMTYPE in ...@@ -88,7 +88,7 @@ case $PMTYPE in
# CMD="equery depgraph" # CMD="equery depgraph"
# ;; # ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -61,7 +61,7 @@ case "$BASEDISTRNAME" in ...@@ -61,7 +61,7 @@ case "$BASEDISTRNAME" in
fi fi
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -147,7 +147,7 @@ epm_downgrade() ...@@ -147,7 +147,7 @@ epm_downgrade()
sudocmd urpm-reposync -v sudocmd urpm-reposync -v
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -98,7 +98,7 @@ __download_pkg_urls() ...@@ -98,7 +98,7 @@ __download_pkg_urls()
if docmd eget $latest "$url" ; then if docmd eget $latest "$url" ; then
local i local i
for i in * ; do for i in * ; do
[ "$i" = "*" ] && warning "Incorrect true status from eget. No saved files from download $url, ignoring" && continue [ "$i" = "*" ] && warning 'Incorrect true status from eget. No saved files from download $url, ignoring' && continue
[ -s "$tmppkg/$i" ] || continue [ -s "$tmppkg/$i" ] || continue
chmod $verbose a+r "$tmppkg/$i" chmod $verbose a+r "$tmppkg/$i"
local si="$(echo "$i" | sed -e 's| |-|g')" local si="$(echo "$i" | sed -e 's| |-|g')"
...@@ -219,7 +219,7 @@ __epm_download_alt() ...@@ -219,7 +219,7 @@ __epm_download_alt()
local installlist="$(get_task_packages $*)" local installlist="$(get_task_packages $*)"
# hack: drop -devel packages to avoid package provided by multiple packages # hack: drop -devel packages to avoid package provided by multiple packages
installlist="$(estrlist reg_exclude ".*-devel .*-devel-static .*-checkinstall .*-debuginfo" "$installlist")" installlist="$(estrlist reg_exclude ".*-devel .*-devel-static .*-checkinstall .*-debuginfo" "$installlist")"
[ -n "$verbose" ] && info "Packages from task(s): $installlist" [ -n "$verbose" ] && info 'Packages from task(s): $installlist'
try_change_alt_repo try_change_alt_repo
epm_addrepo "$@" epm_addrepo "$@"
...@@ -309,7 +309,7 @@ epm_download() ...@@ -309,7 +309,7 @@ epm_download()
docmd brew fetch $* docmd brew fetch $*
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -65,7 +65,7 @@ __epm_korinf_install_eepm() ...@@ -65,7 +65,7 @@ __epm_korinf_install_eepm()
if [ "$BASEDISTRNAME" = "alt" ] && [ "$DISTRVERSION" != "Sisyphus" ] && [ "$EPMMODE" = "package" ] ; then if [ "$BASEDISTRNAME" = "alt" ] && [ "$DISTRVERSION" != "Sisyphus" ] && [ "$EPMMODE" = "package" ] ; then
if epm status --original eepm ; then if epm status --original eepm ; then
warning "Using external (Korinf) repo is forbidden for stable ALT branch $DISTRVERSION." warning 'Using external (Korinf) repo is forbidden for stable ALT branch $DISTRVERSION.'
info "Check https://bugzilla.altlinux.org/44314 for reasons." info "Check https://bugzilla.altlinux.org/44314 for reasons."
info "You can install eepm package from Korinf manually, check instruction at https://eepm.ru" info "You can install eepm package from Korinf manually, check instruction at https://eepm.ru"
info info
......
...@@ -112,7 +112,7 @@ __epm_filelist_file() ...@@ -112,7 +112,7 @@ __epm_filelist_file()
CMD="eopkg --files info" CMD="eopkg --files info"
;; ;;
*) *)
fatal "Have no suitable query command for $PMTYPE" fatal 'Have no suitable query command for $PMTYPE'
;; ;;
esac esac
...@@ -188,7 +188,7 @@ __epm_filelist_name() ...@@ -188,7 +188,7 @@ __epm_filelist_name()
return return
;; ;;
*) *)
fatal "Have no suitable query command for $PMTYPE" fatal 'Have no suitable query command for $PMTYPE'
;; ;;
esac esac
......
...@@ -69,7 +69,7 @@ confirm_action() ...@@ -69,7 +69,7 @@ confirm_action()
[ -n "$interactive" ] || return 0 [ -n "$interactive" ] || return 0
local response local response
# call with a prompt string or use a default # call with a prompt string or use a default
read -r -p "${1:-Are you sure? [Y/n]} " response read -r -p "${1:-$(eval_gettext 'Are you sure? [Y/n]')} " response
case $response in case $response in
[yY][eE][sS]|[yY]|"") [yY][eE][sS]|[yY]|"")
true true
......
...@@ -166,7 +166,7 @@ case $PMTYPE in ...@@ -166,7 +166,7 @@ case $PMTYPE in
docmd cat /var/log/portage docmd cat /var/log/portage
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -150,7 +150,7 @@ case $PMTYPE in ...@@ -150,7 +150,7 @@ case $PMTYPE in
docmd pkg show $pkg_names docmd pkg show $pkg_names
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
......
...@@ -194,7 +194,7 @@ epm_install_names() ...@@ -194,7 +194,7 @@ epm_install_names()
sudocmd $PMTYPE install $@ sudocmd $PMTYPE install $@
return ;; return ;;
*) *)
fatal "Have no suitable install command for $PMTYPE" fatal 'Have no suitable install command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -285,7 +285,7 @@ epm_ni_install_names() ...@@ -285,7 +285,7 @@ epm_ni_install_names()
__separate_sudocmd_foreach "/usr/sbin/slackpkg -batch=on -default_answer=yes install" "/usr/sbin/slackpkg -batch=on -default_answer=yes upgrade" $@ __separate_sudocmd_foreach "/usr/sbin/slackpkg -batch=on -default_answer=yes install" "/usr/sbin/slackpkg -batch=on -default_answer=yes upgrade" $@
return ;; return ;;
*) *)
fatal "Have no suitable appropriate install command for $PMTYPE" fatal 'Have no suitable appropriate install command for $PMTYPE'
;; ;;
esac esac
} }
......
...@@ -30,7 +30,7 @@ epm_install_files_alt() ...@@ -30,7 +30,7 @@ epm_install_files_alt()
# do repack if needed # do repack if needed
if __epm_repack_if_needed $files ; then if __epm_repack_if_needed $files ; then
[ -n "$repacked_pkgs" ] || fatal "Can't convert $files" [ -n "$repacked_pkgs" ] || fatal 'Cant convert $files'
files="$repacked_pkgs" files="$repacked_pkgs"
fi fi
......
...@@ -28,7 +28,7 @@ epm_install_files_apt_dpkg() ...@@ -28,7 +28,7 @@ epm_install_files_apt_dpkg()
fi fi
if __epm_repack_if_needed $files ; then if __epm_repack_if_needed $files ; then
[ -n "$repacked_pkgs" ] || fatal "Can't convert $files" [ -n "$repacked_pkgs" ] || fatal 'Cant convert $files'
files="$repacked_pkgs" files="$repacked_pkgs"
fi fi
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
__emerge_install_ebuild() __emerge_install_ebuild()
{ {
local EBUILD="$1" local EBUILD="$1"
[ -s "$EBUILD" ] || fatal ".ebuild file '$EBUILD' is missed" [ -s "$EBUILD" ] || fatal '.ebuild file $EBUILD is missed'
# load ebuild and get vars # load ebuild and get vars
. $(pwd)/$EBUILD . $(pwd)/$EBUILD
[ -n "$SRC_URI" ] || fatal "Can't load SRC_URI from $EBUILD" [ -n "$SRC_URI" ] || fatal 'Cant load SRC_URI from $EBUILD'
# try to detect tarballs # try to detect tarballs
local TARBALLS= local TARBALLS=
......
...@@ -79,7 +79,7 @@ epm_print_install_files_command() ...@@ -79,7 +79,7 @@ epm_print_install_files_command()
;; ;;
*) *)
fatal "Have no suitable appropriate install command for $PMTYPE" fatal 'Have no suitable appropriate install command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -134,8 +134,7 @@ epm_print_install_names_command() ...@@ -134,8 +134,7 @@ epm_print_install_names_command()
echo "$PMTYPE install $*" echo "$PMTYPE install $*"
return ;; return ;;
*) *)
fatal "Have no suitable appropriate install command for $PMTYPE" fatal 'Have no suitable appropriate install command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -23,7 +23,7 @@ epm_install_files_rpm() ...@@ -23,7 +23,7 @@ epm_install_files_rpm()
[ -z "$files" ] && return [ -z "$files" ] && return
if __epm_repack_if_needed $files ; then if __epm_repack_if_needed $files ; then
[ -n "$repacked_pkgs" ] || fatal "Can't convert $files" [ -n "$repacked_pkgs" ] || fatal 'Cant convert $files'
files="$repacked_pkgs" files="$repacked_pkgs"
fi fi
......
...@@ -49,7 +49,7 @@ epm_kernel_update() ...@@ -49,7 +49,7 @@ epm_kernel_update()
message "Skipping: kernel package will update during dist-upgrade" message "Skipping: kernel package will update during dist-upgrade"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -72,7 +72,7 @@ epm_list() ...@@ -72,7 +72,7 @@ epm_list()
return return
;; ;;
*) *)
fatal "Unknown option $option, use epm list --help to get info" fatal 'Unknown option $option, use epm list --help to get info
;; ;;
esac esac
......
...@@ -138,7 +138,7 @@ case $PMTYPE in ...@@ -138,7 +138,7 @@ case $PMTYPE in
return 0 return 0
;; ;;
*) *)
fatal "Have no suitable query command for $PMTYPE" fatal 'Have no suitable query command for $PMTYPE'
;; ;;
esac esac
......
...@@ -69,7 +69,7 @@ case $PMTYPE in ...@@ -69,7 +69,7 @@ case $PMTYPE in
docmd winget upgrade docmd winget upgrade
;; ;;
*) *)
fatal "Have no suitable query command for $PMTYPE" fatal 'Have no suitable query command for $PMTYPE'
;; ;;
esac esac
......
...@@ -105,7 +105,7 @@ case $PMTYPE in ...@@ -105,7 +105,7 @@ case $PMTYPE in
info "Manually: edit /etc/pacman.conf modifying IgnorePkg array" info "Manually: edit /etc/pacman.conf modifying IgnorePkg array"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -140,7 +140,7 @@ case $PMTYPE in ...@@ -140,7 +140,7 @@ case $PMTYPE in
info "Manually: edit /etc/pacman.conf removing package from IgnorePkg line" info "Manually: edit /etc/pacman.conf removing package from IgnorePkg line"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -182,7 +182,7 @@ case $PMTYPE in ...@@ -182,7 +182,7 @@ case $PMTYPE in
cat /etc/pacman.conf cat /etc/pacman.conf
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -231,7 +231,7 @@ case $PMTYPE in ...@@ -231,7 +231,7 @@ case $PMTYPE in
sudocmd emerge --oneshot "$@" sudocmd emerge --oneshot "$@"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -262,7 +262,7 @@ case $PMTYPE in ...@@ -262,7 +262,7 @@ case $PMTYPE in
sudocmd emerge --select "$@" sudocmd emerge --select "$@"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -287,7 +287,7 @@ case $PMTYPE in ...@@ -287,7 +287,7 @@ case $PMTYPE in
sudocmd dnf repoquery --unneeded sudocmd dnf repoquery --unneeded
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -311,7 +311,7 @@ case $PMTYPE in ...@@ -311,7 +311,7 @@ case $PMTYPE in
sudocmd dnf repoquery --userinstalled sudocmd dnf repoquery --userinstalled
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -361,7 +361,7 @@ epm_mark() ...@@ -361,7 +361,7 @@ epm_mark()
epm_mark_showmanual "$@" epm_mark_showmanual "$@"
;; ;;
*) *)
fatal "Unknown command $ epm repo '$CMD'" fatal 'Unknown command $ epm repo $CMD'
;; ;;
esac esac
......
...@@ -41,7 +41,7 @@ case $PMTYPE in ...@@ -41,7 +41,7 @@ case $PMTYPE in
a= rpm --rebuilddb a= rpm --rebuilddb
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -35,7 +35,7 @@ __epm_pack_run_handler() ...@@ -35,7 +35,7 @@ __epm_pack_run_handler()
local repackcode="$EPM_PACK_SCRIPTS_DIR/$packname.sh" local repackcode="$EPM_PACK_SCRIPTS_DIR/$packname.sh"
[ -s "$repackcode" ] || return [ -s "$repackcode" ] || return
[ -f "$repackcode.rpmnew" ] && warning "There is .rpmnew file(s) in $EPM_PACK_SCRIPTS_DIR dir. The pack script can be outdated." [ -f "$repackcode.rpmnew" ] && warning 'There is .rpmnew file(s) in $EPM_PACK_SCRIPTS_DIR dir. The pack script can be outdated.'
# a file to keep filename of generated tarball # a file to keep filename of generated tarball
filefortarname="$(pwd)/filefortarname" filefortarname="$(pwd)/filefortarname"
...@@ -46,11 +46,11 @@ __epm_pack_run_handler() ...@@ -46,11 +46,11 @@ __epm_pack_run_handler()
#info "Running $($script --description 2>/dev/null) ..." #info "Running $($script --description 2>/dev/null) ..."
# TODO: add url info here # TODO: add url info here
( unset EPMCURDIR ; export PATH=$SCPATH ; export HOME=$(pwd) ; docmd $CMDSHELL $bashopt $repackcode "$tarname" "$filefortarname" "$packversion" "$url") || fatal ( unset EPMCURDIR ; export PATH=$SCPATH ; export HOME=$(pwd) ; docmd $CMDSHELL $bashopt $repackcode "$tarname" "$filefortarname" "$packversion" "$url") || fatal
returntarname="$(cat "$filefortarname")" || fatal "pack script $repackcode didn't set tarname" returntarname="$(cat "$filefortarname")" || fatal 'pack script $repackcode didnt set tarname'
local i local i
for i in $returntarname ; do for i in $returntarname ; do
[ -s "$i" ] || fatal "pack script for $packname returned a non-existent file $i" [ -s "$i" ] || fatal 'pack script for $packname returned a non-existent file $i'
done done
return 0 return 0
...@@ -63,7 +63,7 @@ __epm_pack() ...@@ -63,7 +63,7 @@ __epm_pack()
local URL="$4" local URL="$4"
# fills returntarname with packed tar # fills returntarname with packed tar
__epm_pack_run_handler "$@" || fatal "Can't find pack script for packname $packname" __epm_pack_run_handler "$@" || fatal 'Cant find pack script for packname $packname'
if [ -n "$download_only" ] ; then if [ -n "$download_only" ] ; then
mv $returntarname $EPMCURDIR mv $returntarname $EPMCURDIR
...@@ -162,7 +162,7 @@ epm_pack() ...@@ -162,7 +162,7 @@ epm_pack()
__download_pkg_urls __download_pkg_urls
pkg_urls= pkg_urls=
[ -n "$pkg_files" ] || fatal "Can't download $tarname" [ -n "$pkg_files" ] || fatal 'Cant download $tarname'
tarname="$(realpath "$pkg_files")" tarname="$(realpath "$pkg_files")"
elif [ -d "$tarname" ] ; then elif [ -d "$tarname" ] ; then
tarname="$(realpath "$tarname")" tarname="$(realpath "$tarname")"
......
...@@ -53,7 +53,7 @@ case $PMTYPE in ...@@ -53,7 +53,7 @@ case $PMTYPE in
fi fi
;; ;;
*) *)
fatal "Sorted package list function is not implemented for $PMTYPE" fatal 'Sorted package list function is not implemented for $PMTYPE'
;; ;;
esac esac
} }
...@@ -109,7 +109,7 @@ epm_packages() ...@@ -109,7 +109,7 @@ epm_packages()
"") "")
;; ;;
*) *)
fatal "Unknown option $1. Use epm packages --help to get help." fatal 'Unknown option $1. Use epm packages --help to get help.'
esac esac
case $PMTYPE in case $PMTYPE in
...@@ -251,7 +251,7 @@ case $PMTYPE in ...@@ -251,7 +251,7 @@ case $PMTYPE in
fi fi
;; ;;
*) *)
fatal "Have no suitable query command for $PMTYPE" fatal 'Have no suitable query command for $PMTYPE'
;; ;;
esac esac
......
...@@ -52,7 +52,7 @@ __run_script() ...@@ -52,7 +52,7 @@ __run_script()
{ {
local script="$psdir/$1.sh" local script="$psdir/$1.sh"
[ -s "$script" ] || return [ -s "$script" ] || return
[ -f "$script.rpmnew" ] && warning "There is .rpmnew file(s) in $psdir dir. The play script can be outdated." [ -f "$script.rpmnew" ] && warning 'There is .rpmnew file(s) in $psdir dir. The play script can be outdated.'
shift shift
[ "$PROGDIR" = "/usr/bin" ] && SCPATH="$PATH" || SCPATH="$PROGDIR:$PATH" [ "$PROGDIR" = "/usr/bin" ] && SCPATH="$PATH" || SCPATH="$PROGDIR:$PATH"
...@@ -283,7 +283,7 @@ __epm_play_remove() ...@@ -283,7 +283,7 @@ __epm_play_remove()
__remove_installed_app "$prescription" __remove_installed_app "$prescription"
else else
psdir=$prsdir psdir=$prsdir
__check_play_script "$prescription" || fatal "We have no idea how to remove $prescription (checked in $psdir and $prsdir)" __check_play_script "$prescription" || fatal 'We have no idea how to remove $prescription (checked in $psdir and $prsdir)'
__epm_play_run "$prescription" --remove || fatal "There was some error during run the script." __epm_play_run "$prescription" --remove || fatal "There was some error during run the script."
fi fi
done done
......
...@@ -45,7 +45,7 @@ case $PMTYPE in ...@@ -45,7 +45,7 @@ case $PMTYPE in
docmd apk policy $pkg_names docmd apk policy $pkg_names
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -42,7 +42,7 @@ fi ...@@ -42,7 +42,7 @@ fi
prescription="$1" prescription="$1"
shift shift
__check_play_script "$prescription" || fatal "We have no idea how to play $prescription (checked in $psdir)" __check_play_script "$prescription" || fatal 'We have no idea how to play $prescription (checked in $psdir)'
__epm_play_run "$prescription" --run "$@" || fatal "There was some error during run the script." __epm_play_run "$prescription" --run "$@" || fatal "There was some error during run the script."
} }
...@@ -433,23 +433,23 @@ epm_print() ...@@ -433,23 +433,23 @@ epm_print()
query_package_field "$FIELD" "$@" query_package_field "$FIELD" "$@"
;; ;;
"pkgname") "pkgname")
[ -n "$FNFLAG" ] || fatal "print $WHAT works only for filename(s)" [ -n "$FNFLAG" ] || fatal 'print $WHAT works only for filename(s)'
[ -n "$1" ] || fatal "Arg is missed" [ -n "$1" ] || fatal "Arg is missed"
# TODO: drop_pkg_extensions # TODO: drop_pkg_extensions
print_pkgname "$@" print_pkgname "$@"
;; ;;
"srcname") "srcname")
[ -n "$FNFLAG" ] || fatal "print $WHAT works only for filename(s)" [ -n "$FNFLAG" ] || fatal 'print $WHAT works only for filename(s)'
[ -n "$1" ] || fatal "Arg is missed" [ -n "$1" ] || fatal "Arg is missed"
print_srcname "$@" print_srcname "$@"
;; ;;
"srcpkgname") "srcpkgname")
[ -n "$FNFLAG" ] || [ -n "$PKFLAG" ] || fatal "print $WHAT works only for filename(s)" [ -n "$FNFLAG" ] || [ -n "$PKFLAG" ] || fatal 'print $WHAT works only for filename(s)'
[ -n "$1" ] || fatal "Arg is missed" [ -n "$1" ] || fatal "Arg is missed"
print_srcpkgname "$@" print_srcpkgname "$@"
;; ;;
"specname") "specname")
[ -n "$FNFLAG" ] || [ -n "$PKFLAG" ] || fatal "print $WHAT works only for filename(s)" [ -n "$FNFLAG" ] || [ -n "$PKFLAG" ] || fatal 'print $WHAT works only for filename(s)'
[ -n "$1" ] || fatal "Arg is missed" [ -n "$1" ] || fatal "Arg is missed"
print_specname "$@" print_specname "$@"
;; ;;
...@@ -487,7 +487,7 @@ epm_print() ...@@ -487,7 +487,7 @@ epm_print()
$DISTRVENDOR "$@" $DISTRVENDOR "$@"
;; ;;
*) *)
fatal "Unknown command $ epm print $WHAT. Use epm print help for get help." fatal 'Unknown command $ epm print $WHAT. Use epm print help for get help.'
;; ;;
esac esac
} }
...@@ -42,7 +42,7 @@ epm_provides_files() ...@@ -42,7 +42,7 @@ epm_provides_files()
docmd dpkg -I $pkg_files | grep "^ *Provides:" | sed "s|^ *Provides:||g" docmd dpkg -I $pkg_files | grep "^ *Provides:" | sed "s|^ *Provides:||g"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -122,7 +122,7 @@ case $PMTYPE in ...@@ -122,7 +122,7 @@ case $PMTYPE in
fi fi
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -137,7 +137,7 @@ __do_query() ...@@ -137,7 +137,7 @@ __do_query()
return 1 return 1
;; ;;
*) *)
fatal "Have no suitable query command for $PMTYPE" fatal 'Have no suitable query command for $PMTYPE'
;; ;;
esac esac
...@@ -168,7 +168,7 @@ __do_short_query() ...@@ -168,7 +168,7 @@ __do_short_query()
return return
;; ;;
*) *)
fatal "Have no suitable query command for $PMTYPE" fatal 'Have no suitable query command for $PMTYPE'
;; ;;
esac esac
......
...@@ -74,7 +74,7 @@ epm_release_downgrade() ...@@ -74,7 +74,7 @@ epm_release_downgrade()
dv="$(__detect_alt_release_by_repo)" dv="$(__detect_alt_release_by_repo)"
if [ -n "$dv" ] && [ "$dv" != "$DISTRVERSION" ] ; then if [ -n "$dv" ] && [ "$dv" != "$DISTRVERSION" ] ; then
DISTRVERSION="$dv" DISTRVERSION="$dv"
info "Detected running $DISTRNAME $DISTRVERSION (according to using repos)" info 'Detected running $DISTRNAME $DISTRVERSION (according to using repos)'
fi fi
fi fi
...@@ -92,7 +92,7 @@ epm_release_downgrade() ...@@ -92,7 +92,7 @@ epm_release_downgrade()
__alt_repofix __alt_repofix
__switch_alt_to_distro $DISTRVERSION $TARGET && info "Done. The system has been successfully downgraded to the previous release '$TARGET'." __switch_alt_to_distro $DISTRVERSION $TARGET && info 'Done. The system has been successfully downgraded to the previous release $TARGET.'
return 0 return 0
;; ;;
...@@ -103,7 +103,7 @@ epm_release_downgrade() ...@@ -103,7 +103,7 @@ epm_release_downgrade()
case $PMTYPE in case $PMTYPE in
apt-rpm) apt-rpm)
#docmd epm update #docmd epm update
info "Have no idea how to downgrade $DISTRNAME" info 'Have no idea how to downgrade $DISTRNAME'
;; ;;
*-dpkg) *-dpkg)
assure_exists do-release-upgrade update-manager-core assure_exists do-release-upgrade update-manager-core
...@@ -130,7 +130,7 @@ epm_release_downgrade() ...@@ -130,7 +130,7 @@ epm_release_downgrade()
local RELEASEVER="$1" local RELEASEVER="$1"
[ -n "$RELEASEVER" ] || RELEASEVER=$(($DISTRVERSION + 1)) [ -n "$RELEASEVER" ] || RELEASEVER=$(($DISTRVERSION + 1))
#[ -n "$RELEASEVER" ] || fatal "Run me with new version" #[ -n "$RELEASEVER" ] || fatal "Run me with new version"
confirm_info "Upgrade to $DISTRNAME/$RELEASEVER" confirm_info 'Upgrade to $DISTRNAME/$RELEASEVER'
sudocmd dnf system-upgrade download --refresh --releasever=$RELEASEVER sudocmd dnf system-upgrade download --refresh --releasever=$RELEASEVER
# TODO: from docs: # TODO: from docs:
# dnf system-upgrade reboot # dnf system-upgrade reboot
...@@ -168,7 +168,7 @@ epm_release_downgrade() ...@@ -168,7 +168,7 @@ epm_release_downgrade()
sudocmd guix pull --verbose sudocmd guix pull --verbose
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -29,10 +29,10 @@ assure_safe_run() ...@@ -29,10 +29,10 @@ assure_safe_run()
fi fi
if [ "$TERM" != "screen" ] ; then if [ "$TERM" != "screen" ] ; then
if [ -n "$force" ] ; then if [ -n "$force" ] ; then
message "You force me running not under screen (TERM=$TERM now)! You can lost your system!" message 'You force me running not under screen (TERM=$TERM now)! You can lost your system!'
return return
else else
warning "It is very dangerous to upgrade to next release from a GUI (your TERM=$TERM)." warning 'It is very dangerous to upgrade to next release from a GUI (your TERM=$TERM).'
if is_installed screen ; then if is_installed screen ; then
warning "You have 'screen' already installed, just run upgrade via screen (check https://losst.ru/komanda-screen-linux if needed)." warning "You have 'screen' already installed, just run upgrade via screen (check https://losst.ru/komanda-screen-linux if needed)."
else else
...@@ -191,8 +191,8 @@ __check_system() ...@@ -191,8 +191,8 @@ __check_system()
if [ "$TO" != "Sisyphus" ] ; then if [ "$TO" != "Sisyphus" ] ; then
# note: we get --base-version directy to get new version # note: we get --base-version directy to get new version
if [ "$($DISTRVENDOR --base-version)" != "$TO" ] || epm installed altlinux-release-sisyphus >/dev/null ; then if [ "$($DISTRVENDOR --base-version)" != "$TO" ] || epm installed altlinux-release-sisyphus >/dev/null ; then
warning "Current distro still is not $TO, or altlinux-release-sisyphus package is installed." warning 'Current distro still is not $TO, or altlinux-release-sisyphus package is installed.'
warning "Trying to fix with altlinux-release-$TO" warning 'Trying to fix with altlinux-release-$TO'
docmd epm install altlinux-release-$TO docmd epm install altlinux-release-$TO
fi fi
fi fi
...@@ -430,9 +430,9 @@ __switch_alt_to_distro() ...@@ -430,9 +430,9 @@ __switch_alt_to_distro()
;; ;;
*) *)
if [ "$FROM" = "$TO" ] ; then if [ "$FROM" = "$TO" ] ; then
info "It seems your system is already $DISTRNAME $TO" info 'It seems your system is already $DISTRNAME $TO'
else else
warning "Unknown distro version. Have no idea how to switch from $DISTRNAME $FROM to $DISTRNAME $TO." warning 'Unknown distro version. Have no idea how to switch from $DISTRNAME $FROM to $DISTRNAME $TO.'
fi fi
end_change_alt_repo end_change_alt_repo
info "Try run f.i. '# epm release-upgrade p10' or '# epm release-downgrade p9' or '# epm release-upgrade Sisyphus'" info "Try run f.i. '# epm release-upgrade p10' or '# epm release-downgrade p9' or '# epm release-upgrade Sisyphus'"
...@@ -465,15 +465,15 @@ epm_release_upgrade() ...@@ -465,15 +465,15 @@ epm_release_upgrade()
dv="$(__detect_alt_release_by_repo)" dv="$(__detect_alt_release_by_repo)"
if [ -n "$dv" ] && [ "$dv" != "$DISTRVERSION" ] ; then if [ -n "$dv" ] && [ "$dv" != "$DISTRVERSION" ] ; then
DISTRVERSION="$dv" DISTRVERSION="$dv"
info "Detected running $DISTRNAME $DISTRVERSION (according to using repos)" info 'Detected running $DISTRNAME $DISTRVERSION (according to using repos)'
fi fi
fi fi
TARGET="" TARGET=""
[ -n "$3" ] && fatal "Too many args: $*" [ -n "$3" ] && fatal 'Too many args: $*'
if [ -n "$2" ] ; then if [ -n "$2" ] ; then
DISTRVERSION="$1" DISTRVERSION="$1"
info "Force current distro version as $DISTRVERSION" info 'Force current distro version as $DISTRVERSION'
TARGET="$2" TARGET="$2"
elif [ -n "$1" ] ; then elif [ -n "$1" ] ; then
TARGET="$1" TARGET="$1"
...@@ -485,7 +485,7 @@ epm_release_upgrade() ...@@ -485,7 +485,7 @@ epm_release_upgrade()
__alt_repofix __alt_repofix
__switch_alt_to_distro $DISTRVERSION $TARGET && info "Done. The system has been successfully upgraded to the next release '$TO'." __switch_alt_to_distro $DISTRVERSION $TARGET && info 'Done. The system has been successfully upgraded to the next release $TO.'
return 0 return 0
;; ;;
...@@ -521,7 +521,7 @@ epm_release_upgrade() ...@@ -521,7 +521,7 @@ epm_release_upgrade()
case $PMTYPE in case $PMTYPE in
apt-rpm) apt-rpm)
#docmd epm update #docmd epm update
info "Have no idea how to upgrade $DISTRNAME. It is possible you need use 'release-downgrade'" info 'Have no idea how to upgrade $DISTRNAME. It is possible you need use release-downgrade'
;; ;;
*-dpkg) *-dpkg)
assure_exists do-release-upgrade update-manager-core assure_exists do-release-upgrade update-manager-core
...@@ -588,7 +588,7 @@ epm_release_upgrade() ...@@ -588,7 +588,7 @@ epm_release_upgrade()
DV=$(echo "$DISTRVERSION" | sed -e "s|\..*||") DV=$(echo "$DISTRVERSION" | sed -e "s|\..*||")
local RELEASEVER="$1" local RELEASEVER="$1"
[ -n "$RELEASEVER" ] || RELEASEVER=$(($DV + 1)) [ -n "$RELEASEVER" ] || RELEASEVER=$(($DV + 1))
confirm_info "Upgrade to $DISTRNAME/$RELEASEVER" confirm_info 'Upgrade to $DISTRNAME/$RELEASEVER'
sudocmd dnf -y --releasever=$RELEASEVER --allowerasing --setopt=deltarpm=false distro-sync sudocmd dnf -y --releasever=$RELEASEVER --allowerasing --setopt=deltarpm=false distro-sync
sudocmd rpm --rebuilddb sudocmd rpm --rebuilddb
...@@ -607,7 +607,7 @@ epm_release_upgrade() ...@@ -607,7 +607,7 @@ epm_release_upgrade()
local RELEASEVER="$1" local RELEASEVER="$1"
[ -n "$RELEASEVER" ] || RELEASEVER=$(($DISTRVERSION + 1)) [ -n "$RELEASEVER" ] || RELEASEVER=$(($DISTRVERSION + 1))
#[ -n "$RELEASEVER" ] || fatal "Run me with new version" #[ -n "$RELEASEVER" ] || fatal "Run me with new version"
confirm_info "Upgrade to $DISTRNAME/$RELEASEVER" confirm_info 'Upgrade to $DISTRNAME/$RELEASEVER'
sudocmd dnf system-upgrade download --refresh --releasever=$RELEASEVER sudocmd dnf system-upgrade download --refresh --releasever=$RELEASEVER
# TODO: from docs: # TODO: from docs:
# dnf system-upgrade reboot # dnf system-upgrade reboot
...@@ -639,7 +639,7 @@ epm_release_upgrade() ...@@ -639,7 +639,7 @@ epm_release_upgrade()
sudocmd guix pull --verbose sudocmd guix pull --verbose
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -182,7 +182,7 @@ epm_remove_names() ...@@ -182,7 +182,7 @@ epm_remove_names()
sudocmd opkg $(subst_option force -force-depends) remove $@ sudocmd opkg $(subst_option force -force-depends) remove $@
return ;; return ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -285,7 +285,7 @@ epm_print_remove_command() ...@@ -285,7 +285,7 @@ epm_print_remove_command()
echo "$PMTYPE uninstall -s $*" echo "$PMTYPE uninstall -s $*"
;; ;;
*) *)
fatal "Have no suitable appropriate remove command for $PMTYPE" fatal 'Have no suitable appropriate remove command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -333,7 +333,7 @@ epm_remove() ...@@ -333,7 +333,7 @@ epm_remove()
APTOPTIONS="--simulate" APTOPTIONS="--simulate"
;; ;;
*) *)
fatal "don't yet support --simulate for $PMTYPE" fatal 'dont yet support --simulate for $PMTYPE'
return return
;; ;;
esac esac
......
...@@ -79,7 +79,7 @@ epm_remove_old_kernels() ...@@ -79,7 +79,7 @@ epm_remove_old_kernels()
case $PMTYPE in case $PMTYPE in
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -28,7 +28,7 @@ __epm_removerepo_alt_grepremove() ...@@ -28,7 +28,7 @@ __epm_removerepo_alt_grepremove()
rl="$1" rl="$1"
else else
rl="$( epm --quiet repolist 2>/dev/null | grep -F "$1")" rl="$( epm --quiet repolist 2>/dev/null | grep -F "$1")"
[ -z "$rl" ] && warning "Can't find '$1' in the repos (see '# epm repolist' output)" && return 1 [ -z "$rl" ] && warning 'Cant find '$1' in the repos (see # epm repolist output)' && return 1
fi fi
echo "$rl" | while read rp ; do echo "$rl" | while read rp ; do
# TODO: print removed lines # TODO: print removed lines
...@@ -159,7 +159,7 @@ case $PMTYPE in ...@@ -159,7 +159,7 @@ case $PMTYPE in
info "You need remove repo from /etc/slackpkg/mirrors" info "You need remove repo from /etc/slackpkg/mirrors"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -50,7 +50,7 @@ __epm_check_if_needed_repack() ...@@ -50,7 +50,7 @@ __epm_check_if_needed_repack()
{ {
__epm_check_repack_rule "$@" || return __epm_check_repack_rule "$@" || return
local pkgname="$(epm print name for package "$1")" local pkgname="$(epm print name for package "$1")"
warning "There is repack rule for '$pkgname' package. It is better install this package via 'epm install --repack' or 'epm play'." warning 'There is repack rule for $pkgname package. It is better install this package via epm install --repack or epm play.'
} }
# arg: rpm or deb # arg: rpm or deb
...@@ -123,7 +123,7 @@ __prepare_source_package() ...@@ -123,7 +123,7 @@ __prepare_source_package()
local pkgname="$(echo $alpkg | sed -e "s|_.*||")" local pkgname="$(echo $alpkg | sed -e "s|_.*||")"
# TODO: use stoplist only for deb? # TODO: use stoplist only for deb?
[ -z "$force" ] && __check_stoplist $pkgname && fatal "Please use official package instead of $alpkg repacking (It is not recommended to use --force to skip this checking." [ -z "$force" ] && __check_stoplist $pkgname && fatal 'Please use official package instead of $alpkg repacking (It is not recommended to use --force to skip this checking.'
SUBGENERIC='' SUBGENERIC=''
...@@ -152,7 +152,7 @@ __prepare_source_package() ...@@ -152,7 +152,7 @@ __prepare_source_package()
fi fi
# it is possible there are a few files, we don't support it # it is possible there are a few files, we don't support it
[ -s "$returntarname" ] || fatal "Can't read result from pack: '$returntarname' is not a readable file." [ -s "$returntarname" ] || fatal 'Cant read result from pack: $returntarname is not a readable file.'
alpkg=$(basename $returntarname) alpkg=$(basename $returntarname)
# FIXME: looks like a hack with current dir # FIXME: looks like a hack with current dir
...@@ -187,7 +187,7 @@ __epm_repack_single() ...@@ -187,7 +187,7 @@ __epm_repack_single()
fi fi
;; ;;
*) *)
fatal "$PKGFORMAT is not supported for repack yet" fatal '$PKGFORMAT is not supported for repack yet'
;; ;;
esac esac
...@@ -200,7 +200,7 @@ __epm_repack() ...@@ -200,7 +200,7 @@ __epm_repack()
local pkg local pkg
repacked_pkgs='' repacked_pkgs=''
for pkg in $* ; do for pkg in $* ; do
__epm_repack_single "$pkg" || fatal "Error with $pkg repacking." __epm_repack_single "$pkg" || fatal 'Error with $pkg repacking.'
[ -n "$repacked_pkgs" ] && repacked_pkgs="$repacked_pkgs $repacked_pkg" || repacked_pkgs="$repacked_pkg" [ -n "$repacked_pkgs" ] && repacked_pkgs="$repacked_pkgs $repacked_pkg" || repacked_pkgs="$repacked_pkg"
done done
} }
...@@ -224,7 +224,7 @@ epm_repack() ...@@ -224,7 +224,7 @@ epm_repack()
pkg_urls= pkg_urls=
fi fi
[ -n "$pkg_names" ] && warning "Can't find $pkg_names files" [ -n "$pkg_names" ] && warning 'Cant find $pkg_names files'
[ -z "$pkg_files" ] && info "Skip empty repack list" && return 22 [ -z "$pkg_files" ] && info "Skip empty repack list" && return 22
if __epm_repack $pkg_files && [ -n "$repacked_pkgs" ] ; then if __epm_repack $pkg_files && [ -n "$repacked_pkgs" ] ; then
......
...@@ -40,7 +40,7 @@ __epm_repack_to_deb() ...@@ -40,7 +40,7 @@ __epm_repack_to_deb()
fi fi
abspkg="$(realpath "$pkg")" abspkg="$(realpath "$pkg")"
info "Repacking $abspkg to local deb format (inside $TDIR) ..." info 'Repacking $abspkg to local deb format (inside $TDIR) ...'
alpkg=$(basename $pkg) alpkg=$(basename $pkg)
# don't use abs package path: copy package to temp dir and use there # don't use abs package path: copy package to temp dir and use there
...@@ -55,7 +55,7 @@ __epm_repack_to_deb() ...@@ -55,7 +55,7 @@ __epm_repack_to_deb()
repacked_pkg="$repacked_pkg $(realpath $DEBCONVERTED)" repacked_pkg="$repacked_pkg $(realpath $DEBCONVERTED)"
remove_on_exit "$(realpath $DEBCONVERTED)" remove_on_exit "$(realpath $DEBCONVERTED)"
else else
warning "Can't find converted deb for source binary package '$pkg'" warning 'Cant find converted deb for source binary package $pkg'
fi fi
clean_store_output clean_store_output
cd - >/dev/null cd - >/dev/null
......
...@@ -96,13 +96,13 @@ __apply_fix_code() ...@@ -96,13 +96,13 @@ __apply_fix_code()
{ {
local repackcode="$EPM_REPACK_SCRIPTS_DIR/$1.sh" local repackcode="$EPM_REPACK_SCRIPTS_DIR/$1.sh"
[ -s "$repackcode" ] || return [ -s "$repackcode" ] || return
[ -f "$repackcode.rpmnew" ] && warning "There is .rpmnew file(s) in $EPM_REPACK_SCRIPTS_DIR dir. The pack script can be outdated." [ -f "$repackcode.rpmnew" ] && warning 'There is .rpmnew file(s) in $EPM_REPACK_SCRIPTS_DIR dir. The pack script can be outdated.'
shift shift
[ "$PROGDIR" = "/usr/bin" ] && SCPATH="$PATH" || SCPATH="$PROGDIR:$PATH" [ "$PROGDIR" = "/usr/bin" ] && SCPATH="$PATH" || SCPATH="$PROGDIR:$PATH"
local bashopt='' local bashopt=''
[ -n "$debug" ] && bashopt='-x' [ -n "$debug" ] && bashopt='-x'
( unset EPMCURDIR ; export PATH=$SCPATH ; docmd $CMDSHELL $bashopt $repackcode "$1" "$2" "$3" "$4" "$5" ) || fatal "There is an error from $repackcode script" ( unset EPMCURDIR ; export PATH=$SCPATH ; docmd $CMDSHELL $bashopt $repackcode "$1" "$2" "$3" "$4" "$5" ) || fatal 'There is an error from $repackcode script'
} }
__create_rpmmacros() __create_rpmmacros()
...@@ -197,7 +197,7 @@ __epm_repack_to_rpm() ...@@ -197,7 +197,7 @@ __epm_repack_to_rpm()
mkdir $tmpbuilddir mkdir $tmpbuilddir
abspkg="$(realpath $pkg)" abspkg="$(realpath $pkg)"
info info
info "Repacking $abspkg to local rpm format (inside $tmpbuilddir) ..." info 'Repacking $abspkg to local rpm format (inside $tmpbuilddir) ...'
alpkg=$(basename $pkg) alpkg=$(basename $pkg)
# don't use abs package path: copy package to temp dir and use there # don't use abs package path: copy package to temp dir and use there
...@@ -223,7 +223,7 @@ __epm_repack_to_rpm() ...@@ -223,7 +223,7 @@ __epm_repack_to_rpm()
rmdir * 2>/dev/null rmdir * 2>/dev/null
local subdir="$(echo *)" local subdir="$(echo *)"
[ -d "$subdir" ] || fatal "can't find subdir in $(pwd)" [ -d "$subdir" ] || fatal "can't find subdir in" $(pwd)
local buildroot="$tmpbuilddir/$subdir" local buildroot="$tmpbuilddir/$subdir"
...@@ -256,7 +256,7 @@ __epm_repack_to_rpm() ...@@ -256,7 +256,7 @@ __epm_repack_to_rpm()
if [ -n "$EEPM_INTERNAL_PKGNAME" ] ; then if [ -n "$EEPM_INTERNAL_PKGNAME" ] ; then
if ! estrlist contains "$pkgname" "$EEPM_INTERNAL_PKGNAME" ; then if ! estrlist contains "$pkgname" "$EEPM_INTERNAL_PKGNAME" ; then
fatal "Some bug: the name of the repacking package ($pkgname) differs with the package name ($EEPM_INTERNAL_PKGNAME) from play.d script." fatal 'Some bug: the name of the repacking package ($pkgname) differs with the package name ($EEPM_INTERNAL_PKGNAME) from play.d script.'
fi fi
fi fi
...@@ -276,7 +276,7 @@ __epm_repack_to_rpm() ...@@ -276,7 +276,7 @@ __epm_repack_to_rpm()
remove_on_exit "$repacked_rpm" remove_on_exit "$repacked_rpm"
repacked_pkg="$repacked_rpm" repacked_pkg="$repacked_rpm"
else else
warning "Can't find converted rpm for source binary package '$pkg' (got $repacked_rpm)" warning 'Cant find converted rpm for source binary package $pkg (got $repacked_rpm)'
fi fi
cd $EPMCURDIR >/dev/null cd $EPMCURDIR >/dev/null
......
...@@ -132,7 +132,7 @@ epm_repo() ...@@ -132,7 +132,7 @@ epm_repo()
epm_repo_pkgdel "$@" epm_repo_pkgdel "$@"
;; ;;
*) *)
fatal "Unknown command $ epm repo '$CMD'" fatal 'Unknown command $ epm repo $CMD'
;; ;;
esac esac
......
...@@ -31,10 +31,10 @@ __epm_repodisable_alt() ...@@ -31,10 +31,10 @@ __epm_repodisable_alt()
rl="$(echo "$1" | sed -e 's|\^||')" rl="$(echo "$1" | sed -e 's|\^||')"
else else
rl="$( (epm --quiet repolist) 2>/dev/null | grep -F "$1" | head -n1 )" rl="$( (epm --quiet repolist) 2>/dev/null | grep -F "$1" | head -n1 )"
[ -z "$rl" ] && warning "Can't find '$1' entries in the repos (see '# epm repolist' output)" && return 1 [ -z "$rl" ] && warning 'Cant find $1 entries in the repos (see # epm repolist output)' && return 1
fi fi
echo "$rl" | while read rp ; do echo "$rl" | while read rp ; do
[ -n "$dryrun" ] && echo "will comment $rp" && continue [ -n "$dryrun" ] && messagw 'will comment $rp' && continue
sed -i -e "s|^\($(sed_escape "$rl")\)|#\1|" $alt_LISTS sed -i -e "s|^\($(sed_escape "$rl")\)|#\1|" $alt_LISTS
done done
} }
...@@ -62,7 +62,7 @@ case $PMTYPE in ...@@ -62,7 +62,7 @@ case $PMTYPE in
docmd eoget disable-repo "$@" docmd eoget disable-repo "$@"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -31,10 +31,10 @@ __epm_repoenable_alt() ...@@ -31,10 +31,10 @@ __epm_repoenable_alt()
rl="$(echo "$1" | sed -e 's|\^||')" rl="$(echo "$1" | sed -e 's|\^||')"
else else
rl="$( epm --quiet --all repolist 2>/dev/null | grep -F "$1" | head -n1 | sed -e 's|[[:space:]]*#[[:space:]]*||' )" rl="$( epm --quiet --all repolist 2>/dev/null | grep -F "$1" | head -n1 | sed -e 's|[[:space:]]*#[[:space:]]*||' )"
[ -z "$rl" ] && warning "Can't find commented '$1' in the repos (see '# epm repolist' output)" && return 1 [ -z "$rl" ] && warning 'Cant find commented $1 in the repos (see # epm repolist output)' && return 1
fi fi
echo "$rl" | while read rp ; do echo "$rl" | while read rp ; do
[ -n "$dryrun" ] && echo "will uncomment $rp" && continue [ -n "$dryrun" ] && message 'will uncomment $rp' && continue
sed -i -e "s|^[[:space:]]*#[[:space:]]*\($(sed_escape "$rl")\)|\1|" $alt_LISTS sed -i -e "s|^[[:space:]]*#[[:space:]]*\($(sed_escape "$rl")\)|\1|" $alt_LISTS
done done
} }
...@@ -62,7 +62,7 @@ case $PMTYPE in ...@@ -62,7 +62,7 @@ case $PMTYPE in
docmd eoget enable-repo "$@" docmd eoget enable-repo "$@"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -220,7 +220,7 @@ __epm_repochange_alt() ...@@ -220,7 +220,7 @@ __epm_repochange_alt()
__change_repo ftp.altlinux "//ftp.altlinux.org/pub/distributions ALTLinux" __change_repo ftp.altlinux "//ftp.altlinux.org/pub/distributions ALTLinux"
;; ;;
*) *)
fatal "Unsupported change key '$1'" fatal 'Unsupported change key $1'
;; ;;
esac esac
} }
...@@ -235,7 +235,7 @@ epm_repochange() ...@@ -235,7 +235,7 @@ epm_repochange()
__epm_repochange_alt "$1" __epm_repochange_alt "$1"
;; ;;
*) *)
fatal "Repo change Unsupported for $BASEDISTRNAME" fatal 'Repo change Unsupported for $BASEDISTRNAME'
;; ;;
esac esac
} }
...@@ -264,7 +264,7 @@ case $PMTYPE in ...@@ -264,7 +264,7 @@ case $PMTYPE in
# yum-rpm|dnf-rpm) # yum-rpm|dnf-rpm)
# ;; # ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -47,7 +47,7 @@ __epm_repoindex_alt() ...@@ -47,7 +47,7 @@ __epm_repoindex_alt()
# TODO: check if we inside arch dir or RPMS.* # TODO: check if we inside arch dir or RPMS.*
[ -n "$REPO_DIR" ] || REPO_DIR="$(pwd)" [ -n "$REPO_DIR" ] || REPO_DIR="$(pwd)"
if [ -z "$init" ] ; then if [ -z "$init" ] ; then
[ -d "$REPO_DIR" ] || fatal "Repo dir $REPO_DIR does not exist" [ -d "$REPO_DIR" ] || fatal 'Repo dir $REPO_DIR does not exist'
fi fi
REPO_NAME="$2" REPO_NAME="$2"
...@@ -117,7 +117,7 @@ case $PMTYPE in ...@@ -117,7 +117,7 @@ case $PMTYPE in
docmd eoget index "$@" docmd eoget index "$@"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -161,7 +161,7 @@ case $PMTYPE in ...@@ -161,7 +161,7 @@ case $PMTYPE in
docmd grep -v -- "^#\|^$" /etc/slackpkg/mirrors docmd grep -v -- "^#\|^$" /etc/slackpkg/mirrors
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -25,7 +25,7 @@ __epm_repo_pkgadd_alt() ...@@ -25,7 +25,7 @@ __epm_repo_pkgadd_alt()
local REPO_DIR="$1" local REPO_DIR="$1"
shift shift
[ -d "$REPO_DIR" ] || fatal "Can't find repo dir $REPO_DIR." [ -d "$REPO_DIR" ] || fatal 'Cant find repo dir $REPO_DIR.'
# default name # default name
REPO_NAME="addon" REPO_NAME="addon"
...@@ -57,7 +57,7 @@ __epm_repo_pkgdel_alt() ...@@ -57,7 +57,7 @@ __epm_repo_pkgdel_alt()
local REPO_DIR="$1" local REPO_DIR="$1"
shift shift
[ -d "$REPO_DIR" ] || fatal "Can't find repo dir $REPO_DIR." [ -d "$REPO_DIR" ] || fatal 'Cant find repo dir $REPO_DIR.'
[ -n "$1" ] || fatal "Missed package name" [ -n "$1" ] || fatal "Missed package name"
...@@ -105,7 +105,7 @@ case $PMTYPE in ...@@ -105,7 +105,7 @@ case $PMTYPE in
__epm_repo_pkgadd_alt "$@" __epm_repo_pkgadd_alt "$@"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -120,7 +120,7 @@ case $PMTYPE in ...@@ -120,7 +120,7 @@ case $PMTYPE in
__epm_repo_pkgupdate_alt "$@" __epm_repo_pkgupdate_alt "$@"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -135,7 +135,7 @@ case $PMTYPE in ...@@ -135,7 +135,7 @@ case $PMTYPE in
__epm_repo_pkgdel_alt "$@" __epm_repo_pkgdel_alt "$@"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -25,14 +25,14 @@ SAVELISTDIR=$epm_vardir/eepm-etc-save ...@@ -25,14 +25,14 @@ SAVELISTDIR=$epm_vardir/eepm-etc-save
__save_alt_repo_lists() __save_alt_repo_lists()
{ {
assure_root assure_root
info "Creating copy of all sources lists to $SAVELISTDIR ..." info 'Creating copy of all sources lists to $SAVELISTDIR ...'
local i local i
rm -rf $verbose $SAVELISTDIR 2>/dev/null rm -rf $verbose $SAVELISTDIR 2>/dev/null
mkdir -p $SAVELISTDIR/apt/ $SAVELISTDIR/apt/sources.list.d/ mkdir -p $SAVELISTDIR/apt/ $SAVELISTDIR/apt/sources.list.d/
for i in /etc/apt/sources.list /etc/apt/sources.list.d/*.list ; do for i in /etc/apt/sources.list /etc/apt/sources.list.d/*.list ; do
[ -s "$i" ] || continue [ -s "$i" ] || continue
local DD="$(echo "$i" | sed -e "s|/etc|$SAVELISTDIR|")" local DD="$(echo "$i" | sed -e "s|/etc|$SAVELISTDIR|")"
cp -af $verbose "$i" "$DD" || fatal "Can't save apt source list files to $SAVELISTDIR" cp -af $verbose "$i" "$DD" || fatal 'Cant save apt source list files to $SAVELISTDIR'
done done
} }
...@@ -40,7 +40,7 @@ __save_alt_repo_lists() ...@@ -40,7 +40,7 @@ __save_alt_repo_lists()
__restore_alt_repo_lists() __restore_alt_repo_lists()
{ {
assure_root assure_root
info "Restoring copy of all sources lists from $SAVELISTDIR ..." info 'Restoring copy of all sources lists from $SAVELISTDIR ...'
local i local i
[ -d "$SAVELISTDIR/apt" ] || return 0 [ -d "$SAVELISTDIR/apt" ] || return 0
mkdir -p $SAVELISTDIR/apt/ $SAVELISTDIR/apt/sources.list.d/ mkdir -p $SAVELISTDIR/apt/ $SAVELISTDIR/apt/sources.list.d/
...@@ -51,7 +51,7 @@ __restore_alt_repo_lists() ...@@ -51,7 +51,7 @@ __restore_alt_repo_lists()
if diff -q "$DD" "$i" >/dev/null ; then if diff -q "$DD" "$i" >/dev/null ; then
rm -f $verbose "$DD" rm -f $verbose "$DD"
else else
mv $verbose "$DD" "$i" || warning "Can't restore $i file" mv $verbose "$DD" "$i" || warning 'Cant restore $i file'
fi fi
done done
} }
...@@ -87,7 +87,7 @@ case $PMTYPE in ...@@ -87,7 +87,7 @@ case $PMTYPE in
__save_alt_repo_lists __save_alt_repo_lists
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -104,7 +104,7 @@ case $PMTYPE in ...@@ -104,7 +104,7 @@ case $PMTYPE in
__restore_alt_repo_lists __restore_alt_repo_lists
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -124,7 +124,7 @@ case $PMTYPE in ...@@ -124,7 +124,7 @@ case $PMTYPE in
sudocmd winget source reset sudocmd winget source reset
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
...@@ -144,12 +144,12 @@ case $PMTYPE in ...@@ -144,12 +144,12 @@ case $PMTYPE in
else else
local days local days
days="$(__epm_check_apt_db_days)" && info "APT database is actual." && return 0 days="$(__epm_check_apt_db_days)" && info "APT database is actual." && return 0
info "APT database is $days." info 'APT database is $days.'
return 1 return 1
fi fi
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
} }
...@@ -202,7 +202,7 @@ case $PMTYPE in ...@@ -202,7 +202,7 @@ case $PMTYPE in
return return
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -102,23 +102,23 @@ __epm_restore_convert_to_rpm_notation() ...@@ -102,23 +102,23 @@ __epm_restore_convert_to_rpm_notation()
local l local l
while read l ; do while read l ; do
if echo "$l" | grep -q 'platform_python_implementation != "PyPy"' ; then if echo "$l" | grep -q 'platform_python_implementation != "PyPy"' ; then
[ -n "$verbose" ] && warning " $t is not PyPi requirement, skipped" [ -n "$verbose" ] && warning ' $t is not PyPi requirement, skipped'
continue continue
fi fi
if echo "$l" | grep -q 'sys_platform == "darwin"' ; then if echo "$l" | grep -q 'sys_platform == "darwin"' ; then
[ -n "$verbose" ] && warning " $t is darwin only requirement, skipped" [ -n "$verbose" ] && warning ' $t is darwin only requirement, skipped'
continue continue
fi fi
if echo "$l" | grep -q 'sys_platform == "win32"' ; then if echo "$l" | grep -q 'sys_platform == "win32"' ; then
[ -n "$verbose" ] && warning " $t is win32 only requirement, skipped" [ -n "$verbose" ] && warning ' $t is win32 only requirement, skipped'
continue continue
fi fi
if echo "$l" | grep -q "; *python_version *< *['\"]3" ; then if echo "$l" | grep -q "; *python_version *< *['\"]3" ; then
[ -n "$verbose" ] && warning " $t is python2 only requirement, skipped" [ -n "$verbose" ] && warning ' $t is python2 only requirement, skipped'
continue continue
fi fi
if echo "$l" | grep -q "; *python_version *<= *['\"]2\." ; then if echo "$l" | grep -q "; *python_version *<= *['\"]2\." ; then
[ -n "$verbose" ] && warning " $t is python2 only requirement, skipped" [ -n "$verbose" ] && warning ' $t is python2 only requirement, skipped'
continue continue
fi fi
# drop various "python_version > '3.5'" # drop various "python_version > '3.5'"
...@@ -160,7 +160,7 @@ __epm_restore_pip() ...@@ -160,7 +160,7 @@ __epm_restore_pip()
cat $req_file | __epm_restore_convert_to_rpm_notation | sed -e "s|^|$reqmacro |" cat $req_file | __epm_restore_convert_to_rpm_notation | sed -e "s|^|$reqmacro |"
return return
else else
info "Install requirements from $req_file ..." info 'Install requirements from $req_file ...'
ilist="$(cat $req_file | __epm_restore_convert_to_rpm_notation | cut -d' ' -f 1 | sed -e "s|^|python3-module-|")" ilist="$(cat $req_file | __epm_restore_convert_to_rpm_notation | cut -d' ' -f 1 | sed -e "s|^|python3-module-|")"
fi fi
...@@ -584,7 +584,7 @@ __epm_restore_perl_shyaml() ...@@ -584,7 +584,7 @@ __epm_restore_perl_shyaml()
__epm_restore_by() __epm_restore_by()
{ {
local req_file="$1" local req_file="$1"
[ -n "$verbose" ] && info "Checking for $req_file ..." [ -n "$verbose" ] && info 'Checking for $req_file ...'
[ -s "$req_file" ] || return [ -s "$req_file" ] || return
if file $req_file | grep -q "ELF [3264]*-bit LSB executable" ; then if file $req_file | grep -q "ELF [3264]*-bit LSB executable" ; then
assure_exists ldd-requires assure_exists ldd-requires
...@@ -594,7 +594,7 @@ __epm_restore_by() ...@@ -594,7 +594,7 @@ __epm_restore_by()
estrlist list $TOINSTALL estrlist list $TOINSTALL
return return
fi fi
[ -n "$TOINSTALL" ] || { info "There are no missed packages is found for $req_file binary." ; return ; } [ -n "$TOINSTALL" ] || { info 'There are no missed packages is found for $req_file binary.' ; return ; }
docmd epm install $TOINSTALL docmd epm install $TOINSTALL
return return
fi fi
......
...@@ -41,7 +41,7 @@ __alt_local_content_search() ...@@ -41,7 +41,7 @@ __alt_local_content_search()
local CI="$(ls $(cat $ALT_CONTENTS_INDEX_LIST) 2>/dev/null)" local CI="$(ls $(cat $ALT_CONTENTS_INDEX_LIST) 2>/dev/null)"
info "Searching for $1 ... " info 'Searching for $1 ... '
# FIXME: do it better # FIXME: do it better
local MGS local MGS
...@@ -111,7 +111,7 @@ case $PMTYPE in ...@@ -111,7 +111,7 @@ case $PMTYPE in
return return
;; ;;
*) *)
fatal "Have no suitable search file command for $PMTYPE" fatal 'Have no suitable search file command for $PMTYPE'
;; ;;
esac esac
......
...@@ -57,7 +57,7 @@ rsync_alt_contents_index() ...@@ -57,7 +57,7 @@ rsync_alt_contents_index()
try_assure_exists rsync || return try_assure_exists rsync || return
if ! __rsync_check "$URL" ; then if ! __rsync_check "$URL" ; then
warning "$URL is not accessible via rsync, skipping contents index update..." warning '$URL is not accessible via rsync, skipping contents index update...'
return return
fi fi
...@@ -143,7 +143,7 @@ update_alt_contents_index() ...@@ -143,7 +143,7 @@ update_alt_contents_index()
local REMOTEURL="$(get_url_to_etersoft_mirror "$URL")" local REMOTEURL="$(get_url_to_etersoft_mirror "$URL")"
if [ -n "$REMOTEURL" ] ; then if [ -n "$REMOTEURL" ] ; then
rsync_alt_contents_index $REMOTEURL/base/contents_index.gz $LOCALPATH/contents_index.gz && __add_to_contents_index_list "$REMOTEURL" "$LOCALPATH/contents_index.gz" && continue rsync_alt_contents_index $REMOTEURL/base/contents_index.gz $LOCALPATH/contents_index.gz && __add_to_contents_index_list "$REMOTEURL" "$LOCALPATH/contents_index.gz" && continue
[ -n "$verbose" ] && info "Note: Can't retrieve $REMOTEURL/base/contents_index.gz, fallback to $URL/base/contents_index" [ -n "$verbose" ] && info 'Note: Cat retrieve $REMOTEURL/base/contents_index.gz, fallback to $URL/base/contents_index'
fi fi
# we don't know if remote server has rsync # we don't know if remote server has rsync
# fix rsync URL firstly # fix rsync URL firstly
......
...@@ -82,17 +82,17 @@ __epm_print_warning_for_nonalt_packages() ...@@ -82,17 +82,17 @@ __epm_print_warning_for_nonalt_packages()
local i local i
for i in $* ; do for i in $* ; do
if epm_status_repacked "$i" ; then if epm_status_repacked "$i" ; then
warning "%%% You are trying install package $i repacked from third-party software source. Use it at your own risk. %%%" warning '%%% You are trying install package $i repacked from third-party software source. Use it at your own risk. %%%'
continue continue
fi fi
if epm_status_thirdparty "$i" ; then if epm_status_thirdparty "$i" ; then
warning "%%% You are trying install package $i from third-party software source. Use it at your own risk. %%%" warning '%%% You are trying install package $i from third-party software source. Use it at your own risk. %%%'
continue continue
fi fi
if ! epm_status_original "$i" ; then if ! epm_status_original "$i" ; then
warning "%%% You are trying install package $i not from official $DISTRNAME/$DISTRVERSION repository. Use it at your own risk. %%%" warning '%%% You are trying install package $i not from official $DISTRNAME/$DISTRVERSION repository. Use it at your own risk. %%%'
continue continue
fi fi
done done
...@@ -116,7 +116,7 @@ __epm_check_vendor() ...@@ -116,7 +116,7 @@ __epm_check_vendor()
if ! epm_status_validate "$i" ; then if ! epm_status_validate "$i" ; then
# it is missed package probably (package remove case) # it is missed package probably (package remove case)
if is_installed "$i" ; then if is_installed "$i" ; then
warning "Can't get any info for $i package. Scripts are DISABLED for package $bi. Use --scripts if you need run scripts from such packages." warning 'Cant get any info for $i package. Scripts are DISABLED for package $bi. Use --scripts if you need run scripts from such packages.'
fi fi
noscripts="--noscripts" noscripts="--noscripts"
continue continue
...@@ -126,7 +126,7 @@ __epm_check_vendor() ...@@ -126,7 +126,7 @@ __epm_check_vendor()
vendor="$(epm print field Vendor for "$i")" vendor="$(epm print field Vendor for "$i")"
if [ -z "$vendor" ] ; then if [ -z "$vendor" ] ; then
warning "Can't get info about vendor for $i package. Scripts are DISABLED for package $bi. Use --scripts if you need run scripts from such packages." warning 'Cant get info about vendor for $i package. Scripts are DISABLED for package $bi. Use --scripts if you need run scripts from such packages.'
noscripts="--noscripts" noscripts="--noscripts"
continue continue
fi fi
...@@ -135,15 +135,15 @@ __epm_check_vendor() ...@@ -135,15 +135,15 @@ __epm_check_vendor()
epm_status_repacked "$i" && continue epm_status_repacked "$i" && continue
if __epm_vendor_ok_scripts "$vendor" ; then if __epm_vendor_ok_scripts "$vendor" ; then
warning "Scripts are ENABLED for package $bi from outside vendor '$vendor' (this vendor is listed in $CONFIGDIR/vendorallowscripts.list). Use --noscripts if you need disable scripts in such packages." warning 'Scripts are ENABLED for package $bi from outside vendor $vendor (this vendor is listed in $CONFIGDIR/vendorallowscripts.list). Use --noscripts if you need disable scripts in such packages.'
continue continue
fi fi
if __epm_package_ok_scripts "$i" ; then if __epm_package_ok_scripts "$i" ; then
warning "Scripts are ENABLED for package $bi from outside vendor '$vendor' (the package is listed in $CONFIGDIR/pkgallowscripts.list). Use --noscripts if you need disable scripts in such packages." warning 'Scripts are ENABLED for package $bi from outside vendor $vendor (the package is listed in $CONFIGDIR/pkgallowscripts.list). Use --noscripts if you need disable scripts in such packages.'
continue continue
fi fi
warning "Scripts are DISABLED for package $bi from outside vendor '$vendor'. Use --scripts if you need run scripts from such packages." warning 'Scripts are DISABLED for package $bi from outside vendor $vendor. Use --scripts if you need run scripts from such packages.'
noscripts="--noscripts" noscripts="--noscripts"
done done
} }
......
...@@ -139,7 +139,7 @@ EOF ...@@ -139,7 +139,7 @@ EOF
done done
return $res ;; return $res ;;
*) *)
fatal "Have no suitable simulate command for $PMTYPE" fatal 'Have no suitable simulate command for $PMTYPE'
;; ;;
esac esac
...@@ -158,7 +158,7 @@ epm_simulate() ...@@ -158,7 +158,7 @@ epm_simulate()
local RES=$? local RES=$?
if [ -z "$quiet" ] ; then if [ -z "$quiet" ] ; then
if [ "$RES" = 0 ] ; then if [ "$RES" = 0 ] ; then
info "Simulate result: $filenames package(s) CAN BE installed" info 'Simulate result: $filenames package(s) CAN BE installed'
else else
info "Simulate result: There are PROBLEMS with install some package(s)" info "Simulate result: There are PROBLEMS with install some package(s)"
fi fi
......
...@@ -117,7 +117,7 @@ query_altlinux_url() ...@@ -117,7 +117,7 @@ query_altlinux_url()
case $PMTYPE in case $PMTYPE in
*-rpm) *-rpm)
local srpm=$(print_srcname "$1") local srpm=$(print_srcname "$1")
[ -n "$srpm" ] || fatal "Can't get source name for $1" [ -n "$srpm" ] || fatal 'Cant get source name for $1'
echo "$(get_pao_url)/$srpm" echo "$(get_pao_url)/$srpm"
return return
;; ;;
...@@ -139,7 +139,7 @@ for f in $pkg_names $pkg_files ; do ...@@ -139,7 +139,7 @@ for f in $pkg_names $pkg_files ; do
pkg_url=$(query_package_url $f) pkg_url=$(query_package_url $f)
fi fi
[ -n "$pkg_url" ] && open_browser "$pkg_url" && continue [ -n "$pkg_url" ] && open_browser "$pkg_url" && continue
warning "Can't get URL for $f package" warning 'Cant get URL for $f package'
done done
#for f in $pkg_names ; do #for f in $pkg_names ; do
......
...@@ -24,7 +24,7 @@ epm_stats() ...@@ -24,7 +24,7 @@ epm_stats()
CMD="apk stats" CMD="apk stats"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -151,7 +151,7 @@ epm_status_original() ...@@ -151,7 +151,7 @@ epm_status_original()
return 0 return 0
;; ;;
*) *)
fatal "Unsupported $DISTRNAME" fatal 'Unsupported $DISTRNAME'
;; ;;
esac esac
return 1 return 1
...@@ -171,7 +171,7 @@ epm_status_repacked() ...@@ -171,7 +171,7 @@ epm_status_repacked()
[ "$packager" = "EPM <support@eepm.ru>" ] && return 0 [ "$packager" = "EPM <support@eepm.ru>" ] && return 0
;; ;;
*) *)
fatal "Unsupported $BASEDISTRNAME" fatal 'Unsupported $BASEDISTRNAME'
;; ;;
esac esac
return 1 return 1
...@@ -270,10 +270,10 @@ epm_status() ...@@ -270,10 +270,10 @@ epm_status()
return return
;; ;;
-*) -*)
fatal "Unknown option $option, use epm status --help to get info" fatal 'Unknown option $option, use epm status --help to get info'
;; ;;
*) *)
fatal "No option before $option, use epm status --help to get info" fatal 'No option before $option, use epm status --help to get info'
;; ;;
esac esac
......
...@@ -70,7 +70,7 @@ epm_tool() ...@@ -70,7 +70,7 @@ epm_tool()
print_command_path "$@" # HELPCMD: which like command (no output to stderr, can works without which package) print_command_path "$@" # HELPCMD: which like command (no output to stderr, can works without which package)
;; ;;
*) *)
fatal "Unknown command $ epm tool $WHAT. Use epm print help for get help." fatal 'Unknown command $ epm tool $WHAT. Use epm print help for get help.'
;; ;;
esac esac
} }
...@@ -40,7 +40,7 @@ __check_for_epm_version() ...@@ -40,7 +40,7 @@ __check_for_epm_version()
local latest="$(get_latest_version eepm)" local latest="$(get_latest_version eepm)"
#[ -z "$latest" ] && return #[ -z "$latest" ] && return
local res="$(epm print compare "$EPMVERSION" "$latest")" local res="$(epm print compare "$EPMVERSION" "$latest")"
[ "$res" = "-1" ] && info "Latest EPM version in Korinf repository is $latest. You have version $EPMVERSION running." && info "You can update eepm with \$ epm ei command." [ "$res" = "-1" ] && info 'Latest EPM version in Korinf repository is $latest. You have version $EPMVERSION running.' && info "You can update eepm with \$ epm ei command."
} }
__save_available_packages() __save_available_packages()
...@@ -188,7 +188,7 @@ case $PMTYPE in ...@@ -188,7 +188,7 @@ case $PMTYPE in
sudocmd winget source update sudocmd winget source update
;; ;;
*) *)
fatal "Have no suitable update command for $PMTYPE" fatal 'Have no suitable update command for $PMTYPE'
;; ;;
esac esac
} }
......
...@@ -63,7 +63,7 @@ epm_upgrade() ...@@ -63,7 +63,7 @@ epm_upgrade()
installlist="$(get_only_installed_packages "$installlist")" installlist="$(get_only_installed_packages "$installlist")"
[ -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 $*'
return 22 return 22
fi fi
...@@ -110,7 +110,7 @@ epm_upgrade() ...@@ -110,7 +110,7 @@ epm_upgrade()
# hack for https://bugzilla.altlinux.org/41225 # hack for https://bugzilla.altlinux.org/41225
case "$pkg_names" in case "$pkg_names" in
-*) -*)
fatal "Option $pkg_names is not allowed here" fatal 'Option $pkg_names is not allowed here'
esac esac
load_helper epm-install load_helper epm-install
(pkg_names=$(get_only_installed_packages $pkg_names) epm_install) (pkg_names=$(get_only_installed_packages $pkg_names) epm_install)
...@@ -219,7 +219,7 @@ epm_upgrade() ...@@ -219,7 +219,7 @@ epm_upgrade()
CMD="pkg upgrade" CMD="pkg upgrade"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -103,7 +103,7 @@ case $PMTYPE in ...@@ -103,7 +103,7 @@ case $PMTYPE in
CMD="xbps-query -X" CMD="xbps-query -X"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
...@@ -51,7 +51,7 @@ case $PMTYPE in ...@@ -51,7 +51,7 @@ case $PMTYPE in
CMD="opkg whatprovides" CMD="opkg whatprovides"
;; ;;
*) *)
fatal "Have no suitable command for $PMTYPE" fatal 'Have no suitable command for $PMTYPE'
;; ;;
esac esac
......
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