sourcegraph / srclib

srclib is a polyglot code analysis library, built for hackability. It consists of language analysis toolchains (currently for Go and Java, with Python, JavaScript, and Ruby in beta) with a common output format, and a CLI tool for running the analysis.
https://srclib.org
Other
942 stars 62 forks source link

cli: revert a part of PR #212 #217

Closed slimsag closed 8 years ago

slimsag commented 8 years ago

This change reverts a part of PR #212 / 3dcee737b542f81af862a93449eb9deb855cce3f which removed a hack on the pretense that it worked fine locally without it. Although it is true that it works fine without it locally (e.g. running srclib config -m docker works), we are seeing failures to build the github.com/golang/go repository due to file permission errors:

##### Building Go bootstrap tool. cmd/dist
# _/src/src/cmd/dist cannot create cmd/dist/dist: Permission denied
PreConfigCommands: command "\nif [ -d /home/srclib ]; then\ncurl -L 'https://storage.googleapis.com/golang/go1.4.1.linux-amd64.tar.gz' > /tmp/go1.4.tgz &&\nmkdir /home/srclib/go1.4 &&\ntar -xf /tmp/go1.4.tgz -C /home/srclib/go1.4 --strip-components=1\nfi &&\ncd src\n./make.bash\n": exit status 2

Suspected is that older Docker versions handle the file permissions differently, thus it works locally but not in prod.

slimsag commented 8 years ago

It would be nice to be able to verify that this is indeed the issue before merging it back in, since it's clearly marked as a HACK. Unfortunately I cannot reproduce the issue locally.

beyang commented 8 years ago

It's a harmless hack, so let's just try it.

slimsag commented 8 years ago

Good news: I've managed to confirm that this does indeed fix the issue on our workers (i.e. Docker version 1.6.2, build 7c8fca2).