xbps-src-doinst-helper is run via fakeroot so set build vars before and after!
This commit is contained in:
parent
823f820827
commit
2850e6ed79
|
@ -88,8 +88,6 @@ install_src_phase()
|
|||
|| msg_error "can't change cwd to build_wrksrc!"
|
||||
fi
|
||||
|
||||
set_build_vars
|
||||
|
||||
# Run pre_install func.
|
||||
run_func pre_install 2>${wrksrc}/.xbps_pre_install.log
|
||||
if [ $? -ne 0 ]; then
|
||||
|
@ -168,14 +166,12 @@ install_src_phase()
|
|||
. $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template
|
||||
pkgname=${subpkg}
|
||||
set_tmpl_common_vars
|
||||
set_build_vars
|
||||
run_func do_install 2>${wrksrc}/.xbps_do_install_${pkgname}.log
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "$pkgname: do_install() failed:"
|
||||
cat ${wrksrc}/.xbps_do_install_${pkgname}.log
|
||||
exit 1
|
||||
fi
|
||||
unset_build_vars
|
||||
done
|
||||
|
||||
#
|
||||
|
@ -185,8 +181,6 @@ install_src_phase()
|
|||
rm -rf $saved_wrksrc && \
|
||||
msg_normal "Removed $sourcepkg-$lver build directory."
|
||||
fi
|
||||
|
||||
unset_build_vars
|
||||
}
|
||||
|
||||
#
|
||||
|
|
|
@ -96,11 +96,13 @@ install_pkg()
|
|||
fi
|
||||
|
||||
# Install pkg into destdir.
|
||||
set_build_vars
|
||||
env xbps_machine=${xbps_machine} MASTERDIR=${_MASTERDIR} \
|
||||
dontrm_builddir=${dontrm_builddir} \
|
||||
${fakeroot_cmd} ${fakeroot_cmd_args} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-doinst-helper \
|
||||
${curpkgn} || return $?
|
||||
unset_build_vars
|
||||
|
||||
# Always write metadata to package's destdir.
|
||||
. $XBPS_SHUTILSDIR/metadata.sh
|
||||
|
|
Loading…
Reference in New Issue