{"action":"closed","number":38036,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/38036","id":96180463,"html_url":"https://github.com/saltstack/salt/pull/38036","diff_url":"https://github.com/saltstack/salt/pull/38036.diff","patch_url":"https://github.com/saltstack/salt/pull/38036.patch","issue_url":"https://api.github.com/repos/saltstack/salt/issues/38036","number":38036,"state":"closed","locked":false,"title":"archive.extracted: fix problems with overwrite arg","user":{"login":"terminalmage","id":328598,"avatar_url":"https://avatars.githubusercontent.com/u/328598?v=3","gravatar_id":"","url":"https://api.github.com/users/terminalmage","html_url":"https://github.com/terminalmage","followers_url":"https://api.github.com/users/terminalmage/followers","following_url":"https://api.github.com/users/terminalmage/following{/other_user}","gists_url":"https://api.github.com/users/terminalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/terminalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terminalmage/subscriptions","organizations_url":"https://api.github.com/users/terminalmage/orgs","repos_url":"https://api.github.com/users/terminalmage/repos","events_url":"https://api.github.com/users/terminalmage/events{/privacy}","received_events_url":"https://api.github.com/users/terminalmage/received_events","type":"User","site_admin":false},"body":"Pull request #37889 introduced several problems:\r\n\r\n1. It forces a wipe of the extracted contents if you are setting\r\n   ``overwrite`` to ``True``. This should be configurable, to allow for\r\n   the use case where extraction should be forced but there are contents\r\n   added to the extracted content which the user does not want purged\r\n   before the archive is re-extracted.\r\n\r\n2. It ignores the case where ``enforce_toplevel`` is set to ``False``\r\n   and the archive doesn't have all contents in a single top-level\r\n   directory, by only deleting the first listed top-level directory (and\r\n   ignoring completely any top-level files).\r\n\r\n3. It ignores the case where ``archive.list`` was unable to list the\r\n   contents of the archive (in which case ``contents`` would be\r\n   ``None``). This would result in a TypeError when this case was\r\n   combined with setting ``overwrite`` to ``True``.\r\n\r\nThis commit fixes all of the above problems. Additionally, a new\r\nargument called ``clean`` now controls whether destination paths are\r\nwiped before extraction is performed.\r\n\r\nFinally, an issue with how I implemented detection (and cleaning) of\r\npaths with incorrect types has been fixed. Specifically, when a path\r\nthat should have been a directory is instead a file, the ``os.stat()``\r\nwill raise an ENOTDIR when the path passed to it contains a trailing\r\npath separator, because the path exists but is not a directory.","created_at":"2016-12-01T22:06:57Z","updated_at":"2016-12-08T19:08:41Z","closed_at":"2016-12-08T19:08:41Z","merged_at":"2016-12-08T19:08:41Z","merge_commit_sha":"827bf59999c425c845345791aaa65cd585b38d1e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/saltstack/salt/pulls/38036/commits","review_comments_url":"https://api.github.com/repos/saltstack/salt/pulls/38036/comments","review_comment_url":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/38036/comments","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/a1c70c7b95bd8be41435e26090b0ee016864eebe","head":{"label":"terminalmage:archive-extracted-override","ref":"archive-extracted-override","sha":"a1c70c7b95bd8be41435e26090b0ee016864eebe","user":{"login":"terminalmage","id":328598,"avatar_url":"https://avatars.githubusercontent.com/u/328598?v=3","gravatar_id":"","url":"https://api.github.com/users/terminalmage","html_url":"https://github.com/terminalmage","followers_url":"https://api.github.com/users/terminalmage/followers","following_url":"https://api.github.com/users/terminalmage/following{/other_user}","gists_url":"https://api.github.com/users/terminalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/terminalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terminalmage/subscriptions","organizations_url":"https://api.github.com/users/terminalmage/orgs","repos_url":"https://api.github.com/users/terminalmage/repos","events_url":"https://api.github.com/users/terminalmage/events{/privacy}","received_events_url":"https://api.github.com/users/terminalmage/received_events","type":"User","site_admin":false},"repo":{"id":3186460,"name":"salt","full_name":"terminalmage/salt","owner":{"login":"terminalmage","id":328598,"avatar_url":"https://avatars.githubusercontent.com/u/328598?v=3","gravatar_id":"","url":"https://api.github.com/users/terminalmage","html_url":"https://github.com/terminalmage","followers_url":"https://api.github.com/users/terminalmage/followers","following_url":"https://api.github.com/users/terminalmage/following{/other_user}","gists_url":"https://api.github.com/users/terminalmage/gists{/gist_id}","starred_url":"https://api.github.com/users/terminalmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terminalmage/subscriptions","organizations_url":"https://api.github.com/users/terminalmage/orgs","repos_url":"https://api.github.com/users/terminalmage/repos","events_url":"https://api.github.com/users/terminalmage/events{/privacy}","received_events_url":"https://api.github.com/users/terminalmage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/terminalmage/salt","description":"Central system and configuration manager ","fork":true,"url":"https://api.github.com/repos/terminalmage/salt","forks_url":"https://api.github.com/repos/terminalmage/salt/forks","keys_url":"https://api.github.com/repos/terminalmage/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/terminalmage/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/terminalmage/salt/teams","hooks_url":"https://api.github.com/repos/terminalmage/salt/hooks","issue_events_url":"https://api.github.com/repos/terminalmage/salt/issues/events{/number}","events_url":"https://api.github.com/repos/terminalmage/salt/events","assignees_url":"https://api.github.com/repos/terminalmage/salt/assignees{/user}","branches_url":"https://api.github.com/repos/terminalmage/salt/branches{/branch}","tags_url":"https://api.github.com/repos/terminalmage/salt/tags","blobs_url":"https://api.github.com/repos/terminalmage/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/terminalmage/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/terminalmage/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/terminalmage/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/terminalmage/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/terminalmage/salt/languages","stargazers_url":"https://api.github.com/repos/terminalmage/salt/stargazers","contributors_url":"https://api.github.com/repos/terminalmage/salt/contributors","subscribers_url":"https://api.github.com/repos/terminalmage/salt/subscribers","subscription_url":"https://api.github.com/repos/terminalmage/salt/subscription","commits_url":"https://api.github.com/repos/terminalmage/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/terminalmage/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/terminalmage/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/terminalmage/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/terminalmage/salt/contents/{+path}","compare_url":"https://api.github.com/repos/terminalmage/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/terminalmage/salt/merges","archive_url":"https://api.github.com/repos/terminalmage/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/terminalmage/salt/downloads","issues_url":"https://api.github.com/repos/terminalmage/salt/issues{/number}","pulls_url":"https://api.github.com/repos/terminalmage/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/terminalmage/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/terminalmage/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/terminalmage/salt/labels{/name}","releases_url":"https://api.github.com/repos/terminalmage/salt/releases{/id}","deployments_url":"https://api.github.com/repos/terminalmage/salt/deployments","created_at":"2012-01-15T22:33:58Z","updated_at":"2015-05-20T21:10:27Z","pushed_at":"2016-12-08T18:43:10Z","git_url":"git://github.com/terminalmage/salt.git","ssh_url":"git@github.com:terminalmage/salt.git","clone_url":"https://github.com/terminalmage/salt.git","svn_url":"https://github.com/terminalmage/salt","homepage":"saltstack.org","size":153293,"stargazers_count":1,"watchers_count":1,"language":null,"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":1,"default_branch":"develop"}},"base":{"label":"saltstack:2016.11","ref":"2016.11","sha":"9661258f22f91ce65dc73f2cc4e19371db41a2b2","user":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"repo":{"id":1390248,"name":"salt","full_name":"saltstack/salt","owner":{"login":"saltstack","id":1147473,"avatar_url":"https://avatars.githubusercontent.com/u/1147473?v=3","gravatar_id":"","url":"https://api.github.com/users/saltstack","html_url":"https://github.com/saltstack","followers_url":"https://api.github.com/users/saltstack/followers","following_url":"https://api.github.com/users/saltstack/following{/other_user}","gists_url":"https://api.github.com/users/saltstack/gists{/gist_id}","starred_url":"https://api.github.com/users/saltstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltstack/subscriptions","organizations_url":"https://api.github.com/users/saltstack/orgs","repos_url":"https://api.github.com/users/saltstack/repos","events_url":"https://api.github.com/users/saltstack/events{/privacy}","received_events_url":"https://api.github.com/users/saltstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/saltstack/salt","description":"Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt Open software package repository here: ","fork":false,"url":"https://api.github.com/repos/saltstack/salt","forks_url":"https://api.github.com/repos/saltstack/salt/forks","keys_url":"https://api.github.com/repos/saltstack/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saltstack/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saltstack/salt/teams","hooks_url":"https://api.github.com/repos/saltstack/salt/hooks","issue_events_url":"https://api.github.com/repos/saltstack/salt/issues/events{/number}","events_url":"https://api.github.com/repos/saltstack/salt/events","assignees_url":"https://api.github.com/repos/saltstack/salt/assignees{/user}","branches_url":"https://api.github.com/repos/saltstack/salt/branches{/branch}","tags_url":"https://api.github.com/repos/saltstack/salt/tags","blobs_url":"https://api.github.com/repos/saltstack/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saltstack/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saltstack/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/saltstack/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saltstack/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/saltstack/salt/languages","stargazers_url":"https://api.github.com/repos/saltstack/salt/stargazers","contributors_url":"https://api.github.com/repos/saltstack/salt/contributors","subscribers_url":"https://api.github.com/repos/saltstack/salt/subscribers","subscription_url":"https://api.github.com/repos/saltstack/salt/subscription","commits_url":"https://api.github.com/repos/saltstack/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/saltstack/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/saltstack/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/saltstack/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/saltstack/salt/contents/{+path}","compare_url":"https://api.github.com/repos/saltstack/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saltstack/salt/merges","archive_url":"https://api.github.com/repos/saltstack/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saltstack/salt/downloads","issues_url":"https://api.github.com/repos/saltstack/salt/issues{/number}","pulls_url":"https://api.github.com/repos/saltstack/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/saltstack/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/saltstack/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saltstack/salt/labels{/name}","releases_url":"https://api.github.com/repos/saltstack/salt/releases{/id}","deployments_url":"https://api.github.com/repos/saltstack/salt/deployments","created_at":"2011-02-20T20:16:56Z","updated_at":"2016-12-08T17:38:44Z","pushed_at":"2016-12-08T19:08:41Z","git_url":"git://github.com/saltstack/salt.git","ssh_url":"git@github.com:saltstack/salt.git","clone_url":"https://github.com/saltstack/salt.git","svn_url":"https://github.com/saltstack/salt","homepage":"https://repo.saltstack.com/","size":233472,"stargazers_count":7124,"watchers_count":7124,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3271,"mirror_url":null,"open_issues_count":4049,"forks":3271,"open_issues":4049,"watchers":7124,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/saltstack/salt/pulls/38036"},"html":{"href":"https://github.com/saltstack/salt/pull/38036"},"issue":{"href":"https://api.github.com/repos/saltstack/salt/issues/38036"},"comments":{"href":"https://api.github.com/repos/saltstack/salt/issues/38036/comments"},"review_comments":{"href":"https://api.github.com/repos/saltstack/salt/pulls/38036/comments"},"review_comment":{"href":"https://api.github.com/repos/saltstack/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saltstack/salt/pulls/38036/commits"},"statuses":{"href":"https://api.github.com/repos/saltstack/salt/statuses/a1c70c7b95bd8be41435e26090b0ee016864eebe"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"cachedout","id":111616,"avatar_url":"https://avatars.githubusercontent.com/u/111616?v=3","gravatar_id":"","url":"https://api.github.com/users/cachedout","html_url":"https://github.com/cachedout","followers_url":"https://api.github.com/users/cachedout/followers","following_url":"https://api.github.com/users/cachedout/following{/other_user}","gists_url":"https://api.github.com/users/cachedout/gists{/gist_id}","starred_url":"https://api.github.com/users/cachedout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cachedout/subscriptions","organizations_url":"https://api.github.com/users/cachedout/orgs","repos_url":"https://api.github.com/users/cachedout/repos","events_url":"https://api.github.com/users/cachedout/events{/privacy}","received_events_url":"https://api.github.com/users/cachedout/received_events","type":"User","site_admin":false},"comments":6,"review_comments":0,"commits":1,"additions":100,"deletions":51,"changed_files":1}}
{"actor":{"display_login":"cachedout"}}