Commit 3bae6d39 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm changelog: improve support for deb systems

parent fe706525
...@@ -27,6 +27,19 @@ __epm_changelog_apt() ...@@ -27,6 +27,19 @@ __epm_changelog_apt()
done done
} }
__epm_changelog_dpkg()
{
local i
tmpdir="$(mktemp -d)" || fatal
remove_on_exit "$tmpdir"
for i in $@ ; do
docmd dpkg-deb -x $i $tmpdir/extract || fatal
docmd zcat $tmpdir/extract/usr/share/doc/*/changelog*.gz
rm -rf $tmpdir/extract
done
}
__epm_changelog_files() __epm_changelog_files()
{ {
[ -z "$*" ] && return [ -z "$*" ] && return
...@@ -37,9 +50,9 @@ __epm_changelog_files() ...@@ -37,9 +50,9 @@ __epm_changelog_files()
assure_exists rpm assure_exists rpm
docmd_foreach "rpm -q -p --changelog" $@ docmd_foreach "rpm -q -p --changelog" $@
;; ;;
# deb) deb)
# __epm_changelog_dpkg "$@"
# ;; ;;
*) *)
fatal 'Have no suitable command for $1 in epm_changelog()' fatal 'Have no suitable command for $1 in epm_changelog()'
;; ;;
...@@ -78,13 +91,14 @@ __epm_changelog_unlocal_names() ...@@ -78,13 +91,14 @@ __epm_changelog_unlocal_names()
apt-rpm) apt-rpm)
__epm_changelog_apt "$1" __epm_changelog_apt "$1"
;; ;;
#apt-dpkg)
# # FIXME: only first pkg
# docmd zcat /usr/share/doc/$1/changelog.Debian.gz | less
# ;;
#yum-rpm) #yum-rpm)
# sudocmd yum clean all # sudocmd yum clean all
# ;; # ;;
apt-dpkg)
#assure_exist apt
#docmd apt changelog "$1"
docmd apt-get changelog "$1"
;;
urpm-rpm) urpm-rpm)
docmd urpmq --changelog "$1" docmd urpmq --changelog "$1"
;; ;;
......
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