From d244069eadf14d5a69aeb6647b0a1c831df879f6 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Mon, 20 Dec 2010 06:29:14 -0600 Subject: [PATCH] script/makepkg: add make.conf tweak for read-only ports tree; make sure config dir exists for port_save_config --- script/makepkg | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/script/makepkg b/script/makepkg index 2ca6099..0d4d87d 100755 --- a/script/makepkg +++ b/script/makepkg @@ -24,6 +24,9 @@ chprepare() { # Just in case we're aborted partway through the prepare trap "chdestroy" exit hup int term kill + # Make sure config dir exists for later save + [ -d "${conf_dir}" ] || mkdir -p "${conf_dir}" + # Populate initial seed mkdir -p "$(dirname "${chroot_dir}")" || wtf "chroot path create failed" cp -pR "${seed_dir}" "${chroot_dir}" || wtf "chroot seeding failed" @@ -51,6 +54,15 @@ chprepare() { [ -f "${chroot_dir}/usr/bin/makeinfo" ] || ln -sf true "${chroot_dir}/usr/bin/makeinfo" [ -f "${chroot_dir}/usr/bin/install-info" ] || ln -sf true "${chroot_dir}/usr/bin/install-info" + # Tweak make.conf to support read-only ports tree + cat <> "${chroot_dir}/etc/make.conf" + +# Read-only ports tree +DISTDIR=/var/ports/distfiles +PACKAGES=/var/ports/packages +WRKDIRPREFIX=/usr/obj +EOF + trap "" exit hup int term kill meh "Chroot tree set up in ${chroot_dir}" -- 2.42.0