summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido G√ľnther <agx@sigxcpu.org>2016-06-17 17:32:44 +0200
committerSean Whitton <spwhitton@spwhitton.name>2016-07-07 10:02:59 +0900
commit396ee3b4ea8afcfc8947b2b3f6062c97a93fb324 (patch)
treeacc97c26ed79a5b6498885bddfa1de48d9808a01
parent42766eff0177b450e3c3694da933f7b12cc2832e (diff)
Add an epoch for icedove/tb >= 45
Closes: #825508
-rwxr-xr-xdh_xul-ext19
1 files 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