[Pkg-anonymity-tools] [torbrowser-launcher] 04/11: always choose a stable release, if available (#120)

Ulrike Uhlig u-guest at moszumanska.debian.org
Tue Aug 12 19:06:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch debian
in repository torbrowser-launcher.

commit 3de81def1a3b0ca714c9732a05b8447f63db16f7
Author: Micah Lee <micah at micahflee.com>
Date:   Sun Aug 10 13:22:13 2014 -0400

    always choose a stable release, if available (#120)
---
 torbrowser-launcher | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/torbrowser-launcher b/torbrowser-launcher
index 9683e9f..483166d 100755
--- a/torbrowser-launcher
+++ b/torbrowser-launcher
@@ -961,7 +961,18 @@ class TBLLauncher:
                     valid.append(str(version))
             valid.sort()
             if len(valid):
-                latest = valid.pop()
+                if len(valid) == 1:
+                    latest = valid.pop()
+                else:
+                    stable = []
+                    # remove alphas/betas
+                    for version in valid:
+                        if '-alpha-' not in version and '-beta-' not in version:
+                            stable.append(version)
+                    if len(stable):
+                        latest = stable.pop()
+                    else:
+                        latest = valid.pop()
 
             if latest:
                 self.common.settings['latest_version'] = latest[:-len('-Linux')]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/torbrowser-launcher.git



More information about the Pkg-anonymity-tools mailing list