public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/R_overlay:gsoc13/next commit in: files/shlib/, roverlay/tools/
@ 2013-07-05 16:55 André Erdmann
  0 siblings, 0 replies; only message in thread
From: André Erdmann @ 2013-07-05 16:55 UTC (permalink / raw
  To: gentoo-commits

commit:     1e0d74b79f92bd54e57102e7f59cd18d5d0465d3
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Fri Jul  5 11:21:04 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> 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
 
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-05 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-05 16:55 [gentoo-commits] proj/R_overlay:gsoc13/next commit in: files/shlib/, roverlay/tools/ André Erdmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox