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

RESOLVED FIXED in mozilla11

Status

()

Core
Build Config
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Raymond Hung, Assigned: sid0)

Tracking

7 Branch
mozilla11
All
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-bs)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
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
(Assignee)

Comment 1

6 years ago
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?
(Reporter)

Comment 2

6 years ago
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.
(Assignee)

Comment 3

6 years ago
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?
(Assignee)

Comment 4

6 years ago
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.
(Assignee)

Comment 5

6 years ago
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.
(Reporter)

Comment 6

6 years ago
(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)

Comment 7

6 years ago
Created attachment 572179 [details] [diff] [review]
Remove mozilla-dos2unix.py
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+
(Assignee)

Comment 9

6 years ago
https://hg.mozilla.org/projects/build-system/rev/7800832fa4fa
Whiteboard: fixed-in-bs
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Status: RESOLVED → UNCONFIRMED
Ever confirmed: false
Resolution: FIXED → ---
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago6 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?
(Reporter)

Comment 15

6 years ago
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

Updated

6 years ago
Blocks: 704316
You need to log in before you can comment on or make changes to this bug.