{"action":"created","issue":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1587","labels_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1587/labels{/name}","comments_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1587/comments","events_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1587/events","html_url":"https://github.com/hpcugent/easybuild-framework/issues/1587","id":130419495,"number":1587,"title":"rpmrebuild as OS dependency in the rpm easyblock, and check_os_dependency","user":{"login":"damianam","id":10760206,"avatar_url":"https://avatars.githubusercontent.com/u/10760206?v=3","gravatar_id":"","url":"https://api.github.com/users/damianam","html_url":"https://github.com/damianam","followers_url":"https://api.github.com/users/damianam/followers","following_url":"https://api.github.com/users/damianam/following{/other_user}","gists_url":"https://api.github.com/users/damianam/gists{/gist_id}","starred_url":"https://api.github.com/users/damianam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianam/subscriptions","organizations_url":"https://api.github.com/users/damianam/orgs","repos_url":"https://api.github.com/users/damianam/repos","events_url":"https://api.github.com/users/damianam/events{/privacy}","received_events_url":"https://api.github.com/users/damianam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-01T17:02:56Z","updated_at":"2016-02-01T17:29:15Z","closed_at":null,"body":"`rpmrebuild` is currently an OS dependency in the RPM easyblock. I think this is not the best way to  handle it, since it might not be available as a system package, but be on `$PATH` anyway. For instance, installed by EB (see https://github.com/hpcugent/easybuild-easyconfigs/pull/2402). This is the case in our setup.\r\n\r\nI think it can be an explicit dependency using the PR listed above, and/or simply check if it is in the path. That takes me to `check_os_dependency`. It will return `False` if the dependency is available in the OS repos, but not installed. Regardless of its presence in `$PATH`. Is that the intended behaviour? It looks to me like this:\r\n\r\n```\r\ndef check_os_dependency(dep):\r\n...\r\n    if cmd is None:\r\n        # fallback for when os-dependency is a binary/library\r\n        found = which(dep)\r\n...\r\n```\r\n\r\nwants to check for simply binaries, but `cmd` will not be `None` if `rpm` or `dpkg` exist.\r\n\r\nIs that a bug or am I missing something?"},"comment":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/comments/178083633","html_url":"https://github.com/hpcugent/easybuild-framework/issues/1587#issuecomment-178083633","issue_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1587","id":178083633,"user":{"login":"ocaisa","id":3840437,"avatar_url":"https://avatars.githubusercontent.com/u/3840437?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaisa","html_url":"https://github.com/ocaisa","followers_url":"https://api.github.com/users/ocaisa/followers","following_url":"https://api.github.com/users/ocaisa/following{/other_user}","gists_url":"https://api.github.com/users/ocaisa/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaisa/subscriptions","organizations_url":"https://api.github.com/users/ocaisa/orgs","repos_url":"https://api.github.com/users/ocaisa/repos","events_url":"https://api.github.com/users/ocaisa/events{/privacy}","received_events_url":"https://api.github.com/users/ocaisa/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T17:29:15Z","updated_at":"2016-02-01T17:29:15Z","body":"In the rpm easyblock just check for the os dep or EBROOTRPMREBUILD.\nOn 1 Feb 2016 18:03, \"damianam\" <notifications@github.com> wrote:\n\n> rpmrebuild is currently an OS dependency in the RPM easyblock. I think\n> this is not the best way to handle it, since it might not be available as a\n> system package, but be on $PATH anyway. For instance, installed by EB\n> (see hpcugent/easybuild-easyconfigs#2402\n> <https://github.com/hpcugent/easybuild-easyconfigs/pull/2402>). This is\n> the case in our setup.\n>\n> I think it can be an explicit dependency using the PR listed above, and/or\n> simply check if it is in the path. That takes me to check_os_dependency.\n> It will return False if the dependency is available in the OS repos, but\n> not installed. Regardless of its presence in $PATH. Is that the intended\n> behaviour? It looks to me like this:\n>\n> def check_os_dependency(dep):\n> ...\n>     if cmd is None:\n>         # fallback for when os-dependency is a binary/library\n>         found = which(dep)\n> ...\n>\n> wants to check for simply binaries, but cmd will not be None if rpm or\n> dpkg exist.\n>\n> Is that a bug or am I missing something?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/hpcugent/easybuild-framework/issues/1587>.\n>\n"}}