[PATCH] Added a new boolean parameter called "update_submodules".

Martin Wilhelm martin at system4.org
Thu Oct 9 08:06:37 UTC 2014


On 2014-10-08 17:08, Martin Wilhelm wrote:

> +        self.submoduleupdatecommand = None
> +        self.update_submodules = opts['update_submodules']
> +        if str(self.update_submodules).lower() == "true":
> +           # We only support git here. All other SCM methodes are unsupported if update_submodules is set to True.
> +           if self.method == "git":
> +              self.submoduleupdatecommand = "git submodule update --init --recursive"
> +           else:
> +              self.log.error("Unsupported SCM method: " + self.method)
> +              sys.exit(5)
> +

Note to myself: That is not enough, I have to initialize 
update_submodules too.

Proposal:

         self.submoduleupdatecommand = None
         self.update_submodules = None
         if 'update_submodules' in opts:
            self.update_submodules = opts['update_submodules']
         if self.update_submodules:
            if str(self.update_submodules).lower() == "true":
               # We only support git here. All other SCM methodes are 
unsupported if update_submodules is set to True.
               if self.method == "git":
                  self.submoduleupdatecommand = "git submodule update 
--init --recursive"
               else:
                  self.log.error("Unsupported SCM method: " + self.method)
                  sys.exit(5)



Martin


More information about the buildsys mailing list