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

Benjamin Drung bdrung at debian.org
Thu Jan 12 21:34:12 UTC 2012


The following commit has been merged in the master branch:
commit d654778675b0d90abf4e41342eaf4ef17c31562d
Author: Benjamin Drung <bdrung at debian.org>
Date:   Thu Jan 12 22:28:57 2012 +0100

    Use unnamed variables in SPARQL queries if they are unused.

diff --git a/dh_xul-ext b/dh_xul-ext
index cea6e94..e003173 100755
--- a/dh_xul-ext
+++ b/dh_xul-ext
@@ -152,11 +152,11 @@ def _get_id_max_min_triple(install_rdf):
         PREFIX em: <http://www.mozilla.org/2004/em-rdf#>
         SELECT ?id ?max ?min
         WHERE {
-            ?x1 em:targetApplication ?x2 .
-            ?x2 em:id ?id .
+            [] em:targetApplication ?x .
+            ?x em:id ?id .
             OPTIONAL {
-                ?x2 em:maxVersion ?max .
-                ?x2 em:minVersion ?min .
+                ?x em:maxVersion ?max .
+                ?x em:minVersion ?min .
             } .
         }
       """, query_language="sparql")
diff --git a/install-xpi b/install-xpi
index ddd7b1a..f73b1bf 100755
--- a/install-xpi
+++ b/install-xpi
@@ -51,12 +51,12 @@ def get_query_field_id_as_list(rdf_path, query_string):
 
 def get_target_applications(install_rdf):
     target_applications = get_query_field_id_as_list(install_rdf, 
-        "SELECT ?id WHERE { ?x1 em:targetApplication ?x2 . ?x2 em:id ?id }")
+        "SELECT ?id WHERE { [] em:targetApplication ?x . ?x em:id ?id }")
     return target_applications
 
 def get_extension_id(install_rdf):
     extension_ids = set(get_query_field_id_as_list(install_rdf,
-        "SELECT ?id WHERE {?x1 em:targetApplication ?x2 . ?x1 em:id ?id }"))
+        "SELECT ?id WHERE {?x em:targetApplication [] . ?x em:id ?id }"))
     return extension_ids.pop()
 
 def get_arch(package):

-- 
Collection of development scripts used for XUL extensions.



More information about the Pkg-mozext-commits mailing list