diff options
Diffstat (limited to 'poky/bitbake/lib')
-rw-r--r-- | poky/bitbake/lib/bb/fetch2/git.py | 7 | ||||
-rwxr-xr-x | poky/bitbake/lib/bb/main.py | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/poky/bitbake/lib/bb/fetch2/git.py b/poky/bitbake/lib/bb/fetch2/git.py index 3de83bed1..7b618c6fb 100644 --- a/poky/bitbake/lib/bb/fetch2/git.py +++ b/poky/bitbake/lib/bb/fetch2/git.py @@ -354,10 +354,9 @@ class Git(FetchMethod): if not self._contains_ref(ud, d, name, ud.clonedir): needupdate = True if needupdate: - try: - runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir) - except bb.fetch2.FetchError: - logger.debug(1, "No Origin") + output = runfetchcmd("%s remote" % ud.basecmd, d, quiet=True, workdir=ud.clonedir) + if "origin" in output: + runfetchcmd("%s remote rm origin" % ud.basecmd, d, workdir=ud.clonedir) runfetchcmd("%s remote add --mirror=fetch origin %s" % (ud.basecmd, repourl), d, workdir=ud.clonedir) fetch_cmd = "LANG=C %s fetch -f --prune --progress %s refs/*:refs/*" % (ud.basecmd, repourl) diff --git a/poky/bitbake/lib/bb/main.py b/poky/bitbake/lib/bb/main.py index f4474e410..732a31540 100755 --- a/poky/bitbake/lib/bb/main.py +++ b/poky/bitbake/lib/bb/main.py @@ -405,9 +405,6 @@ def setup_bitbake(configParams, configuration, extrafeatures=None): # In status only mode there are no logs and no UI logger.addHandler(handler) - # Clear away any spurious environment variables while we stoke up the cooker - cleanedvars = bb.utils.clean_environment() - if configParams.server_only: featureset = [] ui_module = None @@ -423,6 +420,10 @@ def setup_bitbake(configParams, configuration, extrafeatures=None): server_connection = None + # Clear away any spurious environment variables while we stoke up the cooker + # (done after import_extension_module() above since for example import gi triggers env var usage) + cleanedvars = bb.utils.clean_environment() + if configParams.remote_server: # Connect to a remote XMLRPC server server_connection = bb.server.xmlrpcclient.connectXMLRPC(configParams.remote_server, featureset, |