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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
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
Hide 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,11 +184,11 @@ 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
)
log
.
warning
(
'could not find promise "%s"'
%
path
)
return
result
def
call_script
(
self
,
script
):
...
...
@@ -234,9 +234,11 @@ class Recipe(object):
parts
=
[]
# In share mode, do nothing if package has been installed.
if
(
not
self
.
options
[
'share'
]
==
''
)
and
self
.
check_promises
():
log
.
info
(
'This shared package has been installed by other package'
)
return
parts
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
make_cmd
=
self
.
options
.
get
(
'make-binary'
,
'make'
).
strip
()
make_options
=
' '
.
join
(
self
.
options
.
get
(
'make-options'
,
''
).
split
())
...
...
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