{"action":"created","comment":{"url":"https://api.github.com/repos/yast/yast-http-server/pulls/comments/23221540","id":23221540,"diff_hunk":"@@ -282,7 +299,81 @@ def Read\n       YaST::HTTPDData.ReadModules\n       YaST::HTTPDData.ReadService\n \n-      return false if !FileChanges.CheckFiles(@files_to_check)\n+\n+      dynamic_files_to_check = DynamicFilesToCheck()\n+      if !FileChanges.CheckFiles(\n+          Convert.convert(\n+            Builtins.merge(@files_to_check, dynamic_files_to_check),\n+            :from => \"list\",\n+            :to   => \"list <string>\"\n+          )\n+        )\n+        return false\n+      end\n+\n+      # FIXME: following functionality should be generic in FileChanges\n+\n+      file_checksums = {}\n+      if Ops.greater_than(\n+          Convert.to_integer(\n+            SCR.Read(path(\".target.size\"), \"/var/lib/YaST2/file_checksums.ycp\")\n+          ),\n+          0\n+        )\n+        file_checksums = Convert.convert(\n+          SCR.Read(path(\".target.ycp\"), \"/var/lib/YaST2/file_checksums.ycp\"),\n+          :from => \"any\",\n+          :to   => \"map <string, string>\"\n+        )\n+        file_checksums = {} if file_checksums == nil\n+      end\n+\n+      new_files = Builtins.filter(dynamic_files_to_check) do |file|\n+        !Builtins.haskey(file_checksums, file)\n+      end\n+\n+      if Ops.greater_than(Builtins.size(new_files), 0)\n+        # Continue/Cancel question, %1 is a file name\n+        msg = _(\"File %1 has been created manually.\\nYaST might lose this file\")\n+        if Ops.greater_than(Builtins.size(new_files), 1)\n+          # Continue/Cancel question, %1 is a comma separated list of file names\n+          msg = _(\n+            \"Files %1 have been created manually.\\nYaST might lose these files\"\n+          )\n+        end\n+        msg = Builtins.sformat(msg, Builtins.mergestring(new_files, \", \"))\n+        popup_file = \"/filechecks_non_verbose\"\n+        if {} ==\n+            SCR.Read(\n+              path(\".target.stat\"),\n+              Ops.add(Directory.vardir, popup_file)\n+            )\n+          content = VBox(\n+            Label(msg),\n+            Left(CheckBox(Id(:disable), Message.DoNotShowMessageAgain())),\n+            ButtonBox(\n+              PushButton(Id(:ok), Opt(:okButton), Label.ContinueButton()),\n+              PushButton(Id(:cancel), Opt(:cancelButton), Label.CancelButton())\n+            )\n+          )\n+          UI.OpenDialog(content)\n+          UI.SetFocus(:ok)\n+          ret = UI.UserInput\n+          Builtins.y2milestone(\"ret = %1\", ret)\n+          if ret == :ok && Convert.to_boolean(UI.QueryWidget(:disable, :Value))\n+            Builtins.y2milestone(\"Disabled checksum popups\")\n+            SCR.Write(\n+              path(\".target.string\"),\n+              Ops.add(Directory.vardir, popup_file),","path":"src/modules/HttpServer.rb","position":101,"original_position":101,"commit_id":"a1c7c140cbaaf9d107eab816b4a79c7e374f57d4","original_commit_id":"a1c7c140cbaaf9d107eab816b4a79c7e374f57d4","user":{"login":"jreidinger","id":478871,"avatar_url":"https://avatars.githubusercontent.com/u/478871?v=3","gravatar_id":"","url":"https://api.github.com/users/jreidinger","html_url":"https://github.com/jreidinger","followers_url":"https://api.github.com/users/jreidinger/followers","following_url":"https://api.github.com/users/jreidinger/following{/other_user}","gists_url":"https://api.github.com/users/jreidinger/gists{/gist_id}","starred_url":"https://api.github.com/users/jreidinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreidinger/subscriptions","organizations_url":"https://api.github.com/users/jreidinger/orgs","repos_url":"https://api.github.com/users/jreidinger/repos","events_url":"https://api.github.com/users/jreidinger/events{/privacy}","received_events_url":"https://api.github.com/users/jreidinger/received_events","type":"User","site_admin":false},"body":"`popup_file_path` if you use my suggestion above","created_at":"2015-01-20T13:29:56Z","updated_at":"2015-01-20T13:29:56Z","html_url":"https://github.com/yast/yast-http-server/pull/14#discussion_r23221540","pull_request_url":"https://api.github.com/repos/yast/yast-http-server/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/yast/yast-http-server/pulls/comments/23221540"},"html":{"href":"https://github.com/yast/yast-http-server/pull/14#discussion_r23221540"},"pull_request":{"href":"https://api.github.com/repos/yast/yast-http-server/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/yast/yast-http-server/pulls/14","id":27674731,"html_url":"https://github.com/yast/yast-http-server/pull/14","diff_url":"https://github.com/yast/yast-http-server/pull/14.diff","patch_url":"https://github.com/yast/yast-http-server/pull/14.patch","issue_url":"https://api.github.com/repos/yast/yast-http-server/issues/14","number":14,"state":"open","locked":false,"title":"check for manually created files in order to prevent data loss (bsc#860856)","user":{"login":"jsrain","id":914664,"avatar_url":"https://avatars.githubusercontent.com/u/914664?v=3","gravatar_id":"","url":"https://api.github.com/users/jsrain","html_url":"https://github.com/jsrain","followers_url":"https://api.github.com/users/jsrain/followers","following_url":"https://api.github.com/users/jsrain/following{/other_user}","gists_url":"https://api.github.com/users/jsrain/gists{/gist_id}","starred_url":"https://api.github.com/users/jsrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsrain/subscriptions","organizations_url":"https://api.github.com/users/jsrain/orgs","repos_url":"https://api.github.com/users/jsrain/repos","events_url":"https://api.github.com/users/jsrain/events{/privacy}","received_events_url":"https://api.github.com/users/jsrain/received_events","type":"User","site_admin":false},"body":"I know about the FIXME to move some code to FileChanges.rb, I intend to do this when the code passes the review in the master branch.","created_at":"2015-01-20T12:43:46Z","updated_at":"2015-01-20T13:29:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"420735450d645783336dc9bfa4aa068651605fdd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yast/yast-http-server/pulls/14/commits","review_comments_url":"https://api.github.com/repos/yast/yast-http-server/pulls/14/comments","review_comment_url":"https://api.github.com/repos/yast/yast-http-server/pulls/comments/{number}","comments_url":"https://api.github.com/repos/yast/yast-http-server/issues/14/comments","statuses_url":"https://api.github.com/repos/yast/yast-http-server/statuses/a1c7c140cbaaf9d107eab816b4a79c7e374f57d4","head":{"label":"jsrain:SLE-12-GA","ref":"SLE-12-GA","sha":"a1c7c140cbaaf9d107eab816b4a79c7e374f57d4","user":{"login":"jsrain","id":914664,"avatar_url":"https://avatars.githubusercontent.com/u/914664?v=3","gravatar_id":"","url":"https://api.github.com/users/jsrain","html_url":"https://github.com/jsrain","followers_url":"https://api.github.com/users/jsrain/followers","following_url":"https://api.github.com/users/jsrain/following{/other_user}","gists_url":"https://api.github.com/users/jsrain/gists{/gist_id}","starred_url":"https://api.github.com/users/jsrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsrain/subscriptions","organizations_url":"https://api.github.com/users/jsrain/orgs","repos_url":"https://api.github.com/users/jsrain/repos","events_url":"https://api.github.com/users/jsrain/events{/privacy}","received_events_url":"https://api.github.com/users/jsrain/received_events","type":"User","site_admin":false},"repo":{"id":16370546,"name":"yast-http-server","full_name":"jsrain/yast-http-server","owner":{"login":"jsrain","id":914664,"avatar_url":"https://avatars.githubusercontent.com/u/914664?v=3","gravatar_id":"","url":"https://api.github.com/users/jsrain","html_url":"https://github.com/jsrain","followers_url":"https://api.github.com/users/jsrain/followers","following_url":"https://api.github.com/users/jsrain/following{/other_user}","gists_url":"https://api.github.com/users/jsrain/gists{/gist_id}","starred_url":"https://api.github.com/users/jsrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsrain/subscriptions","organizations_url":"https://api.github.com/users/jsrain/orgs","repos_url":"https://api.github.com/users/jsrain/repos","events_url":"https://api.github.com/users/jsrain/events{/privacy}","received_events_url":"https://api.github.com/users/jsrain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsrain/yast-http-server","description":"YaST module http-server","fork":true,"url":"https://api.github.com/repos/jsrain/yast-http-server","forks_url":"https://api.github.com/repos/jsrain/yast-http-server/forks","keys_url":"https://api.github.com/repos/jsrain/yast-http-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsrain/yast-http-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsrain/yast-http-server/teams","hooks_url":"https://api.github.com/repos/jsrain/yast-http-server/hooks","issue_events_url":"https://api.github.com/repos/jsrain/yast-http-server/issues/events{/number}","events_url":"https://api.github.com/repos/jsrain/yast-http-server/events","assignees_url":"https://api.github.com/repos/jsrain/yast-http-server/assignees{/user}","branches_url":"https://api.github.com/repos/jsrain/yast-http-server/branches{/branch}","tags_url":"https://api.github.com/repos/jsrain/yast-http-server/tags","blobs_url":"https://api.github.com/repos/jsrain/yast-http-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsrain/yast-http-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsrain/yast-http-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsrain/yast-http-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsrain/yast-http-server/statuses/{sha}","languages_url":"https://api.github.com/repos/jsrain/yast-http-server/languages","stargazers_url":"https://api.github.com/repos/jsrain/yast-http-server/stargazers","contributors_url":"https://api.github.com/repos/jsrain/yast-http-server/contributors","subscribers_url":"https://api.github.com/repos/jsrain/yast-http-server/subscribers","subscription_url":"https://api.github.com/repos/jsrain/yast-http-server/subscription","commits_url":"https://api.github.com/repos/jsrain/yast-http-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsrain/yast-http-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsrain/yast-http-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsrain/yast-http-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/jsrain/yast-http-server/contents/{+path}","compare_url":"https://api.github.com/repos/jsrain/yast-http-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsrain/yast-http-server/merges","archive_url":"https://api.github.com/repos/jsrain/yast-http-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsrain/yast-http-server/downloads","issues_url":"https://api.github.com/repos/jsrain/yast-http-server/issues{/number}","pulls_url":"https://api.github.com/repos/jsrain/yast-http-server/pulls{/number}","milestones_url":"https://api.github.com/repos/jsrain/yast-http-server/milestones{/number}","notifications_url":"https://api.github.com/repos/jsrain/yast-http-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsrain/yast-http-server/labels{/name}","releases_url":"https://api.github.com/repos/jsrain/yast-http-server/releases{/id}","created_at":"2014-01-30T06:58:31Z","updated_at":"2014-01-30T06:58:32Z","pushed_at":"2015-01-20T12:42:36Z","git_url":"git://github.com/jsrain/yast-http-server.git","ssh_url":"git@github.com:jsrain/yast-http-server.git","clone_url":"https://github.com/jsrain/yast-http-server.git","svn_url":"https://github.com/jsrain/yast-http-server","homepage":"http://en.opensuse.org/Portal:YaST","size":1340,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"yast:SLE-12-GA","ref":"SLE-12-GA","sha":"e6ab082a5aa474f2d1764272f75d723d2e0efa8a","user":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":4368117,"name":"yast-http-server","full_name":"yast/yast-http-server","owner":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/yast-http-server","description":"YaST module http-server","fork":false,"url":"https://api.github.com/repos/yast/yast-http-server","forks_url":"https://api.github.com/repos/yast/yast-http-server/forks","keys_url":"https://api.github.com/repos/yast/yast-http-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-http-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-http-server/teams","hooks_url":"https://api.github.com/repos/yast/yast-http-server/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-http-server/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-http-server/events","assignees_url":"https://api.github.com/repos/yast/yast-http-server/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-http-server/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-http-server/tags","blobs_url":"https://api.github.com/repos/yast/yast-http-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-http-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-http-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-http-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-http-server/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-http-server/languages","stargazers_url":"https://api.github.com/repos/yast/yast-http-server/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-http-server/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-http-server/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-http-server/subscription","commits_url":"https://api.github.com/repos/yast/yast-http-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-http-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-http-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-http-server/issues/comments/{number}","contents_url":"https://api.github.com/repos/yast/yast-http-server/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-http-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-http-server/merges","archive_url":"https://api.github.com/repos/yast/yast-http-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-http-server/downloads","issues_url":"https://api.github.com/repos/yast/yast-http-server/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-http-server/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-http-server/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-http-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-http-server/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-http-server/releases{/id}","created_at":"2012-05-18T10:23:48Z","updated_at":"2014-12-04T12:29:50Z","pushed_at":"2015-01-19T13:08:52Z","git_url":"git://github.com/yast/yast-http-server.git","ssh_url":"git@github.com:yast/yast-http-server.git","clone_url":"https://github.com/yast/yast-http-server.git","svn_url":"https://github.com/yast/yast-http-server","homepage":"http://en.opensuse.org/Portal:YaST","size":1629,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/yast-http-server/pulls/14"},"html":{"href":"https://github.com/yast/yast-http-server/pull/14"},"issue":{"href":"https://api.github.com/repos/yast/yast-http-server/issues/14"},"comments":{"href":"https://api.github.com/repos/yast/yast-http-server/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/yast-http-server/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/yast/yast-http-server/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/yast/yast-http-server/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/yast/yast-http-server/statuses/a1c7c140cbaaf9d107eab816b4a79c7e374f57d4"}}}}