3
# Copyright (C) 2012, 2016 Etersoft
4
# Copyright (C) 2012, 2016 Vitaly Lipatov <lav@etersoft.ru>
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
26
docmd apt-cache show $i | grep -A 1000 "^Changelog:"
30
__epm_changelog_files()
34
# TODO: detect every file
35
case $(get_package_type $1) in
38
docmd_foreach "rpm -q -p --changelog" $@
44
fatal "Have no suitable command for $1"
49
__epm_changelog_local_names()
54
apt-rpm|yum-rpm|dnf-rpm|urpm-rpm|zypper-rpm)
55
docmd_foreach "rpm -q --changelog" $@
57
apt-dpkg|aptitude-dpkg)
58
docmd zcat /usr/share/doc/$1/changelog.Debian.gz
62
docmd equery changes -f $1
68
fatal "Have no suitable command for $PMTYPE"
73
__epm_changelog_unlocal_names()
79
__epm_changelog_apt "$1"
82
# # FIXME: only first pkg
83
# docmd zcat /usr/share/doc/$1/changelog.Debian.gz | less
86
# sudocmd yum clean all
89
docmd urpmq --changelog "$1"
92
# sudocmd zypper clean
96
docmd equery changes -f "$1"
99
fatal "Have no suitable command for $PMTYPE. Try install the package firstly."
108
[ -n "$pkg_filenames" ] || fatal "Changelog: Missing package(s) name"
110
__epm_changelog_files $pkg_files
112
# TODO: add less or bat
114
for pkg in $pkg_names ; do
115
if is_installed $pkg ; then
116
__epm_changelog_local_names $pkg
118
__epm_changelog_unlocal_names $pkg