diff options
author | Benjamin Drung <bdrung@ubuntu.com> | 2010-01-12 00:06:17 +0100 |
---|---|---|
committer | Benjamin Drung <bdrung@ubuntu.com> | 2010-01-12 00:06:17 +0100 |
commit | 7a56de1e876fdcc813396a1ddeb5d0584384a02f (patch) | |
tree | 0eed18fd8b2133525a499786326a5b880c044a36 | |
parent | 7d5ba16f8f933d490a413e3145c20867ccde4627 (diff) |
- create additional symlinks for icedove and thunderbird, because they do
not scan /usr/{lib,share}/mozilla/extensions/$target_application
- update src/install-xpi
-rw-r--r-- | debian/changelog | 5 | ||||
-rwxr-xr-x | src/install-xpi | 23 |
2 files changed, 27 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 97305e8..a908bba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -65,6 +65,9 @@ mozilla-devscripts (0.19) UNRELEASED; urgency=low - create links for architecture independent extensions in /usr/share instead of /usr/lib (Closes: #564671) - update src/install-xpi + - create additional symlinks for icedove and thunderbird, because they do + not scan /usr/{lib,share}/mozilla/extensions/$target_application + - update src/install-xpi * moz-version: - Add parameter for converting Mozilla versions into Debian upstream versions and the other way round. @@ -87,7 +90,7 @@ mozilla-devscripts (0.19) UNRELEASED; urgency=low - update src/dh_xul-ext - update debian/control - -- Benjamin Drung <bdrung@ubuntu.com> Mon, 11 Jan 2010 23:30:25 +0100 + -- Benjamin Drung <bdrung@ubuntu.com> Tue, 12 Jan 2010 00:05:51 +0100 mozilla-devscripts (0.18) unstable; urgency=low diff --git a/src/install-xpi b/src/install-xpi index 9ee6a7c..ade3f73 100755 --- a/src/install-xpi +++ b/src/install-xpi @@ -20,6 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +import csv import getopt import os import stat @@ -68,6 +69,23 @@ def get_mode(filename): mode = st[stat.ST_MODE] return mode & 0777 +def get_xul_apps(): + csvfile = open("/usr/share/mozilla-devscripts/xul-app-data.csv") + csv_reader = csv.DictReader(csvfile) + rows = [] + for row in csv_reader: + rows.append(row) + return rows + +def incompatible_apps(target_applications): + """There are still some application that do not scan + "/usr/{lib,share}/mozilla/extensions/$target_application" for extensions.""" + xul_apps = filter(lambda x: x["id"] in target_applications, get_xul_apps()) + app_list = reduce(lambda l, x: l + [x["package"]], xul_apps, list()) + incompatible_apps = ["icedove", "thunderbird"] + incompatible_apps = filter(lambda x: x in app_list, incompatible_apps) + return incompatible_apps + def install_xpi(script_name, package, xpi_file, exclude, install_dir, links, correct_permissions, remove_licenses, verbose=False): # get xpi file content list if not os.path.isfile(xpi_file): @@ -134,6 +152,11 @@ def install_xpi(script_name, package, xpi_file, exclude, install_dir, links, cor target_application, extension_id) links.add(destination) + # backwards compatibility: create symlinks for applications that do not + # scan /usr/{lib,share}/mozilla/extensions/target_application for extensions + for app in incompatible_apps(target_applications): + links.add(os.path.join("/usr/lib", app, "extensions", extension_id)) + # create symlinks for link in links: command = ["dh_link", "-p" + package, install_dir, link] |