Commit 78dda5ed authored by Vitaly Lipatov's avatar Vitaly Lipatov

add epm history command

parent cf87f1a9
...@@ -321,6 +321,9 @@ check_command() ...@@ -321,6 +321,9 @@ check_command()
mark) # HELPCMD: mark package as manually or automatically installed (see epm mark --help) mark) # HELPCMD: mark package as manually or automatically installed (see epm mark --help)
epm_cmd=mark epm_cmd=mark
;; ;;
history) # HELPCMD: show a log of actions taken by the software management
epm_cmd=history
;;
autoorphans|--orphans) # HELPCMD: remove all packages not from the repository autoorphans|--orphans) # HELPCMD: remove all packages not from the repository
epm_cmd=autoorphans epm_cmd=autoorphans
;; ;;
......
#!/bin/sh
#
# Copyright (C) 2023 Etersoft
# Copyright (C) 2023 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
epm_history()
{
[ -z "$*" ] || fatal "No arguments are allowed here"
case $PMTYPE in
apt-dpkg)
docmd less /var/log/dpkg.log
;;
dnf-rpm)
sudocmd dnf history
;;
zypper-rpm)
less /var/log/zypp/history
;;
pacman)
docmd less /var/log/pacman.log
;;
emerge)
docmd less /var/log/portage
;;
*)
fatal "Have no suitable command for $PMTYPE"
;;
esac
}
...@@ -157,7 +157,7 @@ check_command() ...@@ -157,7 +157,7 @@ check_command()
exit 0 exit 0
;; ;;
history | hist) # HELPCMD: Display, or use, the transaction history history | hist) # HELPCMD: Display, or use, the transaction history
fatal "Is not supported" epm_cmd=history
;; ;;
info) # HELPCMD: Display details about a package or group of packages info) # HELPCMD: Display details about a package or group of packages
epm_cmd=info epm_cmd=info
......
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