The flatten option for fetch action is not longer required: this is the default behavior now

parent 5aa91926
......@@ -674,7 +674,7 @@ If we run the ``hdlmake fetch`` command from inside the folder where the top Man
.. code-block:: python
fetchto = ".."
fetchto = "../../ip_cores"
......
......@@ -219,8 +219,6 @@ def _get_parser():
make_remote = subparsers.add_parser("make-remote", help="generate remote synthesis makefile")
fetch = subparsers.add_parser("fetch", help="fetch and/or update remote modules listed in Manifest")
fetch.add_argument("--flatten", help="`flatten' modules' hierarchy by storing everything in top module's fetchto direactoru",
default=False, action="store_true")
fetch.add_argument("--update", help="force updating of the fetched modules", default=False, action="store_true")
clean = subparsers.add_parser("clean", help="remove all modules fetched for direct and indirect children of this module")
listmod = subparsers.add_parser("list-mods", help="List all modules together with their files")
......
......@@ -27,17 +27,12 @@ from .action import Action
class FetchModules(Action):
def _check_options(self):
if self.options.flatten is True and self.env["coredir"] is not None:
logging.error("Options clash: --flatten and HDLMAKE_COREDIR set at a time\n"
"Take one out of the two")
sys.exit("\nExiting")
def run(self):
top_module = self.modules_pool.get_top_module()
logging.info("Fetching needed modules.")
os.system(top_module.fetch_pre_cmd)
self.modules_pool.fetch_all(unfetched_only=not self.options.update, flatten=self.options.flatten)
self.modules_pool.fetch_all(unfetched_only=not self.options.update)
logging.debug(str(self.modules_pool))
os.system(top_module.fetch_post_cmd)
logging.info("All modules fetched.")
......@@ -173,14 +173,12 @@ class ModulePool(list):
new_modules.extend(module.git_submodules)
return new_modules
def fetch_all(self, unfetched_only=False, flatten=False):
def fetch_all(self, unfetched_only=False):
"""Fetch recursively all modules"""
fetch_queue = [m for m in self]
while len(fetch_queue) > 0:
cur_mod = fetch_queue.pop()
if flatten is True:
cur_mod.fetchto = self.top_module.fetchto
new_modules = []
if unfetched_only:
if cur_mod.isfetched:
......
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