Closed Bug 699203 Opened 13 years ago Closed 13 years ago

mozilla-dos2unix.py looks for a non-existent directory "CVS" in order to run.

Categories

(Firefox Build System :: General, defect)

7 Branch
All
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla11

People

(Reporter: hung.raymond, Assigned: rain1)

References

Details

(Whiteboard: fixed-in-bs)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928134238

Steps to reproduce:

When trying to build Firefox on the Windows platform, client.mk raises an error regarding the line endings being Windows-style rather than Unix-style. The suggestion is to run python mozilla/build/win32/mozilla-dos2unix.py. I executed the script and typed 'y' to proceed.


Actual results:

Nothing happened. I still could not build Firefox because the line endings were still in Windows-style.


Expected results:

The python script should've continued and changed the line endings, except on line 33 of the script, it looks for a CVS directory that does not exist.
Status: UNCONFIRMED → NEW
Component: General → Build Config
Ever confirmed: true
QA Contact: general → build-config
Hardware: x86_64 → All
Heh, I don't think that script has been used in ages. You shouldn't be getting that error normally. Did you try to edit client.mk or configure.in?
I haven't tried editing those files because this was the first time I've tried to build Firefox. I wanted to get one successful build before I started making any changes.
That's really strange and shouldn't be happening. Do you have a Mercurial extension to convert Unix line endings to DOS (look for "eol") in .hgrc or Mercurial.ini?
OK, so I understand you're using git, not hg. In that case what is the output of

$ git config core.autocrlf

Try setting it to false:

$ git config --global core.autocrlf false

... and cloning from scratch again.
So apparently core.autocrlf is set to true by default per <http://code.google.com/p/msysgit/issues/detail?id=21>.

Raymond: try what I mentioned in comment 4 -- it should work. If it does, I'll repurpose this bug into one to remove that script.

humph: if you really insist on using git :) please advise students on Windows to set core.autocrlf to false globally before starting.

Apparently git now has a core.eol, but that doesn't seem to have an option to just leave the files alone, so I guess it complicates things even more. This seems poorly thought-out.
(In reply to Siddharth Agarwal [:sid0] from comment #5)
> So apparently core.autocrlf is set to true by default per
> <http://code.google.com/p/msysgit/issues/detail?id=21>.
> 
> Raymond: try what I mentioned in comment 4 -- it should work. If it does,
> I'll repurpose this bug into one to remove that script.
> 
> humph: if you really insist on using git :) please advise students on
> Windows to set core.autocrlf to false globally before starting.
> 
> Apparently git now has a core.eol, but that doesn't seem to have an option
> to just leave the files alone, so I guess it complicates things even more.
> This seems poorly thought-out.

Thanks for the fix. It works perfectly now.
Assignee: nobody → sagarwal
Status: NEW → ASSIGNED
Attachment #572179 - Flags: review?(ted.mielczarek)
Comment on attachment 572179 [details] [diff] [review]
Remove mozilla-dos2unix.py

Review of attachment 572179 [details] [diff] [review]:
-----------------------------------------------------------------

This is fine. I wonder if we shouldn't add a check somewhere for the exact situation that was encountered here: the user cloned from a git repo on Windows, and the line endings setting is wrong.
Attachment #572179 - Flags: review?(ted.mielczarek) → review+
Can we remove the reference to this file in client.mk: https://mxr.mozilla.org/mozilla-central/source/client.mk#119

If we could sneak Git instructions in there, the proper commands to set line endings on Windows are:

$ git config core.autocrlf false
$ git config core.eof lf
$ git ls-files -z | xargs -0 rm
$ git checkout .
https://hg.mozilla.org/mozilla-central/rev/7800832fa4fa
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Status: RESOLVED → UNCONFIRMED
Ever confirmed: false
Resolution: FIXED → ---
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
(In reply to Gregory Szorc [:gps] from comment #10)
> Can we remove the reference to this file in client.mk:
> https://mxr.mozilla.org/mozilla-central/source/client.mk#119
> 
> If we could sneak Git instructions in there, the proper commands to set line
> endings on Windows are:
> 
> $ git config core.autocrlf false
> $ git config core.eof lf
> $ git ls-files -z | xargs -0 rm
> $ git checkout .

I think this should live on MDN somewhere and a link provided in the error message.
I agree. Can we get a followup to print a link to MDN when we hit this condition?
Raymond, can you take care of comments 12/13 please?
I've made an edit on the Mozilla build FAQ on the MDN, please check if it is alright.
https://developer.mozilla.org/en/Developer_Guide/Mozilla_build_FAQ#Win32-specific_questions
Blocks: 704316
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: