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
Xavier Thompson
slapos.buildout
Commits
f9e37369
Commit
f9e37369
authored
Jan 20, 2013
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error helpfully if install-from-cache and offline are used together.
parent
7153e708
Changes
2
Hide 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
+8
-2
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+18
-0
No files found.
src/zc/buildout/buildout.py
View file @
f9e37369
...
@@ -335,8 +335,14 @@ class Buildout(DictMixin):
...
@@ -335,8 +335,14 @@ class Buildout(DictMixin):
zc
.
buildout
.
easy_install
.
download_cache
(
download_cache
)
zc
.
buildout
.
easy_install
.
download_cache
(
download_cache
)
zc
.
buildout
.
easy_install
.
install_from_cache
(
if
bool_option
(
options
,
'install-from-cache'
):
bool_option
(
options
,
'install-from-cache'
))
if
self
.
offline
:
raise
zc
.
buildout
.
UserError
(
"install-from-cache can't be used with offline mode.
\
n
"
"Nothing is installed, even fromn cache, in offline
\
n
"
"mode, which might better be called 'no-install mode'.
\
n
"
)
zc
.
buildout
.
easy_install
.
install_from_cache
(
True
)
# "Use" each of the defaults so they aren't reported as unused options.
# "Use" each of the defaults so they aren't reported as unused options.
for
name
in
_buildout_default_options
:
for
name
in
_buildout_default_options
:
...
...
src/zc/buildout/tests.py
View file @
f9e37369
...
@@ -2788,6 +2788,24 @@ def bootstrap_honors_relative_paths():
...
@@ -2788,6 +2788,24 @@ def bootstrap_honors_relative_paths():
sys.exit(zc.buildout.buildout.main())
sys.exit(zc.buildout.buildout.main())
"""
"""
def
cant_use_install_from_cache_and_offline_together
():
r"""
>>> write('buildout.cfg',
... '''
... [buildout]
... parts =
... offline = true
... install-from-cache = true
... ''')
>>> print_(system(join('bin', 'buildout')), end='') # doctest: +ELLIPSIS
While:
Initializing.
Error: install-from-cache can't be used with offline mode.
Nothing is installed, even fromn cache, in offline
mode, which might better be called 'no-install mode'.
<BLANKLINE>
"""
######################################################################
######################################################################
...
...
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