Pārlūkot izejas kodu

Merge pull request #20124 from calavera/fix_vendor_codec_cleanup

Do not purge github.com/ugorji/go/codec from vendor.
Brian Goff 9 gadi atpakaļ
vecāks
revīzija
944e4cab2e
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 9 0
      hack/.vendor-helpers.sh

+ 9 - 0
hack/.vendor-helpers.sh

@@ -117,10 +117,19 @@ clean() {
 		# This directory contains only .c and .h files which are necessary
 		-path vendor/src/github.com/mattn/go-sqlite3/code
 	)
+
+	# This package is required to build the Etcd client,
+	# but Etcd hard codes a local Godep full path.
+	# FIXME: fix_rewritten_imports fixes this problem in most platforms
+	# but it fails in very small corner cases where it makes the vendor
+	# script to remove this package.
+	# See: https://github.com/docker/docker/issues/19231
+	findArgs+=( -or -path vendor/src/github.com/ugorji/go/codec )
 	for import in "${imports[@]}"; do
 		[ "${#findArgs[@]}" -eq 0 ] || findArgs+=( -or )
 		findArgs+=( -path "vendor/src/$import" )
 	done
+
 	local IFS=$'\n'
 	local prune=( $($find vendor -depth -type d -not '(' "${findArgs[@]}" ')') )
 	unset IFS