From patchwork Wed Nov 4 22:24:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 1394532 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CRLnM3DqJz9sVK; Thu, 5 Nov 2020 09:25:11 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kaRDI-0002GV-8p; Wed, 04 Nov 2020 22:25:08 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kaRDE-0002Ff-U5 for kernel-team@lists.ubuntu.com; Wed, 04 Nov 2020 22:25:04 +0000 Received: from mail-ot1-f72.google.com ([209.85.210.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kaRDE-0008CA-K4 for kernel-team@lists.ubuntu.com; Wed, 04 Nov 2020 22:25:04 +0000 Received: by mail-ot1-f72.google.com with SMTP id n13so62847otk.22 for ; Wed, 04 Nov 2020 14:25:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vGfDUmLPEMAoy7nToDxP/T2DE98iEahpTb23iAKKv8A=; b=VdypCPSBqwNoVPRTGNzLW3LERWIEEt9geWLdpbJGXVV6vvVbLe0bjEn2V9Ck6gJPhw m9TOM6+5xmYwqHFUi7GPYpHeNVh83HCl8h5bkhev3BSkZ5YPiLu2qQ9c02wKHJUU87nc jWO1LLQEiJoNbAUE9pXNe0lRW6+Pt0Qbs/1/Y7zCQXr4M2w6nO8jBujCDYzwtVGoVkWE De4oFVVGIrd6lvrrheR0ezd8GzW5YhvSqfmxio3Cu62z93Z0t/Di4AvBjcl0WSuZyo6r lL5nz1u9SKEy/93XEQHq9xjIuSpMlB71vQ9CfRDs6uvt3sF3gMaTWmrZzkm9LLU+C9rj Gu5A== X-Gm-Message-State: AOAM530A7ycmo86vAEmI1Y2czLickocidUgtNTurXNZrssigW9Y4JAHg zU0BOCA3Ust13Mg2PBdk6ijXNQpBHX6mrlMH/JesBTAaswk4KJBY0nXUm06kViF34Q+VUQYXIUQ nx0bRV1QSApWcshIknoUJshMGkybU0HecQhu/GaJ6zg== X-Received: by 2002:a05:6830:115a:: with SMTP id x26mr2432409otq.77.1604528703429; Wed, 04 Nov 2020 14:25:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzXsfqckTSW7aWJGFYPc4slcr8HdTU5rGw8tb4PxNF/drfhgR+OZMUcaYS7j8Bzq0ToLi7og== X-Received: by 2002:a05:6830:115a:: with SMTP id x26mr2432397otq.77.1604528703124; Wed, 04 Nov 2020 14:25:03 -0800 (PST) Received: from localhost ([2605:a601:ac0f:820:480c:5c88:a771:1100]) by smtp.gmail.com with ESMTPSA id l11sm755488oti.75.2020.11.04.14.25.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 14:25:02 -0800 (PST) From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [PATCH][kteam-tools] cranky: generate-update-conf: Add leading ~ or + to BACKPORT_SUFFIX Date: Wed, 4 Nov 2020 16:24:59 -0600 Message-Id: <20201104222500.38610-2-seth.forshee@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201104222500.38610-1-seth.forshee@canonical.com> References: <20201104222500.38610-1-seth.forshee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" 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 --- 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))