Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df1e528

Browse files
gjbgjb
authored andcommitted
Move build_doc_ports() to the if...fi block from which it is called.
Sponsored by: The FreeBSD Foundation
1 parent 91d0c7d commit df1e528

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

release/release.sh

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,6 @@ mount -t devfs devfs ${CHROOTDIR}/dev
173173
cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
174174
trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit
175175

176-
build_doc_ports() {
177-
# Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints
178-
# is created. This is needed by ports-mgmt/pkg.
179-
chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart
180-
181-
## Trick the ports 'run-autotools-fixup' target to do the right thing.
182-
_OSVERSION=$(sysctl -n kern.osreldate)
183-
if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then
184-
PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes"
185-
PBUILD_FLAGS="${PBUILD_FLAGS}"
186-
chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \
187-
${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean
188-
fi
189-
}
190-
191176
# If MAKE_CONF and/or SRC_CONF are set and not character devices (/dev/null),
192177
# copy them to the chroot.
193178
if [ -e ${MAKE_CONF} ] && [ ! -c ${MAKE_CONF} ]; then
@@ -200,7 +185,18 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CONF} ]; then
200185
fi
201186

202187
if [ -d ${CHROOTDIR}/usr/ports ]; then
203-
build_doc_ports ${CHROOTDIR}
188+
# Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints
189+
# is created. This is needed by ports-mgmt/pkg.
190+
chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart
191+
192+
## Trick the ports 'run-autotools-fixup' target to do the right thing.
193+
_OSVERSION=$(sysctl -n kern.osreldate)
194+
if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then
195+
PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes"
196+
PBUILD_FLAGS="${PBUILD_FLAGS}"
197+
chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \
198+
${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean
199+
fi
204200
fi
205201

206202
if [ "x${RELSTRING}" = "x" ]; then

0 commit comments

Comments
 (0)