Kill run_template(), use setup_tmpl() instead.
--HG-- extra : convert_revision : 6aaf4f637d28f476e88c05ee8608e418642a01fa
This commit is contained in:
parent
d9dc381cfd
commit
dbb02a1930
6 changed files with 15 additions and 29 deletions
|
@ -45,7 +45,7 @@ install_pkg_deps()
|
|||
|
||||
msg_normal "Installing $saved_prevpkg dependency: $curpkgname."
|
||||
|
||||
run_template $curpkgname
|
||||
setup_tmpl $curpkgname
|
||||
check_build_depends_pkg
|
||||
if [ $? -eq 0 ]; then
|
||||
msg_normal "Dependency $curpkgname requires:"
|
||||
|
@ -123,7 +123,7 @@ install_dependencies_pkg()
|
|||
check_pkgdep_matched "${i}"
|
||||
[ $? -eq 0 ] && continue
|
||||
|
||||
run_template $pkgn
|
||||
setup_tmpl $pkgn
|
||||
check_build_depends_pkg
|
||||
if [ $? -eq 1 ]; then
|
||||
msg_normal "Installing $lpkgname dependency: $pkgn."
|
||||
|
@ -144,7 +144,7 @@ check_pkgdep_matched()
|
|||
[ -z "$pkg" ] && return 2
|
||||
|
||||
pkgname="$($XBPS_PKGDB_CMD getpkgdepname ${pkg})"
|
||||
run_template $pkgname
|
||||
setup_tmpl $pkgname
|
||||
|
||||
iver="$($XBPS_PKGDB_CMD version $pkgname)"
|
||||
if [ -n "$iver" ]; then
|
||||
|
@ -165,7 +165,7 @@ check_installed_pkg()
|
|||
[ -z "$pkg" ] && return 2
|
||||
|
||||
pkgname="$($XBPS_PKGDB_CMD getpkgname ${pkg})"
|
||||
run_template $pkgname
|
||||
setup_tmpl $pkgname
|
||||
|
||||
iver="$($XBPS_PKGDB_CMD version $pkgname)"
|
||||
if [ -n "$iver" ]; then
|
||||
|
|
|
@ -86,7 +86,7 @@ fetch_distfiles()
|
|||
if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then
|
||||
if [ -n "$upcksum" ]; then
|
||||
fetch_update_cksum $curfile
|
||||
run_template $pkgname
|
||||
setup_tmpl $pkgname
|
||||
fi
|
||||
|
||||
for i in ${checksum}; do
|
||||
|
@ -133,7 +133,7 @@ fetch_distfiles()
|
|||
|
||||
if [ -n "$upcksum" ]; then
|
||||
fetch_update_cksum $curfile
|
||||
run_template $pkgname
|
||||
setup_tmpl $pkgname
|
||||
fi
|
||||
|
||||
#
|
||||
|
|
|
@ -35,7 +35,7 @@ xbps_make_binpkg()
|
|||
pkgname=${subpkg}
|
||||
set_tmpl_common_vars
|
||||
xbps_make_binpkg_real
|
||||
run_template ${sourcepkg}
|
||||
setup_tmpl ${sourcepkg}
|
||||
done
|
||||
|
||||
[ -n "${subpackages}" ] && set_tmpl_common_vars
|
||||
|
|
|
@ -46,18 +46,19 @@ xbps_write_metadata_pkg()
|
|||
else
|
||||
spkgrev="${subpkg}-${version}"
|
||||
fi
|
||||
unset run_depends conf_files noarch triggers replaces \
|
||||
revision openrc_services essential keep_empty_dirs
|
||||
check_installed_pkg ${spkgrev}
|
||||
[ $? -eq 0 ] && continue
|
||||
|
||||
if [ ! -f $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template ]; then
|
||||
msg_error "Cannot find subpkg '${subpkg}' build template!"
|
||||
fi
|
||||
setup_tmpl ${sourcepkg}
|
||||
unset run_depends conf_files noarch triggers replaces \
|
||||
revision openrc_services essential keep_empty_dirs
|
||||
. $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template
|
||||
pkgname=${subpkg}
|
||||
set_tmpl_common_vars
|
||||
xbps_write_metadata_pkg_real
|
||||
setup_tmpl ${sourcepkg}
|
||||
done
|
||||
|
||||
if [ "$build_style" = "meta-template" -a -z "${run_depends}" ]; then
|
||||
|
@ -70,7 +71,7 @@ xbps_write_metadata_pkg()
|
|||
run_depends="${run_depends} ${spkgrev}"
|
||||
done
|
||||
fi
|
||||
set_tmpl_common_vars
|
||||
setup_tmpl ${sourcepkg}
|
||||
xbps_write_metadata_pkg_real
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ stow_pkg_handler()
|
|||
else
|
||||
unstow_pkg_real || return $?
|
||||
fi
|
||||
run_template ${sourcepkg}
|
||||
setup_tmpl ${sourcepkg}
|
||||
done
|
||||
|
||||
if [ "$action" = "stow" ]; then
|
||||
|
@ -80,7 +80,7 @@ stow_pkg_real()
|
|||
[ ! -d ${DESTDIR} ] && mkdir -p ${DESTDIR}
|
||||
fi
|
||||
|
||||
[ -n "$stow_flag" ] && run_template $pkgname
|
||||
[ -n "$stow_flag" ] && setup_tmpl $pkgname
|
||||
|
||||
cd ${DESTDIR} || exit 1
|
||||
|
||||
|
@ -120,7 +120,7 @@ unstow_pkg_real()
|
|||
msg_error "cannot unstow $pkgname! (permission denied)"
|
||||
fi
|
||||
|
||||
run_template $pkgname
|
||||
setup_tmpl $pkgname
|
||||
|
||||
ver=$($XBPS_PKGDB_CMD version $pkgname)
|
||||
if [ -z "$ver" ]; then
|
||||
|
|
|
@ -250,18 +250,3 @@ set_tmpl_common_vars()
|
|||
fi
|
||||
SRCPKGDESTDIR=${XBPS_DESTDIR}/${sourcepkg}-${version}
|
||||
}
|
||||
|
||||
run_template()
|
||||
{
|
||||
local pkg="$1"
|
||||
|
||||
if [ "$pkgname" != "$pkg" ]; then
|
||||
reset_tmpl_vars
|
||||
if [ ! -d $XBPS_SRCPKGDIR/$pkg -o \
|
||||
! -f $XBPS_SRCPKGDIR/$pkg/template ]; then
|
||||
msg_error "Cannot find $pkg build template file!"
|
||||
fi
|
||||
. $XBPS_SRCPKGDIR/$pkg/template
|
||||
set_tmpl_common_vars
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue