Displaying 4 results from an estimated 4 matches for "path_perform".
2013 Dec 09
2
[PATCH] sysprep: allow to specify globbing for --delete
...nsertions(+), 1 deletion(-)
diff --git a/sysprep/sysprep_operation_delete.ml b/sysprep/sysprep_operation_delete.ml
index de78a87..59d5485 100644
--- a/sysprep/sysprep_operation_delete.ml
+++ b/sysprep/sysprep_operation_delete.ml
@@ -27,7 +27,9 @@ let add_paths path = paths := path :: !paths
let path_perform g root =
let paths = List.rev !paths in
- List.iter g#rm_rf paths;
+ if paths <> [] then (
+ List.iter (fun glob -> Array.iter g#rm_rf (g#glob_expand glob)) paths
+ );
[]
let op = {
--
1.8.3.1
2013 Oct 22
4
[PATCH] sysprep: add feature of removing specified paths
...program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+open Common_utils
+open Sysprep_operation
+open Common_gettext.Gettext
+
+module G = Guestfs
+
+let paths= ref []
+let add_paths path= paths := path :: !paths
+
+let path_perform g root =
+ let paths = List.rev !paths in
+ if paths <> [] then (
+ List.iter (fun glob -> Array.iter g#rm_rf (g#glob_expand glob)) paths
+ );
+ []
+
+let op = {
+ defaults with
+ name = "remove-path";
+ enabled_by_default = true;
+ heading = s_"Remove speci...
2013 Dec 09
0
Re: [PATCH] sysprep: allow to specify globbing for --delete
...iff --git a/sysprep/sysprep_operation_delete.ml b/sysprep/sysprep_operation_delete.ml
> index de78a87..59d5485 100644
> --- a/sysprep/sysprep_operation_delete.ml
> +++ b/sysprep/sysprep_operation_delete.ml
> @@ -27,7 +27,9 @@ let add_paths path = paths := path :: !paths
>
> let path_perform g root =
> let paths = List.rev !paths in
> - List.iter g#rm_rf paths;
> + if paths <> [] then (
> + List.iter (fun glob -> Array.iter g#rm_rf (g#glob_expand glob)) paths
> + );
> []
>
> let op = {
> --
> 1.8.3.1
ACK, but should we update the...
2014 Jan 21
1
[PATCH 1/2] sysprep: Update comments.
---
sysprep/sysprep_operation.mli | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sysprep/sysprep_operation.mli b/sysprep/sysprep_operation.mli
index 61dde72..eb89db4 100644
--- a/sysprep/sysprep_operation.mli
+++ b/sysprep/sysprep_operation.mli
@@ -16,14 +16,16 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*)
-(** Structure used to describe sysprep