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

epm: drop less using

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