hadi-guang / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

Repo init script - Mac osx 10.8 - Operation not permitted error - on repo: line 702: os.execv(main, me) #128

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Affected Version: Whatever latest version posted as of 2012-01-06
Environment:  Macosx 10.8 (only), python 2.7
   -- doesn't fail in macosx 10.7

What steps will reproduce the problem?
1. Download repo init script into macosx 10.8
   as per android instructions: 
   http://source.android.com/source/downloading.html
2. run: 
   repo init -u https://android.googlesource.com/platform/manifest
3. observe message:
   Operation not permitted

------ fix that did NOT work for my issue ------------------------
Apparently, some are seeing this problem because of 10.8 security 
changes w.r.t quarantine, which can be fixed by:

    xattr -d com.apple.quarantine ~/bin/repo

This fix, unfortunately didn't correct my problem.
------------------------------------------------------------------
However, the attached patch did work...
Patch tested & working on both macosx 10.8 & 10.7

What is the expected output? What do you see instead?
- repo init should start normally
- repo init fails to start with (only on 10.8, 10.7 doesn't see this failure)

Please provide any additional information below.
- See repo.patch for fix. os.execv() isn't supported in 10.8 to launch python 
directly. 
Even at the terminal window command prompt, cannot launch python HelloWorld.py 
without prefixing with "python" command. This changed from 10.7 to 10.8.  That 
is, in 10.7, the command line works:

HelloWorld.py

but in 10.8, this fails (Operation not permitted), requires:
python HelloWorld.py

Patch was tested on both 10.7 and 10.8, works fine on both.

Original issue reported on code.google.com by craigdet...@motorola.com on 7 Jan 2013 at 7:24

Attachments:

GoogleCodeExporter commented 8 years ago
Can you upload your patch on gerrit-review.googlesource.com ?

Original comment by david.pu...@sonymobile.com on 14 Feb 2013 at 8:00

GoogleCodeExporter commented 8 years ago
I resolved this issue by clearing the quarantine flag on my disk imaged used 
for android development (android.dmg). Clearing the quarantine flag on the repo 
script did not resolve the issue as noted in this issue.  The patch solved the 
repo init/sync problem, but I could not build until I cleared the quarantine 
flag on the disk image.

Original comment by gary.c...@gomohu.com on 17 Feb 2013 at 2:15

GoogleCodeExporter commented 8 years ago

Original comment by david.pu...@sonymobile.com on 17 May 2013 at 8:38