diff options
author | Renato Botelho <renato@netgate.com> | 2016-04-07 16:38:55 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-04-07 16:38:55 -0300 |
commit | b431437e4c285aef345e0d46aba6c9dea18f4a19 (patch) | |
tree | c6a2227acb7e07204bf3be4ac1ff1342c3b2484b /tools/builder_common.sh | |
parent | 9d935a090d6d22bfbfb6ea27d380a1dc5475573d (diff) | |
download | pfsense-b431437e4c285aef345e0d46aba6c9dea18f4a19.zip pfsense-b431437e4c285aef345e0d46aba6c9dea18f4a19.tar.gz |
Replace packagesite URL with final URL for RELEASE
Diffstat (limited to 'tools/builder_common.sh')
-rw-r--r-- | tools/builder_common.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 59f3e31..55384d7 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -1304,6 +1304,18 @@ customize_stagearea_for_image() { fi pkg_chroot_add ${FINAL_CHROOT_DIR} ${_default_config} + + # XXX: Workaround to avoid pkg to complain regarding release + # repo on first boot since packages are installed from + # staging server during build phase + if [ "${PKG_REPO_SERVER}" != "${PKG_REPO_SERVER_RELEASE}" ]; then + _read_cmd="select value from repodata where key='packagesite'" + for _db in ${FINAL_CHROOT_DIR}/var/db/pkg/repo-*sqlite; do + _cur=$(/usr/local/bin/sqlite3 ${_db} "${_read_cmd}") + _new=$(echo "${_cur}" | sed -e "s,^${PKG_REPO_SERVER},${PKG_REPO_SERVER_RELEASE},") + /usr/local/bin/sqlite3 ${_db} "update repodata set value='${_new}' where key='packagesite'" + done + fi } create_distribution_tarball() { |