From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D852C1381F3 for ; Fri, 5 Jul 2013 16:55:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4DF48E0A69; Fri, 5 Jul 2013 16:55:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A13C1E0A95 for ; Fri, 5 Jul 2013 16:55:45 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9C19633E8DC for ; Fri, 5 Jul 2013 16:55:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 3CD34E5460 for ; Fri, 5 Jul 2013 16:55:43 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1373023264.1e0d74b79f92bd54e57102e7f59cd18d5d0465d3.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: files/shlib/, roverlay/tools/ X-VCS-Repository: proj/R_overlay X-VCS-Files: files/shlib/functions.sh roverlay/tools/shenv.py X-VCS-Directories: files/shlib/ roverlay/tools/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 1e0d74b79f92bd54e57102e7f59cd18d5d0465d3 X-VCS-Branch: gsoc13/next Date: Fri, 5 Jul 2013 16:55:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c6a1a4c9-b42b-42ef-afb1-ef6adea98c46 X-Archives-Hash: 8eb1b20a1a351dfc0f278fb93445bcb9 commit: 1e0d74b79f92bd54e57102e7f59cd18d5d0465d3 Author: André Erdmann mailerd de> AuthorDate: Fri Jul 5 11:21:04 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Fri Jul 5 11:21:04 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=1e0d74b7 "run hooks": set OVERLAY_NAME --- files/shlib/functions.sh | 2 +- roverlay/tools/shenv.py | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/files/shlib/functions.sh b/files/shlib/functions.sh index 03eb28b..304e3e6 100644 --- a/files/shlib/functions.sh +++ b/files/shlib/functions.sh @@ -78,7 +78,7 @@ readonly FUNCTIONS readonly DEBUG VERBOSE QUIET NO_COLOR readonly ROVERLAY_PHASE \ - OVERLAY S \ + OVERLAY S OVERLAY_NAME \ DISTROOT \ TMPDIR T \ ADDITIONS_DIR FILESDIR \ diff --git a/roverlay/tools/shenv.py b/roverlay/tools/shenv.py index 794ed1e..f732040 100644 --- a/roverlay/tools/shenv.py +++ b/roverlay/tools/shenv.py @@ -40,6 +40,9 @@ NULL_PHASE = 'null' # # overlay directory (depends on config value), initial directory for scripts # +# $OVERLAY_NAME +# +# name of the overlay # # $DISTROOT # @@ -150,6 +153,9 @@ def setup_env(): # str::dirpath $S renames $OVERLAY setup_self ( 'S', 'OVERLAY' ) + # str $OVERLAY_NAME + setup_conf ( 'OVERLAY_NAME', 'OVERLAY.name' ) + # str::dirpath $HOME renames $OVERLAY # # FIXME: this should/could be the parent dir of $OVERLAY @@ -309,11 +315,12 @@ def run_script ( script, phase, return_success=False, logger=None ): output = script_call.communicate() except: - try: - script_call.terminate() - time.sleep ( 1 ) - finally: - script_call.kill() + if 'script_call' in locals(): + try: + script_call.terminate() + time.sleep ( 1 ) + finally: + script_call.kill() raise