Commit c05cacee authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm repack: fix error code

parent 8bf0f2d4
......@@ -309,11 +309,11 @@ epm_install_files()
ALTLinux|ALTServer)
# TODO: replace with name changed function
__epm_check_if_try_install_pkgtype deb $@ && return
__epm_check_if_try_install_pkgtype AppImage $@ && return
__epm_check_if_try_install_pkgtype deb $@ && return $RES
__epm_check_if_try_install_pkgtype AppImage $@ && return $RES
__epm_check_if_src_rpm $@
# do not using low-level for install by file path (FIXME: reasons?)
# do not use low-level for install by file path (FIXME: reasons?)
if ! is_dirpath "$@" || [ "$(get_package_type "$@")" = "rpm" ] ; then
__epm_check_vendor $@
__epm_check_if_needed_repack $@
......@@ -356,8 +356,8 @@ epm_install_files()
;;
*-rpm)
__epm_check_if_try_install_pkgtype deb $@ && return
__epm_check_if_try_install_pkgtype AppImage $@ && return
__epm_check_if_try_install_pkgtype deb $@ && return $RES
__epm_check_if_try_install_pkgtype AppImage $@ && return $RES
__epm_check_if_src_rpm $@
sudocmd rpm -Uvh $force $noscripts $nodeps $@ && return
local RES=$?
......
......@@ -247,8 +247,7 @@ __epm_repack_to_rpm()
./$alpkg --appimage-extract || fatal
alpkg=$PKGNAME-$VERSION.tar
erc a $alpkg squashfs-root
fi
else
VERSION="$(echo "$alpkg" | grep -o -P "[-_.]([0-9])([0-9])*(\.[0-9])*" | head -n1 | sed -e 's|^[-_.]||')" #"
if [ -n "$VERSION" ] ; then
PKGNAME="$(echo "$alpkg" | sed -e "s|[-_.]$VERSION.*||")"
......@@ -264,6 +263,7 @@ __epm_repack_to_rpm()
alpkg=$newalpkg
fi
fi
fi
cd $tmpbuilddir/ || fatal
......@@ -320,16 +320,17 @@ __epm_repack_to_rpm()
true
}
# FIXME: Нужно как-то обеспечить непродолжение выполнения.
__epm_check_if_try_install_pkgtype()
{
local PKG="$1"
shift
__epm_split_by_pkg_type $PKG "$@" || return 1
__epm_repack_to_rpm $split_replaced_pkgs || fatal
__epm_repack_to_rpm $split_replaced_pkgs || { RES=$? ; return 0 ; }
# TODO: move to install
docmd epm install $repacked_rpms
local RES=$?
RES=$?
# TODO: move it to exit handler
if [ -z "$DEBUG" ] ; then
# TODO: reinvent
......@@ -338,7 +339,7 @@ __epm_check_if_try_install_pkgtype()
[ -n "$to_remove_pkg_dirs" ] && rmdir $to_remove_pkg_dirs 2>/dev/null
fi
return $RES
return 0
}
......
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