On 2018-05-14 18:46, Sebastiaan Couwenberg wrote:
On 05/14/2018 08:26 AM, Mehdi Dogguy wrote:On 2018-05-14 08:01, Sebastiaan Couwenberg wrote:Unfortunately that doesn't apply cleanly on top of 0.7.4 for stretch. Ifyou can provide a rebased commit for 0.7.4 I'm willing to test that.No problem. Here it is (attached). Thanks for your tests!Thanks for the patch, it doesn't seem to work as expected, though. `ben tracker` downloads the Packages & Sources files again even when `ben download` downloaded them just before. It also uses the currentworking directory for the downloaded files instead of the cache-dir fromthe global.conf. It looks like this is caused by the custom template that was built with the old ben, because switching the template to debianrt in global.conf results in the expected behaviour.
Indeed. I didn't explain fully how to apply the patch. My apologies. The only effect of my second patch is to build templates differently to avoid linking and include all Ben's library. So in order to have this bug fixed, templates must be recompiled.
Rebuilding the template fails when executed from the root of the git directory: $ ocamlbuild -pkg ben debiangis.cmxs + /usr/bin/ocamlopt unix.cmxa -I /usr/lib/ocaml/ocamlbuild /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa -I /usr/lib/ocaml -I /usr/lib/ocaml/ben -I /usr/lib/ocaml/bytes -I /usr/lib/ocaml/ocamlgraph -I /usr/lib/ocaml/pcre -I /usr/lib/ocaml/tyxml -I /usr/lib/ocaml/uutf /usr/lib/ocaml/unix.cmxa /usr/lib/ocaml/pcre/pcre.cmxa /usr/lib/ocaml/ocamlgraph/graph.cmxa /usr/lib/ocaml/str.cmxa /usr/lib/ocaml/uutf/uutf.cmxa /usr/lib/ocaml/tyxml/tyxml.cmxa /usr/lib/ocaml/ben/benl.cmxa myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild File "myocamlbuild.ml", line 1: Error: Files /usr/lib/ocaml/unix.cmxa and /usr/lib/ocaml/unix.cmxa both define a module named Unix
It is true that the fix needs a documentation update to specify how templates should be built. I'll send you one very soon.If you have an already built plugin, you may use the /usr/lib/ocaml/expunge
tool to hide/remove non-necessary modules (that you can list using ocamlobjinfo). But, in any case, I'll provide a new procedure to build custom plugins. Regards, -- Mehdi