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:42:46 GMT
Updated Branches:
  refs/heads/trunk 764ea58e1 -> d0f91d5d4


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/d0f91d5d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d0f91d5d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d0f91d5d

Branch: refs/heads/trunk
Commit: d0f91d5d4c5500eeff9d142936955f8b42119632
Parents: 764ea58
Author: Nate Cole <ncole@hortonworks.com>
Authored: Fri Dec 6 16:42:31 2013 -0500
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Fri Dec 6 16:42:31 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/d0f91d5d/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/d0f91d5d/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 0dec041..f0f287a 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -2496,9 +2496,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