@@ -358,6 +358,10 @@ class Updater(object):
attachment_fullpath = os.path.join(pkg_ctx['workdir'], attachment)
if os.path.isfile(attachment_fullpath):
attachments.append(attachment_fullpath)
+ # Also add the patch inline using the 'scissors':
+ # https://git-scm.com/docs/git-mailinfo#Documentation/git-mailinfo.txt---scissors
+ if attachment_fullpath.endswith('.patch'):
+ msg_body += "\n\n-- >8 --\n%s" % (open(attachment_fullpath).read())
if self.opts['send_email']:
self.email_handler.send_email(to_addr, subject, msg_body, attachments, cc_addr=cc_addr)
This utilizes the 'scissors' feature as described here https://git-scm.com/docs/git-mailinfo#Documentation/git-mailinfo.txt---scissors and allows easy handling of AUH emails with tools like b4, patchwork or even 'git am' directly, eliminating the need to get the attachment first. Signed-off-by: Alexander Kanavin <alex@linutronix.de> --- upgrade-helper.py | 4 ++++ 1 file changed, 4 insertions(+)