Skip to content
Snippets Groups Projects
Commit fa145a94 authored by Emanuele Aina's avatar Emanuele Aina
Browse files

pkg-pull-updates: Avoid oversized commit messages

`gbp import-dsc` puts all the new changelog entries in the commit
message, generating big walls of text when, for instance, importing the
version from Bullseye on top of the Buster one.

GitLab then puts the whole log message in the `CI_COMMIT_MESSAGE` env
var, which is passed on the docker command line, resulting in a error:

    standard_init_linux.go:219: exec user process caused: argument list too long

See https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26624#note_529234097



To avoid that, trim the message to only keep the first line.

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent dc1cf954
No related branches found
No related tags found
2 merge requests!183apertis-pkg-pull-updates: Avoid oversized commit messages,!93WIP: documentation-builder: Rebase on Apertis instead of Debian Buster
Pipeline #236052 passed
......@@ -220,6 +220,16 @@ def import_sources(local_dsc, upstream_suite):
],
env={'GBP_CONF_FILES': '/dev/null' }, # prevent the debian/gbp.conf in packages from interfering
check=True)
# gbp puts all the new changelog entries in the commit message, generating
# big walls of text when, for instance, importing the version from bullseye
# on top of the buster one
# GitLab then puts the whole log message in the CI_COMMIT_MESSAGE env var,
# which is passed on the docker command line, resulting in a error:
# standard_init_linux.go:219: exec user process caused: argument list too long
# https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26624#note_529234097
# to avoid that, trim the message to only keep the first line
shortmessage = git("log", "--format=%s", "-n1")
git("commit", "--amend", f"--message={shortmessage}")
def main():
parser = argparse.ArgumentParser(description='Pull updates from the upstream repositories')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment