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

import-debian-package: ensure the default branch is correctly set when importing native packages

parent bdf42de0
No related branches found
No related tags found
2 merge requests!111import-debian-package: ensure the default branch is correctly set when importing native packages,!110Fastforward v2026dev1 -> v2026dev2: apertis-pkg-merge-local: Improve changelog
......@@ -247,6 +247,15 @@ def import_debian_dsc(
"debian/%(version)s", str(version)
)
# "gbp import-dsc" has a different behavior when processing native vs
# non-native package. For non-native packages, the default branch is set
# to --debian-branch whereas for native packages the default branch is
# set to master which confuses next steps. Thus ensure the default
# branch is correctly set to --debian-branch before continuing.
git.checkout(f"debian/{upstream_release}")
if "master" in git.branch():
git.branch("-D", "master")
# 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.
......
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