Hadoop Common
  1. Hadoop Common
  2. HADOOP-7038

saveVersion script includes an additional \r while running whoami under windows

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: build
    • Labels:
      None
    • Environment:

      Windows 7 / Eclipse

    • Hadoop Flags:
      Reviewed

      Description

      I built common under windows occasionally, and found it failed because the 'user' in build/src/o/a/h/package-info.java is "myhostmyname^M".

      It seems because the whoami of windows give a string with '\n\r' rather than '\n' only. thus I add an additional tr for it to eliminate the problem.

      Since only windows would generate '\n\r' output, I think it won't harm to any other platform.

        Activity

        Hide
        Wang Xu added a comment -

        Add a tr for whoami, in order to eliminate the additional \r of output of windows

        Show
        Wang Xu added a comment - Add a tr for whoami, in order to eliminate the additional \r of output of windows
        Hide
        Wang Xu added a comment -

        add an tr to eliminate the additional '\r' of whoami of windows

        Show
        Wang Xu added a comment - add an tr to eliminate the additional '\r' of whoami of windows
        Hide
        Wang Xu added a comment -

        here is the different between Windows bin native output and Cygwin bin output:

        bash-3.2$ which whoami
        /cygdrive/c/Windows/system32/whoami
        bash-3.2$ whoami|od -x
        0000000 6570 6361 5c65 6e67 7761 7875 0a0d
        0000016
        bash-3.2$ which date
        /usr/bin/date
        bash-3.2$ date|od -x
        0000000 7554 2065 6f4e 2076 3631 3120 3a34 3135
        0000020 303a 2032 2020 2020 3032 3031 000a
        0000035

        An unwanted '0x0d'

        Show
        Wang Xu added a comment - here is the different between Windows bin native output and Cygwin bin output: bash-3.2$ which whoami /cygdrive/c/Windows/system32/whoami bash-3.2$ whoami|od -x 0000000 6570 6361 5c65 6e67 7761 7875 0a0d 0000016 bash-3.2$ which date /usr/bin/date bash-3.2$ date|od -x 0000000 7554 2065 6f4e 2076 3631 3120 3a34 3135 0000020 303a 2032 2020 2020 3032 3031 000a 0000035 An unwanted '0x0d'
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12459738/HADOOP-7038.diff
        against trunk revision 1035353.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/105//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/105//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/105//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12459738/HADOOP-7038.diff against trunk revision 1035353. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/105//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/105//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/105//console This message is automatically generated.
        Hide
        Konstantin Boudnik added a comment -

        On Unix pre-patched and after patched version produce the same results:

        before 0000000 6f63 0a73 and after 0000000 6f63 0a73

        +1 patch looks good.

        It doesn't have any tests for an apparent enough reason.

        Show
        Konstantin Boudnik added a comment - On Unix pre-patched and after patched version produce the same results: before 0000000 6f63 0a73 and after 0000000 6f63 0a73 +1 patch looks good. It doesn't have any tests for an apparent enough reason.
        Hide
        Konstantin Boudnik added a comment -

        I have just committed this to 0.22 and trunk. Thanks Wang!

        Show
        Konstantin Boudnik added a comment - I have just committed this to 0.22 and trunk. Thanks Wang!
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #456 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/456/)
        HADOOP-7038. saveVersion script includes an additional \r while running whoami under windows. Contributed by Wang Xu.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #456 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/456/ ) HADOOP-7038 . saveVersion script includes an additional \r while running whoami under windows. Contributed by Wang Xu.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #542 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/542/)
        HADOOP-7038. saveVersion script includes an additional \r while running whoami under windows. Contributed by Wang Xu.

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #542 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/542/ ) HADOOP-7038 . saveVersion script includes an additional \r while running whoami under windows. Contributed by Wang Xu.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-22-branch #8 (See https://hudson.apache.org/hudson/job/Hadoop-Common-22-branch/8/)

        Show
        Hudson added a comment - Integrated in Hadoop-Common-22-branch #8 (See https://hudson.apache.org/hudson/job/Hadoop-Common-22-branch/8/ )

          People

          • Assignee:
            Wang Xu
            Reporter:
            Wang Xu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development