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

treinen pushed a commit to branch master
in repository dose3.

commit 1d32a5885c0ce417b208c2ee9cca5f8b1ad8d4f2
Author: Ralf Treinen <trei...@free.fr>
Date:   Tue Jan 17 22:15:48 2017 +0100

    add --deb-drop-b-d-arch option
---
 debian/changelog                 |   5 +-
 debian/patches/deb-drop-b-d-arch | 238 +++++++++++++++++++++++++++++++++++++++
 debian/patches/series            |   1 +
 3 files changed, 242 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 31207ec..f70cf83 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,10 +3,11 @@ dose3 (5.0.1-8) unstable; urgency=medium
   * Patches taken from upstream (thanks, Josch!)
     - architecture-tuples: replace architecture triples by tuples.
       (closes: #843409)
-  * - architectures-dpkg-1.18.15: Update embedded cputable and tupletable
+    - architectures-dpkg-1.18.15: Update embedded cputable and tupletable
       to dpkg 1.18.15
+    - deb-drop-d-b-arch: add support for --deb-drop-b-d-arch (closes: #850943)
 
- -- Ralf Treinen <trei...@debian.org>  Tue, 17 Jan 2017 21:47:13 +0100
+ -- Ralf Treinen <trei...@debian.org>  Tue, 17 Jan 2017 22:14:21 +0100
 
 dose3 (5.0.1-7) unstable; urgency=medium
 
diff --git a/debian/patches/deb-drop-b-d-arch b/debian/patches/deb-drop-b-d-arch
new file mode 100644
index 0000000..83c3373
--- /dev/null
+++ b/debian/patches/deb-drop-b-d-arch
@@ -0,0 +1,238 @@
+Author: Johannes 'josch' Schauer <jo...@mister-muffin.de>
+Description: Add support for --deb-drop-b-d-arch
+Debian-bug: #850943
+
+diff --git a/applications/deb-buildcheck.ml b/applications/deb-buildcheck.ml
+index f465419..9fed16c 100644
+--- a/applications/deb-buildcheck.ml
++++ b/applications/deb-buildcheck.ml
+@@ -97,6 +97,7 @@ let main () =
+   (* hostarch can be None *)
+   let hostarch = match options.Debian.Debcudf.host with None -> "" | Some s 
-> s in
+   let noindep = options.Debian.Debcudf.drop_bd_indep in
++  let noarch = options.Debian.Debcudf.drop_bd_arch in
+   let dropalternatives = OptParse.Opt.get Options.dropalternatives in
+   let profiles = options.Debian.Debcudf.profiles in
+ 
+@@ -132,7 +133,7 @@ let main () =
+               ~dropalternatives 
+               ~profiles 
+               ~filter:filter_external_sources 
+-              ~noindep buildarch hostarch h 
++              ~noindep ~noarch buildarch hostarch h 
+           in
+           let pkglist = Deb.input_raw t in
+           (pkglist,srclist)
+diff --git a/applications/deb-coinstall.ml b/applications/deb-coinstall.ml
+index 4130bff..e04398d 100644
+--- a/applications/deb-coinstall.ml
++++ b/applications/deb-coinstall.ml
+@@ -57,7 +57,7 @@ module Options = struct
+   let default =
+     List.fold_left (fun acc e ->
+       List.remove acc e
+-    ) StdOptions.DistribOptions.default_options 
["deb-host-arch";"deb-drop-b-d-indep";"deb-profiles"]
++    ) StdOptions.DistribOptions.default_options 
["deb-host-arch";"deb-drop-b-d-indep";"deb-drop-b-d-arch";"deb-profiles"]
+   in
+   StdOptions.DistribOptions.add_debian_options ~default options ;
+   StdOptions.DistribOptions.add_option options ~long_name:"deb-tupletable"
+@@ -121,7 +121,7 @@ let main () =
+     in
+     let srclist = 
+       if not(Option.is_none sources) then
+-        Sources.sources2packages ~noindep:true ~profiles:[] native native 
origsourcelist
++        Sources.sources2packages ~noindep:true ~noarch:false ~profiles:[] 
native native origsourcelist
+       else []
+     in
+     let tables = Debian.Debcudf.init_tables ~options (srclist@pkglist) in
+diff --git a/applications/distcheck.ml b/applications/distcheck.ml
+index 0152199..8164572 100644
+--- a/applications/distcheck.ml
++++ b/applications/distcheck.ml
+@@ -48,7 +48,7 @@ module Options = struct
+     List.fold_left
+       List.remove
+       StdOptions.DistribOptions.default_options
+-      ["deb-host-arch";"deb-drop-b-d-indep";"deb-profiles"]
++      
["deb-host-arch";"deb-drop-b-d-indep";"deb-drop-b-d-arch";"deb-profiles"]
+   in
+   StdOptions.DistribOptions.add_debian_options ~default options ;
+   StdOptions.DistribOptions.add_opam_options ~default options ;;
+diff --git a/deb/debcudf.ml b/deb/debcudf.ml
+index 8c83f0d..44f72e8 100644
+--- a/deb/debcudf.ml
++++ b/deb/debcudf.ml
+@@ -65,6 +65,7 @@ type options = {
+   ignore_essential : bool;
+   builds_from : bool;
+   drop_bd_indep : bool;
++  drop_bd_arch : bool;
+   profiles : string list; (* list of active build profiles *)
+ }
+ 
+@@ -76,6 +77,7 @@ let default_options = {
+   ignore_essential = false;
+   builds_from = false;
+   drop_bd_indep = false;
++  drop_bd_arch = false;
+   profiles = [];
+ }
+ 
+diff --git a/deb/debcudf.mli b/deb/debcudf.mli
+index 76c9eb6..be90947 100644
+--- a/deb/debcudf.mli
++++ b/deb/debcudf.mli
+@@ -24,6 +24,7 @@ type options = {
+   ignore_essential : bool ;
+   builds_from : bool ;    (** whether to add the builds-from relationship 
from binary to source packages *)
+   drop_bd_indep : bool ;  (** whether or not to ignore the 
Build-Depends-Indep field *)
++  drop_bd_arch : bool ;   (** whether or not to ignore the Build-Depends-Arch 
field *)
+   profiles : string list ; (** list of active build profiles *)
+ }
+ 
+diff --git a/deb/sources.ml b/deb/sources.ml
+index c14bfb5..ddf0d2f 100644
+--- a/deb/sources.ml
++++ b/deb/sources.ml
+@@ -169,7 +169,7 @@ let select hostarch profiles (v,al,pl) =
+ (* XXX src2pkg could be skip using the same trick we use in opam, 
+  * where dependencies are giltered at parsing time *)
+ (* the package name is encodes as src:<package-name> *)
+-let src2pkg ?(dropalternatives=false) ?(profiles=[]) ?(noindep=false) 
?(src="src") buildarch hostarch srcpkg =
++let src2pkg ?(dropalternatives=false) ?(profiles=[]) ?(noindep=false) 
?(noarch=false) ?(src="src") buildarch hostarch srcpkg =
+   let conflicts l = List.filter_map (select hostarch profiles) l in
+   (* imitate sbuild behaviour and drop all alternatives except those that have
+    * the same name as the first. Search for RESOLVE_ALTERNATIVES in
+@@ -189,6 +189,8 @@ let src2pkg ?(dropalternatives=false) ?(profiles=[]) 
?(noindep=false) ?(src="src
+   let extras_profiles  = match profiles with [] -> [] | _ -> [("profiles", 
String.join " " profiles)] in
+   let depends_indep   = if noindep then [] else srcpkg#build_depends_indep in
+   let conflicts_indep = if noindep then [] else srcpkg#build_conflicts_indep 
in
++  let depends_arch   = if noarch then [] else srcpkg#build_depends_arch in
++  let conflicts_arch = if noarch then [] else srcpkg#build_conflicts_arch in
+   (* when crossbuilding (host != build), implicitly depend on build-essential
+    * and crossbuild-essential-$hostarch. When compiling natively, implicitly
+    * depend on build-essential *)
+@@ -200,8 +202,8 @@ let src2pkg ?(dropalternatives=false) ?(profiles=[]) 
?(noindep=false) ?(src="src
+   new Packages.package ~name:("",Some(src ^ sep ^ srcpkg#name)) 
~version:("",Some(srcpkg#version))
+   ~architecture:("",Some(String.concat "," srcpkg#architecture))
+   ~source:("",Some (srcpkg#name, Some srcpkg#version)) 
+-  ~depends:("",Some (build_essential @ (depends (depends_indep @ 
srcpkg#build_depends @ srcpkg#build_depends_arch))))
+-  ~conflicts:("",Some (conflicts (conflicts_indep @ srcpkg#build_conflicts @ 
srcpkg#build_conflicts_arch)))
++  ~depends:("",Some (build_essential @ (depends (depends_indep @ 
srcpkg#build_depends @ depends_arch))))
++  ~conflicts:("",Some (conflicts (conflicts_indep @ srcpkg#build_conflicts @ 
conflicts_arch)))
+   ~extras:([],Some(extras_profiles @ [("Type",src)])) []
+ ;;
+ 
+@@ -209,8 +211,8 @@ let src2pkg ?(dropalternatives=false) ?(profiles=[]) 
?(noindep=false) ?(src="src
+  * decide whether to select or drop that dependency *)
+ (** transform a list of sources packages into dummy binary packages.
+   * This function preserve the order *)
+-let sources2packages ?(dropalternatives=false) ?(profiles=[]) 
?(noindep=false) ?(src="src") buildarch hostarch =
+-  List.map (src2pkg ~dropalternatives ~profiles ~noindep ~src buildarch 
hostarch)
++let sources2packages ?(dropalternatives=false) ?(profiles=[]) 
?(noindep=false) ?(noarch=false) ?(src="src") buildarch hostarch =
++  List.map (src2pkg ~dropalternatives ~profiles ~noindep ~noarch ~src 
buildarch hostarch)
+ ;;
+ 
+ (** Check if a package is of "Type" source as encoded by the function 
sources2packages *)
+diff --git a/doc/manpages/ceve.pod b/doc/manpages/ceve.pod
+index db9b011..e180139 100644
+--- a/doc/manpages/ceve.pod
++++ b/doc/manpages/ceve.pod
+@@ -304,6 +304,10 @@ Comma separated list of activated build profiles.
+ 
+ Drop Build-Depends-Indep dependencies from Debian source packages.
+ 
++=item B<--deb-drop-b-d-arch>
++
++Drop Build-Depends-Arch dependencies from Debian source packages.
++
+ =back
+ 
+ =head1 EXAMPLES
+diff --git a/doc/manpages/deb-buildcheck.pod b/doc/manpages/deb-buildcheck.pod
+index 155ba71..c41b560 100644
+--- a/doc/manpages/deb-buildcheck.pod
++++ b/doc/manpages/deb-buildcheck.pod
+@@ -216,6 +216,10 @@ Convert Arch:all packages to Multi-Arch: foreign
+ 
+ Drop Build-Indep dependencies
+ 
++=item B<--deb-drop-b-d-arch>
++
++Drop Build-Arch dependencies
++
+ =item B<--deb-include-extra-source>
+ 
+ Include packages with Extra-Source-Only:yes (dropped by default)
+diff --git a/doseparse/stdLoaders.ml b/doseparse/stdLoaders.ml
+index 94be9c0..afa9c5c 100644
+--- a/doseparse/stdLoaders.ml
++++ b/doseparse/stdLoaders.ml
+@@ -49,6 +49,7 @@ let read_deb ?filter ?(extras=[]) fname =
+ let deb_load_list options ?(status=[]) ?(raw=false) dll =
+   Util.Timer.start deb_load_list_timer;
+   let noindep = options.Debian.Debcudf.drop_bd_indep in
++  let noarch = options.Debian.Debcudf.drop_bd_arch in
+   let profiles = options.Debian.Debcudf.profiles in
+   let pkgll = List.map (List.map (function
+       | Deb p -> p
+@@ -57,7 +58,7 @@ let deb_load_list options ?(status=[]) ?(raw=false) dll =
+             fatal "--deb-native-arch was not specified while treating Debian 
Sources File";
+         let buildarch = Option.get options.Debian.Debcudf.native in
+         let hostarch = Option.get options.Debian.Debcudf.host in
+-        Debian.Sources.src2pkg ~noindep ~profiles buildarch hostarch p
++        Debian.Sources.src2pkg ~noindep ~noarch ~profiles buildarch hostarch p
+       | _ -> fatal "cannot handle input"
+     )) dll 
+   in
+@@ -444,10 +445,10 @@ let supported_formats () =
+ ;;
+ 
+ (** return a list of Debian packages from a debian source file *)
+-let deb_load_source ?filter ?(dropalternatives=false) ?(profiles=[]) 
?(noindep=false) buildarch hostarch sourcefile =
++let deb_load_source ?filter ?(dropalternatives=false) ?(profiles=[]) 
?(noindep=false) ?(noarch=false) buildarch hostarch sourcefile =
+   Util.Timer.start deb_load_source_timer;
+   let l = Debian.Sources.input_raw ?filter ~archs:[hostarch] [sourcefile] in
+-  let r = Debian.Sources.sources2packages ~dropalternatives ~noindep 
~profiles buildarch hostarch l in
++  let r = Debian.Sources.sources2packages ~dropalternatives ~noindep ~noarch 
~profiles buildarch hostarch l in
+   Util.Timer.stop deb_load_source_timer r
+ ;;
+ 
+diff --git a/doseparse/stdOptions.ml b/doseparse/stdOptions.ml
+index c13620f..46af73d 100644
+--- a/doseparse/stdOptions.ml
++++ b/doseparse/stdOptions.ml
+@@ -320,6 +320,7 @@ module DistribOptions = struct
+   let deb_ignore_essential = StdOpt.store_true ()
+   let deb_builds_from = StdOpt.store_true ()
+   let deb_drop_bd_indep = StdOpt.store_true ()
++  let deb_drop_bd_arch = StdOpt.store_true ()
+   let deb_profiles = str_list_option ()
+ 
+   let opam_switch = StdOpt.str_option ~default:"system" ()
+@@ -333,6 +334,7 @@ module DistribOptions = struct
+     "deb-ignore-essential";
+     "deb-builds-from";
+     "deb-drop-b-d-indep";
++    "deb-drop-b-d-arch";
+     "deb-profiles";
+     "opam-switch";
+     "opam-switches";
+@@ -386,6 +388,7 @@ module DistribOptions = struct
+       ignore_essential = Opt.get deb_ignore_essential;
+       builds_from = Opt.get deb_builds_from;
+       drop_bd_indep = Opt.get deb_drop_bd_indep;
++      drop_bd_arch = Opt.get deb_drop_bd_arch;
+       profiles = profiles;
+     }
+   ;;
+@@ -476,6 +479,9 @@ module DistribOptions = struct
+       if List.mem "deb-drop-b-d-indep" default then
+         add options ~group ~long_name:"deb-drop-b-d-indep"
+           ~help:"Drop the Build-Depends-Indep field from source packages 
(build no Architecture:all packages)" deb_drop_bd_indep;
++      if List.mem "deb-drop-b-d-arch" default then
++        add options ~group ~long_name:"deb-drop-b-d-arch"
++          ~help:"Drop the Build-Depends-Arch field from source packages 
(build no Architecture:any packages)" deb_drop_bd_arch;
+       if List.mem "deb-profiles" default then
+         add options ~group ~long_name:"deb-profiles"
+           ~help:"comma separated list of activated build profiles" 
deb_profiles;
diff --git a/debian/patches/series b/debian/patches/series
index 72e783a..beee4c9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ input-xz-files
 ocaml-4.02.3+gcc-6.2.0
 architecture-tuples
 architectures-dpkg-1.18.15
+deb-drop-b-d-arch

-- 
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