[Pkg-ocaml-maint-commits] [dose3] 03/08: Imported Upstream version 4.2
Ralf Treinen
treinen at moszumanska.debian.org
Tue Feb 9 20:52:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
treinen pushed a commit to branch experimental/master
in repository dose3.
commit f2ccabf017550f6de6d08f8602e2c7ed074221df
Author: Ralf Treinen <treinen at free.fr>
Date: Tue Feb 9 20:55:36 2016 +0100
Imported Upstream version 4.2
---
CHANGES | 13 ++++++
INSTALL | 3 ++
META.in | 4 +-
Makefile | 15 ++++++-
TODO | 4 +-
algo/defaultgraphs.ml | 4 +-
algo/depsolver.ml | 50 ++++++++++++++++------
algo/depsolver.mli | 23 +++-------
algo/diagnostic.ml | 3 +-
algo/diagnostic.mli | 35 +++++++++------
algo/tests.ml | 32 ++++++++++++++
applications/deb-coinstall.ml | 5 ++-
applications/outdated.ml | 9 ++--
common/cudfAdd.ml | 4 +-
configure | 18 ++++----
configure.ac | 2 +-
deb/debcudf.ml | 27 ++++++------
deb/debcudf.mli | 3 ++
deb/evolution.ml | 1 -
deb/packages.ml | 3 +-
.../{buildcheck.pod => deb-buildcheck.pod} | 9 ++--
doc/manpages/distcheck.pod | 12 +++---
opam_configure.sh | 2 +-
23 files changed, 186 insertions(+), 95 deletions(-)
diff --git a/CHANGES b/CHANGES
index 04ec321..3148006 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,15 @@
+dose3 (4.2) UNRELEASED; urgency=low
+
+ * Fix META file and other compilation problems (notably on 32 bits architectures)
+ * Add back the "Enhances" field in the debian printer
+ * the new yaml format also drops the architecture suffix in the package and
+ unsat-dependency fields
+ * Add new function Depsolver.is_consistent and Debian.Debcudf.get_real_name
+ * Update the yaml output of outdated (no more cudf-related cruft in package names)
+ * bump yaml output-version to 1.1
+
+ -- Pietro Abate <pietro.abate at pps.univ-paris-diderot.fr> Thur, 14 Jan 2016 13:13:06 +0200
+
dose3 (4.1) UNRELEASED; urgency=low
* New optimization criteria parser. apt-cudf now accepts only optimization criterias in
misc2012 format.
@@ -14,6 +26,7 @@ dose3 (4.1) UNRELEASED; urgency=low
encoding ( "src:" , ":$arch" , "--virtual-" ).
* Implement versioned provides
* strict dependency ocamlgraph >= 1.8.6
+ * strict dependency extlib >= 1.7.0
* new cudf property for deb/edsp types
native is 1 if the pkg architecture is equal to the native architecture,
0 otherwise. This can be used to maximise the number of packages
diff --git a/INSTALL b/INSTALL
index f08cc77..6e3d5b8 100644
--- a/INSTALL
+++ b/INSTALL
@@ -21,6 +21,9 @@ additional libraries (enable compilation with --with-<library>) :
To use rpm support, dose3 needs librpm > 4.6
To use ocamlgraph support, dose3 needs libocamlgraph-ocaml-dev >= 1.8.6
+cppo >= 1.1.2
+extlib >= 1.7.0
+
opam users need the following packages to compile dose with the default
options :
diff --git a/META.in b/META.in
index b9a5375..82a2900 100644
--- a/META.in
+++ b/META.in
@@ -1,7 +1,7 @@
description = "Dose3 libraries"
version = "@PACKAGE_VERSION@"
-archive(byte) = "common.cma algo.cma versioning.cma debian.cma csw.cma pef.cma"
-archive(native) = "common.cmxa algo.cmxa versioning.cmxa debian.cmxa csw.cmxa pef.cmxa"
+archive(byte) = "common.cma algo.cma versioning.cma pef.cma debian.cma csw.cma opam.cma"
+archive(native) = "common.cmxa algo.cmxa versioning.cmxa pef.cmxa debian.cmxa csw.cmxa opam.cmxa"
requires = "extlib, re.pcre, cudf, @OCAMLGRAPH@, unix, @ZIP@, @BZ2@"
package "common" (
diff --git a/Makefile b/Makefile
index 25078fb..ad1ab95 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,7 @@ $(DOSELIBS)/cudf.%:
$(OCAMLBUILD) $(OBFLAGS) cudf/cudf.$*
@mkdir -p $(DOSELIBS)
@cp _build/cudf/*.cmi $(DOSELIBS)
+ @rm _build/cudf/*.cmi
@for i in _build/cudf/cudf.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
@@ -64,6 +65,7 @@ $(DOSELIBS)/common.%: common/*.ml common/*.mli
@for i in _build/common/common.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \
fi ; \
done
@@ -74,6 +76,7 @@ $(DOSELIBS)/versioning.%: versioning/*.ml versioning/*.mli
@for i in _build/versioning/versioning.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \
fi ; \
done
@@ -83,6 +86,7 @@ $(DOSELIBS)/algo.%: algo/*.ml algo/*.mli $(DOSELIBS)/common.%
@for i in _build/algo/algo.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \
fi ; \
done
@@ -92,6 +96,7 @@ $(DOSELIBS)/debian.%: deb/*.ml deb/*.mli $(DOSELIBS)/pef.%
@for i in _build/deb/debian.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \
fi ; \
done
@@ -101,6 +106,7 @@ $(DOSELIBS)/opam.%: opam/*.ml opam/*.mli $(DOSELIBS)/pef.%
@for i in _build/opam/opam.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \
fi ; \
done
@@ -110,6 +116,7 @@ $(DOSELIBS)/rpm.%: rpm/*.ml $(DOSELIBS)/algo.%
@for i in _build/rpm/rpm.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \
fi ; \
done
@@ -119,6 +126,7 @@ $(DOSELIBS)/pef.%: pef/*.ml pef/*.mli
@for i in _build/pef/pef.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \
fi ; \
done
@@ -128,6 +136,7 @@ $(DOSELIBS)/csw.%: opencsw/*.ml $(DOSELIBS)/versioning.%
@for i in _build/opencsw/csw.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ; \
fi ; \
done
@@ -137,6 +146,7 @@ $(DOSELIBS)/doseparse.%: $(DOSELIBS)/pef.% $(DOSELIBS)/debian.%
@for i in _build/doseparse/doseparse.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ; \
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx $(DOSELIBS)/*.ml ; \
fi ; \
done
@@ -146,6 +156,7 @@ $(DOSELIBS)/doseparseNoRpm.%: $(DOSELIBS)/pef.% $(DOSELIBS)/debian.%
@for i in _build/doseparseNoRpm/doseparseNoRpm.*; do \
if [ -e $$i ]; then \
cp $$i $(DOSELIBS) ;\
+ rm $$i ;\
rm -f $(DOSELIBS)/*.mlpack $(DOSELIBS)/*.cmx ;\
fi ; \
done
@@ -251,7 +262,7 @@ credits:
@git log --pretty=format:'%aN %aE' | LC_ALL=C sort -u | awk -F'\t' '{printf("\t%s <%s>\n",$$1,$$2)}';
doc: all
- $(OCAMLBUILD) -package unix scripts/pack.native
+ $(OCAMLBUILD) -package unix scripts/pack.$(OCAMLEXT)
scripts/doc.sh $(OCAMLEXT)
dot -Grotate=0 -Tsvg -o dose3.docdir/index.svg dose3.docdir/index.dot
(cd doc && $(MAKE) all)
@@ -261,7 +272,7 @@ man:
upload: doc
(cd doc && $(MAKE) upload)
- rsync -avz -O dose3.docdir/ scm.gforge.inria.fr:/home/groups/dose/htdocs/doc/api/
+ rsync -avz -O dose3.docdir/ scm.gforge.inria.fr:/home/groups/dose/htdocs/API/
.PHONY: \
common algo pef versioning debian rpm csw doseparseNoRpm doseparse \
diff --git a/TODO b/TODO
index e90c3cd..8110fda 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,3 @@
-- add unit tests for opam and pef module
- add --deb-output822 to DistcheckOptions to output 822 package list
for distcheck, buildcheck etc of installable packages
@@ -21,6 +20,9 @@
-------------------
+- add unit tests for opam and pef module
+DONE
+
- Remove all references to Format in diagnostic.ml and all applications.
Format is too slow !
NOT DONE : the new formar module is now as fast as Printf
diff --git a/algo/defaultgraphs.ml b/algo/defaultgraphs.ml
index da9eaf4..3fa3778 100644
--- a/algo/defaultgraphs.ml
+++ b/algo/defaultgraphs.ml
@@ -695,12 +695,12 @@ module PackageGraph = struct
end
let load pkglist filename =
- let timer = Util.Timer.create "Defaultgraph.PackageGrah.load" in
+ let timer = Util.Timer.create "Defaultgraph.PackageGraph.load" in
Util.Timer.start timer;
let ic = open_in filename in
let (detrans,graph) = ((Marshal.from_channel ic) :> (bool * G.t)) in
close_in ic ;
- info "Loading Strong Dependencies graph";
+ info "Loading Dependencies graph";
(* we assume the graph is detransitivitized *)
let sg =
if detrans then begin
diff --git a/algo/depsolver.ml b/algo/depsolver.ml
index 15cf89b..4f09bc8 100644
--- a/algo/depsolver.ml
+++ b/algo/depsolver.ml
@@ -20,18 +20,7 @@ include Util.Logging(struct let label = label end) ;;
type solver = Depsolver_int.solver
-(** @param check if the universe is consistent *)
-let load ?(check=true) universe =
- let is_consistent check universe =
- if check then Cudf_checker.is_consistent universe
- else (true,None)
- in
- match is_consistent check universe with
- |true,None -> Depsolver_int.init_solver_univ universe
- |false,Some(r) ->
- fatal "%s"
- (Cudf_checker.explain_reason (r :> Cudf_checker.bad_solution_reason)) ;
- |_,_ -> assert false
+let load universe = Depsolver_int.init_solver_univ universe
(** [univcheck ?callback universe] check all packages in the
universe for installability
@@ -124,6 +113,43 @@ let edos_coinstall_prod ?(global_constraints=false) univ ll =
List.map (edos_install_cache global_constraints univ cudfpool) (permutation ll)
;;
+let is_consistent univ =
+ match Cudf_checker.is_consistent univ with
+ |true, None ->
+ { Diagnostic.request = [] ;
+ result =
+ Diagnostic.Success (fun ?(all=false) () ->
+ if all then
+ Cudf.get_packages ~filter:(fun p -> p.Cudf.installed) univ
+ else []
+ )
+ }
+ |false, Some `Unsat_dep (nv,vpkgformula) ->
+ let pkg = Cudf.lookup_package univ nv in
+ { Diagnostic.request = [pkg] ;
+ result =
+ Diagnostic.Failure (fun () ->
+ List.map (fun vpkglist ->
+ Diagnostic.Missing(pkg,vpkglist)
+ ) vpkgformula
+ )
+ }
+ |false, Some `Conflict (nv,vpkglist) ->
+ let pkg1 = Cudf.lookup_package univ nv in
+ { Diagnostic.request = [pkg1] ;
+ result =
+ Diagnostic.Failure (fun () ->
+ List.flatten (
+ List.map (fun vpkg ->
+ List.map (fun pkg2 ->
+ Diagnostic.Conflict (pkg1,pkg2,vpkg)
+ ) (CudfAdd.who_provides univ vpkg)
+ ) vpkglist
+ )
+ )
+ }
+ |(true|false),_ -> fatal "Bug in Cudf_checker.is_consistent"
+
let trim ?(global_constraints=true) universe =
let trimmed_pkgs = ref [] in
let callback d =
diff --git a/algo/depsolver.mli b/algo/depsolver.mli
index fed1e6e..1488558 100644
--- a/algo/depsolver.mli
+++ b/algo/depsolver.mli
@@ -15,33 +15,24 @@
(** the solver is an abstract data type associated to a universe *)
type solver
-(** initialize the solver. If [check] is true (default), then check
- for universe consistency (cf. Cudf_checker.is_consistent) *)
-val load : ?check : bool -> Cudf.universe -> solver
+(** initialize the solver *)
+val load : Cudf.universe -> solver
-(*
-(** Turn a result from Diagnostic_int into one of Diagnostic *)
-val result : Depsolver_int.identity -> Cudf.universe -> Diagnostic.result_int -> Diagnostic.result
-
-(** Turn a request from Diagnostic_int into one of Diagnostic *)
-val request : Cudf.universe -> Diagnostic.request_int -> Diagnostic.request
-*)
+(** check if the universe universe is consistent (all installed packages are coinstallable)
+ This function is a wrapper of Cudf_checker.is_consistent. *)
+val is_consistent : Cudf.universe -> Diagnostic.diagnosis
(** check if the given package can be installed in the universe
@param global_constraints : enforce global constraints on the given
universe. In particular packages marked as `Keep_package must be always
- installed. Default false.
-
-*)
+ installed. Default false. *)
val edos_install : ?global_constraints:bool -> Cudf.universe -> Cudf.package -> Diagnostic.diagnosis
(** check if the give package list can be installed in the universe
-
@param global_constraints : enforce global constraints on the given
universe. In particular packages marked as `Keep_package must be always
- installed. Default false.
-*)
+ installed. Default false. *)
val edos_coinstall : ?global_constraints:bool -> Cudf.universe -> Cudf.package list -> Diagnostic.diagnosis
(** accept a list of list of packages and return the coinstallability test of
diff --git a/algo/diagnostic.ml b/algo/diagnostic.ml
index 1ddd728..07b3241 100644
--- a/algo/diagnostic.ml
+++ b/algo/diagnostic.ml
@@ -150,7 +150,7 @@ let default_result n = {
statistic = Hashtbl.create 17
}
-let pp_out_version fmt = Format.fprintf fmt "output-version: 1.0 at .";;
+let pp_out_version fmt = Format.fprintf fmt "output-version: 1.1 at .";;
(** given a list of dependencies, return a list of list containg all
* paths in the dependency tree starting from [root] *)
@@ -721,6 +721,7 @@ let fprintf ?(pp=CudfAdd.default_pp) ?(failure=false) ?(success=false) ?(explain
|{result = Success f; request = req } when success ->
Format.fprintf fmt "@[<v 1>-@,";
begin match req with
+ |[] -> Format.fprintf fmt "@[<v>consistent@]@,"
|[r] ->
Format.fprintf fmt "@[<v>%a@]@," (pp_package ~source:true ~fields:true pp) r;
if minimal then
diff --git a/algo/diagnostic.mli b/algo/diagnostic.mli
index 824f95e..bedffb6 100644
--- a/algo/diagnostic.mli
+++ b/algo/diagnostic.mli
@@ -10,17 +10,8 @@
(* library, see the COPYING file for more information. *)
(**************************************************************************************)
-(** {2 Low level Integer Un-installability reasons} *)
-type reason_int =
- |DependencyInt of (int * Cudf_types.vpkg list * int list)
- |MissingInt of (int * Cudf_types.vpkg list)
- |ConflictInt of (int * int * Cudf_types.vpkg)
-
-type result_int =
- |SuccessInt of (?all:bool -> unit -> int list)
- |FailureInt of (unit -> reason_int list)
-
-type request_int = (int option * int list)
+(** The request provided to the solver *)
+type request = Cudf.package list
(** {2 Un-installability reasons} *)
type reason =
@@ -35,9 +26,6 @@ type reason =
(** Conflict (a,b,vpkg) means that the package [a] is in conflict
with package [b] because of vpkg *)
-(** The request provided to the solver *)
-type request = Cudf.package list
-
(** The result of an installability query *)
type result =
|Success of (?all:bool -> unit -> Cudf.package list)
@@ -53,10 +41,29 @@ type result =
(** The aggregated result from the solver *)
type diagnosis = { result : result; request : request; }
+(** {2 Low level Integer Un-installability reasons} *)
+type reason_int =
+ |DependencyInt of (int * Cudf_types.vpkg list * int list)
+ |MissingInt of (int * Cudf_types.vpkg list)
+ |ConflictInt of (int * int * Cudf_types.vpkg)
+
+type result_int =
+ |SuccessInt of (?all:bool -> unit -> int list)
+ |FailureInt of (unit -> reason_int list)
+
+type request_int = (int option * int list)
+
+(** {2 Helpers Functions } *)
(** Turn an integer result into a cudf result *)
val diagnosis : Common.Util.projection -> Cudf.universe ->
result_int -> request_int -> diagnosis
+(** Turn an integer result into a cudf result *)
+val result : Common.Util.projection -> Cudf.universe -> result_int -> result
+
+(** Turn an integer request into a cudf request *)
+val request : Cudf.universe -> 'a * int list -> Cudf.package list
+
module ResultHash : Hashtbl.S with type key = reason
(** Collect aggregate information about not installable packages *)
diff --git a/algo/tests.ml b/algo/tests.ml
index f3a66ac..3c026b6 100644
--- a/algo/tests.ml
+++ b/algo/tests.ml
@@ -45,6 +45,9 @@ let f_debian = Filename.concat cudf_dir "debian.cudf"
let f_dominators_order = Filename.concat test_dir "dominators_order.cudf"
let f_dominators_cycle = Filename.concat test_dir "dominators_cycle.cudf"
+let f_is_consistent_success = "tests/cudf/is_consistent_success.cudf"
+let f_is_consistent_failure = "tests/cudf/is_consistent_failure.cudf"
+
let load_univ f =
let (_,univ,_) = Cudf_parser.load_from_file f in
univ
@@ -64,6 +67,34 @@ let engine_conflicts_set = toset f_engine_conflicts
let solver = Depsolver.load universe ;;
+(* These tests could be a bit more precise... *)
+let test_is_consistent =
+ "is_consistent" >::: [
+ "success" >:: (fun _ ->
+ let universe = load_univ f_is_consistent_success in
+ let d = Depsolver.is_consistent universe in
+ match d with
+ |{ Diagnostic.result = (Diagnostic.Success f) } ->
+ (* Diagnostic.printf ~failure:true ~success:true ~explain:true d; *)
+ assert_bool "pass" true
+
+ |{ Diagnostic.result = (Diagnostic.Failure _ ) } ->
+ (* Diagnostic.printf ~failure:true ~success:true ~explain:true d; *)
+ assert_failure "fail"
+ );
+ "failure" >:: (fun _ ->
+ let universe = load_univ f_is_consistent_failure in
+ match Depsolver.is_consistent universe with
+ |{ Diagnostic.result = (Diagnostic.Success f) } ->
+ (* Diagnostic.printf ~failure:true ~success:true ~explain:true d; *)
+ assert_failure "fail"
+
+ |{ Diagnostic.result = (Diagnostic.Failure _ ) } ->
+ (* Diagnostic.printf ~failure:true ~success:true ~explain:true d; *)
+ assert_bool "pass" true
+ );
+ ]
+
let test_install =
"install" >:: (fun _ ->
let bicycle = Cudf.lookup_package universe ("bicycle", 7) in
@@ -412,6 +443,7 @@ let test_depsolver =
test_reverse_dependency_closure ;
test_conjunctive_dependency_closure ;
test_depclean ;
+ test_is_consistent;
]
let solution_set =
diff --git a/applications/deb-coinstall.ml b/applications/deb-coinstall.ml
index d4efa2e..a09b180 100644
--- a/applications/deb-coinstall.ml
+++ b/applications/deb-coinstall.ml
@@ -212,7 +212,8 @@ let main () =
try
let id = (cudfpkg.Cudf.package,cudfpkg.Cudf.version) in
let debpkg = Hashtbl.find cudftodeb_table id in
- debpkg#pp oc
+ debpkg#pp oc;
+ Printf.fprintf oc "\n"
with Not_found -> assert false
) is
else
@@ -225,7 +226,7 @@ let main () =
) is
)
in
- List.iter (fun pkg -> pkg#pp oc) l
+ List.iter (fun pkg -> pkg#pp oc; Printf.fprintf oc "\n") l
end; 0 (* exit code 0 . All packages are installable *)
end
else begin if failure then begin
diff --git a/applications/outdated.ml b/applications/outdated.ml
index ac90de9..4979b5b 100644
--- a/applications/outdated.ml
+++ b/applications/outdated.ml
@@ -235,9 +235,10 @@ let outdated
let pp pkg =
let p =
- if String.starts_with pkg.Cudf.package "src/" then
- Printf.sprintf "Source conflict (%s)" pkg.Cudf.package
- else pkg.Cudf.package
+ let n = Debian.Debcudf.get_real_name pkg.Cudf.package in
+ if String.starts_with n "src/" then
+ Printf.sprintf "Source conflict (%s)" n
+ else n
in
let v =
if pkg.Cudf.version > 0 then begin
@@ -260,7 +261,7 @@ let outdated
with Not_found -> None
) ["architecture";"source";"sourcenumber";"equivs"]
in
- (CudfAdd.decode p,v,l)
+ (p,v,l)
in
let fmt = Format.std_formatter in
diff --git a/common/cudfAdd.ml b/common/cudfAdd.ml
index 1ddc8f7..d3a6b16 100644
--- a/common/cudfAdd.ml
+++ b/common/cudfAdd.ml
@@ -140,6 +140,8 @@ let pp from_cudf ?(fields=[]) ?(decode=decode) pkg =
let l = (f false fields)@(f true default_fields) in
(decode p,decode v,l)
+let max32int = if Int32.to_int(Int32.max_int) < 0 then max_int else Int32.to_int(Int32.max_int);;
+
let pp_vpkg pp fmt vpkg =
let string_of_relop = function
`Eq -> "="
@@ -154,7 +156,7 @@ let pp_vpkg pp fmt vpkg =
let (p,_,_) =
pp {Cudf.default_package with
Cudf.package = p ;
- version = Int32.to_int(Int32.max_int)}
+ version = max32int}
in
Format.fprintf fmt "%s" p
|(p,Some(c,v)) ->
diff --git a/configure b/configure
index 7930666..a9cd100 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 4.1.
+# Generated by GNU Autoconf 2.69 for dose3 4.2.
#
# Report bugs to <pietro.abate at pps.univ-paris-diderot.fr>.
#
@@ -582,8 +582,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dose3'
PACKAGE_TARNAME='dose3'
-PACKAGE_VERSION='4.1'
-PACKAGE_STRING='dose3 4.1'
+PACKAGE_VERSION='4.2'
+PACKAGE_STRING='dose3 4.2'
PACKAGE_BUGREPORT='pietro.abate at pps.univ-paris-diderot.fr'
PACKAGE_URL=''
@@ -1315,7 +1315,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 4.1 to adapt to many kinds of systems.
+\`configure' configures dose3 4.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1377,7 +1377,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dose3 4.1:";;
+ short | recursive ) echo "Configuration of dose3 4.2:";;
esac
cat <<\_ACEOF
@@ -1474,7 +1474,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dose3 configure 4.1
+dose3 configure 4.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1732,7 +1732,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 4.1, which was
+It was created by dose3 $as_me 4.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -6494,7 +6494,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 4.1, which was
+This file was extended by dose3 $as_me 4.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6547,7 +6547,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 4.1
+dose3 config.status 4.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index b6e1b80..d3505e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(dose3, 4.1, pietro.abate at pps.univ-paris-diderot.fr)
+AC_INIT(dose3, 4.2, pietro.abate at pps.univ-paris-diderot.fr)
AC_COPYRIGHT(Copyright 2009-2015 Mancoosi Project)
AC_CONFIG_MACRO_DIR([m4])
diff --git a/deb/debcudf.ml b/deb/debcudf.ml
index 7005e97..6d1bc84 100644
--- a/deb/debcudf.ml
+++ b/deb/debcudf.ml
@@ -27,7 +27,7 @@ module Version = Versioning.Debian
let label = __label ;;
include Util.Logging(struct let label = label end) ;;
-let max32int = Int32.to_int(Int32.max_int);;
+let max32int = if Int32.to_int(Int32.max_int) < 0 then max_int else Int32.to_int(Int32.max_int);;
module SMap = Map.Make (String)
@@ -186,7 +186,6 @@ let init_tables ?(step=1) ?(versionlist=[]) pkglist =
List.iter (fun pkg -> ivt pkg ; ivrt pkg ; ivdt pkg ; iut pkg) pkglist ;
let l = Util.StringPairHashtbl.fold (fun v _ acc -> v::acc) temp_versions_table [] in
let add_reverse i (n,v) =
- debug "Add Reverse (%s,%s) %i" n v i;
try
let m = Util.IntHashtbl.find tables.reverse_table i in
m := (SMap.add n v !m)
@@ -198,7 +197,6 @@ let init_tables ?(step=1) ?(versionlist=[]) pkglist =
let rec numbers (prec,i) = function
|[] -> ()
|(v,n)::t ->
- debug "Numbers %s %s" n v;
if Version.equal v prec then begin
add tables.versions_table v i;
if n <> "" then add_reverse i (n,v);
@@ -221,18 +219,19 @@ let get_cudf_version tables (package,version) =
raise Not_found
end
+let get_real_name name =
+ (* Remove --virtual- and architecture encoding *)
+ let n = (CudfAdd.decode name) in
+ if ExtString.String.starts_with n "--vir" then
+ ExtString.String.slice ~first:10 n
+ else
+ try
+ let (n,a) = ExtString.String.split n ":" in
+ if n = "src" then a else n
+ with Invalid_string -> n
+
let get_real_version tables (name,cudfversion) =
- let package =
- (* XXX this is a hack. Remove --virtual- and architecture encoding *)
- let n = (CudfAdd.decode name) in
- if ExtString.String.starts_with n "--vir" then
- ExtString.String.slice ~first:10 n
- else
- try
- let (n,a) = ExtString.String.split n ":" in
- if n = "src" then a else n
- with Invalid_string -> n
- in
+ let package = get_real_name name in
try
if cudfversion = max32int || cudfversion = max32int - 1 then
(package,"nan")
diff --git a/deb/debcudf.mli b/deb/debcudf.mli
index 23eec0e..9e5ddf1 100644
--- a/deb/debcudf.mli
+++ b/deb/debcudf.mli
@@ -36,6 +36,9 @@ val clear : tables -> unit
* to the tuple (name,version) *)
val get_cudf_version : tables -> Pef.Packages_types.name * Pef.Packages_types.version -> int
+(** Get the orgininal debian package name. Remove deb -> cudf conversion cruft *)
+val get_real_name : Cudf_types.pkgname -> string
+
(** return the real version associated to a Cudf package *)
val get_real_version : tables -> Cudf_types.pkgname * Cudf_types.version ->
(Pef.Packages_types.name * Pef.Packages_types.version)
diff --git a/deb/evolution.ml b/deb/evolution.ml
index 166130d..58515c3 100644
--- a/deb/evolution.ml
+++ b/deb/evolution.ml
@@ -187,7 +187,6 @@ let add_epochs el vl =
) [] el
;;
-
let all_ver_constr constraints_table cluster =
let (versionlist, constr) =
List.fold_left (fun (_vl,_cl) pkg ->
diff --git a/deb/packages.ml b/deb/packages.ml
index c180b3a..f240fff 100644
--- a/deb/packages.ml
+++ b/deb/packages.ml
@@ -136,11 +136,10 @@ class package ?(name=("Package",None)) ?(version=("Version",None)) ?(depends=("D
Pef.Printer.pp_vpkglist_wl oc conflicts;
Pef.Printer.pp_vpkglist_wl oc breaks;
Pef.Printer.pp_vpkgformula_wl oc suggests;
+ Pef.Printer.pp_vpkgformula_wl oc enhances;
Pef.Printer.pp_vpkgformula_wl oc recommends;
Pef.Printer.pp_vpkglist_wl oc replaces;
- Printf.fprintf oc "\n";
-
end
let parse_package_stanza filter archs extras par =
diff --git a/doc/manpages/buildcheck.pod b/doc/manpages/deb-buildcheck.pod
similarity index 97%
rename from doc/manpages/buildcheck.pod
rename to doc/manpages/deb-buildcheck.pod
index 0b90904..cdaad2b 100644
--- a/doc/manpages/buildcheck.pod
+++ b/doc/manpages/deb-buildcheck.pod
@@ -33,7 +33,7 @@ B<Conflicts>.
=cut
-=head1 Input Format
+=head1 INPUT FORMAT
The B<binary-repositories> argument is a list of filenames containing stanzas
in the format of L<deb-control(5)>, separated by one blank line. For instance,
@@ -42,7 +42,8 @@ I</var/lib/apt/lists/> of a Debian system, are suitable. The
B<source-repository> argument is the name of a file containing debian source
control stanzas, separated by one blank line. For instance, the Sources files
as found on a Debian mirror server, or in the directory I</var/lib/apt/lists/>
-of a Debian system, are suitable.
+of a Debian system, are suitable. B<binary-repositories> and
+B<source-repository> can be passed in compresssed format (.gz , .bz2).
Multi-arch annotations are correctly considered by dose-builddebcheck. Packages
whose's architecture is neither the native architecture nor in the list of
@@ -175,7 +176,7 @@ Dump the cudf file.
=back
-=head2 DEBIAN SPECIFIC OPTIONS
+=head2 DEBIAN OPTIONS
=over 8
@@ -257,7 +258,7 @@ Compute the list of source packages in Sources for which
it is not possible to install a build environment on i386, assuming that
the binary packages described in file Packages are available:
- dose-builddebcheck -v -f -e --arch amd64 \
+ dose-builddebcheck -v -f -e --deb-native-arch=amd64 \
/var/lib/apt/lists/ftp.fr.debian.org_debian_dists_sid_main_binary-amd64_Packages\
/var/lib/apt/lists/ftp.fr.debian.org_debian_dists_sid_main_source_Sources
diff --git a/doc/manpages/distcheck.pod b/doc/manpages/distcheck.pod
index 1b282b1..b3f6c72 100644
--- a/doc/manpages/distcheck.pod
+++ b/doc/manpages/distcheck.pod
@@ -45,13 +45,13 @@ B<hdlist> or B<eclipse>, and I<pathname> is the pathname of a file
containing the input. The package metadata found in that file must
correspond to the I<type> given in the URI.
-When invoked as I<typeB<check>> then the type of input is assumed to
-be I<type>, and repositories (in positional arguments or in the values of
-options B<--fg> and B<--bg>) are simply given in form of a pathname of a file
+When invoked as I<typeB<check>> then the type of input is assumed to be
+I<type>, and repositories (in positional arguments or in the values of options
+B<--fg> and B<--bg>) are simply given in form of a pathname of a file
containing the repository. If no positional argument is given then input is
-read from standard input. B<distcheck> also compressed files (.gz , .bz2) as
-positional arguments. Input read on standard input cannot be in compressed
-form.
+read from standard input. B<distcheck> also accepts compressed files (.gz ,
+.bz2) as positional arguments. Input read on standard input cannot be in
+compressed form.
=head1 Input Formats
diff --git a/opam_configure.sh b/opam_configure.sh
index 9dd5d1b..3c86dcf 100755
--- a/opam_configure.sh
+++ b/opam_configure.sh
@@ -2,4 +2,4 @@ opam init -y
eval `opam config env`
opam switch -y 4.02.0
eval `opam config env`
-opam install -y extlib camlbz2 camlzip ocamlgraph extlib ounit re cudf
+opam install -y extlib camlbz2 camlzip ocamlgraph extlib ounit re cudf cppo
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/dose3.git
More information about the Pkg-ocaml-maint-commits
mailing list