{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/comments/77455916","id":77455916,"diff_hunk":"@@ -77,12 +77,14 @@ def install\n   end\n \n   def post_install\n-    # Change the version directory below with any future update\n-    if build.with?(\"relocations\") || HOMEBREW_PREFIX.to_s != \"/usr/local\"\n-      ENV[\"GDK_PIXBUF_MODULE_FILE\"]=\"#{lib}/gdk-pixbuf-#{gdk_so_ver}/#{gdk_module_ver}/loaders.cache\"\n-      ENV[\"GDK_PIXBUF_MODULEDIR\"]=\"#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-#{gdk_so_ver}/#{gdk_module_ver}/loaders\"\n-    end\n+    # loaders.cache should be placed into Keg-specific lib directory\n+    module_file = \"#{lib}/gdk-pixbuf-#{gdk_so_ver}/#{gdk_module_ver}/loaders.cache\"\n+    module_dir = \"#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-#{gdk_so_ver}/#{gdk_module_ver}/loaders\"\n+    ENV[\"GDK_PIXBUF_MODULE_FILE\"] = module_file\n+    ENV[\"GDK_PIXBUF_MODULEDIR\"] = module_dir\n     system \"#{bin}/gdk-pixbuf-query-loaders\", \"--update-cache\"\n+    # Link newly created module_file into global gdk-pixbuf directory\n+    ln_sf module_file, \"#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-#{gdk_so_ver}/#{gdk_module_ver}/\"","path":"Formula/gdk-pixbuf.rb","position":16,"original_position":16,"commit_id":"d91e771e9db5cec61ce972333c3b84c5364b9b7f","original_commit_id":"d91e771e9db5cec61ce972333c3b84c5364b9b7f","user":{"login":"MikeMcQuaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeMcQuaid","html_url":"https://github.com/MikeMcQuaid","followers_url":"https://api.github.com/users/MikeMcQuaid/followers","following_url":"https://api.github.com/users/MikeMcQuaid/following{/other_user}","gists_url":"https://api.github.com/users/MikeMcQuaid/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeMcQuaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeMcQuaid/subscriptions","organizations_url":"https://api.github.com/users/MikeMcQuaid/orgs","repos_url":"https://api.github.com/users/MikeMcQuaid/repos","events_url":"https://api.github.com/users/MikeMcQuaid/events{/privacy}","received_events_url":"https://api.github.com/users/MikeMcQuaid/received_events","type":"User","site_admin":true},"body":"Will all the parent directories definitely already exist?","created_at":"2016-09-04T17:26:14Z","updated_at":"2016-09-04T17:26:14Z","html_url":"https://github.com/Homebrew/homebrew-core/pull/4259#discussion_r77455916","pull_request_url":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/4259","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/comments/77455916"},"html":{"href":"https://github.com/Homebrew/homebrew-core/pull/4259#discussion_r77455916"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/4259"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/4259","id":82972416,"html_url":"https://github.com/Homebrew/homebrew-core/pull/4259","diff_url":"https://github.com/Homebrew/homebrew-core/pull/4259.diff","patch_url":"https://github.com/Homebrew/homebrew-core/pull/4259.patch","issue_url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/4259","number":4259,"state":"open","locked":false,"title":"Install gdk-pixbuf `loaders.cache` file to proper location","user":{"login":"staticfloat","id":130920,"avatar_url":"https://avatars.githubusercontent.com/u/130920?v=3","gravatar_id":"","url":"https://api.github.com/users/staticfloat","html_url":"https://github.com/staticfloat","followers_url":"https://api.github.com/users/staticfloat/followers","following_url":"https://api.github.com/users/staticfloat/following{/other_user}","gists_url":"https://api.github.com/users/staticfloat/gists{/gist_id}","starred_url":"https://api.github.com/users/staticfloat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staticfloat/subscriptions","organizations_url":"https://api.github.com/users/staticfloat/orgs","repos_url":"https://api.github.com/users/staticfloat/repos","events_url":"https://api.github.com/users/staticfloat/events{/privacy}","received_events_url":"https://api.github.com/users/staticfloat/received_events","type":"User","site_admin":false},"body":"- [x] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/homebrew-core/blob/master/.github/CONTRIBUTING.md) document?\r\n- [x] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/homebrew-core/pulls) for the same formula update/change?\r\n- [x] Have you built your formula locally prior to submission with `brew install <formula>` (where `<formula>` is the name of the formula you're submitting)?\r\n- [x] Does your submission pass `brew audit --new-formula <formula>` (after doing `brew install <formula>`)?\r\n\r\n-----\r\n\r\n`brew audit --new-formula` gives the following errors:\r\n\r\n```\r\n$ brew audit --new-formula ./gdk-pixbuf.rb\r\ngdk-pixbuf:\r\n  * Use the `ln` Ruby method instead of `system \"ln\"`\r\n  * Formulae are required to declare all linked dependencies.\r\n    Please add all linked dependencies to the formula with:\r\n      depends_on \"gettext\" => :linked\r\nError: 2 problems in 1 formula\r\n```\r\n\r\n* I am not using the `ln` ruby method because I didn't know how to make it overwrite existing files (which it must if you run `postinstall` twice, or if you have previously installed `gdk-pixbuf` through Homebrew).  I saw [this comment](https://github.com/Homebrew/brew/blob/f4fb655aaa907e8ec642469ae21ca03e6cef2e21/Library/Homebrew/cmd/linkapps.rb#L44-L46) in the Homebrew codebase and decided to follow suit.\r\n\r\n* I was previously told not to add the `\"gettext\" -> :linked` dependency, so I am holding off on that for now.\r\n\r\nThe rationale behind this change is explored in detail in [this thread](https://github.com/Homebrew/homebrew-core/pull/3279), but I'll quote the most relevant parts here:\r\n\r\n> as it stands right now, in a \"normal\" /usr/local Homebrew installation, the loaders.cache file is not a symlink to the currently-installed gdk-pixbuf keg, it is a normal file. This (theoretically) doesn't allow for things like quick switching from version to version through unlinking different kegs of the same formula, just plain doesn't work properly on non-/usr/local Homebrew installations, and in general breaks Homebrew encapsulation.\r\n\r\n> On a non-/usr/local Homebrew installation, the environment variables are defined properly and the loaders.cache file is created in the proper place, but no symlink is created because post_install is invoked after link.","created_at":"2016-08-27T00:53:28Z","updated_at":"2016-09-04T17:26:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5aaf725c10c555b21e47fb4020cc6738d5b39b94","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/4259/commits","review_comments_url":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/4259/comments","review_comment_url":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/4259/comments","statuses_url":"https://api.github.com/repos/Homebrew/homebrew-core/statuses/d91e771e9db5cec61ce972333c3b84c5364b9b7f","head":{"label":"staticfloat:sf/gdk-pixbuf_modulefile","ref":"sf/gdk-pixbuf_modulefile","sha":"d91e771e9db5cec61ce972333c3b84c5364b9b7f","user":{"login":"staticfloat","id":130920,"avatar_url":"https://avatars.githubusercontent.com/u/130920?v=3","gravatar_id":"","url":"https://api.github.com/users/staticfloat","html_url":"https://github.com/staticfloat","followers_url":"https://api.github.com/users/staticfloat/followers","following_url":"https://api.github.com/users/staticfloat/following{/other_user}","gists_url":"https://api.github.com/users/staticfloat/gists{/gist_id}","starred_url":"https://api.github.com/users/staticfloat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staticfloat/subscriptions","organizations_url":"https://api.github.com/users/staticfloat/orgs","repos_url":"https://api.github.com/users/staticfloat/repos","events_url":"https://api.github.com/users/staticfloat/events{/privacy}","received_events_url":"https://api.github.com/users/staticfloat/received_events","type":"User","site_admin":false},"repo":{"id":63279849,"name":"homebrew-core","full_name":"staticfloat/homebrew-core","owner":{"login":"staticfloat","id":130920,"avatar_url":"https://avatars.githubusercontent.com/u/130920?v=3","gravatar_id":"","url":"https://api.github.com/users/staticfloat","html_url":"https://github.com/staticfloat","followers_url":"https://api.github.com/users/staticfloat/followers","following_url":"https://api.github.com/users/staticfloat/following{/other_user}","gists_url":"https://api.github.com/users/staticfloat/gists{/gist_id}","starred_url":"https://api.github.com/users/staticfloat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staticfloat/subscriptions","organizations_url":"https://api.github.com/users/staticfloat/orgs","repos_url":"https://api.github.com/users/staticfloat/repos","events_url":"https://api.github.com/users/staticfloat/events{/privacy}","received_events_url":"https://api.github.com/users/staticfloat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/staticfloat/homebrew-core","description":":beers: Core formulae for the Homebrew package manager","fork":true,"url":"https://api.github.com/repos/staticfloat/homebrew-core","forks_url":"https://api.github.com/repos/staticfloat/homebrew-core/forks","keys_url":"https://api.github.com/repos/staticfloat/homebrew-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/staticfloat/homebrew-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/staticfloat/homebrew-core/teams","hooks_url":"https://api.github.com/repos/staticfloat/homebrew-core/hooks","issue_events_url":"https://api.github.com/repos/staticfloat/homebrew-core/issues/events{/number}","events_url":"https://api.github.com/repos/staticfloat/homebrew-core/events","assignees_url":"https://api.github.com/repos/staticfloat/homebrew-core/assignees{/user}","branches_url":"https://api.github.com/repos/staticfloat/homebrew-core/branches{/branch}","tags_url":"https://api.github.com/repos/staticfloat/homebrew-core/tags","blobs_url":"https://api.github.com/repos/staticfloat/homebrew-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/staticfloat/homebrew-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/staticfloat/homebrew-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/staticfloat/homebrew-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/staticfloat/homebrew-core/statuses/{sha}","languages_url":"https://api.github.com/repos/staticfloat/homebrew-core/languages","stargazers_url":"https://api.github.com/repos/staticfloat/homebrew-core/stargazers","contributors_url":"https://api.github.com/repos/staticfloat/homebrew-core/contributors","subscribers_url":"https://api.github.com/repos/staticfloat/homebrew-core/subscribers","subscription_url":"https://api.github.com/repos/staticfloat/homebrew-core/subscription","commits_url":"https://api.github.com/repos/staticfloat/homebrew-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/staticfloat/homebrew-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/staticfloat/homebrew-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/staticfloat/homebrew-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/staticfloat/homebrew-core/contents/{+path}","compare_url":"https://api.github.com/repos/staticfloat/homebrew-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/staticfloat/homebrew-core/merges","archive_url":"https://api.github.com/repos/staticfloat/homebrew-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/staticfloat/homebrew-core/downloads","issues_url":"https://api.github.com/repos/staticfloat/homebrew-core/issues{/number}","pulls_url":"https://api.github.com/repos/staticfloat/homebrew-core/pulls{/number}","milestones_url":"https://api.github.com/repos/staticfloat/homebrew-core/milestones{/number}","notifications_url":"https://api.github.com/repos/staticfloat/homebrew-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/staticfloat/homebrew-core/labels{/name}","releases_url":"https://api.github.com/repos/staticfloat/homebrew-core/releases{/id}","deployments_url":"https://api.github.com/repos/staticfloat/homebrew-core/deployments","created_at":"2016-07-13T21:12:29Z","updated_at":"2016-07-13T21:12:44Z","pushed_at":"2016-09-03T07:12:40Z","git_url":"git://github.com/staticfloat/homebrew-core.git","ssh_url":"git@github.com:staticfloat/homebrew-core.git","clone_url":"https://github.com/staticfloat/homebrew-core.git","svn_url":"https://github.com/staticfloat/homebrew-core","homepage":"http://brew.sh","size":68345,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Homebrew:master","ref":"master","sha":"2eb09a99ee25451a7410799616599cc00790110f","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":52855516,"name":"homebrew-core","full_name":"Homebrew/homebrew-core","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/homebrew-core","description":":beers: Core formulae for the Homebrew package manager","fork":false,"url":"https://api.github.com/repos/Homebrew/homebrew-core","forks_url":"https://api.github.com/repos/Homebrew/homebrew-core/forks","keys_url":"https://api.github.com/repos/Homebrew/homebrew-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/homebrew-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/homebrew-core/teams","hooks_url":"https://api.github.com/repos/Homebrew/homebrew-core/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/homebrew-core/events","assignees_url":"https://api.github.com/repos/Homebrew/homebrew-core/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/homebrew-core/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/homebrew-core/tags","blobs_url":"https://api.github.com/repos/Homebrew/homebrew-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/homebrew-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/homebrew-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/homebrew-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/homebrew-core/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/homebrew-core/languages","stargazers_url":"https://api.github.com/repos/Homebrew/homebrew-core/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/homebrew-core/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/homebrew-core/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/homebrew-core/subscription","commits_url":"https://api.github.com/repos/Homebrew/homebrew-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/homebrew-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/homebrew-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/homebrew-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/homebrew-core/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/homebrew-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/homebrew-core/merges","archive_url":"https://api.github.com/repos/Homebrew/homebrew-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/homebrew-core/downloads","issues_url":"https://api.github.com/repos/Homebrew/homebrew-core/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/homebrew-core/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/homebrew-core/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/homebrew-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/homebrew-core/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/homebrew-core/releases{/id}","deployments_url":"https://api.github.com/repos/Homebrew/homebrew-core/deployments","created_at":"2016-03-01T06:58:36Z","updated_at":"2016-09-03T21:05:07Z","pushed_at":"2016-09-04T17:23:17Z","git_url":"git://github.com/Homebrew/homebrew-core.git","ssh_url":"git@github.com:Homebrew/homebrew-core.git","clone_url":"https://github.com/Homebrew/homebrew-core.git","svn_url":"https://github.com/Homebrew/homebrew-core","homepage":"http://brew.sh","size":112949,"stargazers_count":730,"watchers_count":730,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1285,"mirror_url":null,"open_issues_count":77,"forks":1285,"open_issues":77,"watchers":730,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/4259"},"html":{"href":"https://github.com/Homebrew/homebrew-core/pull/4259"},"issue":{"href":"https://api.github.com/repos/Homebrew/homebrew-core/issues/4259"},"comments":{"href":"https://api.github.com/repos/Homebrew/homebrew-core/issues/4259/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/4259/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/homebrew-core/pulls/4259/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/homebrew-core/statuses/d91e771e9db5cec61ce972333c3b84c5364b9b7f"}}}}
{"actor":{"display_login":"MikeMcQuaid"}}