Commit 143512ec authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm pack: rewrite and fix --repack logic

parent e038ffe4
...@@ -73,19 +73,26 @@ __epm_pack() ...@@ -73,19 +73,26 @@ __epm_pack()
# TODO: merge eepm.yaml here (common with $returntarname.eepm.yaml) # TODO: merge eepm.yaml here (common with $returntarname.eepm.yaml)
# add upstream_url: $URL too # add upstream_url: $URL too
# repack if needed # note: this repack related code here for follow reasons:
repacked_pkgs='' # * repack by default if we have repack rule
# repack to our target # * get repacked files
if __epm_repack_if_needed $returntarname ; then # * install (repacked) files
[ -n "$repacked_pkgs" ] || fatal "Can't repack $returntarname" # the most replacement is epm repack [--install] or epm install [--repack]
# if repack is forced or repack rule (not disabled) is exists
elif [ -n "$repack" ] || [ -z "$norepack" ] && __epm_have_repack_rule $returntarname ; then # FIXME: check for every package would be more reliable
__epm_repack $returntarname # by default
[ -n "$repacked_pkgs" ] || fatal "Can't repack $returntarname" dorepack='--repack'
fi # don't repack by default there is our pkg format
__epm_split_by_pkg_type $PKGFORMAT $returntarname && dorepack=''
# repack if we have a repack rule for it
[ -z "$norepack" ] && __epm_have_repack_rule $returntarname && dorepack='--repack'
# repack if forced
[ -n "$repack" ] && dorepack='--repack'
local pkgnames local pkgnames
if [ -n "$repacked_pkgs" ] ; then if [ -n "$dorepack" ] ; then
__epm_repack $returntarname
[ -n "$repacked_pkgs" ] || fatal "Can't repack $returntarname"
# remove packed file if we have repacked one # remove packed file if we have repacked one
rm -v $returntarname rm -v $returntarname
pkgnames="$repacked_pkgs" pkgnames="$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