From patchwork Tue Feb 11 14:28:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2773 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48H4sW0xztz3xyT for ; Tue, 11 Feb 2020 14:29:19 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48H4sQ2MJGz12B; Tue, 11 Feb 2020 14:29:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48H4sP1Vjyz2yyg; Tue, 11 Feb 2020 14:29:13 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48H4sL67ZPz2ycJ for ; Tue, 11 Feb 2020 14:29:10 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48H4sL4dlmzvs; Tue, 11 Feb 2020 14:29:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L3ZBQkIomC2E747DkjK8lw1wK3np53vCPOdzPpdrwPY=; b=wZR/yX8KSOq91NmetTJGVSIMQWkii+kPQkvR8sXE1tvJt4WwxlbZtI5rK57xGYXrJjrp0K 1WrAcPxkneSgExAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581431350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L3ZBQkIomC2E747DkjK8lw1wK3np53vCPOdzPpdrwPY=; b=LArcyXWs7g8uaDCu7PFfaFtI1qAbbBn5Tu0kGRQj7YSPc9GItDQ2okHdTNnc4rjrtAF/Zw ClJA4gHsjjsfb9UmVqJmb7+dXUr1f5HLnsajNMj7mG3YlqL/C7DXW15PjI6CW8My0HLXw+ ZlbjC+Z/OBa7qhLYpq+KnNH8EAhHOcfRBFFAxV7pRUSoLoZYuda8p5rrjwxdKM1xzhci+f mYc3CeaGFg1ZzFRyf+HplwFwuq9Wmkw6wWL3hkJ0TJrb2jiQEn8ZkUyIIC6aW2eWRBjIPo cqrSz/0SGLzFSk7NusHu2anKeMGa29RCpWrDRt4VN8scNG0LmzXvPDvFVkzk+Q== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 5/8] pakfire: Add version suffix when in a certain tree Date: Tue, 11 Feb 2020 14:28:50 +0000 Message-Id: <20200211142853.8561-6-michael.tremer@ipfire.org> In-Reply-To: <20200211142853.8561-1-michael.tremer@ipfire.org> References: <20200211142853.8561-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- src/pakfire/lib/functions.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index cda6f00a9..ddb1e9aad 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -965,6 +965,13 @@ sub get_arch() { return $machine; } +sub get_tree() { + # Return stable if nothing is set + return "stable" unless (defined $pakfiresettings{'TREE'}); + + return $pakfiresettings{'TREE'}; +} + sub make_version() { my $version = ""; @@ -978,6 +985,14 @@ sub make_version() { $version .= $1; } + # Append suffix for tree + my $tree = &get_tree(); + if ($tree eq "testing") { + $version .= ".1"; + } elsif ($tree eq "unstable") { + $version .= ".2"; + } + # Append architecture my $arch = &get_arch(); if ($arch ne "i586") {