The following commit has been merged in the upstream branch: commit 17081de4eb525c8018e1ca56bc617d8133d0c357 Author: Eric Cooper <e...@cmu.edu> Date: Fri Mar 13 18:09:50 2009 -0400
ignore epoch when comparing versions for importing diff --git a/import.ml b/import.ml index 7b0eb86..a12248a 100644 --- a/import.ml +++ b/import.ml @@ -86,9 +86,9 @@ let package_of_file file = status = Not_seen } | _ -> raise Not_found -let package_version = function - | { epoch = ""; version = version } -> version - | { epoch = epoch; version = version } -> epoch ^ ":" ^ version +let without_epoch version = + try substring ~from: (String.index version ':' + 1) version + with Not_found -> version let packages = Hashtbl.create (List.length files) @@ -136,7 +136,7 @@ let maybe_import pkg fields dist = pkg.base kind (List.assoc kind fields) in if not (imported pkg.status) then - if package_version pkg = List.assoc "version" fields then + if pkg.version = without_epoch (List.assoc "version" fields) then if pkg.arch = List.assoc "architecture" fields then if pkg.size = Int64.of_string (List.assoc "size" fields) then import_package pkg (dist ^/ List.assoc "filename" fields) diff --git a/util.mli b/util.mli index 867bd8c..2bfe10f 100644 --- a/util.mli +++ b/util.mli @@ -192,7 +192,7 @@ val file_sha1sum : string -> string val file_sha256sum : string -> string -(* Drop privileges (user and group ID) to those of the specified name *) +(* Drop privileges to those of the given user and group *) val drop_privileges : user:string -> group:string -> unit -- approx upstream and debian packaging _______________________________________________ Pkg-ocaml-maint-commits mailing list Pkg-ocaml-maint-commits@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-ocaml-maint-commits