* [gentoo-commits] proj/R_overlay:master commit in: roverlay/manifest/
@ 2012-06-20 19:03 André Erdmann
0 siblings, 0 replies; 2+ messages in thread
From: André Erdmann @ 2012-06-20 19:03 UTC (permalink / raw
To: gentoo-commits
commit: 3f1b2d76a0a2f13ea7ba36ff3fc4d833094d8f22
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jun 20 10:36:29 2012 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jun 20 10:36:29 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=3f1b2d76
log manifest creation status
modified: roverlay/manifest/helpers.py
---
roverlay/manifest/helpers.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/roverlay/manifest/helpers.py b/roverlay/manifest/helpers.py
index e7a54eb..78a76e2 100644
--- a/roverlay/manifest/helpers.py
+++ b/roverlay/manifest/helpers.py
@@ -90,9 +90,13 @@ class ExternalManifestCreation ( _ManifestCreation ):
self.logger.warning ( line )
if ebuild_call.returncode == 0:
+ self.logger.debug ( "Manifest written." )
return True
else:
- self.logger.error ( "Couldn't create Manifest for %s!" % ebuild_file )
+ self.logger.error (
+ "Couldn't create Manifest for %s! Return code was %i."
+ % ( ebuild_file, ebuild_call.returncode )
+ )
return False
# --- end of create_for (...) ---
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/R_overlay:master commit in: roverlay/manifest/
@ 2012-07-02 16:52 André Erdmann
0 siblings, 0 replies; 2+ messages in thread
From: André Erdmann @ 2012-07-02 16:52 UTC (permalink / raw
To: gentoo-commits
commit: 434998b389419ad929a53540057f80d4a921ea7b
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Mon Jul 2 16:44:20 2012 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Mon Jul 2 16:44:20 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=434998b3
Manifest creation: use one instance per job
modified: roverlay/manifest/helpers.py
---
roverlay/manifest/helpers.py | 29 ++++++++++++++++++++---------
1 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/roverlay/manifest/helpers.py b/roverlay/manifest/helpers.py
index 5e2919c..47e1e20 100644
--- a/roverlay/manifest/helpers.py
+++ b/roverlay/manifest/helpers.py
@@ -12,14 +12,13 @@ import re
import copy
import logging
import subprocess
+import threading
from roverlay import config, util
class _ManifestCreation ( object ):
"""This is the base class for Manifest file creation."""
- static_instance = None
-
def __init__ ( self ):
self.logger = logging.getLogger ( 'ManifestCreation' )
# --- end of __init__ (...) ---
@@ -31,11 +30,8 @@ class _ManifestCreation ( object ):
@classmethod
def do ( cls, package_info ):
- """Class/static access to Manifest creation."""
- if cls.static_instance is None:
- cls.static_instance = cls()
-
- return cls.static_instance.create_for ( package_info )
+ """Class access to Manifest creation."""
+ return cls().create_for ( package_info )
# --- end of do (...) ---
@@ -44,9 +40,24 @@ class ExternalManifestCreation ( _ManifestCreation ):
interface, ebuild(1), which is called in a filtered environment.
"""
+ envlock = threading.Lock()
+ manifest_env = None
+
+ @classmethod
+ def get_env ( cls, repo_dir ):
+ cls.envlock.acquire()
+ try:
+ if cls.manifest_env is None:
+ cls.manifest_env = ManifestEnv ( filter_env=True )
+ ret = cls.manifest_env [repo_dir]
+ finally:
+ cls.envlock.release()
+
+ return ret
+
+
def __init__ ( self ):
super ( ExternalManifestCreation, self ) . __init__ ()
- self.manifest_env = ManifestEnv ( filter_env=True )
# ebuild <ebuild_file> <target>, where target is:
self.ebuild_tgt = config.get ( 'TOOLS.EBUILD.target', 'manifest' )
self.ebuild_prog = config.get ( 'TOOLS.EBUILD.prog', '/usr/bin/ebuild' )
@@ -60,7 +71,7 @@ class ExternalManifestCreation ( _ManifestCreation ):
raises: *passes Exceptions from failed config lookups
"""
- my_env = self.manifest_env [ package_info ['distdir'] ]
+ my_env = self.__class__.get_env ( package_info ['distdir'] )
ebuild_file = package_info ['ebuild_file']
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-02 16:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 16:52 [gentoo-commits] proj/R_overlay:master commit in: roverlay/manifest/ André Erdmann
-- strict thread matches above, loose matches on Subject: below --
2012-06-20 19:03 André Erdmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox