summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Drung <bdrung@ubuntu.com>2010-11-16 22:18:57 +0100
committerBenjamin Drung <bdrung@ubuntu.com>2010-11-16 22:18:57 +0100
commitbcf4ae002a5e79d7595927a8d49264abef0ef98c (patch)
tree023be18d1bb9947918d5000f49d31c1f14ca96ce
parentedd01c27f580d59432a8d46efa3b0a1bdaa98301 (diff)
* Use versioned target applications in Depends instead of unversioned target
applications in Recommends. All extensions have to add ${xpi:Depends} to Depends. (Closes: #602051) - update src/dh_xul-ext - update src/xpi.mk
-rw-r--r--debian/changelog7
-rwxr-xr-xsrc/dh_xul-ext14
-rw-r--r--src/xpi.mk5
3 files changed, 19 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index e9a7017..57bca83 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,8 +15,13 @@ mozilla-devscripts (0.25) UNRELEASED; urgency=low
- remove debian/manpages
- update debian/rules
- update src/Makefile
+ * Use versioned target applications in Depends instead of unversioned target
+ applications in Recommends. All extensions have to add ${xpi:Depends} to
+ Depends. (Closes: #602051)
+ - update src/dh_xul-ext
+ - update src/xpi.mk
- -- Benjamin Drung <bdrung@ubuntu.com> Tue, 16 Nov 2010 01:35:04 +0100
+ -- Benjamin Drung <bdrung@ubuntu.com> Tue, 16 Nov 2010 15:27:30 +0100
mozilla-devscripts (0.24) unstable; urgency=low
diff --git a/src/dh_xul-ext b/src/dh_xul-ext
index 6a61bd4..832ba9b 100755
--- a/src/dh_xul-ext
+++ b/src/dh_xul-ext
@@ -155,6 +155,10 @@ def get_source_package_name():
break
return source
+def has_no_xpi_depends():
+ lines = open("debian/control").readlines()
+ xpi_depends_lines = filter(lambda x: x.find("${xpi:Depends}") >= 0, lines)
+ return len(xpi_depends_lines) == 0
def get_provided_package_names(package, supported_apps):
ext_name = package
@@ -228,8 +232,16 @@ def generate_substvars(script_name, xul_apps, package, verbose=False):
supported_apps = get_supported_apps(script_name, xul_apps, install_rdf,
package, verbose)
+ packages = map(lambda a: a.get_versioned_package(), supported_apps)
+ if has_no_xpi_depends():
+ # Use xpi:Recommends instead of xpi:Depends for backwards compatibility
+ print ("%s: Warning: Please add ${xpi:Depends} to Depends. Using only "
+ "${xpi:Recommends} is deprecated.") % (script_name)
+ lines.append("xpi:Recommends=" + " | ".join(packages) + "\n")
+ else:
+ lines.append("xpi:Depends=" + " | ".join(packages) + "\n")
+ lines.append("xpi:Recommends=\n")
packages = map(lambda a: a.get_package(), supported_apps)
- lines.append("xpi:Recommends=" + " | ".join(packages) + "\n")
lines.append("xpi:Enhances=" + ", ".join(sorted(packages)) + "\n")
packages = get_provided_package_names(package, supported_apps)
lines.append("xpi:Provides=" + ", ".join(sorted(packages)) + "\n")
diff --git a/src/xpi.mk b/src/xpi.mk
index 5ff0977..cd17a5c 100644
--- a/src/xpi.mk
+++ b/src/xpi.mk
@@ -125,11 +125,6 @@ install/$(MOZ_EXTENSION_PKG):: xpi-install
xpi-install:
install-xpi -p$(MOZ_EXTENSION_PKG) $(xpi_file) $(install_xpi_extra_parameter)
dh_xul-ext -p$(MOZ_EXTENSION_PKG)
-ifneq ($(shell grep '$${xpi:Depends}' debian/control),)
- @echo 'xpi.mk: $${xpi:Depends} is deprecated, please use $${xpi:Recommends} instead.'
- if test -f debian/$(MOZ_EXTENSION_PKG).substvars; then sed -i '/^xpi:Depends=/d' debian/$(MOZ_EXTENSION_PKG).substvars; fi
- grep '^xpi:Recommends=' debian/$(MOZ_EXTENSION_PKG).substvars | sed "s/^xpi:Recommends=/xpi:Depends=/g" >> debian/$(MOZ_EXTENSION_PKG).substvars
-endif
# clean build and remove all .xpi in top-level if a MOZ_XPI_BUILD_COMMAND is defined
ifneq (,$(MOZ_XPI_BUILD_COMMAND))