Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.cmmi
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
Xiaowu Zhang
slapos.recipe.cmmi
Commits
f5b4cb49
Commit
f5b4cb49
authored
Jul 11, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add log message when checking share option
parent
ea57bedd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
slapos/recipe/cmmi/README.txt
slapos/recipe/cmmi/README.txt
+3
-0
slapos/recipe/cmmi/__init__.py
slapos/recipe/cmmi/__init__.py
+7
-5
No files found.
slapos/recipe/cmmi/README.txt
View file @
f5b4cb49
...
...
@@ -1086,6 +1086,8 @@ Use option ``share`` to install a share pacakge.
Uninstalling package.
Uninstalling package-2.
Installing package.
package: Checking whether package is installed at share path: /usr/local/bin
package: could not find promise "/usr/local/bin/mypackage.exe"
package: [ENV] TMP = /sample_buildout/parts/package/tmp
package: Extracting package to /sample_buildout/parts/package__compile__
configure --prefix=/sample_buildout/parts/package
...
...
@@ -1110,6 +1112,7 @@ Do nothing if one package has been installed.
>>> print system(buildout)
Uninstalling package.
Installing package.
package: Checking whether package is installed at share path: /usr/local/bin
package: This shared package has been installed by other package
For even more specific needs you can write your own recipe that uses
...
...
slapos/recipe/cmmi/__init__.py
View file @
f5b4cb49
...
...
@@ -184,10 +184,10 @@ class Recipe(object):
def
check_promises
(
self
,
log
=
None
):
result
=
True
log
=
logging
.
getLogger
(
self
.
name
)
for
path
in
self
.
options
[
'promises'
].
splitlines
():
if
not
os
.
path
.
exists
(
path
):
result
=
False
if
log
is
not
None
:
log
.
warning
(
'could not find promise "%s"'
%
path
)
return
result
...
...
@@ -234,7 +234,9 @@ class Recipe(object):
parts
=
[]
# In share mode, do nothing if package has been installed.
if
(
not
self
.
options
[
'share'
]
==
''
)
and
self
.
check_promises
():
if
(
not
self
.
options
[
'share'
]
==
''
):
log
.
info
(
'Checking whether package is installed at share path: %s'
%
self
.
options
[
'share'
])
if
self
.
check_promises
(
log
):
log
.
info
(
'This shared package has been installed by other package'
)
return
parts
...
...
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