{"action":"created","issue":{"url":"https://api.github.com/repos/gap-system/gap/issues/802","repository_url":"https://api.github.com/repos/gap-system/gap","labels_url":"https://api.github.com/repos/gap-system/gap/issues/802/labels{/name}","comments_url":"https://api.github.com/repos/gap-system/gap/issues/802/comments","events_url":"https://api.github.com/repos/gap-system/gap/issues/802/events","html_url":"https://github.com/gap-system/gap/pull/802","id":157020856,"number":802,"title":"Remove need to pass library directory to GAP / gap.sh","user":{"login":"ChrisJefferson","id":811527,"avatar_url":"https://avatars.githubusercontent.com/u/811527?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisJefferson","html_url":"https://github.com/ChrisJefferson","followers_url":"https://api.github.com/users/ChrisJefferson/followers","following_url":"https://api.github.com/users/ChrisJefferson/following{/other_user}","gists_url":"https://api.github.com/users/ChrisJefferson/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisJefferson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisJefferson/subscriptions","organizations_url":"https://api.github.com/users/ChrisJefferson/orgs","repos_url":"https://api.github.com/users/ChrisJefferson/repos","events_url":"https://api.github.com/users/ChrisJefferson/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisJefferson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-26T16:08:20Z","updated_at":"2016-05-29T12:06:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gap-system/gap/pulls/802","html_url":"https://github.com/gap-system/gap/pull/802","diff_url":"https://github.com/gap-system/gap/pull/802.diff","patch_url":"https://github.com/gap-system/gap/pull/802.patch"},"body":"This patch adds a global variable, `GAPExecLocation`, which stores (hopefully) the full path of GAP's executable.\r\n\r\nWe then use that to look for GAP's library path. The new method of finding GAP's library is:\r\n\r\n1) If we can find GAP's executable, look in it's directory for lib/init.g. If we don't find it, look 3 directory levels up (to deal with how GAP's executable is typically two levels deep).\r\n\r\n2) Look in the environment variable GAPROOT. If it exists, use it to find path (if it doesn't contain any `;`, then it will wipe out (1), as usual)\r\n\r\n3) Look at the '-l'/'--roots' command line option, which as normal can wipe out (1) and (2).\r\n\r\nWith this change, I can just symlink the GAP executable into a directory in my path and GAP runs. I can also copy an entire GAP installation and it works (as long as I don't use gap.sh). I haven't checked every package survives the copy.\r\n\r\nI imagine the function to find GAP's location might need tuning on different OSes. We can work on this, but I wanted to see if people were generally in favour of this technique.\r\n\r\nLong term, this should remove the need for gap.sh entirely (although of course people can still use it if they want!)"},"comment":{"url":"https://api.github.com/repos/gap-system/gap/issues/comments/222357141","html_url":"https://github.com/gap-system/gap/pull/802#issuecomment-222357141","issue_url":"https://api.github.com/repos/gap-system/gap/issues/802","id":222357141,"user":{"login":"fingolfin","id":241512,"avatar_url":"https://avatars.githubusercontent.com/u/241512?v=3","gravatar_id":"","url":"https://api.github.com/users/fingolfin","html_url":"https://github.com/fingolfin","followers_url":"https://api.github.com/users/fingolfin/followers","following_url":"https://api.github.com/users/fingolfin/following{/other_user}","gists_url":"https://api.github.com/users/fingolfin/gists{/gist_id}","starred_url":"https://api.github.com/users/fingolfin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fingolfin/subscriptions","organizations_url":"https://api.github.com/users/fingolfin/orgs","repos_url":"https://api.github.com/users/fingolfin/repos","events_url":"https://api.github.com/users/fingolfin/events{/privacy}","received_events_url":"https://api.github.com/users/fingolfin/received_events","type":"User","site_admin":false},"created_at":"2016-05-29T12:06:23Z","updated_at":"2016-05-29T12:06:23Z","body":"This is in general a good idea, and something we *need* to do in one form or another, I think (indeed, we'll need this for the new build system, see also https://github.com/fingolfin/gap/commit/d9d59fd222bc38389aab4cc5e18eec327e0b4a13).\r\n\r\nI have not yet had a chance to look at your code changes, though (conference and weekend prevented that), but I'll try to review it this week).\r\n\r\nBTW, there is some existing code in there for GAP to \"find itself\", but it likely should be just removed. See also here: https://github.com/fingolfin/gap/commit/b294616dbab76391e6425019f42d5b5b0ac62498"}}
{"actor":{"display_login":"fingolfin"}}