Bug 217064 - configure-xcode-for-embedded-development bad error message when not using sudo
Summary: configure-xcode-for-embedded-development bad error message when not using sudo
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-09-28 14:43 PDT by James Darpinian
Modified: 2020-10-05 14:44 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Darpinian 2020-09-28 14:43:28 PDT
I used the official Python installer from python.org to install Python 3.8.5. configure-xcode-for-embedded-development fails with the message: 

Traceback (most recent call last):
  File "Tools/Scripts/configure-xcode-for-embedded-development", line 333, in <module>
    main()
  File "Tools/Scripts/configure-xcode-for-embedded-development", line 320, in main
    if not os.geteuid() == 0 and not os.access(xcode_developer_dir(), os.R_OK | os.W_OK | os.X_OK, effective_ids=True):
NotImplementedError: access: effective_ids unavailable on this platform
Comment 1 James Darpinian 2020-09-28 14:45:41 PDT
Ah, the error message is misleading, the real problem was I forgot to use sudo. Perhaps the script should check for that.
Comment 2 Jonathan Bedard 2020-09-29 10:30:22 PDT
(In reply to James Darpinian from comment #1)
> Ah, the error message is misleading, the real problem was I forgot to use
> sudo. Perhaps the script should check for that.

That's exactly what that line is doing....is os.geteuid() not implemented on Python 3.8.5?
Comment 3 James Darpinian 2020-09-29 10:50:45 PDT
os.geteuid() is working as intended. Looks like when the root check fails this line runs this os.access call which throws. Is the os.access call just broken or do Python implementations differ in whether they support effective_ids on macOS?
Comment 4 Jonathan Bedard 2020-09-29 11:09:52 PDT
(In reply to James Darpinian from comment #3)
> os.geteuid() is working as intended. Looks like when the root check fails
> this line runs this os.access call which throws. Is the os.access call just
> broken or do Python implementations differ in whether they support
> effective_ids on macOS?

I think that the os.access call might be broken in Python 3.8.5, because Python 3.8.2 seems fine with it. In any case, we can probably just remove the os.access(...) line
Comment 5 Radar WebKit Bug Importer 2020-10-05 14:44:15 PDT
<rdar://problem/69971919>