Displaying 5 results from an estimated 5 matches for "insert_dir".
2014 Mar 10
3
[supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
...unge files =
- let files = List.sort compare files in
+ let paths =
+ List.sort compare
+ (List.map (fun file -> file.ft_path) files) in
let rec stat_is_dir dir =
try (stat dir).st_kind = S_DIR with Unix_error _ -> false
@@ -336,7 +338,7 @@ and munge files =
in
let insert_dir, dir_seen =
- let h = Hashtbl.create (List.length files) in
+ let h = Hashtbl.create (List.length paths) in
let insert_dir dir = Hashtbl.replace h dir true in
let dir_seen dir = Hashtbl.mem h dir in
insert_dir, dir_seen
@@ -385,10 +387,17 @@ and munge files =
(* Have we...
2014 Mar 13
2
Re: [supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
...avoid a corner-case in subsequent rules. *)
loop rest
- | dir :: rest when stat_is_dir dir && dir_seen dir ->
+ | dir :: rest when stat_is_dir dir.ft_path && dir_seen dir.ft_path ->
dir :: loop rest
- | dir :: rest when is_lnk_to_dir dir ->
- insert_dir dir;
+ | dir :: rest when is_lnk_to_dir dir.ft_path ->
+ insert_dir dir.ft_path;
(* Symlink to a directory. Insert the target directory before
* if we've not seen it yet.
*)
- let target = readlink dir in
- let parent = Filename.dirname dir in
+...
2014 Mar 13
3
[supermin 1/3] Recognize dpkg-divert
---
configure.ac | 1 +
src/config.ml.in | 1 +
src/dpkg.ml | 1 +
3 files changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac
index 2141540..99ea913 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,6 +92,7 @@ AC_PATH_PROG(APT_GET,[apt-get],[no])
AC_PATH_PROG(DPKG,[dpkg],[no])
AC_PATH_PROG(DPKG_DEB,[dpkg-deb],[no])
AC_PATH_PROG(DPKG_QUERY,[dpkg-query],[no])
2014 Mar 08
9
supermin and dpkg-divert
While trying to run libguestfs tests after building with
"--enable-appliance --with-supermin-extra-options=--use-installed", I
ran into a peculiar error message in the c-api test:
,----
| libguestfs: error: strings: /abssymlink: strings: error while loading
| shared libraries: libbfd-2.24-multiarch.so: cannot open shared object
| file: No such file or directory
`----
The problem here
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...+and munge files =
+ let files = List.sort compare files in
+
+ let rec stat_is_dir dir =
+ try (stat dir).st_kind = S_DIR with Unix_error _ -> false
+ and is_lnk_to_dir dir =
+ try stat_is_dir dir && (lstat dir).st_kind = S_LNK
+ with Unix_error _ -> false
+ in
+
+ let insert_dir, dir_seen =
+ let h = Hashtbl.create (List.length files) in
+ let insert_dir dir = Hashtbl.replace h dir true in
+ let dir_seen dir = Hashtbl.mem h dir in
+ insert_dir, dir_seen
+ in
+
+ let rec loop = function
+ | [] -> []
+
+ | "/" :: rest ->
+ (* This is...