Commit 968ccfe1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-info: add support for local rpm and deb files

parent a2a7253a
...@@ -28,19 +28,25 @@ __epm_info_rpm_low() ...@@ -28,19 +28,25 @@ __epm_info_rpm_low()
is_installed $pkg_names && docmd rpm -qi $pkg_names && return is_installed $pkg_names && docmd rpm -qi $pkg_names && return
} }
# TODO: separate to _files and _names parts __epm_info_by_pkgtype()
# implement _files part per package, not by PMTYPE (see filelist)
epm_info()
{ {
[ -n "$pkg_files" ] || return 1
# if possible, it will put pkg_urls into pkg_files or pkg_names case $(get_package_type $pkg_files) in
if [ -n "$pkg_urls" ] ; then rpm)
load_helper epm-download __epm_info_rpm_low && return
__handle_pkg_urls_to_checking ;;
fi deb)
docmd dpkg -I $pkg_files
[ -n "$pkg_filenames" ] || fatal "Info: missing package(s) name" ;;
*)
return 1
;;
esac
}
__epm_info_by_pmtype()
{
case $PMTYPE in case $PMTYPE in
apt-rpm) apt-rpm)
__epm_info_rpm_low && return __epm_info_rpm_low && return
...@@ -122,6 +128,23 @@ case $PMTYPE in ...@@ -122,6 +128,23 @@ case $PMTYPE in
fatal "Have no suitable command for $PMTYPE" fatal "Have no suitable command for $PMTYPE"
;; ;;
esac esac
}
# TODO: separate to _files and _names parts
# implement _files part per package, not by PMTYPE (see filelist)
epm_info()
{
# if possible, it will put pkg_urls into pkg_files or pkg_names
if [ -n "$pkg_urls" ] ; then
load_helper epm-download
__handle_pkg_urls_to_checking
fi
[ -n "$pkg_filenames" ] || fatal "Info: missing package(s) name"
__epm_info_by_pkgtype || __epm_info_by_pmtype
local RETVAL=$? local RETVAL=$?
......
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