From d5b59ea2f6b1078e18657c18261c6a35f7a7fff9 Mon Sep 17 00:00:00 2001 From: James Bielman Date: Wed, 21 Aug 2013 13:55:16 -0700 Subject: [PATCH] Don't depend on mirage-net for noip builds. --- lib/mirari.ml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/mirari.ml b/lib/mirari.ml index 72d0889..8bc30d7 100644 --- a/lib/mirari.ml +++ b/lib/mirari.ml @@ -338,7 +338,7 @@ module Build = struct if t.packages <> [] && not (cmd_exists "opam") then error "OPAM is not installed." - let prepare ~mode t = + let prepare ~mode ip t = check t; let os = match mode with @@ -346,11 +346,13 @@ module Build = struct | `xen -> "mirage-xen" in let net = - match mode with - | `xen | `unix `direct -> "mirage-net-direct" - | `unix `socket -> "mirage-net-socket" + match ip with + | IP.NOIP -> [] + | _ -> (match mode with + | `xen | `unix `direct -> ["mirage-net-direct"] + | `unix `socket -> ["mirage-net-socket"]) in - let ps = os :: net :: t.packages in + let ps = os :: t.packages @ net in opam_install ps end @@ -481,7 +483,7 @@ let configure ~mode ~no_install file = (* Generate the XL config file if backend = Xen *) if mode = `xen then XL.output t.name t.kvs; (* install OPAM dependencies *) - if not no_install then Build.prepare ~mode t.build; + if not no_install then Build.prepare ~mode t.ip t.build; (* crunch *) call_crunch_scripts t -- 1.7.9.5