{"action":"created","comment":{"url":"https://api.github.com/repos/gentoo/gentoo/pulls/comments/45546792","id":45546792,"diff_hunk":"@@ -0,0 +1,129 @@\n+# Copyright 1999-2015 Gentoo Foundation\n+# Distributed under the terms of the GNU General Public License v2\n+# $Id$\n+\n+# @ECLASS: xdg-utils.eclass\n+# @MAINTAINER:\n+# gnome@gentoo.org\n+# @AUTHOR:\n+# Original author: Gilles Dartiguelongue <eva@gentoo.org>\n+# @BLURB: Auxiliary functions commonly used by XDG compliant packages.\n+# @DESCRIPTION:\n+# This eclass provides a set of auxiliary functions needed by most XDG\n+# compliant packages.\n+# It provides XDG stack related functions such as:\n+#  * XDG .desktop files cache management\n+#  * XDG mime information database management\n+\n+case \"${EAPI:-0}\" in\n+\t4|5|6) ;;\n+\t*) die \"EAPI=${EAPI} is not supported\" ;;\n+esac\n+\n+# @ECLASS-VARIABLE: DESKTOP_DATABASE_UPDATE_BIN\n+# @INTERNAL\n+# @DESCRIPTION:\n+# Path to update-desktop-database\n+: ${DESKTOP_DATABASE_UPDATE_BIN:=\"/usr/bin/update-desktop-database\"}\n+\n+# @ECLASS-VARIABLE: DESKTOP_DATABASE_DIR\n+# @INTERNAL\n+# @DESCRIPTION:\n+# Directory where .desktop files database is stored\n+: ${DESKTOP_DATABASE_DIR=\"/usr/share/applications\"}\n+\n+# @ECLASS-VARIABLE: MIMEINFO_DATABASE_UPDATE_BIN\n+# @INTERNAL\n+# @DESCRIPTION:\n+# Path to update-desktop-database\n+: ${MIMEINFO_DATABASE_UPDATE_BIN:=\"/usr/bin/update-mime-database\"}\n+\n+# @ECLASS-VARIABLE: MIMEINFO_DATABASE_DIR\n+# @INTERNAL\n+# @DESCRIPTION:\n+# Directory where .desktop files database is stored\n+: ${MIMEINFO_DATABASE_DIR:=\"/usr/share/mime\"}\n+\n+# @FUNCTION: xdg_environment_reset\n+# @DESCRIPTION:\n+# Clean up environment for clean builds.\n+xdg_environment_reset() {\n+\t# Prepare XDG base directories\n+\texport XDG_DATA_HOME=\"${T}/.local/share\"\n+\texport XDG_CONFIG_HOME=\"${T}/.config\"\n+\texport XDG_CACHE_HOME=\"${T}/.cache\"\n+\texport XDG_RUNTIME_DIR=\"${T}/run\"\n+\tmkdir -p \"${XDG_DATA_HOME}\" \"${XDG_CONFIG_HOME}\" \"${XDG_CACHE_HOME}\" \\\n+\t\t\"${XDG_RUNTIME_DIR}\"","path":"eclass/xdg-utils.eclass","position":57,"original_position":57,"commit_id":"8fb4018a8367ce759aaf1702aa99642ea43db278","original_commit_id":"8fb4018a8367ce759aaf1702aa99642ea43db278","user":{"login":"mgorny","id":110765,"avatar_url":"https://avatars.githubusercontent.com/u/110765?v=3","gravatar_id":"","url":"https://api.github.com/users/mgorny","html_url":"https://github.com/mgorny","followers_url":"https://api.github.com/users/mgorny/followers","following_url":"https://api.github.com/users/mgorny/following{/other_user}","gists_url":"https://api.github.com/users/mgorny/gists{/gist_id}","starred_url":"https://api.github.com/users/mgorny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgorny/subscriptions","organizations_url":"https://api.github.com/users/mgorny/orgs","repos_url":"https://api.github.com/users/mgorny/repos","events_url":"https://api.github.com/users/mgorny/events{/privacy}","received_events_url":"https://api.github.com/users/mgorny/received_events","type":"User","site_admin":false},"body":"||die","created_at":"2015-11-21T14:40:37Z","updated_at":"2015-11-21T14:40:37Z","html_url":"https://github.com/gentoo/gentoo/pull/383#discussion_r45546792","pull_request_url":"https://api.github.com/repos/gentoo/gentoo/pulls/383","_links":{"self":{"href":"https://api.github.com/repos/gentoo/gentoo/pulls/comments/45546792"},"html":{"href":"https://github.com/gentoo/gentoo/pull/383#discussion_r45546792"},"pull_request":{"href":"https://api.github.com/repos/gentoo/gentoo/pulls/383"}}},"pull_request":{"url":"https://api.github.com/repos/gentoo/gentoo/pulls/383","id":51439950,"html_url":"https://github.com/gentoo/gentoo/pull/383","diff_url":"https://github.com/gentoo/gentoo/pull/383.diff","patch_url":"https://github.com/gentoo/gentoo/pull/383.patch","issue_url":"https://api.github.com/repos/gentoo/gentoo/issues/383","number":383,"state":"open","locked":false,"title":"Gnome xdg eclasses","user":{"login":"EvaSDK","id":745513,"avatar_url":"https://avatars.githubusercontent.com/u/745513?v=3","gravatar_id":"","url":"https://api.github.com/users/EvaSDK","html_url":"https://github.com/EvaSDK","followers_url":"https://api.github.com/users/EvaSDK/followers","following_url":"https://api.github.com/users/EvaSDK/following{/other_user}","gists_url":"https://api.github.com/users/EvaSDK/gists{/gist_id}","starred_url":"https://api.github.com/users/EvaSDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvaSDK/subscriptions","organizations_url":"https://api.github.com/users/EvaSDK/orgs","repos_url":"https://api.github.com/users/EvaSDK/repos","events_url":"https://api.github.com/users/EvaSDK/events{/privacy}","received_events_url":"https://api.github.com/users/EvaSDK/received_events","type":"User","site_admin":false},"body":"History of XDG related discussions:\r\nhttps://archives.gentoo.org/gentoo-dev/message/3aaccb913b3713b85db3467cd3403f1d\r\nhttps://archives.gentoo.org/gentoo-dev/message/3014c27e20bbaf300caf9d498a04fbf4\r\nhttps://archives.gentoo.org/gentoo-dev/message/db3db4151eb15f551ef2f1a1caa0f6ad\r\n\r\nRe-reading these threads, I will change $T to $HOME in xdg_environment_reset like proposed by Mike.\r\n\r\nAlso stacked a couple of other changes for Gnome.\r\n\r\nOne problem for gnome and gstreamer eclass is that they should basically set a very common set of variables on top of XDG_* and I am not sure if it is better to copy/paste G_HOME & GST_REGISTRY or have the two eclasses call each other environment_reset function, given that gstreamer eclass has no utils variant to avoid importing phase functions.\r\n\r\n@gentoo/gnome","created_at":"2015-11-21T11:56:43Z","updated_at":"2015-11-21T14:40:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf7a75b0db2e7a44d59daeb6ccf038da2f23f141","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gentoo/gentoo/pulls/383/commits","review_comments_url":"https://api.github.com/repos/gentoo/gentoo/pulls/383/comments","review_comment_url":"https://api.github.com/repos/gentoo/gentoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gentoo/gentoo/issues/383/comments","statuses_url":"https://api.github.com/repos/gentoo/gentoo/statuses/8fb4018a8367ce759aaf1702aa99642ea43db278","head":{"label":"gentoo:gnome-xdg-eclasses","ref":"gnome-xdg-eclasses","sha":"8fb4018a8367ce759aaf1702aa99642ea43db278","user":{"login":"gentoo","id":52242,"avatar_url":"https://avatars.githubusercontent.com/u/52242?v=3","gravatar_id":"","url":"https://api.github.com/users/gentoo","html_url":"https://github.com/gentoo","followers_url":"https://api.github.com/users/gentoo/followers","following_url":"https://api.github.com/users/gentoo/following{/other_user}","gists_url":"https://api.github.com/users/gentoo/gists{/gist_id}","starred_url":"https://api.github.com/users/gentoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentoo/subscriptions","organizations_url":"https://api.github.com/users/gentoo/orgs","repos_url":"https://api.github.com/users/gentoo/repos","events_url":"https://api.github.com/users/gentoo/events{/privacy}","received_events_url":"https://api.github.com/users/gentoo/received_events","type":"Organization","site_admin":false},"repo":{"id":40499714,"name":"gentoo","full_name":"gentoo/gentoo","owner":{"login":"gentoo","id":52242,"avatar_url":"https://avatars.githubusercontent.com/u/52242?v=3","gravatar_id":"","url":"https://api.github.com/users/gentoo","html_url":"https://github.com/gentoo","followers_url":"https://api.github.com/users/gentoo/followers","following_url":"https://api.github.com/users/gentoo/following{/other_user}","gists_url":"https://api.github.com/users/gentoo/gists{/gist_id}","starred_url":"https://api.github.com/users/gentoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentoo/subscriptions","organizations_url":"https://api.github.com/users/gentoo/orgs","repos_url":"https://api.github.com/users/gentoo/repos","events_url":"https://api.github.com/users/gentoo/events{/privacy}","received_events_url":"https://api.github.com/users/gentoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gentoo/gentoo","description":"The official mirror the Gentoo ebuild repository (now in true git!)","fork":false,"url":"https://api.github.com/repos/gentoo/gentoo","forks_url":"https://api.github.com/repos/gentoo/gentoo/forks","keys_url":"https://api.github.com/repos/gentoo/gentoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gentoo/gentoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gentoo/gentoo/teams","hooks_url":"https://api.github.com/repos/gentoo/gentoo/hooks","issue_events_url":"https://api.github.com/repos/gentoo/gentoo/issues/events{/number}","events_url":"https://api.github.com/repos/gentoo/gentoo/events","assignees_url":"https://api.github.com/repos/gentoo/gentoo/assignees{/user}","branches_url":"https://api.github.com/repos/gentoo/gentoo/branches{/branch}","tags_url":"https://api.github.com/repos/gentoo/gentoo/tags","blobs_url":"https://api.github.com/repos/gentoo/gentoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gentoo/gentoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gentoo/gentoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/gentoo/gentoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gentoo/gentoo/statuses/{sha}","languages_url":"https://api.github.com/repos/gentoo/gentoo/languages","stargazers_url":"https://api.github.com/repos/gentoo/gentoo/stargazers","contributors_url":"https://api.github.com/repos/gentoo/gentoo/contributors","subscribers_url":"https://api.github.com/repos/gentoo/gentoo/subscribers","subscription_url":"https://api.github.com/repos/gentoo/gentoo/subscription","commits_url":"https://api.github.com/repos/gentoo/gentoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/gentoo/gentoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/gentoo/gentoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/gentoo/gentoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/gentoo/gentoo/contents/{+path}","compare_url":"https://api.github.com/repos/gentoo/gentoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gentoo/gentoo/merges","archive_url":"https://api.github.com/repos/gentoo/gentoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gentoo/gentoo/downloads","issues_url":"https://api.github.com/repos/gentoo/gentoo/issues{/number}","pulls_url":"https://api.github.com/repos/gentoo/gentoo/pulls{/number}","milestones_url":"https://api.github.com/repos/gentoo/gentoo/milestones{/number}","notifications_url":"https://api.github.com/repos/gentoo/gentoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gentoo/gentoo/labels{/name}","releases_url":"https://api.github.com/repos/gentoo/gentoo/releases{/id}","created_at":"2015-08-10T18:47:32Z","updated_at":"2015-11-20T14:56:27Z","pushed_at":"2015-11-21T14:40:19Z","git_url":"git://github.com/gentoo/gentoo.git","ssh_url":"git@github.com:gentoo/gentoo.git","clone_url":"https://github.com/gentoo/gentoo.git","svn_url":"https://github.com/gentoo/gentoo","homepage":null,"size":112726,"stargazers_count":179,"watchers_count":179,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":118,"mirror_url":null,"open_issues_count":31,"forks":118,"open_issues":31,"watchers":179,"default_branch":"master"}},"base":{"label":"gentoo:master","ref":"master","sha":"c3630195b6eed6346e00ba88372464fc9d1b38f7","user":{"login":"gentoo","id":52242,"avatar_url":"https://avatars.githubusercontent.com/u/52242?v=3","gravatar_id":"","url":"https://api.github.com/users/gentoo","html_url":"https://github.com/gentoo","followers_url":"https://api.github.com/users/gentoo/followers","following_url":"https://api.github.com/users/gentoo/following{/other_user}","gists_url":"https://api.github.com/users/gentoo/gists{/gist_id}","starred_url":"https://api.github.com/users/gentoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentoo/subscriptions","organizations_url":"https://api.github.com/users/gentoo/orgs","repos_url":"https://api.github.com/users/gentoo/repos","events_url":"https://api.github.com/users/gentoo/events{/privacy}","received_events_url":"https://api.github.com/users/gentoo/received_events","type":"Organization","site_admin":false},"repo":{"id":40499714,"name":"gentoo","full_name":"gentoo/gentoo","owner":{"login":"gentoo","id":52242,"avatar_url":"https://avatars.githubusercontent.com/u/52242?v=3","gravatar_id":"","url":"https://api.github.com/users/gentoo","html_url":"https://github.com/gentoo","followers_url":"https://api.github.com/users/gentoo/followers","following_url":"https://api.github.com/users/gentoo/following{/other_user}","gists_url":"https://api.github.com/users/gentoo/gists{/gist_id}","starred_url":"https://api.github.com/users/gentoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gentoo/subscriptions","organizations_url":"https://api.github.com/users/gentoo/orgs","repos_url":"https://api.github.com/users/gentoo/repos","events_url":"https://api.github.com/users/gentoo/events{/privacy}","received_events_url":"https://api.github.com/users/gentoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gentoo/gentoo","description":"The official mirror the Gentoo ebuild repository (now in true git!)","fork":false,"url":"https://api.github.com/repos/gentoo/gentoo","forks_url":"https://api.github.com/repos/gentoo/gentoo/forks","keys_url":"https://api.github.com/repos/gentoo/gentoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gentoo/gentoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gentoo/gentoo/teams","hooks_url":"https://api.github.com/repos/gentoo/gentoo/hooks","issue_events_url":"https://api.github.com/repos/gentoo/gentoo/issues/events{/number}","events_url":"https://api.github.com/repos/gentoo/gentoo/events","assignees_url":"https://api.github.com/repos/gentoo/gentoo/assignees{/user}","branches_url":"https://api.github.com/repos/gentoo/gentoo/branches{/branch}","tags_url":"https://api.github.com/repos/gentoo/gentoo/tags","blobs_url":"https://api.github.com/repos/gentoo/gentoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gentoo/gentoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gentoo/gentoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/gentoo/gentoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gentoo/gentoo/statuses/{sha}","languages_url":"https://api.github.com/repos/gentoo/gentoo/languages","stargazers_url":"https://api.github.com/repos/gentoo/gentoo/stargazers","contributors_url":"https://api.github.com/repos/gentoo/gentoo/contributors","subscribers_url":"https://api.github.com/repos/gentoo/gentoo/subscribers","subscription_url":"https://api.github.com/repos/gentoo/gentoo/subscription","commits_url":"https://api.github.com/repos/gentoo/gentoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/gentoo/gentoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/gentoo/gentoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/gentoo/gentoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/gentoo/gentoo/contents/{+path}","compare_url":"https://api.github.com/repos/gentoo/gentoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gentoo/gentoo/merges","archive_url":"https://api.github.com/repos/gentoo/gentoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gentoo/gentoo/downloads","issues_url":"https://api.github.com/repos/gentoo/gentoo/issues{/number}","pulls_url":"https://api.github.com/repos/gentoo/gentoo/pulls{/number}","milestones_url":"https://api.github.com/repos/gentoo/gentoo/milestones{/number}","notifications_url":"https://api.github.com/repos/gentoo/gentoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gentoo/gentoo/labels{/name}","releases_url":"https://api.github.com/repos/gentoo/gentoo/releases{/id}","created_at":"2015-08-10T18:47:32Z","updated_at":"2015-11-20T14:56:27Z","pushed_at":"2015-11-21T14:40:19Z","git_url":"git://github.com/gentoo/gentoo.git","ssh_url":"git@github.com:gentoo/gentoo.git","clone_url":"https://github.com/gentoo/gentoo.git","svn_url":"https://github.com/gentoo/gentoo","homepage":null,"size":112726,"stargazers_count":179,"watchers_count":179,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":118,"mirror_url":null,"open_issues_count":31,"forks":118,"open_issues":31,"watchers":179,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gentoo/gentoo/pulls/383"},"html":{"href":"https://github.com/gentoo/gentoo/pull/383"},"issue":{"href":"https://api.github.com/repos/gentoo/gentoo/issues/383"},"comments":{"href":"https://api.github.com/repos/gentoo/gentoo/issues/383/comments"},"review_comments":{"href":"https://api.github.com/repos/gentoo/gentoo/pulls/383/comments"},"review_comment":{"href":"https://api.github.com/repos/gentoo/gentoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gentoo/gentoo/pulls/383/commits"},"statuses":{"href":"https://api.github.com/repos/gentoo/gentoo/statuses/8fb4018a8367ce759aaf1702aa99642ea43db278"}}}}