Commit 6890a5d6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-whatdepends: allow --short mode, disable verbose mode by default

parent 51c4e5bd
Не воспроизводится:
epmqp --short wine
(--short удаляет всё, что больше wine (не может правильно оторвать версию)
......
......@@ -70,6 +70,8 @@ print_version_release()
echo "$1" | xargs -n1 echo | sed -e "s|$PKGNAMEMASK|\2-\3|g"
}
# get package name only by package filename
# TODO: see also __epm_get_hilevel_name()
print_pkgname()
{
local i
......
......@@ -31,9 +31,16 @@ epm_whatdepends()
# by package name
case $PMTYPE in
apt-rpm)
if [ -n "$short" ] ; then
if [ -z "$verbose" ] ; then
showcmd apt-cache whatdepends $pkg
a= apt-cache whatdepends $pkg | grep "^ [^ ]" | sed -e "s|[0-9]*:||" | grep -E -v "(i586-|-debuginfo)"
if [ -n "$short" ] ; then
# TODO: use common converter from full name to short name
# TODO: see print_pkgname
a= apt-cache whatdepends $pkg | grep "^ [^ ]" | sed -e "s|[0-9]*:||" | grep -E -v "(i586-|-debuginfo)" | sed -e 's|[@:].*||' -e "s|-[0-9].*||g" -e 's|^ *||' -e 's/\.32bit//g'
else
load_helper epm-query
a= apt-cache whatdepends $pkg | grep "^ [^ ]" | sed -e "s|[0-9]*:||" | grep -E -v "(i586-|-debuginfo)"
fi
return
fi
CMD="apt-cache whatdepends"
......
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