Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildstream
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
BuildStream
buildstream
Commits
c8677af0
You need to sign in or sign up before continuing.
Commit
c8677af0
authored
6 years ago
by
Jim MacArthur
Browse files
Options
Downloads
Patches
Plain Diff
_process_list: Make files readable before copying/linking
parent
fafa8136
No related branches found
No related tags found
1 merge request
!837
WIP: Import unreadable files
Pipeline
#31695256
passed
6 years ago
Stage: prepare
Stage: test
Stage: post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildstream/utils.py
+10
-0
10 additions, 0 deletions
buildstream/utils.py
with
10 additions
and
0 deletions
buildstream/utils.py
+
10
−
0
View file @
c8677af0
...
...
@@ -831,8 +831,18 @@ def _process_list(srcdir, destdir, filelist, actionfunc, result,
result
.
ignored
.
append
(
path
)
continue
if
not
file_stat
.
st_mode
&
stat
.
S_IRUSR
:
os
.
chmod
(
srcpath
,
file_stat
.
st_mode
|
stat
.
S_IRUSR
)
actionfunc
(
srcpath
,
destpath
,
result
=
result
)
if
not
file_stat
.
st_mode
&
stat
.
S_IRUSR
:
# actionfunc would normally preserve permissions, but
# if we changed them before copying, we need to reset
# the permissions on both.
os
.
chmod
(
destpath
,
file_stat
.
st_mode
)
os
.
chmod
(
srcpath
,
file_stat
.
st_mode
)
elif
stat
.
S_ISCHR
(
mode
)
or
stat
.
S_ISBLK
(
mode
):
# Block or character device. Put contents of st_dev in a mknod.
if
not
safe_remove
(
destpath
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment