Commit 54bb2d17 authored by Vitaly Lipatov's avatar Vitaly Lipatov

use short names when possible

parent 74f3e1cb
......@@ -18,6 +18,7 @@
#
load_helper epm-query
load_helper epm-print
# TODO: port or rewrite apt-file
# https://bugzilla.altlinux.org/show_bug.cgi?id=14449
......@@ -53,13 +54,13 @@ __epm_filelist_remote()
case $PMTYPE in
apt-rpm)
# TODO: use RESTful interface to prometeus? See ALT bug #29496
docmd_foreach __alt_local_content_filelist $@
docmd_foreach __alt_local_content_filelist $(print_name $@)
;;
apt-dpkg)
assure_exists apt-file || return
# if sudo requires a password, skip autoupdate
sudo -n true 2>/dev/null && sudocmd apt-file update || info "sudo requires a password, skip apt-file update"
docmd_foreach __deb_local_content_filelist $@
docmd_foreach __deb_local_content_filelist $(print_name $@)
;;
*)
fatal "Query filelist for non installed packages does not realized"
......
......@@ -18,6 +18,7 @@
#
load_helper epm-query
load_helper epm-print
epm_provides_files()
{
......@@ -105,5 +106,5 @@ epm_provides()
[ -n "$pkg_filenames" ] || fatal "Provides: missing package(s) name"
epm_provides_files $pkg_files
epm_provides_names $pkg_names
epm_provides_names $(print_name $pkg_names)
}
......@@ -18,6 +18,7 @@
#
load_helper epm-packages
load_helper epm-print
_get_grep_exp()
......@@ -185,5 +186,5 @@ epm_query()
__epm_query_file $pkg_files || return
__epm_query_name $pkg_names || return
__epm_query_name $(print_name $pkg_names) || return
}
......@@ -18,6 +18,7 @@
#
load_helper epm-query
load_helper epm-print
epm_requires_files()
{
......@@ -104,5 +105,5 @@ epm_requires()
{
[ -n "$pkg_filenames" ] || fatal "Requires: missing package(s) name"
epm_requires_files $pkg_files
epm_requires_names $pkg_names
epm_requires_names $(print_name $pkg_names)
}
......@@ -17,10 +17,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
load_helper epm-print
epm_whatdepends()
{
local CMD
[ -n "$pkg_filenames" ] || fatal "Whatdepends: missing package(s) name"
[ -n "$pkg_files" ] && fatal "whatdepends do not handle files"
[ -n "$pkg_names" ] || fatal "whatdepends: missing package(s) name"
local pkg=$(print_name $pkg_names)
# by package name
case $PMTYPE in
......@@ -48,6 +52,6 @@ case $PMTYPE in
;;
esac
docmd $CMD $pkg_filenames
docmd $CMD $pkg
}
......@@ -17,10 +17,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
load_helper epm-print
epm_whatprovides()
{
local CMD
[ -n "$pkg_filenames" ] || fatal "Whatprovides: missing package(s) name"
[ -n "$pkg_files" ] && fatal "whatprovides does not handle files"
[ -n "$pkg_names" ] || fatal "whatprovides: missing package(s) name"
local pkg=$(print_name $pkg_names)
# by package name
case $PMTYPE in
......@@ -28,7 +32,7 @@ case $PMTYPE in
CMD="conary repquery --what-provides"
;;
apt-rpm|apt-dpkg|aptitude-dpkg)
LANG=C docmd apt-get install --print-uris $pkg_filenames | grep "^Selecting" | cut -f2 -d" "
LANG=C docmd apt-get install --print-uris $pkg | grep "^Selecting" | cut -f2 -d" "
return
;;
yum-rpm)
......@@ -42,6 +46,6 @@ case $PMTYPE in
;;
esac
docmd $CMD $pkg_filenames
docmd $CMD $pkg
}
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