build/distfiles: use it whenever possible
This commit is contained in:
parent
64b65c8137
commit
5e0d2230ca
|
@ -57,5 +57,9 @@ for ARG in ${@}; do
|
|||
echo ">>> Removing release set"
|
||||
rm -f ${SETSDIR}/release-*-${PRODUCT_FLAVOUR}-${ARCH}.tar
|
||||
;;
|
||||
distfiles)
|
||||
echo ">>> Removing distfiles set"
|
||||
rm -f ${SETSDIR}/distfiles-*.tar
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
|
@ -276,6 +276,17 @@ setup_kernel()
|
|||
setup_marker ${1} ${KERNEL_VER%%.txz} kernel
|
||||
}
|
||||
|
||||
setup_distfiles()
|
||||
{
|
||||
echo ">>> Setting up distfiles in ${1}"
|
||||
|
||||
DISTFILES_SET=$(find ${SETSDIR} -name "distfiles-*.tar")
|
||||
if [ -n "${DISTFILES_SET}" ]; then
|
||||
mkdir -p ${1}${PORTSDIR}
|
||||
tar -C ${1}${PORTSDIR} -xpf ${DISTFILES_SET}
|
||||
fi
|
||||
}
|
||||
|
||||
extract_packages()
|
||||
{
|
||||
echo ">>> Extracting packages in ${1}"
|
||||
|
|
|
@ -29,21 +29,35 @@ set -e
|
|||
|
||||
. ./common.sh && $(${SCRUB_ARGS})
|
||||
|
||||
PORT_LIST=$(cat ${CONFIGDIR}/ports.conf)
|
||||
# clean all previous distfiles
|
||||
rm -rf ${PORTSDIR}/distfiles
|
||||
sh ./clean.sh distfiles
|
||||
|
||||
git_checkout ${PORTSDIR} HEAD
|
||||
PORT_LIST="ports-mgmt/pkg
|
||||
security/openssl
|
||||
security/libressl
|
||||
$(cat ${CONFIGDIR}/ports.conf)"
|
||||
|
||||
git_describe ${PORTSDIR}
|
||||
|
||||
MAKE_CONF="${CONFIGDIR}/make.conf"
|
||||
if [ -f ${MAKE_CONF} ]; then
|
||||
cp ${MAKE_CONF} ${STAGEDIR}/etc/make.conf
|
||||
fi
|
||||
|
||||
echo "ports-mgmt/pkg ${PORT_LIST}" | while read PORT_ORIGIN PORT_BROKEN; do
|
||||
echo "${PORT_LIST}" | while read PORT_ORIGIN PORT_BROKEN; do
|
||||
if [ "$(echo ${PORT_ORIGIN} | colrm 2)" = "#" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
echo -n ">>> Fetching ${PORT_ORIGIN}... "
|
||||
echo ">>> Fetching ${PORT_ORIGIN}..."
|
||||
|
||||
make -C ${PORTSDIR}/${PORT_ORIGIN} fetch
|
||||
make -C ${PORTSDIR}/${PORT_ORIGIN} fetch-recursive
|
||||
done
|
||||
|
||||
echo -n ">>> Creating distfiles set... "
|
||||
tar -C ${PORTSDIR} -cf ${SETSDIR}/distfiles-${REPO_VERSION}.tar distfiles
|
||||
echo "done"
|
||||
|
||||
# clean up again
|
||||
rm -rf ${PORTSDIR}/distfiles
|
||||
|
|
|
@ -36,6 +36,7 @@ setup_base ${STAGEDIR}
|
|||
setup_clone ${STAGEDIR} ${PORTSDIR}
|
||||
setup_clone ${STAGEDIR} ${SRCDIR}
|
||||
setup_chroot ${STAGEDIR}
|
||||
setup_distfiles ${STAGEDIR}
|
||||
|
||||
extract_packages ${STAGEDIR}
|
||||
remove_packages ${STAGEDIR} ${@}
|
||||
|
|
Loading…
Reference in New Issue