VPP-64: Fix top-level "make pkg-deb" which breaks if CDPATH is set in the user's 20/1120/3
authorDave Wallace <dwallacelf@gmail.com>
Sat, 14 May 2016 02:49:36 +0000 (22:49 -0400)
committerDave Barach <openvpp@barachs.net>
Mon, 16 May 2016 11:47:05 +0000 (11:47 +0000)
bash environment.

Change-Id: Ib13e6fdafa67175937e57fad4e75e553cb1e08a3
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
build-root/scripts/find-dpdk-contents

index f8c80b5..c706513 100755 (executable)
@@ -5,6 +5,15 @@ rm -rf dpdk-includes
 mkdir dpdk-includes
 (cd $1/dpdk/include; tar cfh - . | (cd ../../../dpdk-includes; tar xf -))
 
+# If CDPATH is set, the "Change Directory" builtin (cd) will output the
+# destination directory when a relative path is passed as an argument.
+# In this case, this has the negative side effect of polluting the "paths"
+# variable with the destination directory, breaking the package generation.
+#
+#   Patient:  Doctor!  Doctor!  It hurts when I do this...
+#    Doctor:  Don't do that!
+#
+unset CDPATH
 paths=`cd dpdk-includes; find . -type f -print`
 rm -f $2