Commit a81735f6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

workaround against ALT bug 37272

parent 0391547b
...@@ -33,7 +33,7 @@ epm_Install() ...@@ -33,7 +33,7 @@ epm_Install()
yum-rpm) yum-rpm)
;; ;;
*) *)
pkg_filenames='' epm_update || return (pkg_filenames='' epm_update) || return
;; ;;
esac esac
......
...@@ -23,10 +23,10 @@ load_helper epm-upgrade ...@@ -23,10 +23,10 @@ load_helper epm-upgrade
epm_Upgrade() epm_Upgrade()
{ {
case $PMTYPE in case $PMTYPE in
yum-rpm) yum-rpm|dnf-rpm)
;; ;;
*) *)
pkg_filenames='' epm_update || return (pkg_filenames='' epm_update) || return
;; ;;
esac esac
......
...@@ -62,7 +62,7 @@ update_repo_if_needed() ...@@ -62,7 +62,7 @@ update_repo_if_needed()
if ! __is_repo_info_downloaded || ! __is_repo_info_uptodate ; then if ! __is_repo_info_downloaded || ! __is_repo_info_uptodate ; then
load_helper epm-update load_helper epm-update
# FIXME: cleans!!! # FIXME: cleans!!!
$(pkg_filenames='' epm_update) (pkg_filenames='' epm_update)
fi fi
cd - >/dev/null || fatal cd - >/dev/null || fatal
......
...@@ -88,12 +88,12 @@ _shortquery_via_packages_list() ...@@ -88,12 +88,12 @@ _shortquery_via_packages_list()
# Note: double call due stderr redirect # Note: double call due stderr redirect
# Note: we use short=1 here due grep by ^name$ # Note: we use short=1 here due grep by ^name$
# separate first line for print out command # separate first line for print out command
short=1 pkg_filenames=$firstpkg epm_packages | grep -- "$grepexp" && res=0 || res=1 (short=1 pkg_filenames=$firstpkg epm_packages | grep -- "$grepexp") && res=0 || res=1
local pkg local pkg
for pkg in "$@" ; do for pkg in "$@" ; do
grepexp=$(_get_grep_exp $pkg) grepexp=$(_get_grep_exp $pkg)
short=1 pkg_filenames=$pkg epm_packages 2>/dev/null | grep -- "$grepexp" || res=1 (short=1 pkg_filenames=$pkg epm_packages 2>/dev/null) | grep -- "$grepexp" || res=1
done done
# TODO: print in query (for user): 'warning: package $pkg is not installed' # TODO: print in query (for user): 'warning: package $pkg is not installed'
...@@ -116,12 +116,12 @@ _query_via_packages_list() ...@@ -116,12 +116,12 @@ _query_via_packages_list()
# Note: double call due stderr redirect # Note: double call due stderr redirect
# Note: we use short=1 here due grep by ^name$ # Note: we use short=1 here due grep by ^name$
# separate first line for print out command # separate first line for print out command
short=1 pkg_filenames=$firstpkg epm_packages | grep -q -- "$grepexp" && quiet=1 pkg_filenames=$firstpkg epm_packages && res=0 || res=1 (short=1 pkg_filenames=$firstpkg epm_packages) | grep -q -- "$grepexp" && (quiet=1 pkg_filenames=$firstpkg epm_packages) && res=0 || res=1
local pkg local pkg
for pkg in "$@" ; do for pkg in "$@" ; do
grepexp=$(_get_grep_exp $pkg) grepexp=$(_get_grep_exp $pkg)
short=1 pkg_filenames=$pkg epm_packages 2>/dev/null | grep -q -- "$grepexp" && quiet=1 pkg_filenames=$pkg epm_packages || res=1 (short=1 pkg_filenames=$pkg epm_packages 2>/dev/null) | grep -q -- "$grepexp" && (quiet=1 pkg_filenames=$pkg epm_packages) || res=1
done done
return $res return $res
......
...@@ -85,7 +85,7 @@ __alt_repofix() ...@@ -85,7 +85,7 @@ __alt_repofix()
local TO="$1" local TO="$1"
load_helper epm-repofix load_helper epm-repofix
showcmd epm repofix showcmd epm repofix
quiet=1 pkg_filenames='' epm_repofix >/dev/null (quiet=1 pkg_filenames='' epm_repofix >/dev/null)
# replace sign name # replace sign name
if [ -n "$TO" ] ; then if [ -n "$TO" ] ; then
__replace_text_in_alt_repo "/^ *#/! s!\[alt\]![$TO]!g" __replace_text_in_alt_repo "/^ *#/! s!\[alt\]![$TO]!g"
......
...@@ -127,7 +127,7 @@ EOF ...@@ -127,7 +127,7 @@ EOF
# use verbose for get package status # use verbose for get package status
#pkg_filenames="$pkg-[0-9]" verbose=--verbose __epm_search_internal | egrep "(installed|upgrade)" && continue #pkg_filenames="$pkg-[0-9]" verbose=--verbose __epm_search_internal | egrep "(installed|upgrade)" && continue
#pkg_filenames="$pkg" verbose=--verbose __epm_search_internal | egrep "(installed|upgrade)" && continue #pkg_filenames="$pkg" verbose=--verbose __epm_search_internal | egrep "(installed|upgrade)" && continue
pkg_filenames="$pkg" __epm_search_internal | grep -q "^$pkg-[0-9]" && continue (pkg_filenames="$pkg" __epm_search_internal) | grep -q "^$pkg-[0-9]" && continue
res=1 res=1
info "Package '$pkg' does not found in repository." info "Package '$pkg' does not found in repository."
done done
......
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