ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject git commit: AMBARI-3909. Upgrade local repo definitions when upgrading Ambari [part 2] (ncole)
Date Fri, 06 Dec 2013 21:40:34 GMT
Updated Branches:
  refs/heads/branch-1.4.2 377518ba9 -> 650b50618


AMBARI-3909. Upgrade local repo definitions when upgrading Ambari [part 2] (ncole)


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

Branch: refs/heads/branch-1.4.2
Commit: 650b506184e2b1b74a0a1348d3ded1e0d4fdcc0a
Parents: 377518b
Author: Nate Cole <ncole@hortonworks.com>
Authored: Fri Dec 6 15:10:46 2013 -0500
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Fri Dec 6 16:39:57 2013 -0500

----------------------------------------------------------------------
 ambari-server/pom.xml                          | 6 ++++++
 ambari-server/src/main/python/ambari-server.py | 8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/650b5061/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 8d3df57..9f9f48b 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -373,6 +373,12 @@
                 <source>
                   <location>src/main/resources/upgrade/dml/Ambari-DML-Oracle-UPGRADE_STACK.sql</location>
                 </source>
+                <source>
+                  <location>src/main/resources/upgrade/dml/Ambari-DML-Postgres-INSERT_METAINFO.sql</location>
+                </source>
+                <source>
+                  <location>src/main/resources/upgrade/dml/Ambari-DML-Oracle-INSERT_METAINFO.sql</location>
+                </source>
               </sources>
             </mapping>
             <mapping>

http://git-wip-us.apache.org/repos/asf/ambari/blob/650b5061/ambari-server/src/main/python/ambari-server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index 7b78a08..9dcf756 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -2551,9 +2551,15 @@ def upgrade_local_repo(args):
     return
 
   for stack_version_local in os.listdir(stack_root_local):
-    repo_file_local = os.path.join(stack_root_local, stack_version_local, "repos", "repoinfo.xml")
+    repo_file_local = os.path.join(stack_root_local, stack_version_local, "repos", "repoinfo.xml.rpmsave")
+    if not os.path.exists(repo_file_local):
+      repo_file_local = os.path.join(stack_root_local, stack_version_local, "repos", "repoinfo.xml")
+
     repo_file = os.path.join(stack_root, stack_version_local, "repos", "repoinfo.xml")
 
+    print_info_msg("Local repo file: " + repo_file_local)
+    print_info_msg("Repo file: " + repo_file_local)
+
     if os.path.exists(repo_file_local) and os.path.exists(repo_file):
       local_values = load_stack_values(stack_version_local, repo_file_local)
       repo_values = load_stack_values(stack_version_local, repo_file)


Mime
View raw message