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
Rafael Monnerat
slapos.buildout
Commits
d853d17d
Commit
d853d17d
authored
Jan 13, 2013
by
Jim Fulton
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #37 from kilink/master
Fix macro inheritance bug
parents
ab708739
8678876e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+2
-1
src/zc/buildout/buildout.txt
src/zc/buildout/buildout.txt
+1
-1
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+34
-0
No files found.
src/zc/buildout/buildout.py
View file @
d853d17d
...
@@ -1117,7 +1117,7 @@ class Options(DictMixin):
...
@@ -1117,7 +1117,7 @@ class Options(DictMixin):
raise
zc
.
buildout
.
UserError
(
"Infinite extending loop %r"
%
name
)
raise
zc
.
buildout
.
UserError
(
"Infinite extending loop %r"
%
name
)
doing
.
append
(
name
)
doing
.
append
(
name
)
try
:
try
:
to_do
=
data
.
pop
(
'<'
,
None
)
to_do
=
data
.
get
(
'<'
,
None
)
if
to_do
is
None
:
if
to_do
is
None
:
return
data
return
data
__doing__
=
'Loading input sections for %r'
,
name
__doing__
=
'Loading input sections for %r'
,
name
...
@@ -1133,6 +1133,7 @@ class Options(DictMixin):
...
@@ -1133,6 +1133,7 @@ class Options(DictMixin):
result
.
update
(
self
.
_do_extend_raw
(
iname
,
raw
,
doing
))
result
.
update
(
self
.
_do_extend_raw
(
iname
,
raw
,
doing
))
result
.
update
(
data
)
result
.
update
(
data
)
result
.
pop
(
'<'
,
None
)
return
result
return
result
finally
:
finally
:
assert
doing
.
pop
()
==
name
assert
doing
.
pop
()
==
name
...
...
src/zc/buildout/buildout.txt
View file @
d853d17d
...
@@ -1074,7 +1074,7 @@ Extending sections (macros)
...
@@ -1074,7 +1074,7 @@ Extending sections (macros)
A section (other than the buildout section) can extend one or more
A section (other than the buildout section) can extend one or more
other sections using the ``<`` option. Options from the referenced
other sections using the ``<`` option. Options from the referenced
sections are copied to the refering section *before* variable
sections are copied to the refer
r
ing section *before* variable
substitution. This, together with the ability to refer to variables
substitution. This, together with the ability to refer to variables
of the current section allows sections to be used as macros.
of the current section allows sections to be used as macros.
...
...
src/zc/buildout/tests.py
View file @
d853d17d
...
@@ -2718,6 +2718,40 @@ def want_new_zcrecipeegg():
...
@@ -2718,6 +2718,40 @@ def want_new_zcrecipeegg():
Error: Bad constraint >=2.0.0a3 zc.recipe.egg<2dev
Error: Bad constraint >=2.0.0a3 zc.recipe.egg<2dev
"""
"""
def
macro_inheritance_bug
():
"""
There was a bug preventing a section from using another section as a macro
if that section was extended with macros, and both sections were listed as
parts (phew!). The following contrived example demonstrates that this
now works.
>>> write('buildout.cfg',
... '''
... [buildout]
... parts = foo bar
... [base]
... recipe = zc.recipe.egg
... [foo]
... <=base
... eggs = zc.buildout
... interpreter = python
... [bar]
... <=foo
... interpreter = py
... ''')
>>> print_(system(join('bin', 'buildout')), end='') # doctest: +ELLIPSIS
Installing foo.
...
Installing bar.
...
>>> ls("./bin")
- buildout
- py
- python
"""
######################################################################
######################################################################
...
...
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