[yocto] [PATCH 08/11][auh] upgradehelper.py: Fix interactive mode when recipe upgrade finish.
Aníbal Limón
anibal.limon at linux.intel.com
Wed Jun 10 09:28:49 PDT 2015
The validation for dropping changes needs to be defined only when
interactive mode is true if not this causes to drop the changes
for every failure.
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
upgradehelper.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/upgradehelper.py b/upgradehelper.py
index 19753a6..b1f075d 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -335,11 +335,10 @@ class Updater(object):
# this function will be called at the end of each recipe upgrade
def pkg_upgrade_handler(self, err):
- if err and self.patch_file:
+ if err and self.patch_file and self.interactive:
answer = "N"
- if self.interactive:
- I(" %s: Do you want to keep the changes? (y/N)" % self.pn)
- answer = sys.stdin.readline().strip().upper()
+ I(" %s: Do you want to keep the changes? (y/N)" % self.pn)
+ answer = sys.stdin.readline().strip().upper()
if answer == '' or answer == 'N':
I(" %s: Dropping changes from git ..." % self.pn)
--
1.8.4.5
More information about the yocto
mailing list