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
6
Merge Requests
6
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
becffc03
Commit
becffc03
authored
Mar 20, 2020
by
Julien Muchembled
Committed by
Xavier Thompson
May 03, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] Check that sections don't install the same path
parent
205396cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+21
-5
No files found.
src/zc/buildout/buildout.py
View file @
becffc03
...
@@ -937,7 +937,9 @@ class Buildout(DictMixin):
...
@@ -937,7 +937,9 @@ class Buildout(DictMixin):
# Check for unused buildout options:
# Check for unused buildout options:
_check_for_unused_options_in_section
(
self
,
'buildout'
)
_check_for_unused_options_in_section
(
self
,
'buildout'
)
# install new parts
# install new parts
all_installed_paths
=
{}
for
part
in
install_parts
:
for
part
in
install_parts
:
signature
=
self
[
part
].
pop
(
'__buildout_signature__'
)
signature
=
self
[
part
].
pop
(
'__buildout_signature__'
)
saved_options
=
self
[
part
].
copy
()
saved_options
=
self
[
part
].
copy
()
...
@@ -968,11 +970,11 @@ class Buildout(DictMixin):
...
@@ -968,11 +970,11 @@ class Buildout(DictMixin):
' '
.
join
(
installed_parts
))
' '
.
join
(
installed_parts
))
raise
raise
installed_files
=
set
(
installed_files
.
split
(
'
\
n
'
))
\
if
installed_files
else
set
()
if
updated_files
:
if
updated_files
:
installed_files
=
set
(
installed_files
.
split
(
'
\
n
'
))
(
installed_files
.
add
if
isinstance
(
updated_files
,
str
)
else
(
installed_files
.
add
if
isinstance
(
updated_files
,
str
)
else
installed_files
.
update
)(
updated_files
)
installed_files
.
update
)(
updated_files
)
installed_files
=
'
\
n
'
.
join
(
sorted
(
installed_files
))
else
:
# install
else
:
# install
__doing__
=
'Installing %s.'
,
part
__doing__
=
'Installing %s.'
,
part
...
@@ -985,9 +987,23 @@ class Buildout(DictMixin):
...
@@ -985,9 +987,23 @@ class Buildout(DictMixin):
"The %s install returned None. A path or "
"The %s install returned None. A path or "
"iterable os paths should be returned."
,
"iterable os paths should be returned."
,
part
)
part
)
installed_files
=
""
elif
installed_files
:
elif
not
isinstance
(
installed_files
,
str
):
installed_files
=
({
installed_files
}
installed_files
=
'
\
n
'
.
join
(
installed_files
)
if
isinstance
(
installed_files
,
str
)
else
set
(
installed_files
))
if
installed_files
:
conflicts
=
installed_files
.
intersection
(
all_installed_paths
)
if
conflicts
:
self
.
_error
(
"The following paths are already"
" installed by other sections: %r"
,
{
x
:
all_installed_paths
[
x
]
for
x
in
conflicts
})
all_installed_paths
.
update
(
dict
.
fromkeys
(
installed_files
,
part
))
installed_files
=
'
\
n
'
.
join
(
sorted
(
installed_files
))
else
:
installed_files
=
''
saved_options
[
'__buildout_installed__'
]
=
installed_files
saved_options
[
'__buildout_installed__'
]
=
installed_files
saved_options
[
'__buildout_signature__'
]
=
signature
saved_options
[
'__buildout_signature__'
]
=
signature
...
...
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