Commit 41cb3027 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm print: use local file for query_package_field only if it has .rpm extension

parent 1de7b30f
......@@ -24,9 +24,11 @@ query_package_field()
{
local FORMAT="%{$1}\n"
shift
local INSTALLED="-p"
# if not file, drop -p for get from rpm base
[ -f "$1" ] || INSTALLED=""
local INSTALLED=""
# if a file, ad -p for get from rpm base
if [ -f "$1" ] && [ "$(get_package_type "$1")" = "rpm" ] ; then
INSTALLED="-p"
fi
a= rpmquery $INSTALLED --queryformat "$FORMAT" "$@"
}
......
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