3
# Copyright (C) 2013, 2016, 2018 Etersoft
4
# Copyright (C) 2013, 2016, 2018 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/>.
25
[ -n "$pkg_files" ] && fatal "whatprovides does not handle files"
26
[ -n "$pkg_names" ] || fatal "whatprovides: package name is missed"
27
local pkg=$(print_name $pkg_names)
32
CMD="conary repquery --what-provides"
34
apt-rpm|apt-dpkg|aptitude-dpkg)
35
LC_ALL=C docmd apt-get install --print-uris $pkg | grep "^Selecting" | cut -f2 -d" "
39
CMD="yum whatprovides"
42
CMD="urpmq --whatprovides"
48
CMD="zypper what-provides"
51
CMD="opkg whatprovides"
54
fatal "Have no suitable command for $PMTYPE"