Conversation
| print self.builddir | ||
| if LooseVersion(self.version) < LooseVersion('1.7'): | ||
| # uncompress java6 to build dir | ||
| cmd = 'cd %s; yes | bash %s' % (self.builddir, self.src[0]['path']) |
There was a problem hiding this comment.
seems like you should use run_cmd_qa instead? what type of question is being asked?
There was a problem hiding this comment.
this is what you get...you just need to press enter that's why I did the yes trick...seems simpler to me but I will implement it as you prefer...
Java(TM) SE Development Kit 6 successfully installed.
Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Oracle products, services and training
* Access to early releases and documentation
Product and system data will be collected. If your configuration
supports a browser, the JDK Product Registration form will
be presented. If you do not register, none of this information
will be saved. You may also register your JDK later by
opening the register.html file (located in the JDK installation
directory) in a browser.
For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html
Press Enter to continue.....
Done.
There was a problem hiding this comment.
@pescobar alternatively, use the inp argument to run_cmd to specify input to stdin; you probably need to pass a space (rather than an empty string):
run_cmd(cmd, log_all=True, simple=True, inp=' ')|
I tested with a java6 easyconfig and also with a java7 easyconfig. seem to be ready for merging |
| def extract_step(self): | ||
| """Unpack the source""" | ||
| if LooseVersion(self.version) < LooseVersion('1.7'): | ||
| cmd = 'cd %s; bash %s' % (self.builddir, self.src[0]['path']) |
There was a problem hiding this comment.
@pescobar please do the cd in Python, and there's no need for bash, run_cmd already runs commands in a subshell
try:
os.chdir(self.builddir)
except OSError, err:
raise EasyBuildError("Failed to move to build dir: %s", err)
run_cmd(self.src[0]['path'], log_all=True, simple=True, inp='')| try: | ||
| os.chmod(self.src[0]['path'], 0755) | ||
| except OSError, err: | ||
| raise EasyBuildError("Failed adding execution permission to java installer: %s", err) |
There was a problem hiding this comment.
@pescobar please use adjust_permissions (from filetools):
adjust_permissions(self.src[0]['path'], stat.S_IXUSR, add=True)Also, this will change permissions of the actual source file itself, should we worry about that (and copy it to build dir before changing permissions & running it)?
|
@pescobar looks good, but I'd like to see a PR for an easyconfig for Java 1.6.x so we have a test case for this? |
|
@boegel here you have easybuilders/easybuild-easyconfigs#3577 |
|
tested with easybuilders/easybuild-easyconfigs#3577, looks good, going in, thanks @pescobar! |
I know this is not ready to merge. @boegel please review? :)
This is an easyconfig to test
https://gist.github.com/10a77ea9b266f3020b40bbfb8c582f51
To download java jdk6:
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/6u24-b07/jdk-6u24-linux-x64.bin