diff options
author | Renato Botelho <renato@netgate.com> | 2016-10-26 16:16:16 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-10-26 16:16:16 -0200 |
commit | a014cf62398d27c6d89cfa02c610b4c89b227415 (patch) | |
tree | e3c7ad6e015ae39e716f626ccb10eb985e24741b /tools/builder_common.sh | |
parent | e37ecea9d1432934e0c1e6e8356ac1672ccff99e (diff) | |
download | pfsense-a014cf62398d27c6d89cfa02c610b4c89b227415.zip pfsense-a014cf62398d27c6d89cfa02c610b4c89b227415.tar.gz |
Make sure we consume staging packages on build process after pfSense-repo became a package
Diffstat (limited to 'tools/builder_common.sh')
-rw-r--r-- | tools/builder_common.sh | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 37b3bb1..19f3431 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -1249,6 +1249,15 @@ clone_to_staging_area() { # Make sure pkg is present pkg_bootstrap ${STAGE_CHROOT_DIR} + # Make sure correct repo is available on tmp dir + mkdir -p ${STAGE_CHROOT_DIR}/tmp/pkg-repos + setup_pkg_repo \ + ${PKG_REPO_DEFAULT} \ + ${STAGE_CHROOT_DIR}/tmp/pkg-repos/repo.conf \ + ${TARGET} \ + ${TARGET_ARCH} \ + staging + echo "Done!" } @@ -1349,6 +1358,9 @@ customize_stagearea_for_image() { ${BUILDER_TOOLS}/templates/custom_logos/${_image_variant}/*.png \ ${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/custom_logos fi + + # Remove temporary repo conf + rm -rf ${FINAL_CHROOT_DIR}/tmp/pkg-repos } create_distribution_tarball() { @@ -1709,7 +1721,12 @@ pkg_chroot() { /sbin/mount -t devfs devfs ${_root}/dev cp -f /etc/resolv.conf ${_root}/etc/resolv.conf touch ${BUILDER_LOGS}/install_pkg_install_ports.txt - script -aq ${BUILDER_LOGS}/install_pkg_install_ports.txt pkg -c ${_root} $@ >/dev/null 2>&1 + local _params="" + if [ -f "${_root}/tmp/pkg-repos/repo.conf" ]; then + _params="--repo-conf-dir /tmp/pkg-repos " + fi + script -aq ${BUILDER_LOGS}/install_pkg_install_ports.txt \ + pkg -c ${_root} ${_params}$@ >/dev/null 2>&1 local result=$? rm -f ${_root}/etc/resolv.conf /sbin/umount -f ${_root}/dev @@ -1791,24 +1808,13 @@ install_pkg_install_ports() { install_bsdinstaller() { local _params="" - # Use staging repo on RELEASE - if [ -n "${_IS_RELEASE}" ]; then - mkdir -p ${FINAL_CHROOT_DIR}/tmp/pkg-repo - cp -f ${STAGE_CHROOT_DIR}${PKG_REPO_PATH} \ - ${FINAL_CHROOT_DIR}/tmp/pkg-repo - _params="--repo-conf-dir /tmp/pkg-repo " - fi - echo ">>> Installing BSDInstaller in chroot (${FINAL_CHROOT_DIR})... (starting)" - pkg_chroot ${FINAL_CHROOT_DIR} ${_params}install -f bsdinstaller + pkg_chroot ${FINAL_CHROOT_DIR} install -f bsdinstaller sed -i '' -e "s,%%PRODUCT_NAME%%,${PRODUCT_NAME}," \ -e "s,%%PRODUCT_VERSION%%,${PRODUCT_VERSION}," \ -e "s,%%ARCH%%,${TARGET}," \ ${FINAL_CHROOT_DIR}/usr/local/share/dfuibe_lua/conf/pfSense.lua \ ${FINAL_CHROOT_DIR}/usr/local/share/dfuibe_lua/conf/pfSense_rescue.lua - if [ -n "${_IS_RELEASE}" ]; then - rm -rf ${FINAL_CHROOT_DIR}/tmp/pkg-repo - fi echo ">>> Installing BSDInstaller in chroot (${FINAL_CHROOT_DIR})... (finished)" } |