Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos.buildout
Commits
d43dfdad
Commit
d43dfdad
authored
Oct 18, 2015
by
Kazuhiko Shiozaki
Committed by
Xavier Thompson
May 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] Give owner's non-write permissions to group and other
parent
c9ab3010
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+15
-1
No files found.
src/zc/buildout/easy_install.py
View file @
d43dfdad
...
@@ -34,6 +34,7 @@ import setuptools.command.easy_install
...
@@ -34,6 +34,7 @@ import setuptools.command.easy_install
import
setuptools.command.setopt
import
setuptools.command.setopt
import
setuptools.package_index
import
setuptools.package_index
import
shutil
import
shutil
import
stat
import
subprocess
import
subprocess
import
sys
import
sys
import
tempfile
import
tempfile
...
@@ -1577,14 +1578,27 @@ class MissingDistribution(zc.buildout.UserError):
...
@@ -1577,14 +1578,27 @@ class MissingDistribution(zc.buildout.UserError):
req
,
ws
=
self
.
data
req
,
ws
=
self
.
data
return
"Couldn't find a distribution for %r."
%
str
(
req
)
return
"Couldn't find a distribution for %r."
%
str
(
req
)
def
chmod
(
path
):
mode
=
os
.
lstat
(
path
).
st_mode
if
stat
.
S_ISLNK
(
mode
):
return
# give the same permission but write as owner to group and other.
mode
=
stat
.
S_IMODE
(
mode
)
urx
=
(
mode
>>
6
)
&
5
new_mode
=
mode
&
~
0o77
|
urx
<<
3
|
urx
if
new_mode
!=
mode
:
os
.
chmod
(
path
,
new_mode
)
def
redo_pyc
(
egg
):
def
redo_pyc
(
egg
):
if
not
os
.
path
.
isdir
(
egg
):
if
not
os
.
path
.
isdir
(
egg
):
return
return
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
egg
):
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
egg
):
chmod
(
dirpath
)
for
filename
in
filenames
:
for
filename
in
filenames
:
filepath
=
os
.
path
.
join
(
dirpath
,
filename
)
chmod
(
filepath
)
if
not
filename
.
endswith
(
'.py'
):
if
not
filename
.
endswith
(
'.py'
):
continue
continue
filepath
=
os
.
path
.
join
(
dirpath
,
filename
)
if
not
(
os
.
path
.
exists
(
filepath
+
'c'
)
if
not
(
os
.
path
.
exists
(
filepath
+
'c'
)
or
os
.
path
.
exists
(
filepath
+
'o'
)):
or
os
.
path
.
exists
(
filepath
+
'o'
)):
# If it wasn't compiled, it may not be compilable
# If it wasn't compiled, it may not be compilable
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment