Commit ba41b747 authored by Vitaly Lipatov's avatar Vitaly Lipatov

fix messages

parent bb46bcbc
......@@ -26,7 +26,7 @@ epm_Install()
local names="$(echo $pkg_names | filter_out_installed_packages)"
local files="$(echo $pkg_files | filter_out_installed_packages)"
[ -z "$files$names" ] && info "Skip empty install list" && return 22
[ -z "$files$names" ] && info "Install: Skip empty install list." && return 22
# do update only if really need install something
case $PMTYPE in
......
......@@ -43,7 +43,7 @@ __epm_assure()
fi
# TODO: use package name normalization
info "Install appropriate package for $1 command..."
info "Installing appropriate package for $1 command..."
local PACKAGE="$2"
[ -n "$PACKAGE" ] || PACKAGE="$1"
......@@ -58,7 +58,7 @@ __epm_assure()
epm_assure()
{
[ -n "$pkg_filenames" ] || fatal "Run assure without params"
[ -n "$pkg_filenames" ] || fatal "Assure: Missing params. Check $0 --help for info."
# use helper func for extract separate params
__epm_assure $pkg_filenames
......
......@@ -23,7 +23,7 @@ __epm_autoremove_altrpm()
local flag=
load_helper epm-packages
info
info "Just remove all non -devel libs packages not need by anything"
info "Just removing all non -devel libs packages not need by anything"
for pkg in $(short=1 pkg_filenames= epm_packages | grep -- "^lib" | grep -v -- "-devel$" | grep -v -- ^libreoffice ) ; do
sudocmd rpm -v -e $pkg && flag=1
done
......
......@@ -104,7 +104,7 @@ __epm_changelog_unlocal_names()
epm_changelog()
{
[ -n "$pkg_filenames" ] || fatal "Run changelog without params"
[ -n "$pkg_filenames" ] || fatal "Changelog: Missing package(s) name"
__epm_changelog_files $pkg_files
......
......@@ -72,7 +72,7 @@ epm_checkpkg()
return
fi
[ -n "$pkg_files" ] || fatal "Run without names"
[ -n "$pkg_files" ] || fatal "Checkpkg: missing file or package name(s)"
local pkg
for pkg in $pkg_files ; do
check_pkg_integrity $pkg || fatal "Broken package $pkg"
......
......@@ -98,7 +98,7 @@ docmd $CMD $pkg_names
epm_conflicts()
{
[ -n "$pkg_filenames" ] || fatal "Run query without names"
[ -n "$pkg_filenames" ] || fatal "Conflicts: Missing package(s) name"
epm_conflicts_files
epm_conflicts_names
}
......@@ -135,7 +135,7 @@ __epm_filelist_name()
epm_filelist()
{
[ -n "$pkg_filenames" ] || fatal "Run query without names"
[ -n "$pkg_filenames" ] || fatal "Filelist: missing package(s) name"
__epm_filelist_file $pkg_files || return
......
......@@ -33,7 +33,7 @@ __epm_info_rpm_low()
epm_info()
{
[ -n "$pkg_filenames" ] || fatal "Run info without names"
[ -n "$pkg_filenames" ] || fatal "Info: missing package(s) name"
case $PMTYPE in
apt-rpm)
......
......@@ -152,7 +152,7 @@ epm_install_names()
__separate_sudocmd "guix package -i" "guix package -i" $@
return ;;
android)
warning "We have no idea how to use package repository, ever if it is F-Droid."
fatal "We still have no idea how to use package repository, ever if it is F-Droid."
return ;;
*)
fatal "Have no suitable install command for $PMTYPE"
......
......@@ -19,7 +19,7 @@
epm_kernel_update()
{
info "Start update system kernel to the latest version"
info "Starting update system kernel to the latest version"
case $DISTRNAME in
ALTLinux)
......
......@@ -93,7 +93,8 @@ docmd $CMD $pkg_names
epm_provides()
{
[ -n "$pkg_filenames" ] || fatal "Run query without names"
[ -n "$pkg_filenames" ] || fatal "Provides: missing package(s) name"
epm_provides_files
epm_provides_names
}
......@@ -176,7 +176,7 @@ separate_installed()
epm_query()
{
[ -n "$pkg_filenames" ] || fatal "Run query without names"
[ -n "$pkg_filenames" ] || fatal "Query: missing package(s) name"
__epm_query_file $pkg_files || return
......
......@@ -66,7 +66,7 @@ epm_reinstall_files()
epm_reinstall()
{
[ -n "$pkg_filenames" ] || fatal "Run install without packages"
[ -n "$pkg_filenames" ] || fatal "Reinstall: missing package(s) name."
epm_reinstall_names $pkg_names
epm_reinstall_files $pkg_files
......
......@@ -19,7 +19,7 @@
epm_release_upgrade()
{
info "Start upgrade whole system to the next release"
info "Starting upgrade whole system to the next release"
info "Check also http://wiki.etersoft.ru/Admin/UpdateLinux"
case $PMTYPE in
......
......@@ -197,7 +197,7 @@ epm_remove()
# get full package name(s) from the package file(s)
[ -n "$pkg_files" ] && pkg_names="$pkg_names $(epm query $pkg_files)"
[ -n "$pkg_names" ] || fatal "Run remove without args"
[ -n "$pkg_names" ] || fatal "Remove: missing package(s) name."
epm_remove_low $pkg_names && return
# get package name for hi level package management command (with version if supported and if possible)
......
......@@ -23,7 +23,9 @@ epm_requires_files()
{
[ -n "$pkg_files" ] || return
case $(get_package_type $pkg_files) in
local PKGTYPE="$(case $(get_package_type $pkg_files))"
case "$PKGTYPE" in
rpm)
docmd rpm -q --requires -p $pkg_files
;;
......@@ -31,7 +33,7 @@ epm_requires_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 $PKGTYPE"
;;
esac
}
......@@ -92,7 +94,7 @@ docmd $CMD $pkg_names
epm_requires()
{
[ -n "$pkg_filenames" ] || fatal "Run query without names"
[ -n "$pkg_filenames" ] || fatal "Requires: missing package(s) name"
epm_requires_files
epm_requires_names
}
......@@ -148,7 +148,7 @@ __epm_search_make_grep()
epm_search()
{
[ -n "$pkg_filenames" ] || fatal "Please, use search with some argument"
[ -n "$pkg_filenames" ] || fatal "Search: missing search argument(s)"
# it is useful for first time running
update_repo_if_needed
......
......@@ -21,10 +21,12 @@
# https://bugzilla.altlinux.org/show_bug.cgi?id=14449
local_content_search()
{
# TODO: use global get_sysarch function
local SYSARCH
SYSARCH=$(uname -m)
[ "$SYSARCH" = "x86_64" ] || SYSARCH=i586
# FIXME: use config or/and web url
local REPODIR=/var/ftp/pub/ALTLinux/Sisyphus
local CI=$REPODIR/$SYSARCH/base/contents_index
local CINOA=$REPODIR/noarch/base/contents_index
......@@ -43,7 +45,7 @@ local_content_search()
epm_search_file()
{
local CMD
[ -n "$pkg_filenames" ] || fatal "Run search without names"
[ -n "$pkg_filenames" ] || fatal "Search file: missing file name(s)"
case $PMTYPE in
apt-rpm)
......
......@@ -96,7 +96,7 @@ echon()
# Used DISTRNAME
set_target_pkg_env()
{
[ -n "$DISTRNAME" ] || fatal "Run set_target_pkg_env without DISTRNAME"
[ -n "$DISTRNAME" ] || fatal "Missing DISTRNAME in set_target_pkg_env."
PKGFORMAT=$($DISTRVENDOR -p "$DISTRNAME")
PKGVENDOR=$($DISTRVENDOR -s "$DISTRNAME")
RPMVENDOR=$($DISTRVENDOR -n "$DISTRNAME")
......
......@@ -116,7 +116,7 @@ EOF
pkg_filenames="$pkg-[0-9]" epm_search | grep -E "(installed|upgrade)" && continue
pkg_filenames="$pkg" epm_search | grep -E "(installed|upgrade)" && continue
res=1
info "Does not found in repository."
info "Package '$pkg' does not found in repository."
done
return $res ;;
*)
......@@ -129,16 +129,16 @@ EOF
epm_simulate()
{
[ -z "$pkg_filenames" ] && info "Skip empty list" && return 22
[ -z "$pkg_filenames" ] && info "Simulate: Skip empty list" && return 22
local filenames="$(echo $pkg_filenames | filter_out_installed_packages)"
[ -z "$filenames" ] && info "All packages are already installed" && return 0
[ -z "$filenames" ] && info "Simulate: All packages are already installed" && return 0
_epm_do_simulate $filenames
local RES=$?
if [ -z "$quiet" ] ; then
[ "$RES" = 0 ] && info "Result: $filenames package(s) CAN BE installed" || info "Result: There are PROBLEMS with install some package(s)"
[ "$RES" = 0 ] && info "Simulate result: $filenames package(s) CAN BE installed" || info "Simulate result: There are PROBLEMS with install some package(s)"
fi
return $RES
}
......
......@@ -21,7 +21,7 @@
epm_update()
{
info "Run command for update remote package repository database"
info "Running command for update remote package repository database"
case $PMTYPE in
apt-rpm)
......
......@@ -26,7 +26,7 @@ epm_upgrade()
# it is useful for first time running
update_repo_if_needed
info "Run command for upgrade packages"
info "Running command for upgrade packages"
case $PMTYPE in
apt-rpm|apt-dpkg)
......
......@@ -20,7 +20,7 @@
epm_whatdepends()
{
local CMD
[ -n "$pkg_filenames" ] || fatal "Run query without names"
[ -n "$pkg_filenames" ] || fatal "Whatdepends: missing package(s) name"
# by package name
case $PMTYPE in
......
......@@ -20,7 +20,7 @@
epm_whatprovides()
{
local CMD
[ -n "$pkg_filenames" ] || fatal "Run query without names"
[ -n "$pkg_filenames" ] || fatal "Whatprovides: missing package(s) name"
# by package name
case $PMTYPE in
......
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