Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Leo Le Bouter
slapos
Commits
97d5f9c3
Commit
97d5f9c3
authored
Jul 26, 2012
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add kinda lock file for rootfs downloading
parent
b7c1d8bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
slapos/recipe/container.py
slapos/recipe/container.py
+2
-0
slapos/recipe/rootfs.py
slapos/recipe/rootfs.py
+8
-5
No files found.
slapos/recipe/container.py
View file @
97d5f9c3
...
@@ -109,11 +109,13 @@ class Recipe(GenericSlapRecipe):
...
@@ -109,11 +109,13 @@ class Recipe(GenericSlapRecipe):
config
.
add_section
(
'rootfs'
)
config
.
add_section
(
'rootfs'
)
config
.
set
(
'rootfs'
,
'directory'
,
self
.
options
[
'rootfs'
])
config
.
set
(
'rootfs'
,
'directory'
,
self
.
options
[
'rootfs'
])
config
.
set
(
'rootfs'
,
'tmp'
,
self
.
options
[
'tmp-dir'
])
config
.
set
(
'rootfs'
,
'tmp'
,
self
.
options
[
'tmp-dir'
])
config
.
set
(
'rootfs'
,
'complete'
,
self
.
options
[
'archive-complete'
])
config
.
add_section
(
'config'
)
config
.
add_section
(
'config'
)
config
.
set
(
'config'
,
'file'
,
self
.
options
[
'config-file'
])
config
.
set
(
'config'
,
'file'
,
self
.
options
[
'config-file'
])
config
.
add_section
(
'tar'
)
config
.
add_section
(
'tar'
)
config
.
set
(
'tar'
,
'binary'
,
self
.
options
[
'tar-binary'
])
config
.
set
(
'tar'
,
'binary'
,
self
.
options
[
'tar-binary'
])
config
.
set
(
'tar'
,
'path'
,
self
.
options
[
'tar-path'
])
config
.
set
(
'tar'
,
'path'
,
self
.
options
[
'tar-path'
])
config
.
set
(
'tar'
,
'archive'
,
self
.
options
[
'archive'
])
config_filename
=
self
.
options
[
'config'
]
config_filename
=
self
.
options
[
'config'
]
with
open
(
config_filename
,
'w'
)
as
config_file
:
with
open
(
config_filename
,
'w'
)
as
config_file
:
...
...
slapos/recipe/rootfs.py
View file @
97d5f9c3
...
@@ -26,14 +26,17 @@
...
@@ -26,14 +26,17 @@
##############################################################################
##############################################################################
import
os
import
os
import
subprocess
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.librecipe.execute
import
execute
def
service
(
args
):
def
service
(
args
):
if
not
os
.
path
.
exists
(
args
[
'rootfs'
])
and
\
if
not
os
.
path
.
exists
(
args
[
'confirm'
]):
not
os
.
path
.
exists
(
args
[
'output'
]):
subprocess
.
check_call
([
args
[
'wget'
],
args
[
'archive'
],
execute
([
args
[
'wget'
],
args
[
'archive'
],
'-O'
,
args
[
'output'
]])
'-O'
,
args
[
'output'
]])
open
(
args
[
'confirm'
],
'w'
).
close
()
class
Recipe
(
GenericBaseRecipe
):
class
Recipe
(
GenericBaseRecipe
):
...
@@ -48,7 +51,7 @@ class Recipe(GenericBaseRecipe):
...
@@ -48,7 +51,7 @@ class Recipe(GenericBaseRecipe):
'wget'
:
self
.
options
[
'wget-binary'
],
'wget'
:
self
.
options
[
'wget-binary'
],
'archive'
:
self
.
options
[
'archive-url'
],
'archive'
:
self
.
options
[
'archive-url'
],
'output'
:
self
.
options
[
'downloaded-archive'
],
'output'
:
self
.
options
[
'downloaded-archive'
],
'
rootfs'
:
self
.
options
[
'rootfs
'
]
'
confirm'
:
self
.
options
[
'downloaded-archive-complete
'
]
}
}
)
)
)
)
...
...
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