[yocto] [auh][PATCH 17/20] upgradehelper.py: add all changes before committing them

Alexander Kanavin alexander.kanavin at linux.intel.com
Thu Dec 14 08:35:57 PST 2017


From: Alexander Kanavin <alex.kanavin at gmail.com>

Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
---
 modules/utils/git.py | 3 +++
 upgradehelper.py     | 1 +
 2 files changed, 4 insertions(+)

diff --git a/modules/utils/git.py b/modules/utils/git.py
index a6f5422..0e812b9 100644
--- a/modules/utils/git.py
+++ b/modules/utils/git.py
@@ -52,6 +52,9 @@ class Git(object):
     def stash(self):
         return self._cmd("stash")
 
+    def add(self, src):
+        return self._cmd("add " + src)
+
     def commit(self, commit_message, author=None):
         if author is None:
             return self._cmd("commit -a -s -m \"" + commit_message + "\"")
diff --git a/upgradehelper.py b/upgradehelper.py
index 043d334..d1f441c 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -402,6 +402,7 @@ class Updater(object):
             pkg_ctx['patch_file'] = None
 
             I(" %s: Auto commit changes ..." % pkg_ctx['PN'])
+            self.git.add(pkg_ctx['recipe_dir'])
             self.git.commit(pkg_ctx['commit_msg'], self.opts['author'])
 
             stdout = self.git.create_patch(pkg_ctx['workdir'])
-- 
2.15.0




More information about the yocto mailing list