From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: yocto@yoctoproject.org
Cc: paul.eggleton@linux.intel.com
Subject: [PATCHv2 09/11][auh] upgradehelper.py: Change policy for send emails and fix error passing
Date: Fri, 12 Jun 2015 20:10:45 +0000 [thread overview]
Message-ID: <1434139845-34607-1-git-send-email-anibal.limon@linux.intel.com> (raw)
Now send emails almost in all cases this give the maintainer
patches and diff to continue work also if the build isn't
succesful.
[YOCTO #7489]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
upgradehelper.py | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/upgradehelper.py b/upgradehelper.py
index b1f075d..d065fba 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -346,8 +346,6 @@ class Updater(object):
self.git.clean_untracked()
return
- status = type(err).__name__
-
# drop last upgrade from git. It's safer this way if the upgrade has
# problems and other recipes depend on it. Give the other recipes a
# chance...
@@ -381,8 +379,14 @@ class Updater(object):
"Attached are the patch, license diff (if change) and bitbake log.\n\n" \
"Regards,\nThe Upgrade Helper"
- # don't bother maintainer with mail if the recipe is already up to date
- if status == "UpgradeNotNeededError":
+ # if error only send email when useful infomration for maintainers exist
+ if err and not (isinstance(err, PatchError) or \
+ isinstance(err, ConfigureError) or \
+ isinstance(err, CompilationError) or \
+ isinstance(err, LicenseError)):
+ D( "%s: Don't send email to maintainer because the error was " \
+ "%s and the information isn't useful, please review it." \
+ % (self.pn, type(err).__name__))
return
if self.maintainer in maintainer_override:
@@ -478,6 +482,7 @@ class Updater(object):
attempted_pkgs = 0
for self.pn, self.new_ver, self.maintainer in pkgs_to_upgrade:
+ error = None
self.recipe = None
attempted_pkgs += 1
I(" ATTEMPT PACKAGE %d/%d" % (attempted_pkgs, total_pkgs))
@@ -489,10 +494,6 @@ class Updater(object):
step()
I(" %s: Upgrade SUCCESSFUL! Please test!" % self.pn)
- error = None
- except UpgradeNotNeededError as e:
- I(" %s: %s" % (self.pn, e.message))
- error = e
except Error as e:
E(" %s: %s" % (self.pn, e.message))
E(" %s: Upgrade FAILED! Logs and/or file diffs are available in %s" % (self.pn, self.workdir))
@@ -667,7 +668,7 @@ class UniverseUpdater(Updater):
# overriding the base method
def pkg_upgrade_handler(self, err):
- super(UniverseUpdater, self).pkg_upgrade_handler(self)
+ super(UniverseUpdater, self).pkg_upgrade_handler(err)
self.update_history(self.pn, self.new_ver, self.maintainer,
self._get_status_msg(err))
--
1.8.4.5
next reply other threads:[~2015-06-12 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 20:10 Aníbal Limón [this message]
2015-06-16 13:01 ` [PATCHv2 09/11][auh] upgradehelper.py: Change policy for send emails and fix error passing Paul Eggleton
2015-06-16 23:56 ` Aníbal Limón
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434139845-34607-1-git-send-email-anibal.limon@linux.intel.com \
--to=anibal.limon@linux.intel.com \
--cc=paul.eggleton@linux.intel.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.