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
Xiaowu Zhang
slapos.recipe.build
Commits
0b94c54b
Commit
0b94c54b
authored
Aug 26, 2011
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Use different syntax to specify architectures"
This reverts commit
667ec876
.
parent
667ec876
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
31 deletions
+11
-31
README.txt
README.txt
+6
-16
slapos/recipe/build.py
slapos/recipe/build.py
+5
-15
No files found.
README.txt
View file @
0b94c54b
...
@@ -74,24 +74,14 @@ Example buildout::
...
@@ -74,24 +74,14 @@ Example buildout::
slapos_promisee =
slapos_promisee =
...
...
[download]
[architecturedependant]
# Downloads, extracts and copy files to part directory
recipe = slapos.cookbook:download
recipe = slapos.recipe.build:download
x86_url = http://host/path/zipball_x86.zip
x86_md5sum = 9631070eac74f92a812d4785a84d1b4e
x86-64_url = http://host/path/zipball_x64.zip
x86-64_md5sum = 9631070eac74f92a812d4785a84d1b4e
slapos_promisee =
slapos_promisee =
directory:bin
...
url =
md5sum =
[choosearchitecture]
recipe = slapos.recipe.build:download
slapos_promisee =
directory:bin
...
...
# List here supported architectures with URL of archive and md5sum
architecture_list =
x86 http://javadl.sun.com/webapps/download/AutoDL?BundleId=483 377456da9fa4d867d4bdf4c655a16dce
x86-64 http://javadl.sun.com/webapps/download/AutoDL?BundleId=48338 bae0cb5d10181abdd9650dcb590eda67
TODO:
TODO:
...
...
slapos/recipe/build.py
View file @
0b94c54b
...
@@ -282,22 +282,12 @@ call(["make", "install"], cwd=workdir, env=env)
...
@@ -282,22 +282,12 @@ call(["make", "install"], cwd=workdir, env=env)
class
Download
(
Script
):
class
Download
(
Script
):
"""Download and install binary package depending on your architecture.
"""Download and install binary package depending on your architecture.
"""
"""
def
setUrl
(
self
):
if
not
self
.
options
.
get
(
'url'
):
try
:
architecture_list
=
self
.
options
.
get
(
'architecture_list'
).
split
(
'
\
n
'
)
except
AttributeError
:
architecture_list
=
[]
architecture_dict
=
dict
()
for
architecture_information
in
architecture_list
:
if
architecture_information
is
not
''
:
architecture
,
url
,
md5sum
=
architecture_information
.
split
(
' '
)
architecture_dict
[
architecture
]
=
(
url
,
md5sum
)
self
.
options
[
'url'
],
self
.
options
[
'md5sum'
]
=
architecture_dict
[
guessPlatform
()]
script
=
"""
script
=
"""
# Specific url/md5sum can be given. Else, list of architecture-specific urls are given
if not self.options.get('url'):
self.setUrl()
architecture = guessPlatform()
self.options['url'] = self.options["%%s_url" %% architecture]
self.options['md5sum'] = self.options["%%s_md5sum" %% architecture]
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
print(extract_dir)
print(extract_dir)
workdir = guessworkdir(extract_dir)
workdir = guessworkdir(extract_dir)
...
...
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