Allow OPTIMIZED_GIT_CLONE to be False
cover Allow OPTIMIZED_GIT_CLONE to be False
The autobuilder code assumes OPTIMIZED_GIT_CLONE is always set True, because things break if it is set to False. I had a case where it needed to be set False because the git trash folder was on a different file system than the build directory. This caused the CheckOutLayers build step to fail.
In addition, I still wanted to use the git mirror even with OPTIMIZED_GIT_CLONE set False, so allow that case, too.
[YOCTO #10010]
Bill Randle (2):
BuildSet.py: allow using local git mirror even if OPTIMIZED_GIT_CLONE is False yoctogit.py: ensure mirrordir is set before trying to use it
lib/python2.7/site-packages/autobuilder/BuildSet.py | 2 ++ .../buildbot-0.8.8-py2.7.egg/buildbot/steps/source/yoctogit.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.5.5
PATCH 1/2 BuildSet.py: allow using local git mirror even if OPTIMIZED_GIT_CLONE is False
OPTIMIZED_GIT_CLONE controls the use of two features: a local git mirror directory and an optimized move/copy of old build directories. Allow the use of the local mirror, even if the optimized move/copy is not used.
To disable the local mirror, comment out the setting of OGIT_MIRROR_DIR, as well as setting OPTIMIZED_GIT_CLONE False.
[YOCOT #10010]
--- lib/python2.7/site-packages/autobuilder/BuildSet.py | 2 ++ 1 file changed, 2 insertions(+)
lib/python2.7/site-packages/autobuilder/BuildSet.py +2 -0
@@ -82,6 +82,8 @@ class BuildSet(): method='barecopy' storedir=os.environ.get('OGIT_TRASH_DIR') mirrordir=os.environ.get('OGIT_MIRROR_DIR') + elif os.environ.get('OGIT_MIRROR_DIR', None) != None: + mirrordir=os.environ.get('OGIT_MIRROR_DIR') if 'poky' in layername or 'oecore' in layername: workdir = 'build' elif "eclipse-poky" in layername:
Signature · 1 line
2.5.5
PATCH 2/2 yoctogit.py: ensure mirrordir is set before trying to use it
In reply to Bill RandleIf OPTIMIZED_GIT_CLONE is False, it's possible for self.mirrordir to be unset, which cause the _mirrorExists function to throw an exception. Check that self.mirrordir is actually set before trying to use it.
[YOCTO #10010]
Upstream-Status: Inappropriate [embedded specific]
--- .../buildbot-0.8.8-py2.7.egg/buildbot/steps/source/yoctogit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/steps/source/yoctogit.py +5 -2
@@ -596,8 +596,11 @@ class YoctoGit(Source): return self.pathExists(self.build.path_module.join(self.workdir, '.git')) def _mirrorExists(self): - mirror = self.mirrordir + "/" + self.repourl.replace("git://", "") + "/" - return self.pathExists(self.build.path_module.join(mirror, '.git')) + if self.mirrordir: + mirror = self.mirrordir + "/" + self.repourl.replace("git://", "") + "/" + return self.pathExists(self.build.path_module.join(mirror, '.git')) + else: + return None def _updateSubmodule(self, _): if self.submodules:
Signature · 1 line
2.5.5
Quoted 7 lines · Bill Randle
The autobuilder code assumes
OPTIMIZED_GIT_CLONEis always set True, because things break if it is set to False. I had a case where it needed to be set False because the git trash folder was on a different
file system than the build directory. This caused the CheckOutLayers build
step to fail.
Part of me is tempted to just say "Don't Do That!" The plan was to eventually just use the optimized git clone, but if people are actually doing the above, then yes, this is needed.
Let me review and then I'll push.
-b
Quoted 18 lines
In addition, I still wanted to use the git mirror even with
OPTIMIZED_GIT_CLONE
set False, so allow that case, too.[YOCTO #10010]
Bill Randle (2):
BuildSet.py: allow using local git mirror even ifOPTIMIZED_GIT_CLONEis False
yoctogit.py: ensure mirrordir is set before trying to use itlib/python2.7/site-packages/autobuilder/BuildSet.py | 2 ++ .../buildbot-0.8.8-py2.7.egg/buildbot/steps/source/yoctogit.py | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
Beth 'pidge' Flanagan
AppliedMerged into master
-b
Quoted 25 lines · Bill Randle
The autobuilder code assumes
OPTIMIZED_GIT_CLONEis always set True, because things break if it is set to False. I had a case where it needed to be set False because the git trash folder was on a different
file system than the build directory. This caused the CheckOutLayers build
step to fail.In addition, I still wanted to use the git mirror even with
OPTIMIZED_GIT_CLONE
set False, so allow that case, too.[YOCTO #10010]
Bill Randle (2):
BuildSet.py: allow using local git mirror even ifOPTIMIZED_GIT_CLONEis False
yoctogit.py: ensure mirrordir is set before trying to use itlib/python2.7/site-packages/autobuilder/BuildSet.py | 2 ++ .../buildbot-0.8.8-py2.7.egg/buildbot/steps/source/yoctogit.py | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)