Commit b2b0b2f8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

update packed

parent 7c031820
...@@ -520,12 +520,49 @@ check_pkg_integrity() ...@@ -520,12 +520,49 @@ check_pkg_integrity()
local EXT=`echo "$1" | sed -e "s|.*\.\([a-z0-9]*\)\$|\1|g"` local EXT=`echo "$1" | sed -e "s|.*\.\([a-z0-9]*\)\$|\1|g"`
local PKG="$1" local PKG="$1"
local RET local RET
# TODO: Попробовать здесь оставить возможность перегрузки функций
case $EXT in
rpm)
docmd rpm --checksig $@
;;
deb)
# FIXME: debsums -ca package ?
docmd dpkg --contents $@
;;
bz2)
docmd bunzip -t $1
;;
#*)
# fatal "Unknown package extension '$EXT' in $PKG package"
# ;;
esac
check_${EXT}_integrity "$PKG" || fatal "Unknown package extension '$EXT' in $PKG package" check_${EXT}_integrity "$PKG" || fatal "Unknown package extension '$EXT' in $PKG package"
} }
__epm_check_installed_pkg()
{
case $PMTYPE in
*-rpm)
docmd rpm -V $@
;;
*-dpkg)
docmd debsums $@
;;
*)
fatal "Do not known command for $PMTYPE"
;;
esac
}
epm_checkpkg() epm_checkpkg()
{ {
if [ -n "$pkg_names" ] ; then
__epm_check_installed_pkg $pkg_names
return
fi
[ -n "$pkg_files" ] || fatal "Run without names" [ -n "$pkg_files" ] || fatal "Run without names"
local pkg local pkg
for pkg in $pkg_files ; do for pkg in $pkg_files ; do
...@@ -1839,6 +1876,7 @@ _epm_do_simulate() ...@@ -1839,6 +1876,7 @@ _epm_do_simulate()
# FIXME: check only error output # FIXME: check only error output
LC_ALL=C sudocmd yum --assumeno install $filenames 2>&1 | grep "^No package" && return 1 LC_ALL=C sudocmd yum --assumeno install $filenames 2>&1 | grep "^No package" && return 1
LC_ALL=C sudocmd yum --assumeno install $filenames 2>&1 | grep "^Complete!" && return 0 LC_ALL=C sudocmd yum --assumeno install $filenames 2>&1 | grep "^Complete!" && return 0
LC_ALL=C sudocmd yum --assumeno install $filenames 2>&1 | grep "^Exiting on user Command" && return 0
LC_ALL=C sudocmd yum --assumeno install $filenames >/dev/null 2>&1 || return LC_ALL=C sudocmd yum --assumeno install $filenames >/dev/null 2>&1 || return
else else
LC_ALL=C echo n | sudocmd yum install $filenames LC_ALL=C echo n | sudocmd yum install $filenames
...@@ -2340,7 +2378,7 @@ $(get_help HELPOPT) ...@@ -2340,7 +2378,7 @@ $(get_help HELPOPT)
print_version() print_version()
{ {
echo "EPM package manager version 1.2.1" echo "EPM package manager version 1.2.2"
echo "Running on $($DISTRVENDOR) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)" echo "Running on $($DISTRVENDOR) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)"
echo "Copyright (c) Etersoft 2012-2013" echo "Copyright (c) Etersoft 2012-2013"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
...@@ -2550,7 +2588,7 @@ for opt in "$@" ; do ...@@ -2550,7 +2588,7 @@ for opt in "$@" ; do
check_command $opt && continue check_command $opt && continue
check_option $opt && continue check_option $opt && continue
if [ -f "$opt" ] ; then if [ -f "$opt" ] && echo $opt | grep -q "\." ; then
pkg_files="$pkg_files $opt" pkg_files="$pkg_files $opt"
else else
pkg_names="$pkg_names $opt" pkg_names="$pkg_names $opt"
......
...@@ -920,7 +920,7 @@ $(get_help HELPOPT) ...@@ -920,7 +920,7 @@ $(get_help HELPOPT)
print_version() print_version()
{ {
echo "Service manager version 1.2.1" echo "Service manager version 1.2.2"
echo "Running on $($DISTRVENDOR)" echo "Running on $($DISTRVENDOR)"
echo "Copyright (c) Etersoft 2012, 2013" echo "Copyright (c) Etersoft 2012, 2013"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment