APPLIED: [PATCH][kteam-tools] cranky: generate-update-conf: Add leading ~ or + to BACKPORT_SUFFIX
Kleber Souza
kleber.souza at canonical.com
Fri Nov 6 17:33:31 UTC 2020
On 04.11.20 23:24, Seth Forshee wrote:
> BugLink: https://bugs.launchpad.net/bugs/1902957
>
> We currently rely on our packaging to add a ~ character in front
> of BACKPORT_SUFFIX in version strings. However we have started
> doing forward ports of kernels to the development series as well,
> where we want this leading character to be + rather than ~. It's
> difficult to figure out which leader is appropriate from our
> kernel packaging, whereas when generating update.conf we have the
> kernel series info which makes it rather trivial.
>
> Update generate-update-conf to add the leader to BACKPORT_SUFFIX.
> This will be a + if the "backport" series is later than the
> source series, otherwise it will be a ~.
>
> Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
Applied to kteam-tools/master branch.
Thanks,
Kleber
> ---
> cranky/fixes.d/generate-update-conf | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/cranky/fixes.d/generate-update-conf b/cranky/fixes.d/generate-update-conf
> index 343ef41b2cea..492d0aa569f9 100755
> --- a/cranky/fixes.d/generate-update-conf
> +++ b/cranky/fixes.d/generate-update-conf
> @@ -61,4 +61,10 @@ print("DEBIAN_MASTER=debian." + master_branch)
> # startnewrelease" will use it to build the new release version
> # following the format "${PARENT_VERSION}~${BACKPORT_SUFFIX}.N":
> if source.backport:
> - print("BACKPORT_SUFFIX={}".format(source.series.name))
> + series = int(source.series.name.replace('.', ''))
> + parent_series = int(parent_source.series.name.replace('.', ''))
> + if series > parent_series:
> + leader = "+"
> + else:
> + leader = "~"
> + print("BACKPORT_SUFFIX={}{}".format(leader, source.series.name))
>
More information about the kernel-team
mailing list