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.li...@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 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto