Commit 889b29e3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

small fixes, make for vars local

parent d9f25d6d
......@@ -82,8 +82,8 @@ check_pkg_integrity()
epm_checkpkg()
{
[ -n "$pkg_files" ] || fatal "Run without names"
for i in $pkg_files ; do
check_pkg_integrity $i || fatal "Broken package $i"
local pkg
for pkg in $pkg_files ; do
check_pkg_integrity $pkg || fatal "Broken package $pkg"
done
}
......@@ -23,6 +23,7 @@ filter_out_installed_packages()
{
[ -z "$skip_installed" ] && cat && return
# TODO: rewrite with use epm_query
# TODO: use this more effectively way
#for i in $(cat) ; do
# rpm -q $i >/dev/null && continue
......
......@@ -49,7 +49,7 @@ real_file()
dpkg_print_name_version()
{
local ver
local ver i
for i in $* ; do
ver=$(dpkg -s $i 2>/dev/null | grep "Version:" | sed -e "s|Version: ||g")
if [ -z "$ver" ] ; then
......@@ -101,10 +101,9 @@ epm_query_file()
# file can exists or not
[ -n "$pkg_filenames" ] || fatal "Run query without file names"
for i in $pkg_filenames ; do
real_file "$i"
__do_query $FULLFILEPATH || pkg_filenames=$i epm_search_file
done
for pkg in $pkg_filenames ; do
real_file "$pkg"
__do_query $FULLFILEPATH || pkg_filenames=$pkg epm_search_file
done
}
......@@ -20,6 +20,7 @@
print_apt_sources_list()
{
local i
for i in $@ ; do
test -r "$i" || continue
#echo
......
......@@ -18,10 +18,6 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
load_helper epm-packages
# TODO: combine with -qa (the difference only in return status now)
epm_requires()
{
[ -n "$pkg_filenames" ] || fatal "Run query without names"
......
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