Displaying 20 results from an estimated 564 matches for "not_found".
2014 Jan 21
3
[PATCH] builder: proper consider subkeys in index files
...t.map (
fun (n, fields) ->
+ let find_elem key subkey fields =
+ match List.filter (
+ fun (iterkey, itersubkey, itervalue) ->
+ iterkey = key && itersubkey = subkey
+ ) fields with
+ | [] -> raise Not_found
+ | (_, _, value) :: _ -> value in
let printable_name =
- try Some (List.assoc "name" fields) with Not_found -> None in
+ try Some (find_elem "name" "" fields) with Not_found -> None in
let osinfo =
-...
2014 Jan 21
2
Re: [PATCH] builder: proper consider subkeys in index files
...let find_elem key subkey fields =
> > + match List.filter (
> > + fun (iterkey, itersubkey, itervalue) ->
> > + iterkey = key && itersubkey = subkey
> > + ) fields with
> > + | [] -> raise Not_found
> > + | (_, _, value) :: _ -> value in
> >
> > let printable_name =
> >
> > - try Some (List.assoc "name" fields) with Not_found ->
> > None in
> > + try Some (find_elem "name" "&q...
2014 Jan 21
0
[PATCH] builder: proper consider subkeys in index files
...et get_index ~prog ~debug ~downloader ~sigchecker source =
let entries =
List.map (
fun (n, fields) ->
+ let fields = List.map (fun (k, sk, v) -> (k, sk), v) fields in
let printable_name =
- try Some (List.assoc "name" fields) with Not_found -> None in
+ try Some (List.assoc ("name", None) fields) with Not_found -> None in
let osinfo =
- try Some (List.assoc "osinfo" fields) with Not_found -> None in
+ try Some (List.assoc ("osinfo", None) fields) with N...
2016 Jan 20
1
[PATCH] convert_windows: uninstall Parallels Tools on first boot
...+-
1 file changed, 72 insertions(+), 1 deletion(-)
diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml
index a08555f..3ab58c2 100644
--- a/v2v/convert_windows.ml
+++ b/v2v/convert_windows.ml
@@ -163,12 +163,66 @@ let convert ~keep_serial_console (g : G.guestfs) inspect source =
Not_found -> None
) in
+ (* Locate and retrieve all uninstallation commands for Parallels Tools *)
+ let prltools_uninsts =
+ let uninsts = ref [] in
+
+ Windows.with_hive g software_hive_filename ~write:false
+ (fun root ->
+ try
+ let path = ["Microsoft";...
2016 Aug 05
3
[PATCH] v2v: do not hide the error, rather report it
...t;tgolembi@redhat.com>
---
v2v/linux.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/v2v/linux.ml b/v2v/linux.ml
index e57dad6..46cb3ba 100644
--- a/v2v/linux.ml
+++ b/v2v/linux.ml
@@ -109,8 +109,8 @@ let rec file_owner (g : G.guestfs) inspect path =
raise Not_found
else
raise exn
- | Invalid_argument msg ->
- raise Not_found
+ | Invalid_argument "index out of bounds" ->
+ error (f_"internal error: file_owner: rpm command returned no output")
)
| format ->
--
2.9.2
2013 Jan 25
4
[PATCH 0/3] Use __attribute__((cleanup(...)))
This patch series changes a small part of the library to use
__attribute__((cleanup(...))) to automatically free memory when
pointers go out of the current scope.
In general terms this seems to be a small win although you do have to
use it carefully. For functions where you can completely get rid of
the "exit code paths", it can simplify things. For a good example,
see the
2016 Aug 01
3
[PATCH] v2v: fixed file_owner function
...bug "%s" (String.concat " " (Array.to_list cmd));
- (try g#command cmd
+ (try
+ let pkgs = g#command_lines cmd in
+ pkgs.(0)
with Guestfs.Error msg as exn ->
if String.find msg "is not owned" >= 0 then
raise Not_found
else
raise exn
+ | Invalid_argument msg ->
+ raise Not_found
)
| format ->
--
2.9.2
2016 Aug 03
1
Re: [PATCH] v2v: fixed file_owner function
...> > - (try g#command cmd
> > + (try
> > + let pkgs = g#command_lines cmd in
> > + pkgs.(0)
> > with Guestfs.Error msg as exn ->
> > if String.find msg "is not owned" >= 0 then
> > raise Not_found
> > else
> > raise exn
> > + | Invalid_argument msg ->
> > + raise Not_found
>
> My concern/confusion about this patch is what raises Invalid_argument?
>
> I'm assuming it's the array index, which could raise `...
2015 Feb 27
3
[PATCH] v2v: allow configurable location for virtio drivers
...--git a/v2v/convert_windows.ml b/v2v/convert_windows.ml
index 0cd818a..e966341 100644
--- a/v2v/convert_windows.ml
+++ b/v2v/convert_windows.ml
@@ -47,7 +47,9 @@ let convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source =
try Sys.getenv "VIRT_TOOLS_DATA_DIR"
with Not_found -> Config.datadir // "virt-tools" in
- let virtio_win_dir = "/usr/share/virtio-win" in
+ let virtio_win_dir =
+ try Sys.getenv "VIRTIO_WIN_DIR"
+ with Not_found -> Config.datadir // "virtio-win" in
(* Check if RHEV-APT exists. This is op...
2017 Apr 04
2
[PATCH v2] builder: Don't hard-code /etc for configuration files.
...insertions(+), 1 deletion(-)
diff --git a/builder/paths.ml b/builder/paths.ml
index cbd9d4bd0..d7c4820bf 100644
--- a/builder/paths.ml
+++ b/builder/paths.ml
@@ -35,7 +35,7 @@ let xdg_config_home () =
let xdg_config_dirs () =
let dirs =
try Sys.getenv "XDG_CONFIG_DIRS"
- with Not_found -> "/etc/xdg" in
+ with Not_found -> Guestfs_config.sysconfdir // "xdg" in
let dirs = String.nsplit ":" dirs in
let dirs = List.filter (fun x -> x <> "") dirs in
List.map (fun x -> x // prog) dirs
diff --git a/mllib/guestfs_confi...
2014 Jun 03
2
Re: libguestfs supermin error
Hi Rich
But there is no src/kernel.ml file on my ubuntu powerpc to which the
above patch is reffering.
I have installed supermin as supermin_5.1.8-2_powerpc.deb debian package.
Thanks
On Tue, Jun 3, 2014 at 7:16 PM, Richard W.M. Jones <rjones@redhat.com>
wrote:
> On Tue, Jun 03, 2014 at 06:55:49PM +0530, abhishek jain wrote:
> > supermin: failed to find a suitable kernel
2020 Sep 23
0
[v2v PATCH 3/3] linux: remove special handling of packages with no files
We check for /boot/vmlinuz-* files in packages with files, and List.find
will raise Not_found if there are none. Iterating on an empty list gives
the same result, so there is no need to handle empty packages in a
special way.
---
v2v/linux_kernels.ml | 321 +++++++++++++++++++++----------------------
1 file changed, 158 insertions(+), 163 deletions(-)
diff --git a/v2v/linux_kernels.ml b/v...
2017 Oct 27
0
[PATCH v11 5/8] builder: add a template parameter to get_index
...s corrupt.\nYou need to ask the supplier of this file to fix it and upload a fixed version.") uri
in
@@ -99,8 +99,25 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } =
let arch =
try Either (List.assoc ("arch", None) fields)
with Not_found ->
- eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n;
- corrupt_file () in
+ if template then
+ try
+ let g = new Guestfs.guestfs () in
+ g#add_drive_ro file_uri;
+ g#launch ();
+...
2017 Nov 13
0
[PATCH v12 2/3] builder: add a template parameter to get_index
...rrupt.\nYou need to ask the supplier of this file to fix it and upload a fixed version.") uri
in
@@ -99,8 +99,23 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } =
let arch =
try Index.Arch (List.assoc ("arch", None) fields)
with Not_found ->
- eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n;
- corrupt_file () in
+ if template then
+ let g = new Guestfs.guestfs () in
+ g#add_drive_ro file_uri;
+ g#launch ();
+ let roots =...
2017 Nov 21
0
[PATCH v13 2/3] builder: add a template parameter to get_index
...rrupt.\nYou need to ask the supplier of this file to fix it and upload a fixed version.") uri
in
@@ -99,8 +99,23 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } =
let arch =
try Index.Arch (List.assoc ("arch", None) fields)
with Not_found ->
- eprintf (f_"%s: no ‘arch’ entry for ‘%s’\n") prog n;
- corrupt_file () in
+ if template then
+ let g = open_guestfs ~identifier:"template" () in
+ g#add_drive_ro file_uri;
+ g#launch ();
+...
2017 Sep 22
0
[PATCH v3 02/22] common/mlpcre: Add PCRE.subi to return indexes instead of the substring.
...ot;PCRE.Error" (Error ("", 0))
diff --git a/common/mlpcre/PCRE.mli b/common/mlpcre/PCRE.mli
index 331a50a9a..02f16d19d 100644
--- a/common/mlpcre/PCRE.mli
+++ b/common/mlpcre/PCRE.mli
@@ -77,3 +77,17 @@ val sub : int -> string
If there was no nth substring then this raises [Not_found].
This can also raise {!Error} for other PCRE-related errors. *)
+
+val subi : int -> int * int
+(** Return the nth substring (capture) matched by the previous call
+ to {!matches} in the current thread.
+
+ This is the same as {!sub} but instead of copying the
+ substring out, it...
2017 Oct 05
4
[PATCH 0/2] lib: Allow db_dump package to be a weak dependency.
Fix for:
https://bugzilla.redhat.com/show_bug.cgi?id=1409024
2018 May 22
1
[PATCH v2] v2v: linux: fix kernel detection when split in different packages
...String.length filename >= 14 &&
- String.is_prefix filename "/lib/modules/"
- ) files in
-
- (* Check vmlinuz & modpath exist. *)
- if not (g#is_dir ~followsymlinks:true modpath) then
- raise Not_found;
let vmlinuz_stat =
try g#statns vmlinuz with G.Error _ -> raise Not_found in
- (* Get/construct the version. XXX Read this from kernel file. *)
- let version =
- let prefix_len = String.length "/lib/modules/" in
-...
2015 Oct 13
2
[PATCH v2 2/4] v2v: copy virtio drivers without guestfs handle leak
...per or lowercase path
+ * elements.
+ *)
+ let lc_path = String.lowercase_ascii path in
+ let lc_basename = Filename.basename path in
- let extension =
- match last_part_of lc_basename '.' with
- | Some x -> x
- | None -> raise Not_found
- in
+ let extension =
+ match last_part_of lc_basename '.' with
+ | Some x -> x
+ | None -> raise Not_found
+ in
- (* Skip files without specific extensions. *)
- if extension <> "cat" && extension <> &qu...
2015 Aug 10
0
[PATCH 3/4] v2v: copy virtio drivers without guestfs handle leak
...c_basename in
-
- (* Skip files without specific extensions. *)
- if extension <> "cat" && extension <> "inf" &&
- extension <> "pdb" && extension <> "sys" then
- raise Not_found;
-
- (* Using the full path, work out what version of Windows
- * this driver is for. Paths can be things like:
- * "NetKVM/2k12R2/amd64/netkvm.sys" or
- * "./drivers/amd64/Win2012R2/netkvm.sys".
- * Note we check lowercase paths...