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.build
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
Jérome Perrin
slapos.recipe.build
Commits
23b84958
Commit
23b84958
authored
Sep 05, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo: promisee -> promise.
parent
98f36c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
31 deletions
+31
-31
slapos/recipe/build.py
slapos/recipe/build.py
+31
-31
No files found.
slapos/recipe/build.py
View file @
23b84958
...
...
@@ -104,36 +104,36 @@ def guessPlatform():
class
Script
:
"""Free script building system"""
def
_checkPromise
e
(
self
,
location
):
promise
e
_problem_list
=
[]
a
=
promise
e
_problem_list
.
append
for
promise
e
in
self
.
options
[
'slapos_promise
e'
].
split
(
'
\
n
'
):
promise
e
=
promise
e
.
strip
()
if
not
promise
e
:
def
_checkPromise
(
self
,
location
):
promise_problem_list
=
[]
a
=
promise_problem_list
.
append
for
promise
in
self
.
options
[
'slapos_promis
e'
].
split
(
'
\
n
'
):
promise
=
promis
e
.
strip
()
if
not
promise
:
continue
if
promise
e
.
startswith
(
'file:'
)
or
promise
e
.
startswith
(
'statlib'
):
s
,
path
=
promise
e
.
split
(
':'
)
if
promise
.
startswith
(
'file:'
)
or
promis
e
.
startswith
(
'statlib'
):
s
,
path
=
promise
.
split
(
':'
)
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
location
,
path
)):
a
(
'File promise
e
not met for %r'
%
path
)
elif
promise
e
.
startswith
(
'directory'
):
s
,
path
=
promise
e
.
split
(
':'
)
a
(
'File promise not met for %r'
%
path
)
elif
promise
.
startswith
(
'directory'
):
s
,
path
=
promise
.
split
(
':'
)
if
not
os
.
path
.
isdir
(
os
.
path
.
join
(
location
,
path
)):
a
(
'Directory promise
e
not met for %r'
%
a
(
'Directory promise not met for %r'
%
path
)
elif
promise
e
.
startswith
(
'dynlib:'
):
if
'linked:'
not
in
promise
e
:
raise
zc
.
buildout
.
UserError
(
'dynlib promise
e
requires
\
'
linked:
\
'
'
elif
promise
.
startswith
(
'dynlib:'
):
if
'linked:'
not
in
promise
:
raise
zc
.
buildout
.
UserError
(
'dynlib promise requires
\
'
linked:
\
'
'
'parameter.'
)
if
'rpath:'
not
in
promise
e
:
if
'rpath:'
not
in
promise
:
rpath_list
=
[]
for
promise
e_part
in
promise
e
.
split
():
if
promise
e
_part
.
startswith
(
'dynlib:'
):
s
,
path
=
promise
e
_part
.
split
(
':'
)
elif
promise
e
_part
.
startswith
(
'linked:'
):
s
,
link_list
=
promise
e
_part
.
split
(
':'
)
for
promise
_part
in
promis
e
.
split
():
if
promise_part
.
startswith
(
'dynlib:'
):
s
,
path
=
promise_part
.
split
(
':'
)
elif
promise_part
.
startswith
(
'linked:'
):
s
,
link_list
=
promise_part
.
split
(
':'
)
link_list
=
link_list
.
split
(
','
)
elif
promise
e
_part
.
startswith
(
'rpath:'
):
s
,
rpath_list
=
promise
e
_part
.
split
(
':'
)
elif
promise_part
.
startswith
(
'rpath:'
):
s
,
rpath_list
=
promise_part
.
split
(
':'
)
if
rpath_list
:
r
=
rpath_list
rpath_list
=
[]
...
...
@@ -144,20 +144,20 @@ class Script:
else
:
rpath_list
=
[]
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
location
,
path
)):
a
(
'Dynlib promise
e file not met %r'
%
promise
e
)
a
(
'Dynlib promise
file not met %r'
%
promis
e
)
else
:
elf_dict
=
readElfAsDict
(
os
.
path
.
join
(
location
,
path
))
if
sorted
(
link_list
)
!=
sorted
(
elf_dict
[
'library_list'
]):
a
(
'Promise
e
library list not met (wanted: %r, found: %r)'
%
(
a
(
'Promise library list not met (wanted: %r, found: %r)'
%
(
link_list
,
elf_dict
[
'library_list'
]))
if
sorted
(
rpath_list
)
!=
sorted
(
elf_dict
[
'runpath_list'
]):
a
(
'Promise
e
rpath list not met (wanted: %r, found: %r)'
%
(
a
(
'Promise rpath list not met (wanted: %r, found: %r)'
%
(
rpath_list
,
elf_dict
[
'runpath_list'
]))
else
:
raise
zc
.
buildout
.
UserError
(
'Unknown promise
e %r'
%
promise
e
)
if
len
(
promise
e
_problem_list
):
raise
zc
.
buildout
.
UserError
(
'Promise
e
not met, found issues:
\
n
%s'
%
' '
.
join
([
q
+
'
\
n
'
for
q
in
promise
e
_problem_list
]))
raise
zc
.
buildout
.
UserError
(
'Unknown promise
%r'
%
promis
e
)
if
len
(
promise_problem_list
):
raise
zc
.
buildout
.
UserError
(
'Promise not met, found issues:
\
n
%s'
%
' '
.
join
([
q
+
'
\
n
'
for
q
in
promise_problem_list
]))
def
download
(
self
,
url
,
md5sum
):
download
=
zc
.
buildout
.
download
.
Download
(
self
.
buildout
[
'buildout'
],
...
...
@@ -279,7 +279,7 @@ class Script:
env
=
self
.
getEnvironment
()
exec
self
.
options
[
'script'
]
try
:
self
.
_checkPromise
e
(
self
.
options
[
'location'
])
self
.
_checkPromise
(
self
.
options
[
'location'
])
except
Exception
:
if
os
.
path
.
exists
(
self
.
options
[
'location'
]):
self
.
logger
.
info
(
'Removing location %r because of error'
%
...
...
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