Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA88410152 for ; Fri, 6 Dec 2013 21:42:46 +0000 (UTC) Received: (qmail 19089 invoked by uid 500); 6 Dec 2013 21:42:46 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 19062 invoked by uid 500); 6 Dec 2013 21:42:46 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 19055 invoked by uid 99); 6 Dec 2013 21:42:46 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2013 21:42:46 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7D79A8A7368; Fri, 6 Dec 2013 21:42:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ncole@apache.org To: commits@ambari.apache.org Message-Id: <080917b574ba4cb28c13547671f4b9aa@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-3909. Upgrade local repo definitions when upgrading Ambari [part 2] (ncole) Date: Fri, 6 Dec 2013 21:42:46 +0000 (UTC) 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 Authored: Fri Dec 6 16:42:31 2013 -0500 Committer: Nate Cole 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 @@ src/main/resources/upgrade/dml/Ambari-DML-Oracle-UPGRADE_STACK.sql + + src/main/resources/upgrade/dml/Ambari-DML-Postgres-INSERT_METAINFO.sql + + + src/main/resources/upgrade/dml/Ambari-DML-Oracle-INSERT_METAINFO.sql + 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)