Jan Krag commented on Bug JENKINS-7303

It seems, from the above, and reading the provided links, that the current implementation of directly looking up in the SOFTWARE\Wow6432Node\ is not actually a recommended way of doing it, as \Wow6432Node is an implementation detail, and may break compatibility in the future (or past?).

Also, in our investigation, we have found that the whole Wow64 registry translation seems extremely fragile, and gives rise to al sorts of confusion, and the mapping is not even the same on different versions of windows.

We are currently investigating a situation where two machines seem to behave differently. Both are running 64 bit java (as reported by java -version in Execute shell), and both have only a 64bit Cygwin installed, and referenced in Software\Cygwin\setup[rootdir]. One of them finds cygpath just fine, the other doesn't, and the main difference between these machines is that one is running Win 7, the other Win Server 2012.

On both machines we have tried running
reg query HKLM\Software\Cygwin\setup /v rootdir /reg:32
— ERROR: The system was unable to find ....

reg query HKLM\Software\Cygwin\setup /v rootdir /reg:64
— rootdir REG_SZ c:\cygwin64

If we run
reg query HKLM\Software\Cygwin\setup /v rootdir
without the view specifier, we get the positive answer, but if we run it in a 32bit command prompt, we get the error.

Our temporary conclusion is that the current code seems to work on a 2012 Server, but not on a Win 7 box.

I am not an experienced plugin dev, so I might be missing the obvious, but couldn't the plugin start
with:

  • checking for a CYGWIN_HOME environment variable before it starts messing around in the registry?
  • just trying the path, as it might actually be set up just fine?

This Env var might not be set by default by the cygwin installation, but it is easy to set and control, either directly on the slave machine or through Jenkins and would also make it much easier to force the use of a specific installed cygwin. (e.g. if you have both cygwin and cygwin64 on the slave).

Any comments?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to