Commit fa8d0961 authored by Tristan Gingold's avatar Tristan Gingold

module.py: renaming.

parent dbb5f091
...@@ -63,7 +63,7 @@ class Module(object): ...@@ -63,7 +63,7 @@ class Module(object):
providing the modular behavior allowing for structured designs. providing the modular behavior allowing for structured designs.
""" """
def __init__(self, module_args, pool): def __init__(self, module_args, action):
"""Calculate and initialize the origin attributes: path, source...""" """Calculate and initialize the origin attributes: path, source..."""
assert module_args.url is not None assert module_args.url is not None
assert module_args.source is not None assert module_args.source is not None
...@@ -74,7 +74,7 @@ class Module(object): ...@@ -74,7 +74,7 @@ class Module(object):
self.modules = {'local': [], 'git': [], 'gitsm': [], 'svn': []} self.modules = {'local': [], 'git': [], 'gitsm': [], 'svn': []}
self.incl_makefiles = [] self.incl_makefiles = []
self.library = "work" self.library = "work"
self.pool = None self.action = None
self.top_manifest = None self.top_manifest = None
self.manifest_dict = {} self.manifest_dict = {}
self.source = None self.source = None
...@@ -85,8 +85,8 @@ class Module(object): ...@@ -85,8 +85,8 @@ class Module(object):
self.path = None self.path = None
self.isfetched = False self.isfetched = False
self.init_config(module_args) self.init_config(module_args)
self.pool = pool self.action = action
self.top_manifest = pool.get_top_manifest() self.top_manifest = action.get_top_manifest()
self.module_args = module_args self.module_args = module_args
def init_config(self, module_args): def init_config(self, module_args):
...@@ -253,7 +253,7 @@ class Module(object): ...@@ -253,7 +253,7 @@ class Module(object):
raise Exception("Found an absolute path (" + path + raise Exception("Found an absolute path (" + path +
") in a manifest(" + self.path + ")") ") in a manifest(" + self.path + ")")
path = path_mod.rel2abs(path, self.path) path = path_mod.rel2abs(path, self.path)
mods.append(self.pool.new_module( mods.append(self.action.new_module(
parent=self, url=path, source=m, fetchto=fetchto)) parent=self, url=path, source=m, fetchto=fetchto))
self.modules[m] = mods self.modules[m] = mods
...@@ -268,7 +268,7 @@ class Module(object): ...@@ -268,7 +268,7 @@ class Module(object):
path = git_submodule_dict[submodule_key]["path"] path = git_submodule_dict[submodule_key]["path"]
path = os.path.join(git_toplevel, path) path = os.path.join(git_toplevel, path)
fetchto = os.path.sep.join(path.split(os.path.sep)[:-1]) fetchto = os.path.sep.join(path.split(os.path.sep)[:-1])
self.modules['git'].append(self.pool.new_module(parent=self, self.modules['git'].append(self.action.new_module(parent=self,
url=url, url=url,
fetchto=fetchto, fetchto=fetchto,
source='git')) source='git'))
...@@ -326,7 +326,7 @@ class Module(object): ...@@ -326,7 +326,7 @@ class Module(object):
to the manifest_dict property. to the manifest_dict property.
In order to do this, it creates a ManifestParser object and In order to do this, it creates a ManifestParser object and
feeds it with: feeds it with:
- the arbitrary code from pool's top_module options - the arbitrary code from action's top_module options
(it assumes a top_module exists before any parsing!) (it assumes a top_module exists before any parsing!)
- the Manifest.py (if exists) - the Manifest.py (if exists)
- the extra_context: - the extra_context:
...@@ -352,8 +352,8 @@ PARSE START: %s ...@@ -352,8 +352,8 @@ PARSE START: %s
manifest_parser = ManifestParser() manifest_parser = ManifestParser()
manifest_parser.add_prefix_code(self.pool.options.prefix_code) manifest_parser.add_prefix_code(self.action.options.prefix_code)
manifest_parser.add_suffix_code(self.pool.options.suffix_code) manifest_parser.add_suffix_code(self.action.options.suffix_code)
# Parse and extract variables from it. # Parse and extract variables from it.
if self.parent is None: if self.parent is None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment