Control: -1 tags +patch

Hi,
attached patch adds the needed epoch. If this is shared verbatim with
ubuntu we need to check with get_vendor as well. I'm happy to update
the patch if needed.
Cheers,
 -- Guido
>From 2ee8215c93abbab7da562532b2ea159305461f0e Mon Sep 17 00:00:00 2001
Message-Id: <2ee8215c93abbab7da562532b2ea159305461f0e.1466179669.git....@sigxcpu.org>
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org>
Date: Fri, 17 Jun 2016 17:32:44 +0200
Subject: [PATCH] Add an epoch for icedove/tb >= 45

Closes: #825508
---
 dh_xul-ext | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/dh_xul-ext b/dh_xul-ext
index 221135b..8017896 100755
--- a/dh_xul-ext
+++ b/dh_xul-ext
@@ -49,6 +49,11 @@ class XulApp(object):
         return(self.xul_id + ": " + self.package + " (" + self.sol + " to " +
                self.eol + ")")
 
+    def get_epoch(self, version):
+        if self.xul_id == THUNDERBIRD_ID and compare_versions(version, "45") >= 0:
+           return 1
+        return 0
+
     def defaults_to_compatible(self):
         """Returns true if the maximum and all later versions of the XUL
         application defaults add-ons to compatible. The XUL extension will be
@@ -65,10 +70,12 @@ class XulApp(object):
         """Return a string for ${xpi:Breaks} for the XUL application."""
         breaks = []
         if self.min_version:
-            deb_min_version = convert_moz_to_debian_version(self.min_version)
+            epoch = self.get_epoch(self.min_version)
+            deb_min_version = convert_moz_to_debian_version(self.min_version, epoch=epoch)
             breaks.append(self.package + " (<< " + deb_min_version + ")")
         if self.max_version and not self.defaults_to_compatible():
-            deb_max_version = moz_to_next_debian_version(self.max_version)
+            epoch = self.get_epoch(self.max_version)
+            deb_max_version = moz_to_next_debian_version(self.max_version, epoch=epoch)
             breaks.append(self.package + " (>> " + deb_max_version + ")")
         return ", ".join(breaks)
 
@@ -87,7 +94,8 @@ class XulApp(object):
     def get_versioned_package(self):
         versioned_package = self.package
         if self.min_version:
-            deb_min_version = convert_moz_to_debian_version(self.min_version)
+            epoch = self.get_epoch(self.min_version)
+            deb_min_version = convert_moz_to_debian_version(self.min_version, epoch=epoch)
             versioned_package += " (>= " + deb_min_version + ")"
         return versioned_package
 
-- 
2.8.1

_______________________________________________
Pkg-mozext-maintainers mailing list
Pkg-mozext-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-mozext-maintainers

Reply via email to