United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6931763 sanity checks broken with latest cygwin, newer egrep -i option problems
JDK-6931763 : sanity checks broken with latest cygwin, newer egrep -i option problems

Details
Type:
Bug
Submit Date:
2010-03-03
Status:
Resolved
Updated Date:
2010-06-15
Project Name:
JDK
Resolved Date:
2010-03-17
Component:
infrastructure
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
It appears that the latest cygwin on windows has a newer version of egrep (2.5.4?) that has some problems with the -i (ignore case) option. Some of the sanity checks use the -i option and are failing and giving false sanity errors. Mostly with regards to paths not being full paths.

The errors will look something like:

ERROR: ALT_BOOTDIR must be an Absolute Path Name, 
       not a Relative Path Name. 
       The current value of ALT_BOOTDIR is 
           C:/cygwin/home/ohair/import/WINDOW~1/JDK16~1.0 
       Please fix this and continue your build.

A workaround is to replace the patterns  $(EGREP) -ci '^([a-z]:)?/'  with  $(EGREP) -c '^([a-zA-Z]:)?/'

diff --git a/make/common/shared/Sanity.gmk b/make/common/shared/Sanity.gmk
--- a/make/common/shared/Sanity.gmk
+++ b/make/common/shared/Sanity.gmk
@@ -687,13 +687,13 @@
 ######################################################
 sane-alt_outputdir:
 ifdef ALT_OUTPUTDIR
-       @if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+       @if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
          $(ECHO) "ERROR: ALT_OUTPUTDIR must be an Absolute Path Name, \n" \
            "      not a Relative Path Name. \n" \
            "" >> $(ERROR_FILE) ; \
        fi
   ifeq ($(PLATFORM), windows)
-       @if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)'` -ne 1 ]; then \
+       @if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -c '^([A-Za-z]:)'` -ne 1 ]; then \
          $(ECHO) "ERROR: On windows, ALT_OUTPUTDIR must contain the drive letter. \n" \
            "" >> $(ERROR_FILE) ; \
        fi
@@ -742,7 +742,7 @@
 ######################################################
 sane-alt_bootdir:
 ifdef ALT_BOOTDIR
-       @if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+       @if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
          $(ECHO) "ERROR: ALT_BOOTDIR must be an Absolute Path Name, \n" \
            "      not a Relative Path Name. \n" \
            "      The current value of ALT_BOOTDIR is \n" \
@@ -772,7 +772,7 @@
 ######################################################
 sane-local-bootdir:
 ifeq ($(PLATFORM), windows)
-       @if [ `$(ECHO) $(BOOTDIR) | $(EGREP) -ci '^J:'` -ne 0 ]; then \
+       @if [ `$(ECHO) $(BOOTDIR) | $(EGREP) -c '^[jJ]:'` -ne 0 ]; then \
          $(ECHO) "WARNING: Your BOOTDIR is located on the J: drive. Often the J:\n" \
            "        drive is mapped over a network. Using a mapped drive for\n" \
            "        the BOOTDIR may significantly slow down the build process.\n" \
@@ -789,7 +789,7 @@
 ######################################################
 sane-cacerts:
   ifdef ALT_CACERTS_FILE
-       @if [ `$(ECHO) $(subst \,/,$(ALT_CACERTS_FILE)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+       @if [ `$(ECHO) $(subst \,/,$(ALT_CACERTS_FILE)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
          $(ECHO) "ERROR: ALT_CACERTS_FILE must be an Absolute Path Name, \n" \
            "      not a Relative Path Name. \n" \
            "      The current value of ALT_CACERTS_FILE is \n" \
@@ -1538,7 +1538,7 @@
 sane-mozilla:
 ifeq ($(ARCH_DATA_MODEL), 32)
   ifdef ALT_MOZILLA_HEADERS_PATH
-       @if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
+       @if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
          $(ECHO) "ERROR: ALT_MOZILLA_HEADERS_PATH must be an Absolute Path Name, \n" \
            "      not a Relative Path Name. \n" \
            "      The current value of ALT_MOZILLA_HEADERS_PATH is \n" \

                                    

Comments
EVALUATION

See description.
                                     
2010-03-03
EVALUATION

http://hg.openjdk.java.net/jdk7/tl/jdk/rev/507159d8d143
                                     
2010-03-03
EVALUATION

http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/99af8bf29c24
                                     
2010-06-15



Hardware and Software, Engineered to Work Together