aboutsummaryrefslogtreecommitdiff
path: root/release/scripts
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2015-01-08 15:42:10 +0000
committerGlen Barber <gjb@FreeBSD.org>2015-01-08 15:42:10 +0000
commit0669938973db3c2d3e0a70664504739060e8ec7a (patch)
tree652d6b06533ee8ed0e9e5febc6eb97b9ddb275e8 /release/scripts
parentd31d9a42bf7b0ddb742047d180f046b9e09384f4 (diff)
downloadsrc-0669938973db3c2d3e0a70664504739060e8ec7a.tar.gz
src-0669938973db3c2d3e0a70664504739060e8ec7a.zip
Ensure the ports directories exist for the list of
packages intended to be included on the DVD, and remove any nonexistent ports from the final list. Print the list of missing paths, and ensure that DVD_PACKAGES is non-zero length (which should never happen). MFC after: 3 days X-MFC-With: r276820, r276822 Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=276827
Diffstat (limited to 'release/scripts')
-rwxr-xr-xrelease/scripts/pkg-stage.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh
index b1639b82f041..9879821f8b21 100755
--- a/release/scripts/pkg-stage.sh
+++ b/release/scripts/pkg-stage.sh
@@ -11,7 +11,7 @@ export PERMISSIVE="YES"
export REPO_AUTOUPDATE="NO"
export PKGCMD="/usr/sbin/pkg -d"
-DVD_PACKAGES="archivers/unzip
+_DVD_PACKAGES="archivers/unzip
devel/subversion
devel/subversion-static
emulators/linux_base-f10
@@ -54,6 +54,25 @@ if [ ! -z "${PKG_ALTABI}" ]; then
(cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI})
fi
+# Ensure the ports listed in _DVD_PACKAGES exist to sanitize the
+# final list.
+for _P in ${_DVD_PACKAGES}; do
+ if [ -d "/usr/ports/${_P}" ]; then
+ DVD_PACKAGES="${DVD_PACKAGES} ${_P}"
+ else
+ echo "*** Skipping nonexistent port: ${_P}"
+ fi
+done
+
+# Make sure the package list is not empty.
+if [ -z "${DVD_PACKAGES}" ]; then
+ echo "*** The package list is empty."
+ echo "*** Something is very wrong."
+ # Exit '0' so the rest of the build process continues
+ # so other issues (if any) can be addressed as well.
+ exit 0
+fi
+
# Print pkg(8) information to make debugging easier.
${PKGCMD} -vv
${PKGCMD} update -f