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():
...
@@ -104,36 +104,36 @@ def guessPlatform():
class
Script
:
class
Script
:
"""Free script building system"""
"""Free script building system"""
def
_checkPromise
e
(
self
,
location
):
def
_checkPromise
(
self
,
location
):
promise
e
_problem_list
=
[]
promise_problem_list
=
[]
a
=
promise
e
_problem_list
.
append
a
=
promise_problem_list
.
append
for
promise
e
in
self
.
options
[
'slapos_promise
e'
].
split
(
'
\
n
'
):
for
promise
in
self
.
options
[
'slapos_promis
e'
].
split
(
'
\
n
'
):
promise
e
=
promise
e
.
strip
()
promise
=
promis
e
.
strip
()
if
not
promise
e
:
if
not
promise
:
continue
continue
if
promise
e
.
startswith
(
'file:'
)
or
promise
e
.
startswith
(
'statlib'
):
if
promise
.
startswith
(
'file:'
)
or
promis
e
.
startswith
(
'statlib'
):
s
,
path
=
promise
e
.
split
(
':'
)
s
,
path
=
promise
.
split
(
':'
)
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
location
,
path
)):
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
location
,
path
)):
a
(
'File promise
e
not met for %r'
%
path
)
a
(
'File promise not met for %r'
%
path
)
elif
promise
e
.
startswith
(
'directory'
):
elif
promise
.
startswith
(
'directory'
):
s
,
path
=
promise
e
.
split
(
':'
)
s
,
path
=
promise
.
split
(
':'
)
if
not
os
.
path
.
isdir
(
os
.
path
.
join
(
location
,
path
)):
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
)
path
)
elif
promise
e
.
startswith
(
'dynlib:'
):
elif
promise
.
startswith
(
'dynlib:'
):
if
'linked:'
not
in
promise
e
:
if
'linked:'
not
in
promise
:
raise
zc
.
buildout
.
UserError
(
'dynlib promise
e
requires
\
'
linked:
\
'
'
raise
zc
.
buildout
.
UserError
(
'dynlib promise requires
\
'
linked:
\
'
'
'parameter.'
)
'parameter.'
)
if
'rpath:'
not
in
promise
e
:
if
'rpath:'
not
in
promise
:
rpath_list
=
[]
rpath_list
=
[]
for
promise
e_part
in
promise
e
.
split
():
for
promise
_part
in
promis
e
.
split
():
if
promise
e
_part
.
startswith
(
'dynlib:'
):
if
promise_part
.
startswith
(
'dynlib:'
):
s
,
path
=
promise
e
_part
.
split
(
':'
)
s
,
path
=
promise_part
.
split
(
':'
)
elif
promise
e
_part
.
startswith
(
'linked:'
):
elif
promise_part
.
startswith
(
'linked:'
):
s
,
link_list
=
promise
e
_part
.
split
(
':'
)
s
,
link_list
=
promise_part
.
split
(
':'
)
link_list
=
link_list
.
split
(
','
)
link_list
=
link_list
.
split
(
','
)
elif
promise
e
_part
.
startswith
(
'rpath:'
):
elif
promise_part
.
startswith
(
'rpath:'
):
s
,
rpath_list
=
promise
e
_part
.
split
(
':'
)
s
,
rpath_list
=
promise_part
.
split
(
':'
)
if
rpath_list
:
if
rpath_list
:
r
=
rpath_list
r
=
rpath_list
rpath_list
=
[]
rpath_list
=
[]
...
@@ -144,20 +144,20 @@ class Script:
...
@@ -144,20 +144,20 @@ class Script:
else
:
else
:
rpath_list
=
[]
rpath_list
=
[]
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
location
,
path
)):
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
:
else
:
elf_dict
=
readElfAsDict
(
os
.
path
.
join
(
location
,
path
))
elf_dict
=
readElfAsDict
(
os
.
path
.
join
(
location
,
path
))
if
sorted
(
link_list
)
!=
sorted
(
elf_dict
[
'library_list'
]):
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'
]))
link_list
,
elf_dict
[
'library_list'
]))
if
sorted
(
rpath_list
)
!=
sorted
(
elf_dict
[
'runpath_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'
]))
rpath_list
,
elf_dict
[
'runpath_list'
]))
else
:
else
:
raise
zc
.
buildout
.
UserError
(
'Unknown promise
e %r'
%
promise
e
)
raise
zc
.
buildout
.
UserError
(
'Unknown promise
%r'
%
promis
e
)
if
len
(
promise
e
_problem_list
):
if
len
(
promise_problem_list
):
raise
zc
.
buildout
.
UserError
(
'Promise
e
not met, found issues:
\
n
%s'
%
raise
zc
.
buildout
.
UserError
(
'Promise not met, found issues:
\
n
%s'
%
' '
.
join
([
q
+
'
\
n
'
for
q
in
promise
e
_problem_list
]))
' '
.
join
([
q
+
'
\
n
'
for
q
in
promise_problem_list
]))
def
download
(
self
,
url
,
md5sum
):
def
download
(
self
,
url
,
md5sum
):
download
=
zc
.
buildout
.
download
.
Download
(
self
.
buildout
[
'buildout'
],
download
=
zc
.
buildout
.
download
.
Download
(
self
.
buildout
[
'buildout'
],
...
@@ -279,7 +279,7 @@ class Script:
...
@@ -279,7 +279,7 @@ class Script:
env
=
self
.
getEnvironment
()
env
=
self
.
getEnvironment
()
exec
self
.
options
[
'script'
]
exec
self
.
options
[
'script'
]
try
:
try
:
self
.
_checkPromise
e
(
self
.
options
[
'location'
])
self
.
_checkPromise
(
self
.
options
[
'location'
])
except
Exception
:
except
Exception
:
if
os
.
path
.
exists
(
self
.
options
[
'location'
]):
if
os
.
path
.
exists
(
self
.
options
[
'location'
]):
self
.
logger
.
info
(
'Removing location %r because of error'
%
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