if ('[submodule "%s"]' % (package)) not in gitmodules.split("\n"):
gitmodules += """[submodule "%s"]
\tpath = %s
\turl = ../packages/%s.git
""" % (package, package, package)
if ('[submodule "%s"]' % (package)) not in gitmodules.split("\n"):
gitmodules += """[submodule "%s"]
\tpath = %s
\turl = ../packages/%s.git
""" % (package, package, package)