This is an automated email from the git hooks/post-receive script.

treinen pushed a commit to branch experimental/master
in repository dose3.

commit 0740c4fa769e2210b5031f84cac05bbaed148837
Author: Ralf Treinen <trei...@free.fr>
Date:   Wed Jun 15 20:14:34 2016 +0200

    Imported Upstream version 5.0~rc2
---
 Makefile                      |  3 +-
 algo/depsolver.ml             | 36 +++++++++++++-------
 algo/depsolver_int.ml         | 79 ++++++++++++++++++++-----------------------
 algo/depsolver_int.mli        | 34 +++++++++++--------
 algo/strongconflicts_int.ml   |  2 +-
 algo/strongdeps.ml            | 10 +++---
 applications/distcheck.ml     | 13 -------
 applications/outdated.ml      | 16 ++++-----
 common/edosSolver.ml          | 26 +++++++++++---
 configure                     | 18 +++++-----
 configure.ac                  |  2 +-
 deb/tests.ml                  |  4 ++-
 doseparse/stdLoaders.ml       |  2 +-
 pef/pef.itarget               |  4 ---
 versioning/versioning.itarget |  4 ---
 15 files changed, 132 insertions(+), 121 deletions(-)

diff --git a/Makefile b/Makefile
index 4efc591..09464ff 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,8 @@ DIST_TARBALL = $(DIST_DIR).tar.gz
 #VERBOSE := -classic-display
 OBFLAGS := $(VERBOSE) -j 10 -no-links -cflags -warn-error,FPSXY
 APPFLAGS := $(VERBOSE) -j 10
-#OBFLAGS := $(OBFLAGS) -tag profile -tag debug
+#OBFLAGS := $(OBFLAGS) -tag debug
+#OBFLAGS := $(OBFLAGS) -tag profile
 #OBFLAGS := $(OBFLAGS) -classic-display
 
 addnotrpm:
diff --git a/algo/depsolver.ml b/algo/depsolver.ml
index acb36ca..2f05f51 100644
--- a/algo/depsolver.ml
+++ b/algo/depsolver.ml
@@ -19,6 +19,8 @@ let label =  __label ;;
 include Util.Logging(struct let label = label end) ;;
 
 type solver = Depsolver_int.solver
+let timer_solver = Util.Timer.create "Algo.Depsolver.solver" 
+let timer_init = Util.Timer.create "Algo.Depsolver.init" 
 
 let load ?(global_constraints=[]) universe =
   let global_constraints =
@@ -35,14 +37,15 @@ let load ?(global_constraints=[]) universe =
 *)
 let univcheck ?(global_constraints=[]) ?callback ?(explain=true) universe =
   let aux ?callback univ =
-    let timer = Util.Timer.create "Algo.Depsolver.univcheck" in
-    Util.Timer.start timer;
     let global_constraints =
       List.map (fun (vpkg,l) ->
         (vpkg,List.map (CudfAdd.pkgtoint universe) l)
       ) global_constraints
     in
+    Util.Timer.start timer_init;
     let solver = Depsolver_int.init_solver_univ ~global_constraints ~explain 
univ in
+    Util.Timer.stop timer_init ();
+    Util.Timer.start timer_solver;
     let failed = ref 0 in
     (* This is size + 1 because we encode the global constraint of the
      * universe as a package that must be tested like any other *)
@@ -53,7 +56,7 @@ let univcheck ?(global_constraints=[]) ?callback 
?(explain=true) universe =
     (* we do not test the last package that encodes the global constraints
      * on the universe as it is tested all the time with all other packages. *)
     for id = 0 to size - 2 do if not(check id) then incr failed done;
-    Util.Timer.stop timer !failed
+    Util.Timer.stop timer_solver !failed
   in
   let map = new Common.Util.identity in
   match callback with
@@ -76,19 +79,26 @@ let listcheck ?(global_constraints=[]) ?callback 
?(explain=true) universe pkglis
         (vpkg,List.map (CudfAdd.pkgtoint universe) l)
       ) global_constraints
     in
+    Util.Timer.start timer_init;
     let solver = Depsolver_int.init_solver_univ ~global_constraints ~explain 
univ in
-    let timer = Util.Timer.create "Algo.Depsolver.listcheck" in
-    Util.Timer.start timer;
+    Util.Timer.stop timer_init ();
+    Util.Timer.start timer_solver;
     let failed = ref 0 in
     let size = (Cudf.universe_size univ) + 1 in
     let tested = Array.make size false in
     Util.Progress.set_total Depsolver_int.progressbar_univcheck size ;
     let check = Depsolver_int.pkgcheck callback explain solver tested in
-    List.iter (function
-      |id when id = solver.Depsolver_int.globalid -> ()
-      |id -> if not(check id) then incr failed
-    ) idlist ;
-    Util.Timer.stop timer !failed
+    begin match (fst solver.Depsolver_int.globalid) with
+    |(false,false) ->
+        List.iter (fun id -> if not(check id) then incr failed) idlist
+    |_ -> 
+        let gid = snd solver.Depsolver_int.globalid in
+        List.iter (function
+          |id when id = gid -> ()
+          |id ->if not(check id) then incr failed
+        ) idlist 
+    end;
+    Util.Timer.stop timer_solver !failed
   in
   let idlist = List.map (CudfAdd.pkgtoint universe) pkglist in
   let map = new Common.Util.identity in
@@ -162,8 +172,8 @@ let univcheck_lowmem ?(global_constraints=[]) ?callback 
?(explain=true) universe
 let edos_install_cache univ cudfpool pkglist =
   let idlist = List.map (CudfAdd.pkgtoint univ) pkglist in
   let closure = Depsolver_int.dependency_closure_cache cudfpool idlist in
-  let solver = Depsolver_int.init_solver_closure cudfpool closure in
-  let res = Depsolver_int.solve solver ~explain:true idlist in
+  let solver = Depsolver_int.init_solver_closure ~global_constraints:[] 
cudfpool closure in
+  let res = Depsolver_int.solve solver  ~explain:true idlist in
   Diagnostic.diagnosis solver.Depsolver_int.map univ res idlist
 ;;
 
@@ -545,7 +555,7 @@ let depclean ?(global_constraints=[]) ?(callback=(fun _ -> 
())) universe pkglist
   (* if a package p depends on a package that make p uninstallable, then it 
      can be removed. If p depends on a missing package, the dependency can
      be equally removed *)
-  let test_depends univ (`CudfPool pool) pkg l =
+  let test_depends univ (`CudfPool (_,pool)) pkg l =
     List.fold_left (fun acc -> function
       |(vpkglist,vpkg,_,[]) -> (vpkglist,vpkg,[])::acc
       |(vpkglist,vpkg,depends,l) ->
diff --git a/algo/depsolver_int.ml b/algo/depsolver_int.ml
index 911766e..964a638 100644
--- a/algo/depsolver_int.ml
+++ b/algo/depsolver_int.ml
@@ -10,25 +10,9 @@
 (*  library, see the COPYING file for more information.                        
       *)
 
(**************************************************************************************)
 
-(** Dependency solver. Low Level API *)
-
-(** Implementation of the EDOS algorithms (and more).
-    This module respects the cudf semantic. 
-
-    This module contains two type of functions.
-    Normal functions work on a cudf universe. These are just a wrapper to
-    _cache functions.
-
-    _cache functions work on a pool of ids that is a more compact
-    representation of a cudf universe based on arrays of integers.
-    _cache function can be used to avoid recreating the pool for each
-    operation and therefore speed up operations.
-*)
-
 open ExtLib
 open Common
 
-(** progress bar *)
 let progressbar_init = Util.Progress.create "Depsolver_int.init_solver"
 let progressbar_univcheck = Util.Progress.create "Depsolver_int.univcheck"
 
@@ -39,20 +23,19 @@ include Util.Logging(struct let label = label end) ;;
 module R = struct type reason = Diagnostic.reason_int end
 module S = EdosSolver.M(R)
 
-(** low level solver data type *)
 type solver = {
-  constraints : S.state; (** the sat problem *)
-  map : Util.projection; (** a map from cudf package ids to solver ids *)
-  globalid : int (* the last index of the cudfpool. 
-                    Used to encode a 'dummy' package and to enforce global
-                    constraints *)
+  constraints : S.state;
+  map : Util.projection;
+  globalid : (bool * bool) * int
 }
 
+type global_constraints = (Cudf_types.vpkglist * int list) list
+
 type dep_t = 
   ((Cudf_types.vpkg list * S.var list) list * 
    (Cudf_types.vpkg * S.var list) list ) 
 and pool = dep_t array
-and t = [`SolverPool of pool | `CudfPool of pool]
+and t = [`SolverPool of pool | `CudfPool of (bool * pool)]
 
 type result =
   |Success of (unit -> int list)
@@ -60,7 +43,7 @@ type result =
 
 (* cudf uid -> cudf uid array . Here we assume cudf uid are sequential
    and we can use them as an array index *)
-let init_pool_univ ?global_constraints univ =
+let init_pool_univ ~global_constraints univ =
   (* the last element of the array *)
   let size = Cudf.universe_size univ in
   let keep = Hashtbl.create 200 in
@@ -117,17 +100,14 @@ let init_pool_univ ?global_constraints univ =
   let keep_dll =
     Hashtbl.fold (fun cnstr {contents = l} acc ->
       ([cnstr],l) :: acc
-    ) keep (
-      if Option.is_none global_constraints then []
-      else Option.get global_constraints
-    )
+    ) keep global_constraints
   in
   pool.(size) <- (keep_dll,[]);
-  (`CudfPool pool)
+  (`CudfPool (keep_dll <> [],pool))
 
 (** this function creates an array indexed by solver ids that can be 
     used to init the edos solver *)
-let init_solver_pool map (`CudfPool cudfpool) closure =
+let init_solver_pool map (`CudfPool (keep_constraints,cudfpool)) closure =
   let convert (dll,cl) =
     let sdll = 
       List.map (fun (vpkgs,uidl) ->
@@ -258,9 +238,16 @@ let solve ?tested ~explain solver request =
       else
         Diagnostic.FailureInt(fun () -> [])
   in
-  (* the global id "package" is always co-installed *)
-  let il = List.map solver.map#vartoint (solver.globalid :: request) in
-  result S.solve_lst S.collect_reasons_lst il
+  match request,solver.globalid with
+  |[],((false,false),_) -> Diagnostic.SuccessInt(fun ?(all=false) () -> [])
+  |[],(((_,true)|(true,_)),gid) -> result S.solve S.collect_reasons 
(solver.map#vartoint gid)
+  |[i],((false,false),_) -> result S.solve S.collect_reasons 
(solver.map#vartoint i)
+  |l,((false,false),_) ->
+      let il = List.map solver.map#vartoint l in
+      result S.solve_lst S.collect_reasons_lst il
+  |l,(_,gid) ->
+      let il = List.map solver.map#vartoint (gid :: l) in
+      result S.solve_lst S.collect_reasons_lst il
 
 (* this function is used to "distcheck" a list of packages. The id is a 
cudfpool index *)
 let pkgcheck callback explain solver tested id =
@@ -298,15 +285,17 @@ let pkgcheck callback explain solver tested id =
     @param buffer debug buffer to print out debug messages
     @param univ cudf package universe
 *)
-let init_solver_univ ?global_constraints ?(buffer=false) ?(explain=true) univ =
+let init_solver_univ ~global_constraints ?(buffer=false) ?(explain=true) univ =
   let map = new Util.identity in
   (* here we convert a cudfpool in a varpool. The assumption
    * that cudf package identifiers are contiguous is essential ! *)
-  let `CudfPool pool = init_pool_univ ?global_constraints univ in
+  let `CudfPool (keep_constraints,pool) = init_pool_univ ~global_constraints 
univ in
   let varpool = `SolverPool pool in
   let constraints = init_solver_cache ~buffer ~explain varpool in
-  let globalid = Cudf.universe_size univ in
-  { constraints = constraints ; map = map; globalid = globalid }
+  let gid = Cudf.universe_size univ in
+  let global_constraints = global_constraints <> [] in
+  { constraints = constraints ; map = map;
+    globalid = ((keep_constraints,global_constraints),gid) }
 
 (** low level constraint solver initialization
  
@@ -315,13 +304,19 @@ let init_solver_univ ?global_constraints ?(buffer=false) 
?(explain=true) univ =
     @param closure subset of packages used to initialize the solver
 *)
 (* pool = cudf pool - closure = dependency clousure . cudf uid list *)
-let init_solver_closure ?(buffer=false) (`CudfPool cudfpool) closure =
-  let globalid = Array.length cudfpool - 1 in
+let init_solver_closure ~global_constraints ?(buffer=false) 
+  (`CudfPool (keep_constraints,cudfpool)) closure =
+  let gid = Array.length cudfpool - 1 in
+  let global_constraints = global_constraints <> [] in
   let map = new Util.intprojection (List.length closure) in
   List.iter map#add closure;
-  let varpool = init_solver_pool map (`CudfPool cudfpool) closure in
+  let varpool =
+    init_solver_pool map
+      (`CudfPool (keep_constraints,cudfpool)) closure
+  in
   let constraints = init_solver_cache ~buffer varpool in
-  { constraints = constraints ; map = map; globalid = globalid }
+  { constraints ; map = map;
+    globalid = ((keep_constraints,global_constraints),gid) }
 
 (** return a copy of the state of the solver *)
 let copy_solver solver =
@@ -350,7 +345,7 @@ let reverse_dependencies univ =
   reverse
 
 let dependency_closure_cache ?(maxdepth=max_int) 
-  ?(conjunctive=false) (`CudfPool cudfpool) idlist =
+  ?(conjunctive=false) (`CudfPool (_,cudfpool)) idlist =
   let queue = Queue.create () in
   let globalid = (Array.length cudfpool - 1) in
   let visited = Hashtbl.create (2 * (List.length idlist)) in
diff --git a/algo/depsolver_int.mli b/algo/depsolver_int.mli
index 89a96ef..e28441f 100644
--- a/algo/depsolver_int.mli
+++ b/algo/depsolver_int.mli
@@ -34,12 +34,18 @@ module S : Common.EdosSolver.T with module X = R
     sat solver variables (that must be contiguous) to integers 
     representing the id of a package *)
 type solver = {
-  constraints : S.state;        (** the sat problem *)
-  map : Common.Util.projection; (** a map from cudf package ids to solver ids 
*)
-  globalid : int                (** the last index of the cudfpool. Used to 
encode 
-                                    a 'dummy' package and to enforce global 
constraints *)
+  constraints : S.state;         (** the sat problem *)
+  map : Common.Util.projection;  (** a map from cudf package ids to solver ids 
*)
+  globalid : (bool * bool) * int (** (keep_constrains,global_constrains),gui) 
where
+                                     gid is the last index of the cudfpool. 
Used to encode 
+                                     a 'dummy' package and to enforce global 
constraints.
+                                     keep_constrains and global_constrains are 
true if either
+                                     keep_constrains or global_constrains are 
enforceble.
+                                  *)
 }
 
+type global_constraints = (Cudf_types.vpkglist * int list) list
+
 (** Solver Package Pool. [pool_t] is an array where each index
   is an solver variable and the content of the array associates
   cudf dependencies to a list of solver varialbles representing
@@ -50,8 +56,10 @@ type dep_t =
 and pool = dep_t array
 (** A pool can either be a low level representation of the universe
     where all integers are interpreted as solver variables or a universe
-    where all integers are interpreted as cudf package indentifiers *)
-and t = [`SolverPool of pool | `CudfPool of pool]
+    where all integers are interpreted as cudf package indentifiers. The
+    boolean associate to the cudfpool is true if keep_constrains are 
+    present in the universe. *)
+and t = [`SolverPool of pool | `CudfPool of (bool * pool)]
 
 type result =
   | Success of (unit -> int list) (** return a function providing the list of 
the 
@@ -61,14 +69,12 @@ type result =
 
 (** Given a cudf universe , this function returns a [CudfPool]. 
     We assume that cudf uid are sequential and we can use them as an array 
index *)
-val init_pool_univ :
-  ?global_constraints:(Cudf_types.vpkglist * int list) list ->
-    Cudf.universe -> [> `CudfPool of pool]
+val init_pool_univ : global_constraints : global_constraints -> Cudf.universe 
-> [> `CudfPool of (bool * pool)]
 
 (** this function creates an array indexed by solver ids that can be 
     used to init the edos solver. Return a [SolverPool] *)
 val init_solver_pool : Common.Util.projection -> 
-  [< `CudfPool of pool] -> 'a list -> [> `SolverPool of pool]
+  [< `CudfPool of (bool * pool)] -> 'a list -> [> `SolverPool of pool]
 
 (** Initalise the sat solver. Operates only on solver ids [SolverPool] *)
 val init_solver_cache : ?buffer:bool -> ?explain:bool ->
@@ -99,8 +105,7 @@ val pkgcheck :
     @param buffer debug buffer to print out debug messages
     @param univ cudf package universe
 *)
-val init_solver_univ :
-  ?global_constraints:(Cudf_types.vpkglist * int list) list -> ?buffer: bool 
-> 
+val init_solver_univ : global_constraints : global_constraints -> ?buffer: 
bool -> 
     ?explain: bool -> Cudf.universe -> solver
 
 (** Constraint solver initialization
@@ -110,7 +115,8 @@ val init_solver_univ :
     @param closure subset of packages used to initialize the solver
 *)
 (* pool = cudf pool - closure = dependency clousure . cudf uid list *)
-val init_solver_closure : ?buffer:bool -> [< `CudfPool of pool] -> int list -> 
solver
+val init_solver_closure : global_constraints : global_constraints -> 
?buffer:bool ->
+  [< `CudfPool of (bool * pool)] -> int list -> solver
 
 (** return a copy of the state of the solver *)
 val copy_solver : solver -> solver
@@ -123,7 +129,7 @@ val copy_solver : solver -> solver
 val reverse_dependencies : Cudf.universe -> int list array
 
 val dependency_closure_cache : ?maxdepth:int -> ?conjunctive:bool ->
-  [< `CudfPool of pool] -> int list -> S.var list
+  [< `CudfPool of (bool * pool)] -> int list -> S.var list
 
 (** return the dependency closure of the reverse dependency graph.
     The visit is bfs.    
diff --git a/algo/strongconflicts_int.ml b/algo/strongconflicts_int.ml
index 653b52e..f834587 100644
--- a/algo/strongconflicts_int.ml
+++ b/algo/strongconflicts_int.ml
@@ -75,7 +75,7 @@ let triangle reverse xpred ypred common =
 
 (* [strongconflicts mdf] return the list of strong conflicts *)
 let strongconflicts univ =
-  let solver = Depsolver_int.init_solver_univ univ in
+  let solver = Depsolver_int.init_solver_univ ~global_constraints:[] univ in
   let reverse = Depsolver_int.reverse_dependencies univ in
   let size = Cudf.universe_size univ in
   let cache = IG.make size in
diff --git a/algo/strongdeps.ml b/algo/strongdeps.ml
index 08dd606..59d62f8 100644
--- a/algo/strongdeps.ml
+++ b/algo/strongdeps.ml
@@ -41,7 +41,8 @@ let check_strong univ transitive graph solver p l =
   let pkg_p = CudfAdd.inttopkg univ p in
   List.iter (fun q ->
     let q = solver.Depsolver_int.map#inttovar q in
-    if q <> solver.Depsolver_int.globalid then
+    let gid = (snd solver.Depsolver_int.globalid) in
+    if q <> gid then
       let pkg_q = CudfAdd.inttopkg univ q in
       if p <> q then
         if not(Defaultgraphs.PackageGraph.G.mem_edge graph pkg_p pkg_q) then
@@ -50,7 +51,7 @@ let check_strong univ transitive graph solver p l =
   ) l
 
 (* true if at least one dependency is disjunctive *)
-let somedisj (`CudfPool cudfpool) id = 
+let somedisj (`CudfPool (_,cudfpool)) id = 
   let (depends,_) = cudfpool.(id) in
   if List.length depends > 0 then
     try
@@ -66,7 +67,8 @@ let somedisj (`CudfPool cudfpool) id =
    might be hidden in the closure.
 *)
 let strongdeps_int ?(transitive=true) graph univ pkglist =
-  let cudfpool = Depsolver_int.init_pool_univ univ in
+  let global_constraints = [] in
+  let cudfpool = Depsolver_int.init_pool_univ ~global_constraints univ in
   let pkglist_size = List.length pkglist in
   let universe_size = Cudf.universe_size univ in
 
@@ -78,7 +80,7 @@ let strongdeps_int ?(transitive=true) graph univ pkglist =
     let id = CudfAdd.pkgtoint univ pkg in
     if (pkglist_size <> universe_size) || (somedisj cudfpool id) then begin 
       let closure = Depsolver_int.dependency_closure_cache cudfpool [id] in
-      let solver = Depsolver_int.init_solver_closure cudfpool closure in
+      let solver = Depsolver_int.init_solver_closure ~global_constraints 
cudfpool closure in
       match Depsolver_int.solve solver ~explain:true [id] with
       |Diagnostic.FailureInt(_) -> ()
       |Diagnostic.SuccessInt(f_int) ->
diff --git a/applications/distcheck.ml b/applications/distcheck.ml
index 776d6d9..48c323f 100644
--- a/applications/distcheck.ml
+++ b/applications/distcheck.ml
@@ -240,19 +240,6 @@ let main () =
     let nbp =
       if (OptParse.Opt.is_set Options.checkonly) && (List.length checklist) = 
0 then 0
       else if OptParse.Opt.is_set Options.checkonly || not(bg_pkglist = []) 
then 
-        (*
-        let subuniverse =
-          let l =
-            Cudf.fold_packages (fun acc pkg ->
-                match pkg.Cudf.keep with
-                |`Keep_package |`Keep_version | `Keep_feature 
-                  when pkg.Cudf.installed -> pkg::acc
-                |_ -> acc
-            ) checklist universe
-          in
-          Cudf.load_universe (CudfAdd.cone universe l)
-        in
-        *)
         Depsolver.listcheck ~global_constraints ~callback ~explain universe 
checklist
       else
         univcheck ~global_constraints ~callback ~explain universe 
diff --git a/applications/outdated.ml b/applications/outdated.ml
index 5e78749..c42e166 100644
--- a/applications/outdated.ml
+++ b/applications/outdated.ml
@@ -92,8 +92,6 @@ let version_of_target getv = function
   |`Lo v |`In (_,v) -> (getv v) - 1
 ;;
 
-let timer = Util.Timer.create "Solver"
-
 (* the repository should contain only the most recent version of each
    package *)
 let future ~options ?(checklist=[]) repository =
@@ -273,17 +271,16 @@ let outdated
   let results = Diagnostic.default_result universe_size in
   let callback d = 
     if summary then Diagnostic.collect results d ;
-    Diagnostic.fprintf ~pp ~failure ~explain fmt d 
+    if failure then
+      Diagnostic.fprintf ~pp ~failure ~explain fmt d 
   in
 
-  Util.Timer.start timer;
   let broken =
     if checklist <> [] then
-      Depsolver.listcheck ~callback universe checklist
+      Depsolver.listcheck ~callback ~explain universe checklist
     else
-      Depsolver.univcheck ~callback universe
+      Depsolver.univcheck ~callback ~explain universe
   in
-  ignore(Util.Timer.stop timer ());
 
   if failure then Format.fprintf fmt "@]@.";
 
@@ -306,8 +303,9 @@ let main () =
 
   StdDebug.enable_debug (OptParse.Opt.get Options.verbose);
   StdDebug.enable_bars (OptParse.Opt.get Options.progress)
-    ["Depsolver_int.univcheck";"Depsolver_int.init_solver"] ;
-  StdDebug.enable_timers (OptParse.Opt.get Options.timers) ["Solver"];
+  ["Depsolver_int.univcheck";"Depsolver_int.init_solver"];
+  StdDebug.enable_timers (OptParse.Opt.get Options.timers)
+    ["Algo.Depsolver.solver"; "Algo.Depsolver.init" ] ;
   StdDebug.all_quiet (OptParse.Opt.get Options.quiet);
 
   let checklist = OptParse.Opt.opt Options.checkonly in
diff --git a/common/edosSolver.ml b/common/edosSolver.ml
index 9b4b6f4..c699854 100644
--- a/common/edosSolver.ml
+++ b/common/edosSolver.ml
@@ -12,6 +12,7 @@
 (*  library, see the COPYING file for more information.                        
        *)
 
(***************************************************************************************)
 
+
 module type S = sig
   type reason
 end
@@ -55,6 +56,27 @@ module IntHash =
     let hash i = i
   end)
 
+open ExtLib
+(*
+let (@) l1 l2 =
+  let rec geq = function
+    |[],[] -> true
+    |_::_,[] -> true
+    |[],_::_ -> false
+    |_::r1,_::r2 -> geq (r1,r2)
+  in 
+  if geq (l1,l2) then List.append l2 l1 else List.append l1 l2
+*)
+
+(* join two lists ignoring the order *)
+let (@) l1 l2 =
+  let rec aux l1 l2 acc =
+    match (l1,l2) with
+    |x::r1,y::r2 -> aux r1 r2 (x::y::acc)
+    |l1,[] -> List.fold_left (fun accu x -> x::accu) l1 acc
+    |[],l2 -> List.fold_left (fun accu x -> x::accu) l2 acc
+  in aux l1 l2 []
+
 module M (X : S) = struct
 
   module X = X
@@ -442,10 +464,6 @@ module M (X : S) = struct
       reasons := !r.reasons @ !reasons;
       for i = 0 to Array.length !r.all_lits - 1 do
         let p = !r.all_lits.(i) in
-(*
-      for i = 0 to Array.length !r.lits - 1 do
-        let p = !r.lits.(i) in
-*)
         let x = var_of_lit p in
         if  st.st_seen_var.(x) <> st.st_seen then begin
           assert (val_of_lit st p = False);
diff --git a/configure b/configure
index 62790bc..692fdb3 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dose3 5.0.
+# Generated by GNU Autoconf 2.69 for dose3 5.0~rc2.
 #
 # Report bugs to <pietro.ab...@inria.fr>.
 #
@@ -582,8 +582,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='dose3'
 PACKAGE_TARNAME='dose3'
-PACKAGE_VERSION='5.0'
-PACKAGE_STRING='dose3 5.0'
+PACKAGE_VERSION='5.0~rc2'
+PACKAGE_STRING='dose3 5.0~rc2'
 PACKAGE_BUGREPORT='pietro.ab...@inria.fr'
 PACKAGE_URL=''
 
@@ -1317,7 +1317,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dose3 5.0 to adapt to many kinds of systems.
+\`configure' configures dose3 5.0~rc2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1379,7 +1379,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dose3 5.0:";;
+     short | recursive ) echo "Configuration of dose3 5.0~rc2:";;
    esac
   cat <<\_ACEOF
 
@@ -1475,7 +1475,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dose3 configure 5.0
+dose3 configure 5.0~rc2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1733,7 +1733,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dose3 $as_me 5.0, which was
+It was created by dose3 $as_me 5.0~rc2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -5933,7 +5933,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dose3 $as_me 5.0, which was
+This file was extended by dose3 $as_me 5.0~rc2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5986,7 +5986,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dose3 config.status 5.0
+dose3 config.status 5.0~rc2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 694b2eb..c884911 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(dose3, 5.0, pietro.ab...@inria.fr)
+AC_INIT(dose3, 5.0~rc2, pietro.ab...@inria.fr)
 AC_COPYRIGHT(Copyright 2009-2016 Mancoosi Project)
 
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/deb/tests.ml b/deb/tests.ml
index 7079a5f..96728fe 100644
--- a/deb/tests.ml
+++ b/deb/tests.ml
@@ -1071,8 +1071,10 @@ let test_essential_constraints =
         SETPKG.S.of_list l
       ) (Debcudf.get_essential ~options tables)
     in
+    let cc = Debcudf.tocudf ~options tables (List.find (fun p -> p#name = "cc" 
&& p#version = "1") pkgl) in
+    let dd = Debcudf.tocudf ~options tables (List.find (fun p -> p#name = "dd" 
&& p#version = "1") pkgl) in
     SetPKG.assert_equal
-      (SetPKG.of_list [])
+      (SetPKG.of_list [SETPKG.S.of_list [cc]; SETPKG.S.of_list [dd]])
       (SetPKG.of_list essential)
   )
 ;;
diff --git a/doseparse/stdLoaders.ml b/doseparse/stdLoaders.ml
index d85e8fd..94be9c0 100644
--- a/doseparse/stdLoaders.ml
+++ b/doseparse/stdLoaders.ml
@@ -235,7 +235,7 @@ let rpm_load_list dll =
 
 (** transform a list of rpm control stanza into a cudf universe *)
 let rpm_load_universe l =
-  let (pr,cll,r,f,t,w) = rpm_load_list [l] in
+  let (pr,cll,r,f,t,w,_) = rpm_load_list [l] in
   (pr,Cudf.load_universe (List.flatten cll), r, f, t, w)
 
 (** parse a cudf file and return a triple (preamble,package list,request
diff --git a/pef/pef.itarget b/pef/pef.itarget
deleted file mode 100644
index b9d44ad..0000000
--- a/pef/pef.itarget
+++ /dev/null
@@ -1,4 +0,0 @@
-pef.cma
-pef.cmxa
-pef.cmxs
-pef.a
diff --git a/versioning/versioning.itarget b/versioning/versioning.itarget
deleted file mode 100644
index 78d77f9..0000000
--- a/versioning/versioning.itarget
+++ /dev/null
@@ -1,4 +0,0 @@
-versioning.cma
-versioning.cmxa
-versioning.cmxs
-versioning.a

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-ocaml-maint/packages/dose3.git

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to