Commit ac514984 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm pack/repack: add sha256sum output for input files

parent dba43423
...@@ -34,6 +34,15 @@ __epm_pack_run_handler() ...@@ -34,6 +34,15 @@ __epm_pack_run_handler()
shift 4 shift 4
returntarname='' returntarname=''
if is_command sha256sum ; then
message "sha256sum:"
for i in $tarname ; do
message " $(sha256sum $i) $(basename $i)"
done
else
message "sha256sum is missed, can't print sha256 for packages..."
fi
local repackcode="$EPM_PACK_SCRIPTS_DIR/$packname.sh" local repackcode="$EPM_PACK_SCRIPTS_DIR/$packname.sh"
[ -s "$repackcode" ] || return [ -s "$repackcode" ] || return
[ -f "$repackcode.rpmnew" ] && warning 'There is .rpmnew file(s) in $EPM_PACK_SCRIPTS_DIR dir. The pack script can be outdated.' [ -f "$repackcode.rpmnew" ] && warning 'There is .rpmnew file(s) in $EPM_PACK_SCRIPTS_DIR dir. The pack script can be outdated.'
......
...@@ -207,6 +207,16 @@ __epm_repack() ...@@ -207,6 +207,16 @@ __epm_repack()
{ {
local pkg local pkg
repacked_pkgs='' repacked_pkgs=''
if is_command sha256sum ; then
message "sha256sum:"
for i in $pkg_files ; do
message " $(sha256sum $i) $(basename $i)"
done
else
message "sha256sum is missed, can't print sha256 for packages..."
fi
for pkg in $* ; do for pkg in $* ; do
__epm_repack_single "$pkg" || fatal 'Error with $pkg repacking.' __epm_repack_single "$pkg" || fatal 'Error with $pkg repacking.'
[ -n "$repacked_pkgs" ] && repacked_pkgs="$repacked_pkgs $repacked_pkg" || repacked_pkgs="$repacked_pkg" [ -n "$repacked_pkgs" ] && repacked_pkgs="$repacked_pkgs $repacked_pkg" || repacked_pkgs="$repacked_pkg"
...@@ -234,7 +244,6 @@ epm_repack() ...@@ -234,7 +244,6 @@ epm_repack()
[ -n "$pkg_names" ] && warning 'Can'\''t find $pkg_names files' [ -n "$pkg_names" ] && warning 'Can'\''t find $pkg_names files'
[ -z "$pkg_files" ] && info "Empty repack list was skipped" && return 22 [ -z "$pkg_files" ] && info "Empty repack list was skipped" && return 22
if __epm_repack $pkg_files && [ -n "$repacked_pkgs" ] ; then if __epm_repack $pkg_files && [ -n "$repacked_pkgs" ] ; then
if [ -n "$install" ] ; then if [ -n "$install" ] ; then
epm install $repacked_pkgs epm install $repacked_pkgs
......
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