{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/opam-depext/issues/38","repository_url":"https://api.github.com/repos/ocaml/opam-depext","labels_url":"https://api.github.com/repos/ocaml/opam-depext/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/opam-depext/issues/38/comments","events_url":"https://api.github.com/repos/ocaml/opam-depext/issues/38/events","html_url":"https://github.com/ocaml/opam-depext/pull/38","id":137079890,"number":38,"title":"fix FreeBSD support","user":{"login":"hannesm","id":228456,"avatar_url":"https://avatars.githubusercontent.com/u/228456?v=3","gravatar_id":"","url":"https://api.github.com/users/hannesm","html_url":"https://github.com/hannesm","followers_url":"https://api.github.com/users/hannesm/followers","following_url":"https://api.github.com/users/hannesm/following{/other_user}","gists_url":"https://api.github.com/users/hannesm/gists{/gist_id}","starred_url":"https://api.github.com/users/hannesm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannesm/subscriptions","organizations_url":"https://api.github.com/users/hannesm/orgs","repos_url":"https://api.github.com/users/hannesm/repos","events_url":"https://api.github.com/users/hannesm/events{/privacy}","received_events_url":"https://api.github.com/users/hannesm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-28T18:26:14Z","updated_at":"2016-02-29T01:20:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ocaml/opam-depext/pulls/38","html_url":"https://github.com/ocaml/opam-depext/pull/38","diff_url":"https://github.com/ocaml/opam-depext/pull/38.diff","patch_url":"https://github.com/ocaml/opam-depext/pull/38.patch"},"body":"I am actually not sure how depext is designed, what I understand that there is the need for an architecture.  Then, a notion of operating system (still makes sense), and a distribution (which is more clearly very linux-specific).  In any case, the current state of code (esp `install_packages_command` and `get_installed_packages`) match only on the distribution.  Thus, suddenly the operating system becomes not really relevant anymore, and BSD polyvars are added as choices to the distribution type...\r\n\r\nCould maybe someone who knows more about the code base come up with an interface file and describe a bit clearer how things are supposed to work?  I suspect that similar to `sudo`, `update` and `install` the `install_packages_command`, `update_command`, `get_installed_packages` should use both os and distribution...\r\n\r\nFurthermore, `get_installed_packages` seems to get a list of desired packages and returns a list of packages which are desired without the actually installed ones... I'm confused, some documentation might also be useful.\r\n\r\nIn any case, this PR avoids that I've to convince opam that conf-gmp etc. is around (by fake installing it).  It used to work several months ago with an earlier version of depext, but broke in the meantime.\r\n\r\n(I read the [initial proposal](https://github.com/ocaml/opam/blob/master/doc/design/depexts-plugins), but this barely talks about distributions and os...)"},"comment":{"url":"https://api.github.com/repos/ocaml/opam-depext/issues/comments/189987576","html_url":"https://github.com/ocaml/opam-depext/pull/38#issuecomment-189987576","issue_url":"https://api.github.com/repos/ocaml/opam-depext/issues/38","id":189987576,"user":{"login":"AltGr","id":807966,"avatar_url":"https://avatars.githubusercontent.com/u/807966?v=3","gravatar_id":"","url":"https://api.github.com/users/AltGr","html_url":"https://github.com/AltGr","followers_url":"https://api.github.com/users/AltGr/followers","following_url":"https://api.github.com/users/AltGr/following{/other_user}","gists_url":"https://api.github.com/users/AltGr/gists{/gist_id}","starred_url":"https://api.github.com/users/AltGr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AltGr/subscriptions","organizations_url":"https://api.github.com/users/AltGr/orgs","repos_url":"https://api.github.com/users/AltGr/repos","events_url":"https://api.github.com/users/AltGr/events{/privacy}","received_events_url":"https://api.github.com/users/AltGr/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T01:20:20Z","updated_at":"2016-02-29T01:20:20Z","body":"As far as opam is concerned, all depext selectors are just tags, without further meaning (except for the infamous `source`).\r\n\r\nFor any given system, `opam-depext` will attempt to find arch, OS and distribution, but just set no corresponding tag if not relevant. Indeed, it's not accurate that `get_installed_packages`, etc. only take `distribution` as argument: either we should take also `os`, or set `distribution=os` when the distribution is not relevant.\r\n\r\n> Furthermore, get_installed_packages seems to get a list of desired packages and returns a list of packages which are desired without the actually installed ones... I'm confused, some documentation might also be useful.\r\n\r\nHm, no, as the comment says, it returns the subset of the packages given as argument that are installed.\r\n\r\n> In any case, this PR avoids that I've to convince opam that conf-gmp etc. is around (by fake installing it). It used to work several months ago with an earlier version of depext, but broke in the meantime.\r\n\r\nI don't really understand: opam doesn't (yet) use opam-depext internally, and the checks that the `conf-*` packages may do are independent. Or did you mean for the automatic testing ?\r\n\r\nIn any case, the PR is fine, thanks a bunch!"}}