[Pkg-ocaml-maint-commits] [SCM] dh-ocaml packaging branch, master, updated. debian/0.9.1-9-g8787211

Stephane Glondu steph at glondu.net
Sun Nov 1 21:20:42 UTC 2009


The following commit has been merged in the master branch:
commit 8787211fd24a7e3452c045e7c7cebd1ba3343cc5
Author: Stephane Glondu <steph at glondu.net>
Date:   Sun Nov 1 17:03:45 2009 +0100

    dh_ocaml: also take into account OCaml objects in non-lib packages
    
    And remove the restriction that OCaml objects must be in /usr/lib
    (this is a policy issue, it should be checked by Lintian or such).

diff --git a/debhelper/dh_ocaml b/debhelper/dh_ocaml
index 7bb48d6..03eb74f 100755
--- a/debhelper/dh_ocaml
+++ b/debhelper/dh_ocaml
@@ -339,46 +339,24 @@ foreach my $package (keys(%dev_packages), @binary_packages)
     my @search_path = tmpdir $package;
     push(@search_path, tmpdir($dev_packages{$package})) if $is_dev && $has_runtime;
 
-    open(OLIST, ">", $olist_fn) unless $dh{NO_ACT};
-    # Search for OCaml bytecode binaries
     foreach (@search_path)
     {
       die "E: $_ directory must exist when invoking dh_ocaml\n" unless -d $_;
     };
-    find
-      sub {
-        (-f $_ && -x $_)
+
+    # Search for OCaml bytecode binaries and objects
+    open(OLIST, ">", $olist_fn) unless $dh{NO_ACT};
+    find sub {
+        (-f $_)
         &&
-        !excludefile($File::Find::name)
+        (-x $_ && test_bytecode($_) || /\.cm([iaox]|x[as])$/)
         &&
-        test_bytecode($_)
+        !excludefile($File::Find::name)
         &&
         (!$dh{NO_ACT})
         &&
         (print OLIST $File::Find::name."\n")
-      }, @search_path;
-
-    # Search for OCaml objects
-    if ($is_dev)
-    {
-      my @paths = map {"$_/usr/lib"} @search_path;
-
-      foreach (@paths)
-      {
-        die "E: $_ directory must exist when invoking dh_ocaml\n" unless -d $_;
-      };
-
-      find
-        sub {
-          ($_ =~ /\.cm([iaox]|x[as])$/)
-          &&
-          !excludefile($File::Find::name)
-          &&
-          (!$dh{NO_ACT})
-          &&
-          (print OLIST $File::Find::name."\n")
-        }, @paths;
-    };
+    }, @search_path;
     close(OLIST) unless $dh{NO_ACT};
     doit("cat $olist_fn") if $dh{VERBOSE};
   };
diff --git a/debian/changelog b/debian/changelog
index d73e261..eefc1c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ dh-ocaml (0.9.2) UNRELEASED; urgency=low
   * dom-new-git-repo: fail by default when executed out of a Git
     repository and without tarball argument; don't fail if explicitly
     given "--notifications"
+  * dh_ocaml: also take into account OCaml objects in non-lib packages;
+    don't assume all objects are in /usr/lib
 
   [ Mehdi Dogguy ]
   * Use my debian address instead of the old ones, everywhere.

-- 
dh-ocaml packaging



More information about the Pkg-ocaml-maint-commits mailing list