pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gopkgdep: Try following the repos that "go get" downloads.



Module Name:	pkgsrc-wip
Committed By:	Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By:	bsiegert
Date:		Thu Apr 13 19:27:06 2017 +0200
Changeset:	5368c997852b70130562c0fb1f990df855baadac

Modified Files:
	gopkgdep/files/gopkgdep.sh

Log Message:
gopkgdep: Try following the repos that "go get" downloads.

There is a new section in the output of gopkgdep that lists all repos that
"go get" needed to, well, get for this package. Perhaps that's exactly the
signal we need.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5368c997852b70130562c0fb1f990df855baadac

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gopkgdep/files/gopkgdep.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diffs:
diff --git a/gopkgdep/files/gopkgdep.sh b/gopkgdep/files/gopkgdep.sh
index 7cf78afab1..5a6d1dffe3 100755
--- a/gopkgdep/files/gopkgdep.sh
+++ b/gopkgdep/files/gopkgdep.sh
@@ -12,13 +12,17 @@ fi
 
 GOPATH=$(mktemp -d -t ${ME}) || exit 2
 export GOPATH
+OUT_TMPFILE=$(mktemp -t ${ME}-out) || exit 2
 
 echo "=> Downloading code for $1"
-go get "$1/..."
+go get -v "$1/..." 2> ${OUT_TMPFILE}
+
+echo "=> Repositories downloaded"
+awk '/\(download\)/ { print $1 }' ${OUT_TMPFILE}
 
 echo "=> Recursive dependencies (excluding stdlib)"
 go list -f '{{range .Deps}}{{.}}
 {{end}}' "$1/..." \
 	| sort -u \
 	| xargs go list -e -f '{{if not .Standard}}{{.ImportPath}}{{end}}' \
-	| grep -v "^$1"
\ No newline at end of file
+	| grep -v "^$1"


Home | Main Index | Thread Index | Old Index