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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Roque
slapos
Commits
40d8562c
Commit
40d8562c
authored
Oct 24, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use createWrapper() for rdiff-backup
parent
bd35420c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
slapos/recipe/pbs.py
slapos/recipe/pbs.py
+11
-13
No files found.
slapos/recipe/pbs.py
View file @
40d8562c
...
...
@@ -134,8 +134,7 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
'host'
:
parsed_url
.
hostname
,
}
command
=
[
self
.
options
[
'rdiffbackup-binary'
]]
command
.
extend
([
'--remote-schema'
,
remote_schema
])
parameters
=
[
'--remote-schema'
,
remote_schema
]
remote_directory
=
'%(port)s::%(path)s'
%
{
'port'
:
parsed_url
.
port
,
'path'
:
parsed_url
.
path
}
...
...
@@ -144,24 +143,23 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
name_hash
)
if
entry
[
'type'
]
==
'push'
:
command
.
extend
([
'--restore-as-of'
,
'now'
])
command
.
append
(
'--force'
)
command
.
extend
([
local_directory
,
remote_directory
])
parameters
.
extend
([
'--restore-as-of'
,
'now'
])
parameters
.
append
(
'--force'
)
parameters
.
extend
([
local_directory
,
remote_directory
])
else
:
command
.
extend
([
remote_directory
,
local_directory
])
parameters
.
extend
([
remote_directory
,
local_directory
])
wrapper_basepath
=
os
.
path
.
join
(
self
.
options
[
'wrappers-directory'
],
url_hash
)
wrapper_path
=
wrapper_basepath
if
'notify'
in
entry
:
wrapper_path
=
'%s_raw'
%
wrapper_basepath
wrapper_path
=
wrapper_basepath
+
'_raw'
else
:
wrapper_path
=
wrapper_basepath
wrapper
=
self
.
createPythonScript
(
wrapper_path
,
'slapos.recipe.librecipe.execute.execute'
,
[
str
(
i
)
for
i
in
command
]
)
wrapper
=
self
.
createWrapper
(
name
=
wrapper_path
,
command
=
self
.
options
[
'rdiffbackup-binary'
],
parameters
=
parameters
)
path_list
.
append
(
wrapper
)
if
'notify'
in
entry
:
...
...
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