Closed Bug 1339409 Opened 9 years ago Closed 9 years ago

"mach bootstrap" for artifact desktop builds fails due to "FileNotFoundError" in install_rustup()

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox54 fixed)

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: whimboo, Assigned: rillian)

Details

Attachments

(1 file)

I tried to run "mach bootstrap" on a Windows8 loaner machine via mozilla-build and the command failed as follows: NameError: global name 'FileNotFoundError' is not defined File "c:\builds\mozilla-unified\python/mozboot/mozboot/mach_commands.py", line 26, in bootstrap bootstrapper.bootstrap() File "c:\builds\mozilla-unified\python/mozboot\mozboot\bootstrap.py", line 223 , in bootstrap self.instance.install_system_packages() File "c:\builds\mozilla-unified\python/mozboot\mozboot\mozillabuild.py", line 22, in install_system_packages self.install_rustup() File "c:\builds\mozilla-unified\python/mozboot\mozboot\mozillabuild.py", line 48, in install_rustup except FileNotFoundError:
Flags: needinfo?(giles)
oops, thought I'd fixed. Of course if you got this error it means the install probably also failed?
Assignee: nobody → giles
Flags: needinfo?(giles)
Attachment #8837281 - Flags: review?(cmanchester)
Attachment #8837281 - Flags: review?(cmanchester) → review?(nfroyd)
Comment on attachment 8837281 [details] Bug 1339409 - mozboot: Fix undefined FileNotFoundError. https://reviewboard.mozilla.org/r/112450/#review113848 r=me. WDYT about the below change? ::: python/mozboot/mozboot/mozillabuild.py:49 (Diff revision 1) > - except FileNotFoundError: > + except OSError as e: > + # Emulate FileNotFoundError on python 2. > + if e.errno == errno.ENOENT: I think we could just remove the comment. I wondered what would happen in Python 3 with this code--as future readers might--and discovered `FileNotFoundError` was a subclass of `OSError`. Talking about emulation in this context is just a historical artifact of the code, IMHO.
Attachment #8837281 - Flags: review?(nfroyd) → review+
Comment on attachment 8837281 [details] Bug 1339409 - mozboot: Fix undefined FileNotFoundError. https://reviewboard.mozilla.org/r/112450/#review113854 ::: python/mozboot/mozboot/mozillabuild.py:49 (Diff revision 1) > - except FileNotFoundError: > + except OSError as e: > + # Emulate FileNotFoundError on python 2. > + if e.errno == errno.ENOENT: According the the requests, module, FileNotFoundError is a subclass of OSError, and so this clause will pass that as well. This seems to work in a test script I tried. This is what I was trying to indicate with the comment, apparently unsuccessfully. I don't think it's worth writing out the whole thing just for potential python3 porting, so I'll just remove the comment.
Pushed by rgiles@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4dd3c6bf5b29 mozboot: Fix undefined FileNotFoundError. r=froydnj
(In reply to Ralph Giles (:rillian) | needinfo me from comment #2) > oops, thought I'd fixed. Of course if you got this error it means the > install probably also failed? Most likely yes. But not sure what it actually was because of the busted stack output. Thanks for fixing this problem.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Now I also know the underlying issue... for details see bug 1339347 comment 5.
Ah, python too old for tls does explain it. :/
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: