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
Nicolas Wavrant
slapos.buildout
Commits
27c7aead
Commit
27c7aead
authored
Aug 25, 2017
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
e837aff8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+22
-14
No files found.
src/zc/buildout/buildout.py
View file @
27c7aead
...
...
@@ -548,6 +548,11 @@ class Buildout(DictMixin):
os
.
symlink
(
os
.
path
.
join
(
shared_path
,
name
,
item
),
new_item_path
)
for
item
in
shared_item_set
-
current_item_set
:
os
.
symlink
(
os
.
path
.
join
(
shared_path
,
item
),
item
)
if
item
==
'.installed.cfg'
:
self
.
installed_part_options
=
self
.
_read_installed_part_options
()
self
.
_save_installed_options
()
elif
link
:
options
[
'extends'
]
=
link
...
...
@@ -649,13 +654,6 @@ class Buildout(DictMixin):
self
.
install
(())
def
install
(
self
,
install_args
):
options
=
self
[
'buildout'
]
link
=
options
.
get
(
'link'
,
""
)
if
link
and
shared_path
:
os
.
environ
.
set
(
'BUILDOUT_HOME'
,
shared_path
)
self
.
_save_installed_options
()
return
try
:
self
.
_install_parts
(
install_args
)
finally
:
...
...
@@ -728,6 +726,7 @@ class Buildout(DictMixin):
# uninstall parts that are no-longer used or who's configs
# have changed
import
pdb
;
pdb
.
set_trace
()
for
part
in
reversed
(
installed_parts
):
if
part
in
install_parts
:
old_options
=
installed_part_options
[
part
].
copy
()
...
...
@@ -958,8 +957,8 @@ class Buildout(DictMixin):
def
_read_installed_part_options
(
self
):
old
=
self
[
'buildout'
][
'installed'
]
link
=
options
.
get
(
'link'
,
""
)
new_path
=
os
.
curdir
link
=
self
[
'buildout'
]
.
get
(
'link'
,
""
)
new_path
=
os
.
path
.
realpath
(
os
.
curdir
)
shared_path
=
shared_stack_path
(
link
)
if
old
and
os
.
path
.
isfile
(
old
):
...
...
@@ -973,7 +972,10 @@ class Buildout(DictMixin):
for
k
,
v
in
_spacey_defaults
:
value
=
value
.
replace
(
k
,
v
)
options
[
option
]
=
value
result
[
section
]
=
self
.
Options
(
self
,
section
,
options
.
replace
(
shared_path
,
new_path
))
if
link
and
value
.
startswith
(
shared_path
):
value
=
value
.
replace
(
shared_path
,
new_path
)
options
[
option
]
=
value
result
[
section
]
=
self
.
Options
(
self
,
section
,
options
)
return
result
else
:
...
...
@@ -1827,8 +1829,16 @@ def _open(base, filename, seen, dl_options, override, downloaded):
os
.
remove
(
downloaded_filename
)
options
=
result
.
get
(
'buildout'
,
{})
# link = options.get('link', "")
# shared_path = shared_stack_path(link)
extends
=
options
.
pop
(
'extends'
,
[])
if
extends
:
extends
=
extends
.
split
()
link
=
options
.
get
(
'link'
,
""
)
shared_path
=
shared_stack_path
(
link
)
if
link
and
shared_path
:
extends
.
append
(
link
)
# if link and shared_path:
# shared_item_set = set(os.listdir(shared_path))
# current_item_set = set(os.listdir('.'))
...
...
@@ -1839,7 +1849,6 @@ def _open(base, filename, seen, dl_options, override, downloaded):
# elif link:
# options['extends'] = link
extends
=
options
.
pop
(
'extends'
,
None
)
if
'extended-by'
in
options
:
raise
zc
.
buildout
.
UserError
(
'No-longer supported "extended-by" option found in %s.'
%
...
...
@@ -1862,7 +1871,6 @@ def _open(base, filename, seen, dl_options, override, downloaded):
dl_options
=
_update_section
(
dl_options
,
result
[
'buildout'
])
if
extends
:
extends
=
extends
.
split
()
eresult
=
_open
(
base
,
extends
.
pop
(
0
),
seen
,
dl_options
,
override
,
downloaded
)
for
fname
in
extends
:
...
...
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