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
Yusei Tahara
slapos.buildout
Commits
818082c4
Commit
818082c4
authored
Jun 23, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug_717802'
parents
e52a53c4
39442e5d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+5
-0
src/zc/buildout/extends-cache.txt
src/zc/buildout/extends-cache.txt
+21
-2
No files found.
src/zc/buildout/buildout.py
View file @
818082c4
...
@@ -1385,6 +1385,11 @@ def _open(base, filename, seen, dl_options, override, downloaded):
...
@@ -1385,6 +1385,11 @@ def _open(base, filename, seen, dl_options, override, downloaded):
Recursively open other files based on buildout options found.
Recursively open other files based on buildout options found.
"""
"""
counter
=
0
while
filename
.
startswith
(
'../'
):
filename
=
filename
.
replace
(
'../'
,
''
,
1
)
counter
+=
1
base
=
base
.
rsplit
(
'/'
,
counter
)[
0
]
_update_section
(
dl_options
,
override
)
_update_section
(
dl_options
,
override
)
_dl_options
=
_unannotate_section
(
dl_options
.
copy
())
_dl_options
=
_unannotate_section
(
dl_options
.
copy
())
newest
=
_convert_bool
(
'newest'
,
_dl_options
.
get
(
'newest'
,
'false'
))
newest
=
_convert_bool
(
'newest'
,
_dl_options
.
get
(
'newest'
,
'false'
))
...
...
src/zc/buildout/extends-cache.txt
View file @
818082c4
...
@@ -463,18 +463,35 @@ used:
...
@@ -463,18 +463,35 @@ used:
... extends = baseB.cfg
... extends = baseB.cfg
... bar = foo
... bar = foo
... """)
... """)
>>> write(server_data, 'baseD.cfg', """\
... [buildout]
... extends-cache = cache
... extends = baseC.cfg
... bar = foo
... """)
>>> mkdir(server_data, 'deeper')
>>> write(server_data, 'deeper', 'base.cfg', """\
... [buildout]
... extends-cache = cache
... extends = ../baseD.cfg
... bar = foo
... """)
>>> write('buildout.cfg', """\
>>> write('buildout.cfg', """\
... [buildout]
... [buildout]
... extends-cache = cache
... extends-cache = cache
... newest = true
... newest = true
... extends = %sbaseA.cfg %sbaseB.cfg %sbaseC.cfg
... extends = %sbaseA.cfg %sbaseB.cfg %sbaseC.cfg
%sdeeper/base.cfg
... """ % (server_url, server_url, server_url))
... """ % (server_url, server_url, server_url
, server_url
))
>>> print system(buildout + " -n")
>>> print system(buildout + " -n")
Unused options for buildout: 'bar' 'foo'.
Unused options for buildout: 'bar' 'foo'.
(XXX We patch download utility's API to produce readable output for the test;
(XXX We patch download utility's API to produce readable output for the test;
a better solution would utilise the logging already done by the utility.)
a better solution would utilise the logging already done by the utility.)
As one can see, even if profile is prefixed with ../ the canocial path is
calculated. Thanks to this paths for complex extend trees are downloaded only
once.
>>> import zc.buildout
>>> import zc.buildout
>>> old_download = zc.buildout.download.Download.download
>>> old_download = zc.buildout.download.Download.download
>>> def wrapper_download(self, url, md5sum=None, path=None):
>>> def wrapper_download(self, url, md5sum=None, path=None):
...
@@ -487,6 +504,8 @@ The URL http://localhost/baseA.cfg was downloaded.
...
@@ -487,6 +504,8 @@ The URL http://localhost/baseA.cfg was downloaded.
The URL http://localhost/base.cfg was downloaded.
The URL http://localhost/base.cfg was downloaded.
The URL http://localhost/baseB.cfg was downloaded.
The URL http://localhost/baseB.cfg was downloaded.
The URL http://localhost/baseC.cfg was downloaded.
The URL http://localhost/baseC.cfg was downloaded.
The URL http://localhost/deeper/base.cfg was downloaded.
The URL http://localhost/baseD.cfg was downloaded.
Unused options for buildout: 'bar' 'foo'.
Unused options for buildout: 'bar' 'foo'.
>>> zc.buildout.download.Download.download = old_download
>>> zc.buildout.download.Download.download = old_download
...
...
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