@@ -110,14 +110,18 @@ def _append_changelog_to_commit_msg(group, opts):
group['commit_msg'] += "\n\n" + text
-def _devtool_upgrade(devtool, bb, git, opts, pkg_ctx, workdir):
+def _devtool_upgrade(devtool, bb, git, opts, pkg_ctx, workdir, want_changelog):
try:
devtool_output = devtool.upgrade(pkg_ctx['PN'], pkg_ctx['NPV'], pkg_ctx['NSRCREV'])
D(" 'devtool upgrade' printed:\n%s" %(devtool_output))
- # Copy changelog before checking for conflicts — it's useful even on failure
- changelog_text = _get_changelog(pkg_ctx['PN'], workdir)
- if changelog_text:
- pkg_ctx['changelog_text'] = changelog_text
+ # Copy changelog before checking for conflicts — it's useful even on failure.
+ # Only for the first pkg in the group: -native/-tools-native variants share
+ # the same upstream source, so their changelog is identical and would
+ # otherwise be duplicated into the commit message once per variant.
+ if want_changelog:
+ changelog_text = _get_changelog(pkg_ctx['PN'], workdir)
+ if changelog_text:
+ pkg_ctx['changelog_text'] = changelog_text
# If devtool failed to rebase patches, it does not fail, but we should
if 'conflict' in devtool_output:
raise DevtoolError("Running 'devtool upgrade' for recipe %s failed." %(pkg_ctx['PN']), devtool_output)
@@ -136,8 +140,8 @@ def _devtool_upgrade(devtool, bb, git, opts, pkg_ctx, workdir):
def devtool_upgrade(devtool, bb, git, opts, group):
- for p in group['pkgs']:
- _devtool_upgrade(devtool, bb, git, opts, p, group['workdir'])
+ for i, p in enumerate(group['pkgs']):
+ _devtool_upgrade(devtool, bb, git, opts, p, group['workdir'], i == 0)
_append_changelog_to_commit_msg(group, opts)