Commit ab0ef6a3 authored by Boria138's avatar Boria138 Committed by Vitaly Lipatov

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

parent b24fc349
......@@ -50,11 +50,11 @@ load_helper()
{
local shieldname="loaded$(echo "$1" | sed -e 's|-||g')"
# already loaded
eval "[ -n \"\$$shieldname\" ]" && debug "Already loaded $1" && return
eval "[ -n \"\$$shieldname\" ]" && debug 'Already loaded $1' && return
local CMD="$SHAREDIR/$1"
# 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"
# shellcheck disable=SC1090
. $CMD
......@@ -598,21 +598,21 @@ check_filenames()
for opt in "$@" ; do
# files can be with full path or have extension via .
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"
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"
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"
# hack, TODO: reasons
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"
else
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
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
[ -n "$pkg_names" ] && pkg_names="$pkg_names $opt" || pkg_names="$opt"
fi
[ -n "$quoted_args" ] && quoted_args="$quoted_args \"$opt\"" || quoted_args="\"$opt\""
......@@ -692,9 +692,9 @@ Popular commands:
if [ -z "$epm_cmd" ] ; then
print_version >&2
echo >&2
fatstr="Unrecognized command in '$*' arg(s)"
fatstr=$(eval_gettext 'Unrecognized command in $* arg(s)')
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
fi
echo "Run $(echocmd "$PROGNAME --help") to get help." >&2
......
......@@ -360,7 +360,7 @@ __epm_addrepo_astra()
return
;;
astra-*)
fatal "Unsupported distro version $1-$reponame, see '# epm print info' output."
fatal 'Unsupported distro version $1-$reponame, see # epm print info output.'
;;
esac
......@@ -493,7 +493,7 @@ case $PMTYPE in
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
......
#!/bin/sh
#!/bin/sh
#
# Copyright (C) 2013-2016 Etersoft
# Copyright (C) 2013-2016 Vitaly Lipatov <lav@etersoft.ru>
......@@ -55,7 +55,7 @@ __epm_assure_checking()
# TODO: check for /usr/bin, /bin, /usr/sbin, /sbin
if [ -e "$CMD" ] ; 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
fi
return 0
......@@ -68,7 +68,7 @@ __epm_assure_checking()
if __check_command_in_path "$CMD" >/dev/null ; then
if [ -n "$verbose" ] ; then
local compath="$(__check_command_in_path "$1")"
info "Command $CMD is exists: $compath"
info 'Command $CMD is exists: $compath'
epm qf "$compath" >&2
fi
return 0
......@@ -96,7 +96,7 @@ epm_assure()
__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
# can't be used in epm ei case
......@@ -117,6 +117,6 @@ epm_assure()
local textpackage
[ -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
}
......@@ -30,7 +30,7 @@ case $PMTYPE in
sudocmd apk audit
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -47,14 +47,14 @@ case $BASEDISTRNAME in
info "Retrieving packages installed via epm play ..."
local play_installed="$(epm play --list-installed-packages)"
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")"
fi
# TODO: implement for other PMTYPE
local hold_packages="$(epm mark --short showhold)"
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")"
fi
......@@ -148,7 +148,7 @@ case $PMTYPE in
fi
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -356,7 +356,7 @@ case $PMTYPE in
fi
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -41,7 +41,7 @@ __epm_changelog_files()
#
# ;;
*)
fatal "Have no suitable command for $1"
fatal 'Have no suitable command for $1'
;;
esac
}
......@@ -65,7 +65,7 @@ __epm_changelog_local_names()
docmd pacman -Qc $1
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
}
......@@ -96,7 +96,7 @@ __epm_changelog_unlocal_names()
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
......
......@@ -80,7 +80,7 @@ case $PMTYPE in
sudocmd apk fix
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -129,7 +129,7 @@ update_repo_if_needed()
esac
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
......
......@@ -102,7 +102,7 @@ case $PMTYPE in
sudocmd eopkg check $@
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -27,7 +27,7 @@ __alt_fix_triggers()
assure_exists time
touch $TDIR/added
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
done
rm -f $TDIR/added fatal
......@@ -60,7 +60,7 @@ case $BASEDISTRNAME in
epm_checksystem_$DISTRNAME
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -95,7 +95,7 @@ case $PMTYPE in
sudocmd pkg clean
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
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()
# 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
}
......@@ -88,7 +88,7 @@ case $PMTYPE in
# CMD="equery depgraph"
# ;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -61,7 +61,7 @@ case "$BASEDISTRNAME" in
fi
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -147,7 +147,7 @@ epm_downgrade()
sudocmd urpm-reposync -v
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
}
......@@ -98,7 +98,7 @@ __download_pkg_urls()
if docmd eget $latest "$url" ; then
local i
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
chmod $verbose a+r "$tmppkg/$i"
local si="$(echo "$i" | sed -e 's| |-|g')"
......@@ -219,7 +219,7 @@ __epm_download_alt()
local installlist="$(get_task_packages $*)"
# hack: drop -devel packages to avoid package provided by multiple packages
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
epm_addrepo "$@"
......@@ -309,7 +309,7 @@ epm_download()
docmd brew fetch $*
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
}
......@@ -65,7 +65,7 @@ __epm_korinf_install_eepm()
if [ "$BASEDISTRNAME" = "alt" ] && [ "$DISTRVERSION" != "Sisyphus" ] && [ "$EPMMODE" = "package" ] ; 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 "You can install eepm package from Korinf manually, check instruction at https://eepm.ru"
info
......
......@@ -112,7 +112,7 @@ __epm_filelist_file()
CMD="eopkg --files info"
;;
*)
fatal "Have no suitable query command for $PMTYPE"
fatal 'Have no suitable query command for $PMTYPE'
;;
esac
......@@ -188,7 +188,7 @@ __epm_filelist_name()
return
;;
*)
fatal "Have no suitable query command for $PMTYPE"
fatal 'Have no suitable query command for $PMTYPE'
;;
esac
......
......@@ -69,7 +69,7 @@ confirm_action()
[ -n "$interactive" ] || return 0
local response
# 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
[yY][eE][sS]|[yY]|"")
true
......
......@@ -166,7 +166,7 @@ case $PMTYPE in
docmd cat /var/log/portage
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -150,7 +150,7 @@ case $PMTYPE in
docmd pkg show $pkg_names
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
}
......
......@@ -194,7 +194,7 @@ epm_install_names()
sudocmd $PMTYPE install $@
return ;;
*)
fatal "Have no suitable install command for $PMTYPE"
fatal 'Have no suitable install command for $PMTYPE'
;;
esac
}
......@@ -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" $@
return ;;
*)
fatal "Have no suitable appropriate install command for $PMTYPE"
fatal 'Have no suitable appropriate install command for $PMTYPE'
;;
esac
}
......
......@@ -30,7 +30,7 @@ epm_install_files_alt()
# do repack if needed
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"
fi
......
......@@ -28,7 +28,7 @@ epm_install_files_apt_dpkg()
fi
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"
fi
......
......@@ -27,11 +27,11 @@
__emerge_install_ebuild()
{
local EBUILD="$1"
[ -s "$EBUILD" ] || fatal ".ebuild file '$EBUILD' is missed"
[ -s "$EBUILD" ] || fatal '.ebuild file $EBUILD is missed'
# load ebuild and get vars
. $(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
local TARBALLS=
......
......@@ -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
}
......@@ -134,8 +134,7 @@ epm_print_install_names_command()
echo "$PMTYPE install $*"
return ;;
*)
fatal "Have no suitable appropriate install command for $PMTYPE"
fatal 'Have no suitable appropriate install command for $PMTYPE'
;;
esac
}
......@@ -23,7 +23,7 @@ epm_install_files_rpm()
[ -z "$files" ] && return
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"
fi
......
......@@ -49,7 +49,7 @@ epm_kernel_update()
message "Skipping: kernel package will update during dist-upgrade"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
}
......@@ -72,7 +72,7 @@ epm_list()
return
;;
*)
fatal "Unknown option $option, use epm list --help to get info"
fatal 'Unknown option $option, use epm list --help to get info
;;
esac
......
......@@ -138,7 +138,7 @@ case $PMTYPE in
return 0
;;
*)
fatal "Have no suitable query command for $PMTYPE"
fatal 'Have no suitable query command for $PMTYPE'
;;
esac
......
......@@ -69,7 +69,7 @@ case $PMTYPE in
docmd winget upgrade
;;
*)
fatal "Have no suitable query command for $PMTYPE"
fatal 'Have no suitable query command for $PMTYPE'
;;
esac
......
......@@ -105,7 +105,7 @@ case $PMTYPE in
info "Manually: edit /etc/pacman.conf modifying IgnorePkg array"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -140,7 +140,7 @@ case $PMTYPE in
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
......@@ -182,7 +182,7 @@ case $PMTYPE in
cat /etc/pacman.conf
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -231,7 +231,7 @@ case $PMTYPE in
sudocmd emerge --oneshot "$@"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -262,7 +262,7 @@ case $PMTYPE in
sudocmd emerge --select "$@"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -287,7 +287,7 @@ case $PMTYPE in
sudocmd dnf repoquery --unneeded
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -311,7 +311,7 @@ case $PMTYPE in
sudocmd dnf repoquery --userinstalled
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -361,7 +361,7 @@ epm_mark()
epm_mark_showmanual "$@"
;;
*)
fatal "Unknown command $ epm repo '$CMD'"
fatal 'Unknown command $ epm repo $CMD'
;;
esac
......
......@@ -41,7 +41,7 @@ case $PMTYPE in
a= rpm --rebuilddb
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -35,7 +35,7 @@ __epm_pack_run_handler()
local repackcode="$EPM_PACK_SCRIPTS_DIR/$packname.sh"
[ -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
filefortarname="$(pwd)/filefortarname"
......@@ -46,11 +46,11 @@ __epm_pack_run_handler()
#info "Running $($script --description 2>/dev/null) ..."
# TODO: add url info here
( 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
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
return 0
......@@ -63,7 +63,7 @@ __epm_pack()
local URL="$4"
# 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
mv $returntarname $EPMCURDIR
......@@ -162,7 +162,7 @@ epm_pack()
__download_pkg_urls
pkg_urls=
[ -n "$pkg_files" ] || fatal "Can't download $tarname"
[ -n "$pkg_files" ] || fatal 'Cant download $tarname'
tarname="$(realpath "$pkg_files")"
elif [ -d "$tarname" ] ; then
tarname="$(realpath "$tarname")"
......
......@@ -53,7 +53,7 @@ case $PMTYPE in
fi
;;
*)
fatal "Sorted package list function is not implemented for $PMTYPE"
fatal 'Sorted package list function is not implemented for $PMTYPE'
;;
esac
}
......@@ -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
case $PMTYPE in
......@@ -251,7 +251,7 @@ case $PMTYPE in
fi
;;
*)
fatal "Have no suitable query command for $PMTYPE"
fatal 'Have no suitable query command for $PMTYPE'
;;
esac
......
......@@ -52,7 +52,7 @@ __run_script()
{
local script="$psdir/$1.sh"
[ -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
[ "$PROGDIR" = "/usr/bin" ] && SCPATH="$PATH" || SCPATH="$PROGDIR:$PATH"
......@@ -283,7 +283,7 @@ __epm_play_remove()
__remove_installed_app "$prescription"
else
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."
fi
done
......
......@@ -45,7 +45,7 @@ case $PMTYPE in
docmd apk policy $pkg_names
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -42,7 +42,7 @@ fi
prescription="$1"
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."
}
......@@ -433,23 +433,23 @@ epm_print()
query_package_field "$FIELD" "$@"
;;
"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"
# TODO: drop_pkg_extensions
print_pkgname "$@"
;;
"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"
print_srcname "$@"
;;
"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"
print_srcpkgname "$@"
;;
"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"
print_specname "$@"
;;
......@@ -487,7 +487,7 @@ epm_print()
$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
}
......@@ -42,7 +42,7 @@ epm_provides_files()
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
}
......@@ -122,7 +122,7 @@ case $PMTYPE in
fi
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -137,7 +137,7 @@ __do_query()
return 1
;;
*)
fatal "Have no suitable query command for $PMTYPE"
fatal 'Have no suitable query command for $PMTYPE'
;;
esac
......@@ -168,7 +168,7 @@ __do_short_query()
return
;;
*)
fatal "Have no suitable query command for $PMTYPE"
fatal 'Have no suitable query command for $PMTYPE'
;;
esac
......
......@@ -74,7 +74,7 @@ epm_release_downgrade()
dv="$(__detect_alt_release_by_repo)"
if [ -n "$dv" ] && [ "$dv" != "$DISTRVERSION" ] ; then
DISTRVERSION="$dv"
info "Detected running $DISTRNAME $DISTRVERSION (according to using repos)"
info 'Detected running $DISTRNAME $DISTRVERSION (according to using repos)'
fi
fi
......@@ -92,7 +92,7 @@ epm_release_downgrade()
__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
;;
......@@ -103,7 +103,7 @@ epm_release_downgrade()
case $PMTYPE in
apt-rpm)
#docmd epm update
info "Have no idea how to downgrade $DISTRNAME"
info 'Have no idea how to downgrade $DISTRNAME'
;;
*-dpkg)
assure_exists do-release-upgrade update-manager-core
......@@ -130,7 +130,7 @@ epm_release_downgrade()
local RELEASEVER="$1"
[ -n "$RELEASEVER" ] || RELEASEVER=$(($DISTRVERSION + 1))
#[ -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
# TODO: from docs:
# dnf system-upgrade reboot
......@@ -168,7 +168,7 @@ epm_release_downgrade()
sudocmd guix pull --verbose
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -29,10 +29,10 @@ assure_safe_run()
fi
if [ "$TERM" != "screen" ] ; 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
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
warning "You have 'screen' already installed, just run upgrade via screen (check https://losst.ru/komanda-screen-linux if needed)."
else
......@@ -191,8 +191,8 @@ __check_system()
if [ "$TO" != "Sisyphus" ] ; then
# note: we get --base-version directy to get new version
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 "Trying to fix with altlinux-release-$TO"
warning 'Current distro still is not $TO, or altlinux-release-sisyphus package is installed.'
warning 'Trying to fix with altlinux-release-$TO'
docmd epm install altlinux-release-$TO
fi
fi
......@@ -430,9 +430,9 @@ __switch_alt_to_distro()
;;
*)
if [ "$FROM" = "$TO" ] ; then
info "It seems your system is already $DISTRNAME $TO"
info 'It seems your system is already $DISTRNAME $TO'
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
end_change_alt_repo
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()
dv="$(__detect_alt_release_by_repo)"
if [ -n "$dv" ] && [ "$dv" != "$DISTRVERSION" ] ; then
DISTRVERSION="$dv"
info "Detected running $DISTRNAME $DISTRVERSION (according to using repos)"
info 'Detected running $DISTRNAME $DISTRVERSION (according to using repos)'
fi
fi
TARGET=""
[ -n "$3" ] && fatal "Too many args: $*"
[ -n "$3" ] && fatal 'Too many args: $*'
if [ -n "$2" ] ; then
DISTRVERSION="$1"
info "Force current distro version as $DISTRVERSION"
info 'Force current distro version as $DISTRVERSION'
TARGET="$2"
elif [ -n "$1" ] ; then
TARGET="$1"
......@@ -485,7 +485,7 @@ epm_release_upgrade()
__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
;;
......@@ -521,7 +521,7 @@ epm_release_upgrade()
case $PMTYPE in
apt-rpm)
#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)
assure_exists do-release-upgrade update-manager-core
......@@ -588,7 +588,7 @@ epm_release_upgrade()
DV=$(echo "$DISTRVERSION" | sed -e "s|\..*||")
local RELEASEVER="$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 rpm --rebuilddb
......@@ -607,7 +607,7 @@ epm_release_upgrade()
local RELEASEVER="$1"
[ -n "$RELEASEVER" ] || RELEASEVER=$(($DISTRVERSION + 1))
#[ -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
# TODO: from docs:
# dnf system-upgrade reboot
......@@ -639,7 +639,7 @@ epm_release_upgrade()
sudocmd guix pull --verbose
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -182,7 +182,7 @@ epm_remove_names()
sudocmd opkg $(subst_option force -force-depends) remove $@
return ;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
}
......@@ -285,7 +285,7 @@ epm_print_remove_command()
echo "$PMTYPE uninstall -s $*"
;;
*)
fatal "Have no suitable appropriate remove command for $PMTYPE"
fatal 'Have no suitable appropriate remove command for $PMTYPE'
;;
esac
}
......@@ -333,7 +333,7 @@ epm_remove()
APTOPTIONS="--simulate"
;;
*)
fatal "don't yet support --simulate for $PMTYPE"
fatal 'dont yet support --simulate for $PMTYPE'
return
;;
esac
......
......@@ -79,7 +79,7 @@ epm_remove_old_kernels()
case $PMTYPE in
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
}
......@@ -28,7 +28,7 @@ __epm_removerepo_alt_grepremove()
rl="$1"
else
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
echo "$rl" | while read rp ; do
# TODO: print removed lines
......@@ -159,7 +159,7 @@ case $PMTYPE in
info "You need remove repo from /etc/slackpkg/mirrors"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -50,7 +50,7 @@ __epm_check_if_needed_repack()
{
__epm_check_repack_rule "$@" || return
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
......@@ -123,7 +123,7 @@ __prepare_source_package()
local pkgname="$(echo $alpkg | sed -e "s|_.*||")"
# 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=''
......@@ -152,7 +152,7 @@ __prepare_source_package()
fi
# 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)
# FIXME: looks like a hack with current dir
......@@ -187,7 +187,7 @@ __epm_repack_single()
fi
;;
*)
fatal "$PKGFORMAT is not supported for repack yet"
fatal '$PKGFORMAT is not supported for repack yet'
;;
esac
......@@ -200,7 +200,7 @@ __epm_repack()
local pkg
repacked_pkgs=''
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"
done
}
......@@ -224,7 +224,7 @@ epm_repack()
pkg_urls=
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
if __epm_repack $pkg_files && [ -n "$repacked_pkgs" ] ; then
......
......@@ -40,7 +40,7 @@ __epm_repack_to_deb()
fi
abspkg="$(realpath "$pkg")"
info "Repacking $abspkg to local deb format (inside $TDIR) ..."
info 'Repacking $abspkg to local deb format (inside $TDIR) ...'
alpkg=$(basename $pkg)
# don't use abs package path: copy package to temp dir and use there
......@@ -55,7 +55,7 @@ __epm_repack_to_deb()
repacked_pkg="$repacked_pkg $(realpath $DEBCONVERTED)"
remove_on_exit "$(realpath $DEBCONVERTED)"
else
warning "Can't find converted deb for source binary package '$pkg'"
warning 'Cant find converted deb for source binary package $pkg'
fi
clean_store_output
cd - >/dev/null
......
......@@ -96,13 +96,13 @@ __apply_fix_code()
{
local repackcode="$EPM_REPACK_SCRIPTS_DIR/$1.sh"
[ -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
[ "$PROGDIR" = "/usr/bin" ] && SCPATH="$PATH" || SCPATH="$PROGDIR:$PATH"
local bashopt=''
[ -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()
......@@ -197,7 +197,7 @@ __epm_repack_to_rpm()
mkdir $tmpbuilddir
abspkg="$(realpath $pkg)"
info
info "Repacking $abspkg to local rpm format (inside $tmpbuilddir) ..."
info 'Repacking $abspkg to local rpm format (inside $tmpbuilddir) ...'
alpkg=$(basename $pkg)
# don't use abs package path: copy package to temp dir and use there
......@@ -223,7 +223,7 @@ __epm_repack_to_rpm()
rmdir * 2>/dev/null
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"
......@@ -256,7 +256,7 @@ __epm_repack_to_rpm()
if [ -n "$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
......@@ -276,7 +276,7 @@ __epm_repack_to_rpm()
remove_on_exit "$repacked_rpm"
repacked_pkg="$repacked_rpm"
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
cd $EPMCURDIR >/dev/null
......
......@@ -132,7 +132,7 @@ epm_repo()
epm_repo_pkgdel "$@"
;;
*)
fatal "Unknown command $ epm repo '$CMD'"
fatal 'Unknown command $ epm repo $CMD'
;;
esac
......
......@@ -31,10 +31,10 @@ __epm_repodisable_alt()
rl="$(echo "$1" | sed -e 's|\^||')"
else
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
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
done
}
......@@ -62,7 +62,7 @@ case $PMTYPE in
docmd eoget disable-repo "$@"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -31,10 +31,10 @@ __epm_repoenable_alt()
rl="$(echo "$1" | sed -e 's|\^||')"
else
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
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
done
}
......@@ -62,7 +62,7 @@ case $PMTYPE in
docmd eoget enable-repo "$@"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -220,7 +220,7 @@ __epm_repochange_alt()
__change_repo ftp.altlinux "//ftp.altlinux.org/pub/distributions ALTLinux"
;;
*)
fatal "Unsupported change key '$1'"
fatal 'Unsupported change key $1'
;;
esac
}
......@@ -235,7 +235,7 @@ epm_repochange()
__epm_repochange_alt "$1"
;;
*)
fatal "Repo change Unsupported for $BASEDISTRNAME"
fatal 'Repo change Unsupported for $BASEDISTRNAME'
;;
esac
}
......@@ -264,7 +264,7 @@ case $PMTYPE in
# yum-rpm|dnf-rpm)
# ;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -47,7 +47,7 @@ __epm_repoindex_alt()
# TODO: check if we inside arch dir or RPMS.*
[ -n "$REPO_DIR" ] || REPO_DIR="$(pwd)"
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
REPO_NAME="$2"
......@@ -117,7 +117,7 @@ case $PMTYPE in
docmd eoget index "$@"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -161,7 +161,7 @@ case $PMTYPE in
docmd grep -v -- "^#\|^$" /etc/slackpkg/mirrors
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -25,7 +25,7 @@ __epm_repo_pkgadd_alt()
local REPO_DIR="$1"
shift
[ -d "$REPO_DIR" ] || fatal "Can't find repo dir $REPO_DIR."
[ -d "$REPO_DIR" ] || fatal 'Cant find repo dir $REPO_DIR.'
# default name
REPO_NAME="addon"
......@@ -57,7 +57,7 @@ __epm_repo_pkgdel_alt()
local REPO_DIR="$1"
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"
......@@ -105,7 +105,7 @@ case $PMTYPE in
__epm_repo_pkgadd_alt "$@"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -120,7 +120,7 @@ case $PMTYPE in
__epm_repo_pkgupdate_alt "$@"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -135,7 +135,7 @@ case $PMTYPE in
__epm_repo_pkgdel_alt "$@"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -25,14 +25,14 @@ SAVELISTDIR=$epm_vardir/eepm-etc-save
__save_alt_repo_lists()
{
assure_root
info "Creating copy of all sources lists to $SAVELISTDIR ..."
info 'Creating copy of all sources lists to $SAVELISTDIR ...'
local i
rm -rf $verbose $SAVELISTDIR 2>/dev/null
mkdir -p $SAVELISTDIR/apt/ $SAVELISTDIR/apt/sources.list.d/
for i in /etc/apt/sources.list /etc/apt/sources.list.d/*.list ; do
[ -s "$i" ] || continue
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
}
......@@ -40,7 +40,7 @@ __save_alt_repo_lists()
__restore_alt_repo_lists()
{
assure_root
info "Restoring copy of all sources lists from $SAVELISTDIR ..."
info 'Restoring copy of all sources lists from $SAVELISTDIR ...'
local i
[ -d "$SAVELISTDIR/apt" ] || return 0
mkdir -p $SAVELISTDIR/apt/ $SAVELISTDIR/apt/sources.list.d/
......@@ -51,7 +51,7 @@ __restore_alt_repo_lists()
if diff -q "$DD" "$i" >/dev/null ; then
rm -f $verbose "$DD"
else
mv $verbose "$DD" "$i" || warning "Can't restore $i file"
mv $verbose "$DD" "$i" || warning 'Cant restore $i file'
fi
done
}
......@@ -87,7 +87,7 @@ case $PMTYPE in
__save_alt_repo_lists
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -104,7 +104,7 @@ case $PMTYPE in
__restore_alt_repo_lists
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -124,7 +124,7 @@ case $PMTYPE in
sudocmd winget source reset
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......@@ -144,12 +144,12 @@ case $PMTYPE in
else
local days
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
fi
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
}
......@@ -202,7 +202,7 @@ case $PMTYPE in
return
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -102,23 +102,23 @@ __epm_restore_convert_to_rpm_notation()
local l
while read l ; do
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
fi
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
fi
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
fi
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
fi
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
fi
# drop various "python_version > '3.5'"
......@@ -160,7 +160,7 @@ __epm_restore_pip()
cat $req_file | __epm_restore_convert_to_rpm_notation | sed -e "s|^|$reqmacro |"
return
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-|")"
fi
......@@ -584,7 +584,7 @@ __epm_restore_perl_shyaml()
__epm_restore_by()
{
local req_file="$1"
[ -n "$verbose" ] && info "Checking for $req_file ..."
[ -n "$verbose" ] && info 'Checking for $req_file ...'
[ -s "$req_file" ] || return
if file $req_file | grep -q "ELF [3264]*-bit LSB executable" ; then
assure_exists ldd-requires
......@@ -594,7 +594,7 @@ __epm_restore_by()
estrlist list $TOINSTALL
return
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
return
fi
......
......@@ -41,7 +41,7 @@ __alt_local_content_search()
local CI="$(ls $(cat $ALT_CONTENTS_INDEX_LIST) 2>/dev/null)"
info "Searching for $1 ... "
info 'Searching for $1 ... '
# FIXME: do it better
local MGS
......@@ -111,7 +111,7 @@ case $PMTYPE in
return
;;
*)
fatal "Have no suitable search file command for $PMTYPE"
fatal 'Have no suitable search file command for $PMTYPE'
;;
esac
......
......@@ -57,7 +57,7 @@ rsync_alt_contents_index()
try_assure_exists rsync || return
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
fi
......@@ -143,7 +143,7 @@ update_alt_contents_index()
local REMOTEURL="$(get_url_to_etersoft_mirror "$URL")"
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
[ -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
# we don't know if remote server has rsync
# fix rsync URL firstly
......
......@@ -82,17 +82,17 @@ __epm_print_warning_for_nonalt_packages()
local i
for i in $* ; do
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
fi
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
fi
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
fi
done
......@@ -116,7 +116,7 @@ __epm_check_vendor()
if ! epm_status_validate "$i" ; then
# it is missed package probably (package remove case)
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
noscripts="--noscripts"
continue
......@@ -126,7 +126,7 @@ __epm_check_vendor()
vendor="$(epm print field Vendor for "$i")"
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"
continue
fi
......@@ -135,15 +135,15 @@ __epm_check_vendor()
epm_status_repacked "$i" && continue
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
fi
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
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"
done
}
......
......@@ -139,7 +139,7 @@ EOF
done
return $res ;;
*)
fatal "Have no suitable simulate command for $PMTYPE"
fatal 'Have no suitable simulate command for $PMTYPE'
;;
esac
......@@ -158,7 +158,7 @@ epm_simulate()
local RES=$?
if [ -z "$quiet" ] ; then
if [ "$RES" = 0 ] ; then
info "Simulate result: $filenames package(s) CAN BE installed"
info 'Simulate result: $filenames package(s) CAN BE installed'
else
info "Simulate result: There are PROBLEMS with install some package(s)"
fi
......
......@@ -117,7 +117,7 @@ query_altlinux_url()
case $PMTYPE in
*-rpm)
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"
return
;;
......@@ -139,7 +139,7 @@ for f in $pkg_names $pkg_files ; do
pkg_url=$(query_package_url $f)
fi
[ -n "$pkg_url" ] && open_browser "$pkg_url" && continue
warning "Can't get URL for $f package"
warning 'Cant get URL for $f package'
done
#for f in $pkg_names ; do
......
......@@ -24,7 +24,7 @@ epm_stats()
CMD="apk stats"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -151,7 +151,7 @@ epm_status_original()
return 0
;;
*)
fatal "Unsupported $DISTRNAME"
fatal 'Unsupported $DISTRNAME'
;;
esac
return 1
......@@ -171,7 +171,7 @@ epm_status_repacked()
[ "$packager" = "EPM <support@eepm.ru>" ] && return 0
;;
*)
fatal "Unsupported $BASEDISTRNAME"
fatal 'Unsupported $BASEDISTRNAME'
;;
esac
return 1
......@@ -270,10 +270,10 @@ epm_status()
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
......
......@@ -70,7 +70,7 @@ epm_tool()
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
}
......@@ -40,7 +40,7 @@ __check_for_epm_version()
local latest="$(get_latest_version eepm)"
#[ -z "$latest" ] && return
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()
......@@ -188,7 +188,7 @@ case $PMTYPE in
sudocmd winget source update
;;
*)
fatal "Have no suitable update command for $PMTYPE"
fatal 'Have no suitable update command for $PMTYPE'
;;
esac
}
......
......@@ -63,7 +63,7 @@ epm_upgrade()
installlist="$(get_only_installed_packages "$installlist")"
[ -n "$verbose" ] && info "Packages to upgrade: $installlist"
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
fi
......@@ -110,7 +110,7 @@ epm_upgrade()
# hack for https://bugzilla.altlinux.org/41225
case "$pkg_names" in
-*)
fatal "Option $pkg_names is not allowed here"
fatal 'Option $pkg_names is not allowed here'
esac
load_helper epm-install
(pkg_names=$(get_only_installed_packages $pkg_names) epm_install)
......@@ -219,7 +219,7 @@ epm_upgrade()
CMD="pkg upgrade"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -103,7 +103,7 @@ case $PMTYPE in
CMD="xbps-query -X"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
esac
......
......@@ -51,7 +51,7 @@ case $PMTYPE in
CMD="opkg whatprovides"
;;
*)
fatal "Have no suitable command for $PMTYPE"
fatal 'Have no suitable command for $PMTYPE'
;;
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