3
# Copyright (C) 2012, 2014, 2016, 2019 Etersoft
4
# Copyright (C) 2012, 2014, 2016, 2019 Vitaly Lipatov <lav@etersoft.ru>
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
24
if [ -n "$pkg_files" ] ; then
25
docmd rpm -qip $pkg_files
27
[ -z "$pkg_names" ] && return
28
is_installed $pkg_names && docmd rpm -qi $pkg_names && return
31
__epm_info_by_pkgtype()
33
[ -n "$pkg_files" ] || return 1
35
case $(get_package_type $pkg_files) in
37
__epm_info_rpm_low && return
40
docmd dpkg -I $pkg_files
52
if [ -n "$pkg_files" ] ; then
53
docmd dpkg -I $pkg_files
55
[ -z "$pkg_names" ] && return
56
is_installed $pkg_names && docmd dpkg -p $pkg_names && return
57
docmd apt-cache show $pkg_names
60
if [ -n "$pkg_files" ] ; then
61
docmd dpkg -I $pkg_files
63
[ -z "$pkg_names" ] && return
64
docmd aptitude show $pkg_names
67
__epm_info_rpm_low && return
70
docmd apt-cache show $pkg_names
73
docmd pkcon get-details $pkg_names
76
docmd yum info $pkg_names
79
docmd urpmq -i $pkg_names
82
docmd dnf info $pkg_names
85
docmd zypper info $pkg_names
88
warning "Unknown command for $PMTYPE"
93
# TODO: get-details-local
94
docmd pkcon get-details $pkg_names
97
is_installed $pkg_names && docmd pacman -Qi $pkg_names && return
98
docmd pacman -Si $pkg_names
101
is_installed $pkg_names && docmd pacman -Qi $pkg_names && return
102
docmd aura -Ai $pkg_names
106
docmd npackdcl info --package=$pkg_names
109
is_installed $pkg_names && docmd conary query $pkg_names --info && return
110
docmd conary repquery $pkg_names --info
114
docmd equery meta $pkg_names
115
docmd equery which $pkg_names
116
docmd equery uses $pkg_names
117
docmd equery size $pkg_names
120
docmd /usr/sbin/slackpkg info $pkg_names
123
docmd opkg info $pkg_names
126
docmd apk info $pkg_names
129
docmd pkg info $pkg_names
132
docmd xbps-query --show $pkg_names
135
docmd brew info $pkg_names
138
docmd apt-cyg show $pkg_names
141
docmd eopkg info $pkg_files $pkg_names
144
docmd appget view $pkg_names
147
docmd winget show $pkg_names
150
docmd pkg show $pkg_names
153
fatal "Have no suitable command for $PMTYPE"
159
# TODO: separate to _files and _names parts
160
# implement _files part per package, not by PMTYPE (see filelist)
164
# if possible, it will put pkg_urls into pkg_files or pkg_names
165
if [ -n "$pkg_urls" ] ; then
166
load_helper epm-download
167
__handle_pkg_urls_to_checking
170
[ -n "$pkg_filenames" ] || fatal "Info: package name is missed"
172
__epm_info_by_pkgtype || __epm_info_by_pmtype