{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/oasis2opam/issues/24","repository_url":"https://api.github.com/repos/ocaml/oasis2opam","labels_url":"https://api.github.com/repos/ocaml/oasis2opam/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/oasis2opam/issues/24/comments","events_url":"https://api.github.com/repos/ocaml/oasis2opam/issues/24/events","html_url":"https://github.com/ocaml/oasis2opam/issues/24","id":131458174,"number":24,"title":"Don't encourage distribution of repetitive removal files in opam metadata","user":{"login":"dsheets","id":59918,"avatar_url":"https://avatars.githubusercontent.com/u/59918?v=3","gravatar_id":"","url":"https://api.github.com/users/dsheets","html_url":"https://github.com/dsheets","followers_url":"https://api.github.com/users/dsheets/followers","following_url":"https://api.github.com/users/dsheets/following{/other_user}","gists_url":"https://api.github.com/users/dsheets/gists{/gist_id}","starred_url":"https://api.github.com/users/dsheets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsheets/subscriptions","organizations_url":"https://api.github.com/users/dsheets/orgs","repos_url":"https://api.github.com/users/dsheets/repos","events_url":"https://api.github.com/users/dsheets/events{/privacy}","received_events_url":"https://api.github.com/users/dsheets/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-04T20:00:14Z","updated_at":"2016-02-05T08:25:53Z","closed_at":null,"body":"`package.install`:\r\n```\r\netc: [\r\n  \"setup.ml\"\r\n  \"setup.data\"\r\n  \"setup.log\"\r\n  \"_oasis_remove_.ml\"\r\n]\r\n```\r\n\r\nand\r\n\r\n`_oasis_remove_.ml`:\r\n```\r\nopen Printf\r\n\r\nlet () =\r\n  let dir = Sys.argv.(1) in\r\n  (try Sys.chdir dir\r\n   with _ -> eprintf \"Cannot change directory to %s\\n%!\" dir);\r\n  exit (Sys.command \"ocaml setup.ml -uninstall\")\r\n```\r\n\r\nget added to every version of every package that uses this tool and are distributed to every user of opam even if they don't use those packages. They are always the same. They increase bandwidth and storage costs with very little benefit. They belong in the build system of the package. They make opam package analysis harder because the package is no longer self-contained.\r\n\r\nPerhaps the solution is to upstream oasis changes so `setup.ml` can change its own directory?"},"comment":{"url":"https://api.github.com/repos/ocaml/oasis2opam/issues/comments/180247747","html_url":"https://github.com/ocaml/oasis2opam/issues/24#issuecomment-180247747","issue_url":"https://api.github.com/repos/ocaml/oasis2opam/issues/24","id":180247747,"user":{"login":"Chris00","id":1255665,"avatar_url":"https://avatars.githubusercontent.com/u/1255665?v=3","gravatar_id":"","url":"https://api.github.com/users/Chris00","html_url":"https://github.com/Chris00","followers_url":"https://api.github.com/users/Chris00/followers","following_url":"https://api.github.com/users/Chris00/following{/other_user}","gists_url":"https://api.github.com/users/Chris00/gists{/gist_id}","starred_url":"https://api.github.com/users/Chris00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chris00/subscriptions","organizations_url":"https://api.github.com/users/Chris00/orgs","repos_url":"https://api.github.com/users/Chris00/repos","events_url":"https://api.github.com/users/Chris00/events{/privacy}","received_events_url":"https://api.github.com/users/Chris00/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T08:25:53Z","updated_at":"2016-02-05T08:25:53Z","body":"On Thu, 4 Feb 2016 12:01:16 -0800, David Sheets wrote:\n> \n> Perhaps the solution is to upstream oasis changes so setup.ml can change its\n> own directory?\n\nThis was upstreamed a while ago but a new release of oasis needs to be made — not really my decision to make.\n\nAnother possibility is that opam offers a portable way to change directories (say a variable \"cd\" that gets expanded according to the platform).  It is not the case at the moment.\n\nAlso, this file only gets added when an executable is built — packages providing only libraries do not need it.\n"}}