Commit a81735f6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

workaround against ALT bug 37272

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