[Pkg-mozext-commits] [mozilla-devscripts] 02/08: Add an epoch for icedove/tb >= 45

Sean Whitton spw-guest at moszumanska.debian.org
Thu Jul 7 02:31:40 UTC 2016


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

spw-guest pushed a commit to annotated tag debian/0.46
in repository mozilla-devscripts.

commit 396ee3b4ea8afcfc8947b2b3f6062c97a93fb324
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Jun 17 17:32:44 2016 +0200

    Add an epoch for icedove/tb >= 45
    
    Closes: #825508
---
 dh_xul-ext | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/dh_xul-ext b/dh_xul-ext
index 221135b..d68a95c 100755
--- a/dh_xul-ext
+++ b/dh_xul-ext
@@ -49,6 +49,16 @@ class XulApp(object):
         return(self.xul_id + ": " + self.package + " (" + self.sol + " to " +
                self.eol + ")")
 
+    def get_epoch(self, version):
+        """
+        Check wether a version needs an epoch
+        """
+        if (get_vendor() == 'Debian' and
+            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 +75,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 +99,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
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/mozilla-devscripts.git



More information about the Pkg-mozext-commits mailing list