Merge lp:~bdrung/mozilla-devscripts/moz-version into lp:~mozillateam/mozilla-devscripts/mozilla-devscripts
- moz-version
- Merge into mozilla-devscripts
Proposed by
Benjamin Drung
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~bdrung/mozilla-devscripts/moz-version |
Merge into: | lp:~mozillateam/mozilla-devscripts/mozilla-devscripts |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~bdrung/mozilla-devscripts/moz-version |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexander Sack (community) | Approve | ||
Review via email: mp+9672@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Benjamin Drung (bdrung) wrote : | # |
- 223. By Benjamin Drung
-
- make MOZ_EXTENSION_PKG optional; if this variable is unset, the first
binary package listed in debian/control will be used
- update src/xpi.mk
Revision history for this message
Alexander Sack (asac) wrote : | # |
approved and merged. in future, try to keep changelog changes in the same commit where you commit stuff ;) (use debcommit preferably to automatically use changelog changes as bzr commit text) ... if you do general changelog improvements at best keep them out of an unrelated topic branch.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2009-07-29 08:47:47 +0000 | |||
3 | +++ debian/changelog 2009-08-04 23:12:53 +0000 | |||
4 | @@ -9,33 +9,16 @@ | |||
5 | 9 | - update src/xpi.mk | 9 | - update src/xpi.mk |
6 | 10 | - improve rule dependencies; avoid duplicate/circular depends | 10 | - improve rule dependencies; avoid duplicate/circular depends |
7 | 11 | - update src/xpi.mk | 11 | - update src/xpi.mk |
29 | 12 | - add automatic xpi depends .substvars feature based on smart parsing | 12 | - first pitch on automagic max/min version detection implemented; add a |
30 | 13 | of install.rdf and checking min/maxVersion for each target application; | 13 | generic |TARGET_VERSION| call taking parameters a) appid, |
31 | 14 | extensions can now use ${xpi:Depends} to get the right dependencies added; | 14 | b) maxVersion|minVersion and c) extension-dir; this call is then used to |
32 | 15 | the version/package/targetAppId mapping information is currently maintained | 15 | parse the right max/minVersion for a given targetApplication on demand in |
33 | 16 | in src/xpi.mk itself - thx to Benjamin Drung <bdrung@ubuntu.com> for this | 16 | |CHECK_VERSION|. In this way we now filter out unsuitable packages from |
34 | 17 | - update src/xpi.mk | 17 | xpi:Depends based on the install.rdf version bounds |
35 | 18 | - first pitch on automagic max/min version detection implemented; add a generic | 18 | - update src/xpi.mk |
15 | 19 | |TARGET_VERSION| call taking parameters a) appid, b) maxVersion|minVersion and | ||
16 | 20 | c) extension-dir; this call is then used to parse the right max/minVersion | ||
17 | 21 | for a given targetApplication on demand in |CHECK_VERSION|. In this way we | ||
18 | 22 | now filter out unsuitable packages from xpi:Depends based on the install.rdf | ||
19 | 23 | version bounds; Note: currently uses dpkg --compare-versions, which is wrong | ||
20 | 24 | for mozilla versions; but works good enough until with have a | ||
21 | 25 | mozpkg --compare-versions script | ||
22 | 26 | - update src/xpi.mk | ||
23 | 27 | - add moz-version-compare helper script and ship it in extra_files; this script | ||
24 | 28 | implements compare operations for mozilla versions as in | ||
25 | 29 | https://developer.mozilla.org/en/Toolkit_version_format; thanks to Benjamin | ||
26 | 30 | Drung <bdrung@ubuntu.com> for this contribution | ||
27 | 31 | - add src/moz-version-compare | ||
28 | 32 | - update src/Makefile | ||
36 | 33 | - add prism@developer.mozilla.org 1.0 to list of auto detected target | 19 | - add prism@developer.mozilla.org 1.0 to list of auto detected target |
37 | 34 | application packages | 20 | application packages |
38 | 35 | - update src/xpi.mk | 21 | - update src/xpi.mk |
39 | 36 | - use moz-version-compare in ${xpi:Depends} |CHECK_VERSION| call | ||
40 | 37 | instead of the rather flawed dpkg --compare-versions approach. | ||
41 | 38 | - update src/xpi.mk | ||
42 | 39 | - add thunderbird-3.0 to list of auto detected target application packages | 22 | - add thunderbird-3.0 to list of auto detected target application packages |
43 | 40 | - update src/xpi.mk | 23 | - update src/xpi.mk |
44 | 41 | * build-system: | 24 | * build-system: |
45 | @@ -45,7 +28,24 @@ | |||
46 | 45 | - update src/Makefile | 28 | - update src/Makefile |
47 | 46 | - update debian/mozilla-devscripts.install | 29 | - update debian/mozilla-devscripts.install |
48 | 47 | 30 | ||
50 | 48 | -- Alexander Sack <asac@ubuntu.com> Wed, 29 Jul 2009 01:08:07 +0200 | 31 | [ Benjamin Drung ] |
51 | 32 | * xpi.mk: | ||
52 | 33 | - add automatic xpi depends .substvars feature based on smart parsing | ||
53 | 34 | of install.rdf and checking min/maxVersion for each target application; | ||
54 | 35 | extensions can now use ${xpi:Depends} to get the right dependencies added; | ||
55 | 36 | the version/package/targetAppId mapping information is currently | ||
56 | 37 | maintained in src/xpi.mk itself | ||
57 | 38 | - update src/xpi.mk | ||
58 | 39 | - add moz-version helper script and ship it in extra_files; this script | ||
59 | 40 | implements compare operations for mozilla versions as in | ||
60 | 41 | https://developer.mozilla.org/en/Toolkit_version_format | ||
61 | 42 | - add src/moz-version | ||
62 | 43 | - update src/Makefile | ||
63 | 44 | - implement start/end of life for comparing possible alternate binary | ||
64 | 45 | dependency | ||
65 | 46 | - update src/xpi.mk | ||
66 | 47 | |||
67 | 48 | -- Benjamin Drung <bdrung@ubuntu.com> Wed, 05 Aug 2009 01:01:31 +0200 | ||
68 | 49 | 49 | ||
69 | 50 | mozilla-devscripts (0.13) unstable; urgency=low | 50 | mozilla-devscripts (0.13) unstable; urgency=low |
70 | 51 | 51 | ||
71 | 52 | 52 | ||
72 | === modified file 'src/Makefile' | |||
73 | --- src/Makefile 2009-07-28 23:31:43 +0000 | |||
74 | +++ src/Makefile 2009-08-03 23:37:38 +0000 | |||
75 | @@ -53,7 +53,7 @@ | |||
76 | 53 | bindir_files = \ | 53 | bindir_files = \ |
77 | 54 | med-xpi-pack \ | 54 | med-xpi-pack \ |
78 | 55 | med-xpi-unpack \ | 55 | med-xpi-unpack \ |
80 | 56 | moz-version-compare | 56 | moz-version |
81 | 57 | 57 | ||
82 | 58 | extra_dirs = \ | 58 | extra_dirs = \ |
83 | 59 | mozclient \ | 59 | mozclient \ |
84 | 60 | 60 | ||
85 | === renamed file 'src/moz-version-compare' => 'src/moz-version' | |||
86 | --- src/moz-version-compare 2009-07-28 23:08:24 +0000 | |||
87 | +++ src/moz-version 2009-08-03 23:37:38 +0000 | |||
88 | @@ -22,8 +22,14 @@ | |||
89 | 22 | 22 | ||
90 | 23 | # Reference: https://developer.mozilla.org/en/Toolkit_version_format | 23 | # Reference: https://developer.mozilla.org/en/Toolkit_version_format |
91 | 24 | 24 | ||
92 | 25 | import getopt | ||
93 | 25 | import sys | 26 | import sys |
94 | 26 | 27 | ||
95 | 28 | # error codes | ||
96 | 29 | COMMAND_LINE_SYNTAX_ERROR = 2 | ||
97 | 30 | INVALID_COMPARATOR = 3 | ||
98 | 31 | EMPTY_VERSION_STRING = 4 | ||
99 | 32 | |||
100 | 27 | def decode_part(part): | 33 | def decode_part(part): |
101 | 28 | """Decodes a version part (like 5pre4) to <number-a><string-b><number-c><string-d>""" | 34 | """Decodes a version part (like 5pre4) to <number-a><string-b><number-c><string-d>""" |
102 | 29 | subpart = [0,"",0,""] | 35 | subpart = [0,"",0,""] |
103 | @@ -74,13 +80,15 @@ | |||
104 | 74 | 80 | ||
105 | 75 | return subpart | 81 | return subpart |
106 | 76 | 82 | ||
108 | 77 | def decode_version(version): | 83 | def decode_version(version, verbose=False): |
109 | 78 | """Decodes a version string like 1.1pre1a""" | 84 | """Decodes a version string like 1.1pre1a""" |
110 | 79 | parts = version.split(".") | 85 | parts = version.split(".") |
111 | 80 | decoded_parts = map(decode_part, parts) | 86 | decoded_parts = map(decode_part, parts) |
112 | 87 | if verbose: | ||
113 | 88 | print "I: Split %s up into %s." % (version, decoded_parts) | ||
114 | 81 | return decoded_parts | 89 | return decoded_parts |
115 | 82 | 90 | ||
117 | 83 | def compare((a, b)): | 91 | def compare_subpart((a, b)): |
118 | 84 | # A string-part that exists is always less-then a nonexisting string-part | 92 | # A string-part that exists is always less-then a nonexisting string-part |
119 | 85 | if a == "": | 93 | if a == "": |
120 | 86 | if b == "": | 94 | if b == "": |
121 | @@ -96,7 +104,7 @@ | |||
122 | 96 | return cmp(a, b) | 104 | return cmp(a, b) |
123 | 97 | 105 | ||
124 | 98 | def compare_part((x, y)): | 106 | def compare_part((x, y)): |
126 | 99 | compared_subparts = filter(lambda x: x != 0, map(compare, zip(x, y))) | 107 | compared_subparts = filter(lambda x: x != 0, map(compare_subpart, zip(x, y))) |
127 | 100 | if compared_subparts: | 108 | if compared_subparts: |
128 | 101 | return compared_subparts[0] | 109 | return compared_subparts[0] |
129 | 102 | else: | 110 | else: |
130 | @@ -114,32 +122,94 @@ | |||
131 | 114 | else: | 122 | else: |
132 | 115 | return 0 | 123 | return 0 |
133 | 116 | 124 | ||
145 | 117 | def moz_compare_versions(version1, operator, version2): | 125 | comparators = ("lt", "le", "eq", "ne", "ge", "gt") |
146 | 118 | """Return true if the expression version1 operator version2 is valid, otherwise false""" | 126 | |
147 | 119 | operators = ("lt", "le", "eq", "ne", "ge", "gt") | 127 | def moz_version_compare(version1, comparator, version2, silent=False, verbose=False): |
148 | 120 | if operator not in operators: | 128 | """Return true if the expression version1 comparator version2 is valid, otherwise false""" |
149 | 121 | print "E: The operator " + operator + " is not valid. It should one of " + ", ".join(operators) + "." | 129 | if comparator not in comparators: |
150 | 122 | sys.exit(2) | 130 | if not silent: |
151 | 123 | 131 | print >> sys.stderr, "E: The comparator " + comparator + \ | |
152 | 124 | a = decode_version(version1) | 132 | " is not valid. It should one of " + ", ".join(comparators) + "." |
153 | 125 | b = decode_version(version2) | 133 | sys.exit(INVALID_COMPARATOR) |
154 | 126 | 134 | ||
155 | 127 | if operator == "lt": | 135 | if version1.strip() == "" or version2.strip() == "": |
156 | 136 | if not silent: | ||
157 | 137 | print >> sys.stderr, "E: At least one version string is empty." | ||
158 | 138 | sys.exit(EMPTY_VERSION_STRING) | ||
159 | 139 | |||
160 | 140 | if verbose: | ||
161 | 141 | symbol = {"lt": "<", "le": "<=", "eq": "=", "ne": "!=", "ge": ">=", "gt": ">"} | ||
162 | 142 | print "I: Comparing %s %s %s." % (version1, symbol[comparator], version2) | ||
163 | 143 | |||
164 | 144 | a = decode_version(version1, verbose) | ||
165 | 145 | b = decode_version(version2, verbose) | ||
166 | 146 | |||
167 | 147 | if comparator == "lt": | ||
168 | 128 | return compare_versions(a, b) < 0 | 148 | return compare_versions(a, b) < 0 |
170 | 129 | elif operator == "le": | 149 | elif comparator == "le": |
171 | 130 | return compare_versions(a, b) <= 0 | 150 | return compare_versions(a, b) <= 0 |
173 | 131 | elif operator == "eq": | 151 | elif comparator == "eq": |
174 | 132 | return compare_versions(a, b) == 0 | 152 | return compare_versions(a, b) == 0 |
176 | 133 | elif operator == "ne": | 153 | elif comparator == "ne": |
177 | 134 | return compare_versions(a, b) != 0 | 154 | return compare_versions(a, b) != 0 |
179 | 135 | elif operator == "ge": | 155 | elif comparator == "ge": |
180 | 136 | return compare_versions(a, b) >= 0 | 156 | return compare_versions(a, b) >= 0 |
182 | 137 | elif operator == "gt": | 157 | elif comparator == "gt": |
183 | 138 | return compare_versions(a, b) > 0 | 158 | return compare_versions(a, b) > 0 |
184 | 139 | 159 | ||
185 | 160 | |||
186 | 161 | def usage(output): | ||
187 | 162 | print >> output, """Usage: %s --compare version1 comparator version2 | ||
188 | 163 | |||
189 | 164 | -h, --help display this help and exit | ||
190 | 165 | -s, --silent do not print anything and die silent on errors | ||
191 | 166 | -v, --verbose print more information | ||
192 | 167 | |||
193 | 168 | comparator must be one of %s.""" % (sys.argv[0], ", ".join(comparators)) | ||
194 | 169 | |||
195 | 170 | |||
196 | 140 | if __name__ == "__main__": | 171 | if __name__ == "__main__": |
199 | 141 | if moz_compare_versions(sys.argv[1], sys.argv[2], sys.argv[3]): | 172 | try: |
200 | 142 | sys.exit(0) | 173 | long_opts = ["compare", "help", "silent", "verbose"] |
201 | 174 | opts, args = getopt.gnu_getopt(sys.argv[1:], "chsv", long_opts) | ||
202 | 175 | except getopt.GetoptError, e: | ||
203 | 176 | # print help information and exit: | ||
204 | 177 | print >> sys.stderr, str(e) # will print something like "option -a not recognized" | ||
205 | 178 | usage(sys.stderr) | ||
206 | 179 | sys.exit(COMMAND_LINE_SYNTAX_ERROR) | ||
207 | 180 | |||
208 | 181 | compare = False | ||
209 | 182 | silent = False | ||
210 | 183 | verbose = False | ||
211 | 184 | |||
212 | 185 | for o, a in opts: | ||
213 | 186 | if o in ("-c", "--compare"): | ||
214 | 187 | compare = True | ||
215 | 188 | elif o in ("-h", "--help"): | ||
216 | 189 | usage(sys.stdout) | ||
217 | 190 | sys.exit() | ||
218 | 191 | elif o in ("-s", "--silent"): | ||
219 | 192 | silent = True | ||
220 | 193 | elif o in ("-v", "--verbose"): | ||
221 | 194 | verbose = True | ||
222 | 195 | else: | ||
223 | 196 | assert False, "unhandled option" | ||
224 | 197 | |||
225 | 198 | if compare: | ||
226 | 199 | if len(args) != 3: | ||
227 | 200 | if not silent: | ||
228 | 201 | usage(sys.stderr) | ||
229 | 202 | sys.exit(COMMAND_LINE_SYNTAX_ERROR) | ||
230 | 203 | if moz_version_compare(args[0], args[1], args[2], silent, verbose): | ||
231 | 204 | if verbose: | ||
232 | 205 | print "I: Compare expression true." | ||
233 | 206 | sys.exit(0) | ||
234 | 207 | else: | ||
235 | 208 | if verbose: | ||
236 | 209 | print "I: Compare expression false." | ||
237 | 210 | sys.exit(1) | ||
238 | 143 | else: | 211 | else: |
241 | 144 | sys.exit(1) | 212 | if not silent: |
242 | 145 | 213 | print >> sys.stderr, "E: You should specify the command --compare." | |
243 | 214 | usage(sys.stderr) | ||
244 | 215 | sys.exit(COMMAND_LINE_SYNTAX_ERROR) | ||
245 | 146 | 216 | ||
246 | === modified file 'src/xpi.mk' | |||
247 | --- src/xpi.mk 2009-07-29 08:47:47 +0000 | |||
248 | +++ src/xpi.mk 2009-08-04 22:59:15 +0000 | |||
249 | @@ -3,6 +3,7 @@ | |||
250 | 3 | # Copyright (c) 2008-2009 Canonical Ltd. | 3 | # Copyright (c) 2008-2009 Canonical Ltd. |
251 | 4 | # Author(s): Alexander Sack <asac@ubuntu.com> | 4 | # Author(s): Alexander Sack <asac@ubuntu.com> |
252 | 5 | # Fabien Tassin <fta@sofaraway.org> | 5 | # Fabien Tassin <fta@sofaraway.org> |
253 | 6 | # Benjamin Drung <bdrung@ubuntu.com> | ||
254 | 6 | # | 7 | # |
255 | 7 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
256 | 8 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
257 | @@ -62,34 +63,77 @@ | |||
258 | 62 | # your code to MOZ_XPI_MOZILLA_EXTRA_DIRS | 63 | # your code to MOZ_XPI_MOZILLA_EXTRA_DIRS |
259 | 63 | # | 64 | # |
260 | 64 | 65 | ||
273 | 65 | # data for XPI_DEPENDS/CHECK_VERSION magic - targetApplication to package mapping | 66 | # data for XPI_DEPENDS/CHECK_VERSION magic - start/end of life of binary packages |
274 | 66 | target_packages_{ec8030f7-c20a-464f-9b0e-13a3a9e97384}_3.0 := abrowser-3.0 firefox-3.0 iceweasel | 67 | abrowser-3.0_sol := 3.0a8 |
275 | 67 | target_packages_{ec8030f7-c20a-464f-9b0e-13a3a9e97384}_3.5 := abrowser-3.5 firefox-3.5 iceweasel | 68 | abrowser-3.0_eol := 3.0.* |
276 | 68 | target_packages_{ec8030f7-c20a-464f-9b0e-13a3a9e97384}_3.6 := abrowser-3.6 firefox-3.6 | 69 | abrowser-3.5_sol := 3.5b4 |
277 | 69 | target_packages_{3550f703-e582-4d05-9a08-453d09bdfdc6}_2.0 := icedove thunderbird | 70 | abrowser-3.5_eol := 3.5.* |
278 | 70 | target_packages_{3550f703-e582-4d05-9a08-453d09bdfdc6}_3.0 := icedove thunderbird-3.0 | 71 | abrowser-3.6_sol := 3.6a1pre |
279 | 71 | target_packages_prism@developer.mozilla.org_1.0 := prism | 72 | abrowser-3.6_eol := 3.6.* |
280 | 72 | 73 | firefox-3.0_sol := 3.0a8 | |
281 | 73 | # data for XPI_DEPENDS/CHECK_VERSION magic - targetApplication versions | 74 | firefox-3.0_eol := 3.0.* |
282 | 74 | target_versions_{ec8030f7-c20a-464f-9b0e-13a3a9e97384} := 3.0 3.5 3.6 | 75 | firefox-3.5_sol := 3.5b4 |
283 | 75 | target_versions_{3550f703-e582-4d05-9a08-453d09bdfdc6} := 2.0 3.0 | 76 | firefox-3.5_eol := 3.5.* |
284 | 76 | target_versions_prism@developer.mozilla.org := 1.0 | 77 | firefox-3.6_sol := 3.6a1pre |
285 | 78 | firefox-3.6_eol := 3.6.* | ||
286 | 79 | iceweasel_sol := 2.0 | ||
287 | 80 | iceweasel_eol := * | ||
288 | 81 | |||
289 | 82 | icedove_sol := 1.5.0.7 | ||
290 | 83 | icedove_eol := * | ||
291 | 84 | thunderbird_sol := 2.0 | ||
292 | 85 | thunderbird_eol := 2.0.0.* | ||
293 | 86 | thunderbird-3.0_sol := 3.0a1pre | ||
294 | 87 | thunderbird-3.0_eol := 3.0.* | ||
295 | 88 | |||
296 | 89 | iceape_sol := 1.0.6 | ||
297 | 90 | iceape_eol := * | ||
298 | 91 | seamonkey_sol := 1.1.6 | ||
299 | 92 | seamonkey_eol := * | ||
300 | 93 | |||
301 | 94 | conkeror_sol := 0.9 | ||
302 | 95 | conkeror_eol := * | ||
303 | 96 | |||
304 | 97 | prism_sol := 0.8 | ||
305 | 98 | prism_eol := * | ||
306 | 99 | |||
307 | 100 | sunbird_sol := 0.5 | ||
308 | 101 | sunbird_eol := * | ||
309 | 102 | |||
310 | 103 | xulrunner-1.9_sol := 1.9a1pre | ||
311 | 104 | xulrunner-1.9_eol := 1.9.0.* | ||
312 | 105 | xulrunner-1.9.1_sol := 1.9.1a1pre | ||
313 | 106 | xulrunner-1.9.1_eol := 1.9.1.* | ||
314 | 107 | xulrunner-1.9.2_sol := 1.9.2a1pre | ||
315 | 108 | xulrunner-1.9.2_eol := 1.9.2.* | ||
316 | 109 | |||
317 | 110 | # data for XPI_DEPENDS/CHECK_VERSION magic - targetApplication packages | ||
318 | 111 | packages_{ec8030f7-c20a-464f-9b0e-13a3a9e97384} := abrowser-3.0 abrowser-3.5 abrowser-3.6 firefox-3.0 firefox-3.5 firefox-3.6 iceweasel | ||
319 | 112 | packages_{3550f703-e582-4d05-9a08-453d09bdfdc6} := icedove thunderbird thunderbird-3.0 | ||
320 | 113 | packages_{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} := iceape seamonkey | ||
321 | 114 | packages_{a79fe89b-6662-4ff4-8e88-09950ad4dfde} := conkeror | ||
322 | 115 | packages_prism@developer.mozilla.org := prism | ||
323 | 116 | packages_toolkit@mozilla.org := xulrunner-1.9 xulrunner-1.9.1 xulrunner-1.9.2 | ||
324 | 77 | 117 | ||
325 | 78 | # data for XPI_DEPENDS/CHECK_VERSION magic - targetApplication min-/maxVersions | 118 | # data for XPI_DEPENDS/CHECK_VERSION magic - targetApplication min-/maxVersions |
326 | 79 | # FIXME: find a way to get this information | ||
327 | 80 | # call parameters_ | 119 | # call parameters_ |
328 | 81 | # 1- target app id | 120 | # 1- target app id |
329 | 82 | # 2- maxVersion | minVersion | 121 | # 2- maxVersion | minVersion |
330 | 83 | # 3- extension dir | 122 | # 3- extension dir |
331 | 84 | TARGET_VERSION = $(shell xpath -q -e '//em:targetApplication/Description[em:id="$(1)" or @em:id="$(1)"]/em:$(2)/text() | //em:targetApplication/Description[em:id="$(1)" or @em:id="$(1)"]/@em:$(2)' $(3)/install.rdf) | 123 | TARGET_VERSION = $(shell xpath -q -e '//em:targetApplication/Description[em:id="$(1)" or @em:id="$(1)"]/em:$(2)/text() | //em:targetApplication/Description[em:id="$(1)" or @em:id="$(1)"]/@em:$(2)' $(3)/install.rdf) |
332 | 85 | 124 | ||
335 | 86 | # TODO: Use correct comparison | 125 | # call parameters_ |
336 | 87 | CHECK_VERSION = $(shell moz-version-compare $(call TARGET_VERSION,$(1),minVersion,$(TEMPDIR)) le $(2) && moz-version-compare $(2) le $(call TARGET_VERSION,$(1),maxVersion,$(TEMPDIR)) && echo $(target_packages_$(1)_$(2))) | 126 | # 1- target app id |
337 | 127 | # 2- package name | ||
338 | 128 | CHECK_VERSION = $(shell \ | ||
339 | 129 | moz-version -cs "$($(2)_eol)" ge $(call TARGET_VERSION,$(1),minVersion,$(TEMPDIR)) && \ | ||
340 | 130 | moz-version -cs "$($(2)_sol)" le $(call TARGET_VERSION,$(1),maxVersion,$(TEMPDIR)) && \ | ||
341 | 131 | echo $(2)) | ||
342 | 88 | 132 | ||
343 | 89 | MOZ_XPI_BUILD_COMMAND ?= med-xpi-pack $(CURDIR) $(MOZ_EXTENSION_PKG).xpi; | 133 | MOZ_XPI_BUILD_COMMAND ?= med-xpi-pack $(CURDIR) $(MOZ_EXTENSION_PKG).xpi; |
344 | 90 | 134 | ||
345 | 91 | XPI_DEPENDS = $(sort $(foreach id,$(call XPI_TARGET_EMIDs,$(TEMPDIR)), \ | 135 | XPI_DEPENDS = $(sort $(foreach id,$(call XPI_TARGET_EMIDs,$(TEMPDIR)), \ |
347 | 92 | $(foreach version,$(target_versions_$(id)),$(call CHECK_VERSION,$(id),$(version))))) | 136 | $(foreach package,$(packages_$(id)),$(call CHECK_VERSION,$(id),$(package))))) |
348 | 93 | 137 | ||
349 | 94 | TEMPDIR := temp-xpi-unpacked | 138 | TEMPDIR := temp-xpi-unpacked |
350 | 95 | 139 |
xpi.mk: start/end of life implementation.