Commit 5eec5a83 authored by Boris Yumankulov's avatar Boris Yumankulov Committed by Vitaly Lipatov

epm status: added --supported argument

parent 558b0189
......@@ -114,6 +114,19 @@ epm_status_certified()
}
epm_status_supported() {
local distro
distro=$(epm print info -s)
case "$distro" in
alt|redos|rosa*|mos|fedora)
return 0
;;
*)
return 1
;;
esac
}
# check if the package is really package (check accessibility)
epm_status_validate()
{
......@@ -264,6 +277,7 @@ Options:
--thirdparty check if <package> from a third-party source (didn'\''t packed for this distro)
--repacked check if <package> was repacked with epm repack
--validate check if <package> is accessible (we can get a fields from it)
--supported check if distribution is supported by epm status
'
}
......@@ -312,6 +326,10 @@ epm_status()
epm_status_installable "$@"
return
;;
--supported)
epm_status_supported
return
;;
-*)
fatal 'Unknown option $option, use epm status --help to get info'
;;
......
......@@ -319,10 +319,7 @@ is_repacked_package()
epm status --installed $pkg || return 0
# actually only for ALT, RedOS, Rosa Fresh, MOS Desktop and Fedora
if [ "$(epm print info -s)" != "alt" ] && [ "$(epm print info -s)" != "redos" ] && [ "$(epm print info -s)" != "rosa*" ] && [ "$(epm print info -s)" != "mos" ] && [ "$(epm print info -s)" != "fedora" ] ; then
return 0
fi
epm status --supported || return 1
[ -n "$force" ] && return 0
......
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