Skip to content
Snippets Groups Projects
Commit 14c623a7 authored by Dylan Aïssi's avatar Dylan Aïssi
Browse files

import-debian-package: 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 a
new package for the first time.
GitLab then puts the whole log message in the `CI_COMMIT_MESSAGE` env
var, which makes the runner to fail during the executor preparation
section with the error:

    exec /usr/bin/dumb-init: argument list too long

See: https://gitlab.com/gitlab-org/gitlab/-/issues/392406



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

Signed-off-by: default avatarDylan Aïssi <dylan.aissi@collabora.com>
parent 2c8c8b6a
No related branches found
No related tags found
1 merge request!64import-debian-package: avoid oversized commit messages
......@@ -195,6 +195,20 @@ def import_debian_dsc(args, dsc_file: Path, upstream: str, downstream: str, vers
'--no-pristine-tar',
str(dsc_file)]) == 0: # success
debian_tag = DebianGitRepository.version_to_tag("debian/%(version)s", str(version))
# gbp puts all the new changelog entries in the commit message, generating
# big walls of text when, for instance, importing a new package for the
# first time.
# GitLab then puts the whole log message in the CI_COMMIT_MESSAGE env var,
# which makes the runner to fail during the executor preparation
# section with the error:
# exec /usr/bin/dumb-init: argument list too long
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/392406
# to avoid that, trim the message to only keep the first line
shortmessage = git("log", "--format=%s", "-n1")
git("commit", "--amend", f"--message={shortmessage}")
git.tag('-a', '-f', '-m', f'Debian version {version}', debian_tag)
epochless = Version(version)
epochless.epoch = None
epochless_tag = DebianGitRepository.version_to_tag("debian/%(version)s", str(epochless))
......
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