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
Thomas Leymonerie
slapos.buildout
Commits
2f517b7d
Commit
2f517b7d
authored
Feb 20, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow extending more than once sections extending other sections.
parent
1a2d9c89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+2
-1
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+46
-0
No files found.
src/zc/buildout/buildout.py
View file @
2f517b7d
...
...
@@ -1153,6 +1153,7 @@ class Options(UserDict.DictMixin):
if
'<'
in
self
.
_raw
:
self
.
_raw
=
self
.
_do_extend_raw
(
name
,
self
.
_raw
,
[])
self
.
_raw
.
pop
(
'<'
)
# force substitutions
for
k
,
v
in
self
.
_raw
.
items
():
...
...
@@ -1181,7 +1182,7 @@ class Options(UserDict.DictMixin):
raise
zc
.
buildout
.
UserError
(
"Infinite extending loop %r"
%
name
)
doing
.
append
(
name
)
try
:
to_do
=
data
.
pop
(
'<'
,
None
)
to_do
=
data
.
get
(
'<'
,
None
)
if
to_do
is
None
:
return
data
__doing__
=
'Loading input sections for %r'
,
name
...
...
src/zc/buildout/tests.py
View file @
2f517b7d
...
...
@@ -3587,6 +3587,52 @@ def increment_on_command_line():
recipe='zc.buildout:debug'
"""
def
bug_605017_reuse_extending_section
():
r"""
>>> write('buildout.cfg', '''
... [buildout]
... parts = myfiles
... myfiles2
...
... [debug]
... recipe = zc.buildout:debug
...
... [with_file1]
... <= debug
... file1 = ${:path}/file1
... color = red
...
... [with_file2]
... <= debug
... file2 = ${:path}/file2
... color = blue
...
... [myfiles]
... <= with_file1
... with_file2
... path = mydata
...
... [myfiles2]
... <= with_file1
... with_file2
... path = mydata2
... ''')
>>> print system(buildout),
Installing myfiles.
color='blue'
file1='mydata/file1'
file2='mydata/file2'
path='mydata'
recipe='zc.buildout:debug'
Installing myfiles2.
color='blue'
file1='mydata2/file1'
file2='mydata2/file2'
path='mydata2'
recipe='zc.buildout:debug'
"""
######################################################################
def
make_py_with_system_install
(
make_py
,
sample_eggs
):
...
...
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