Add comment to clarify why don't load git when is already instanced
the reason is the UniverseUpdater use poky git repository root instead
of per recipe directory.

Signed-off-by: Aníbal Limón <[email protected]>
---
 upgradehelper.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/upgradehelper.py b/upgradehelper.py
index a3813c3..8d6c6f6 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -209,7 +209,8 @@ class Updater(object):
         if self.env['PV'] == self.new_ver:
             raise UpgradeNotNeededError
 
-        if self.git is not None:
+        # UniverseUpdater use git poky respository 
+        if isinstance(self.git, UniverseUpdater):
             return
 
         self.git = Git(self.recipe_dir)
@@ -525,6 +526,8 @@ class Updater(object):
 class UniverseUpdater(Updater):
     def __init__(self):
         Updater.__init__(self, True, True)
+
+        # XXX: assume that the poky directory is the first entry in the PATH
         self.git = Git(os.path.dirname(os.getenv('PATH', False).split(':')[0]))
 
         # read history file
-- 
1.9.1

-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to