Commit 34d80166 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: drop less using

parent 54b0ade5
......@@ -35,7 +35,7 @@ __epm_changelog_files()
case $(get_package_type $1) in
rpm)
assure_exists rpm
docmd_foreach "rpm -q -p --changelog" $@ | less
docmd_foreach "rpm -q -p --changelog" $@
;;
# deb)
#
......@@ -52,17 +52,17 @@ __epm_changelog_local_names()
case $PMTYPE in
apt-rpm|yum-rpm|dnf-rpm|urpm-rpm|zypper-rpm)
docmd_foreach "rpm -q --changelog" $@ | less
docmd_foreach "rpm -q --changelog" $@
;;
apt-dpkg|aptitude-dpkg)
docmd zcat /usr/share/doc/$1/changelog.Debian.gz | less
docmd zcat /usr/share/doc/$1/changelog.Debian.gz
;;
emerge)
assure_exists equery
docmd equery changes -f $1 | less
docmd equery changes -f $1
;;
pacman)
docmd pacman -Qc $1 | less
docmd pacman -Qc $1
;;
*)
fatal "Have no suitable command for $PMTYPE"
......@@ -76,7 +76,7 @@ __epm_changelog_unlocal_names()
case $PMTYPE in
apt-rpm)
__epm_changelog_apt $@ | less
__epm_changelog_apt "$1"
;;
#apt-dpkg)
# # FIXME: only first pkg
......@@ -86,14 +86,14 @@ __epm_changelog_unlocal_names()
# sudocmd yum clean all
# ;;
urpm-rpm)
docmd urpmq --changelog $@ | less
docmd urpmq --changelog "$1"
;;
#zypper-rpm)
# sudocmd zypper clean
# ;;
emerge)
assure_exists equery
docmd equery changes -f $1 | less
docmd equery changes -f "$1"
;;
*)
fatal "Have no suitable command for $PMTYPE. Try install the package firstly."
......@@ -109,6 +109,7 @@ epm_changelog()
__epm_changelog_files $pkg_files
# TODO: add less or bat
local pkg
for pkg in $pkg_names ; do
if is_installed $pkg ; then
......
......@@ -32,7 +32,7 @@ __alt_local_content_filelist()
update_alt_contents_index
local CI="$(cat $ALT_CONTENTS_INDEX_LIST)"
# TODO: safe way to use less
# TODO: safe way to use less or bat
#local OUTCMD="less"
#[ -n "$USETTY" ] || OUTCMD="cat"
OUTCMD="cat"
......@@ -110,7 +110,8 @@ __epm_filelist_file()
;;
esac
docmd $CMD $@ | less
# TODO: add less
docmd $CMD $@
}
__epm_filelist_name()
......@@ -138,7 +139,7 @@ __epm_filelist_name()
CMD="conary query --ls"
;;
pacman)
docmd pacman -Ql $@ | sed -e "s|.* ||g" | less
docmd pacman -Ql $@ | sed -e "s|.* ||g"
return
;;
emerge)
......@@ -167,7 +168,7 @@ __epm_filelist_name()
;;
slackpkg)
is_installed $@ || fatal "Query filelist for non installed packages is not implemented yet"
docmd awk 'BEGIN{desk=1}{if(/^FILE LIST:$/){desk=0} else if (desk==0) {print}}' /var/log/packages/${pkg_filenames}* | less
docmd awk 'BEGIN{desk=1}{if(/^FILE LIST:$/){desk=0} else if (desk==0) {print}}' /var/log/packages/${pkg_filenames}*
return
;;
*)
......@@ -175,7 +176,7 @@ __epm_filelist_name()
;;
esac
# TODO: add less
# TODO: add less or bat (for any output in the function)
docmd $CMD $@ && return
# TODO: may be we need check is installed before prev. line?
is_installed $@ || __epm_filelist_remote $@
......
......@@ -118,19 +118,19 @@ if [ $PMTYPE = "apt-rpm" ] ; then
return
;;
--installed) # HELPCMD: print only new installed packages
__alt_epm_history_installed | less
__alt_epm_history_installed
return
;;
--removed) # HELPCMD: print only removed packages
__alt_epm_history_removed #| less
__alt_epm_history_removed
return
;;
--updated) # HELPCMD: print only updated packages
__alt_epm_history_updated | less
__alt_epm_history_updated
return
;;
--list) # HELPCMD: (or empty) print all history entries
docmd journalctl -t apt-get
docmd journalctl $JCHAN
return
;;
"")
......
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