You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by di...@apache.org on 2017/06/29 17:13:54 UTC

ambari git commit: AMBARI-21373 Remove clean repo logic not suitable for Apache Ambari Python API (dili)

Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-21348 ab85eeb19 -> 98f77089c


AMBARI-21373 Remove clean repo logic not suitable for Apache Ambari Python API (dili)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98f77089
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98f77089
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98f77089

Branch: refs/heads/branch-feature-AMBARI-21348
Commit: 98f77089c97db7e49498107b9641d39cb0e6a527
Parents: ab85eeb
Author: Di Li <di...@apache.org>
Authored: Thu Jun 29 13:13:16 2017 -0400
Committer: Di Li <di...@apache.org>
Committed: Thu Jun 29 13:13:16 2017 -0400

----------------------------------------------------------------------
 .../scripts/repo_initialization.py              | 27 --------------------
 .../scripts/repo_initialization.py              | 27 --------------------
 2 files changed, 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/98f77089/ambari-server/src/main/resources/stacks/BigInsights/4.0/hooks/before-INSTALL/scripts/repo_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/hooks/before-INSTALL/scripts/repo_initialization.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/hooks/before-INSTALL/scripts/repo_initialization.py
index 1b0f5c6..dffcc39 100755
--- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/hooks/before-INSTALL/scripts/repo_initialization.py
+++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/hooks/before-INSTALL/scripts/repo_initialization.py
@@ -52,33 +52,6 @@ def _alter_repo(action, repo_string, repo_template):
                components = ubuntu_components, # ubuntu specific
     )
 
-    if action == "create":
-      #Attempt to clean cache against the given repo
-      repo_id=repo['repoId']
-      print "Clean cache against " + repo_id + "; file:" + repo['repoName']
-      current_repo_ids = []
-      current_repo_files = set() 
-      
-      if OSCheck.is_ubuntu_family():
-        current_repo_files.add("base")
-        current_repo_files.add(repo['repoName'])
-      elif OSCheck.is_suse_family():
-        current_repo_ids.append("base")
-        current_repo_ids.append(repo_id)
-      else:  
-        current_repo_ids.append(repo_id)
-      
-      Repository(repo_id,
-                 action = "clearcache",
-                 base_url = repo['baseUrl'],
-                 mirror_list = repo['mirrorsList'],
-                 repo_file_name = repo['repoName'],
-                 repo_template = repo_template,
-                 components = ubuntu_components,  # ubuntu specific
-                 use_repos=list(current_repo_files) if OSCheck.is_ubuntu_family() else current_repo_ids,
-                 skip_repos=["*"] if OSCheck.is_redhat_family() else []
-      )      
-
 def install_repos():
   import params
   if params.host_sys_prepped:

http://git-wip-us.apache.org/repos/asf/ambari/blob/98f77089/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/before-INSTALL/scripts/repo_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/before-INSTALL/scripts/repo_initialization.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/before-INSTALL/scripts/repo_initialization.py
index 98fa131..0de2f5b 100755
--- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/before-INSTALL/scripts/repo_initialization.py
+++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/before-INSTALL/scripts/repo_initialization.py
@@ -59,33 +59,6 @@ def _alter_repo(action, repo_string, repo_template):
                components = ubuntu_components, # ubuntu specific
     )
 
-    if action == "create":
-      #Attempt to clean cache against the given repo
-      repo_id=repo['repoId']
-      print "Clean cache against " + repo_id + "; file:" + repo['repoName']
-      current_repo_ids = []
-      current_repo_files = set() 
-      
-      if OSCheck.is_ubuntu_family():
-        current_repo_files.add("base")
-        current_repo_files.add(repo['repoName'])
-      elif OSCheck.is_suse_family():
-        current_repo_ids.append("base")
-        current_repo_ids.append(repo_id)
-      else:  
-        current_repo_ids.append(repo_id)
-      
-      Repository(repo_id,
-                 action = "clearcache",
-                 base_url = repo['baseUrl'],
-                 mirror_list = repo['mirrorsList'],
-                 repo_file_name = repo['repoName'],
-                 repo_template = repo_template,
-                 components = ubuntu_components,  # ubuntu specific
-                 use_repos=list(current_repo_files) if OSCheck.is_ubuntu_family() else current_repo_ids,
-                 skip_repos=["*"] if OSCheck.is_redhat_family() else []
-      )      
-
 def install_repos():
   import params
   if params.host_sys_prepped: