Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- 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") {