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