[Pkg-mozext-commits] [SCM] Collection of development scripts used for XUL extensions. branch, master, updated. 0.23-71-g69fa5a2

Benjamin Drung bdrung at debian.org
Wed May 23 20:02:12 UTC 2012


The following commit has been merged in the master branch:
commit 69fa5a271fa68527b5c67ccb314588a3a1bdfb17
Author: Benjamin Drung <bdrung at debian.org>
Date:   Wed May 23 21:29:56 2012 +0200

    dh_xul-ext: Do not generate a Breaks entry for Firefox/Iceweasel 10 or later.
    
    Firefox/Iceweasel 10 defaults add-ons to compatible.

diff --git a/dh_xul-ext b/dh_xul-ext
index 6876988..e995174 100755
--- a/dh_xul-ext
+++ b/dh_xul-ext
@@ -44,13 +44,26 @@ class XulApp(object):
         return self.xul_id + ": " + self.package + " (" + self.sol + " to " + \
                self.eol + ")"
 
+    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
+        enabled even if the version of the XUL application is higher than the
+        specified maximum version in this case.
+
+        Firefox/Iceweasel 10 defaults add-ons to compatible."""
+
+        if self.xul_id == "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" and \
+            compare_versions(self.max_version, "10") >= 0:
+            return True
+        return False
+
     def get_breaks(self):
         """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)
             breaks.append(self.package + " (<< " + deb_min_version + ")")
-        if self.max_version:
+        if self.max_version and not self.defaults_to_compatible():
             deb_max_version = moz_to_next_debian_version(self.max_version)
             breaks.append(self.package + " (>> " + deb_max_version + ")")
         return ", ".join(breaks)
diff --git a/tests/dh_xul-ext/all/debian/control b/tests/dh_xul-ext/all/debian/control
index 346ceba..1aea594 100644
--- a/tests/dh_xul-ext/all/debian/control
+++ b/tests/dh_xul-ext/all/debian/control
@@ -11,6 +11,7 @@ Depends: ${misc:Depends}, ${xpi:Depends}
 Recommends: ${xpi:Recommends}
 Provides: ${xpi:Provides}
 Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
 Description: mozilla-devscripts test package
  This is a test package designed to test some scripts in mozilla-devscripts.
  It is part of the mozilla-devscripts test suite and may do very odd things. It
diff --git a/tests/dh_xul-ext/all_environment/debian/control b/tests/dh_xul-ext/all_environment/debian/control
index 346ceba..1aea594 100644
--- a/tests/dh_xul-ext/all_environment/debian/control
+++ b/tests/dh_xul-ext/all_environment/debian/control
@@ -11,6 +11,7 @@ Depends: ${misc:Depends}, ${xpi:Depends}
 Recommends: ${xpi:Recommends}
 Provides: ${xpi:Provides}
 Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
 Description: mozilla-devscripts test package
  This is a test package designed to test some scripts in mozilla-devscripts.
  It is part of the mozilla-devscripts test suite and may do very odd things. It
diff --git a/tests/dh_xul-ext/debian/debian/control b/tests/dh_xul-ext/debian/debian/control
index 346ceba..1aea594 100644
--- a/tests/dh_xul-ext/debian/debian/control
+++ b/tests/dh_xul-ext/debian/debian/control
@@ -11,6 +11,7 @@ Depends: ${misc:Depends}, ${xpi:Depends}
 Recommends: ${xpi:Recommends}
 Provides: ${xpi:Provides}
 Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
 Description: mozilla-devscripts test package
  This is a test package designed to test some scripts in mozilla-devscripts.
  It is part of the mozilla-devscripts test suite and may do very odd things. It
diff --git a/tests/dh_xul-ext/all/debian/changelog b/tests/dh_xul-ext/default-to-compatible/debian/changelog
similarity index 100%
copy from tests/dh_xul-ext/all/debian/changelog
copy to tests/dh_xul-ext/default-to-compatible/debian/changelog
diff --git a/debian/compat b/tests/dh_xul-ext/default-to-compatible/debian/compat
similarity index 100%
copy from debian/compat
copy to tests/dh_xul-ext/default-to-compatible/debian/compat
diff --git a/tests/dh_xul-ext/ubuntu/debian/control b/tests/dh_xul-ext/default-to-compatible/debian/control
similarity index 96%
copy from tests/dh_xul-ext/ubuntu/debian/control
copy to tests/dh_xul-ext/default-to-compatible/debian/control
index 346ceba..1aea594 100644
--- a/tests/dh_xul-ext/ubuntu/debian/control
+++ b/tests/dh_xul-ext/default-to-compatible/debian/control
@@ -11,6 +11,7 @@ Depends: ${misc:Depends}, ${xpi:Depends}
 Recommends: ${xpi:Recommends}
 Provides: ${xpi:Provides}
 Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
 Description: mozilla-devscripts test package
  This is a test package designed to test some scripts in mozilla-devscripts.
  It is part of the mozilla-devscripts test suite and may do very odd things. It
diff --git a/tests/dh_xul-ext/debian/debian/rules b/tests/dh_xul-ext/default-to-compatible/debian/rules
similarity index 100%
copy from tests/dh_xul-ext/debian/debian/rules
copy to tests/dh_xul-ext/default-to-compatible/debian/rules
diff --git a/tests/dh_xul-ext/default-to-compatible/install.rdf b/tests/dh_xul-ext/default-to-compatible/install.rdf
new file mode 100644
index 0000000..660f7e1
--- /dev/null
+++ b/tests/dh_xul-ext/default-to-compatible/install.rdf
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>{deadda7a-fee1-dead-coo1-d00ddeadc0de}</em:id>
+    <em:version>1.0</em:version>
+    <em:name>mozilla-devscripts test package</em:name>
+    <em:targetApplication>
+      <Description>
+        <!-- Iceweasel/Firefox -->
+        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+        <em:minVersion>4.0</em:minVersion>
+        <em:maxVersion>11</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+  </Description>
+</RDF>
diff --git a/tests/dh_xul-ext/expected_result/default-to-compatible.substvars b/tests/dh_xul-ext/expected_result/default-to-compatible.substvars
new file mode 100644
index 0000000..eeb600b
--- /dev/null
+++ b/tests/dh_xul-ext/expected_result/default-to-compatible.substvars
@@ -0,0 +1,5 @@
+xpi:Depends=iceweasel (>= 4.0)
+xpi:Recommends=
+xpi:Breaks=iceweasel (<< 4.0)
+xpi:Enhances=iceweasel
+xpi:Provides=iceweasel-test-package, test-package
diff --git a/tests/dh_xul-ext/test b/tests/dh_xul-ext/test
index 7da0433..02085b8 100755
--- a/tests/dh_xul-ext/test
+++ b/tests/dh_xul-ext/test
@@ -18,7 +18,7 @@ import os
 import sys
 import subprocess
 
-TESTS = ("all", "all_environment", "debian", "ubuntu")
+TESTS = ("all", "all_environment", "debian", "default-to-compatible", "ubuntu")
 
 class TestError(Exception):
     pass
diff --git a/tests/dh_xul-ext/ubuntu/debian/control b/tests/dh_xul-ext/ubuntu/debian/control
index 346ceba..1aea594 100644
--- a/tests/dh_xul-ext/ubuntu/debian/control
+++ b/tests/dh_xul-ext/ubuntu/debian/control
@@ -11,6 +11,7 @@ Depends: ${misc:Depends}, ${xpi:Depends}
 Recommends: ${xpi:Recommends}
 Provides: ${xpi:Provides}
 Enhances: ${xpi:Enhances}
+Breaks: ${xpi:Breaks}
 Description: mozilla-devscripts test package
  This is a test package designed to test some scripts in mozilla-devscripts.
  It is part of the mozilla-devscripts test suite and may do very odd things. It

-- 
Collection of development scripts used for XUL extensions.



More information about the Pkg-mozext-commits mailing list