Displaying 5 results from an estimated 5 matches for "stat_is_dir".
2014 Mar 13
2
Re: [supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
....ml
@@ -345,21 +346,21 @@ and munge files =
let rec loop = function
| [] -> []
- | "/" :: rest ->
+ | root :: rest when root.ft_path = "/" ->
(* This is just to 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_p...
2014 Mar 10
3
[supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
...e})
+ hostfiles)
) in
if debug >= 1 then
@@ -326,7 +326,9 @@ and isalnum = function
* symlink.
*)
and munge 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 t...
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.
...the distro.
+ *
+ * We create intermediate directories simply by examining the
+ * file list. Symlinks to not-yet-existing directories are
+ * handled by adding the target directory into the list before the
+ * symlink.
+ *)
+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 ins...