]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - doc/html/cdl-guide/package.versions.html
RedBoot TX53 Release 2012-02-15
[karo-tx-redboot.git] / doc / html / cdl-guide / package.versions.html
1 <!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2 <!-- This material may be distributed only subject to the terms      -->
3 <!-- and conditions set forth in the Open Publication License, v1.0  -->
4 <!-- or later (the latest version is presently available at          -->
5 <!-- http://www.opencontent.org/openpub/).                           -->
6 <!-- Distribution of the work or derivative of the work in any       -->
7 <!-- standard (paper) book form is prohibited unless prior           -->
8 <!-- permission is obtained from the copyright holder.               -->
9 <HTML
10 ><HEAD
11 ><TITLE
12 >Package Versioning</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
14 <META
15 NAME="GENERATOR"
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17 "><LINK
18 REL="HOME"
19 TITLE="The eCos Component Writer's Guide"
20 HREF="cdl-guide.html"><LINK
21 REL="UP"
22 TITLE="Package Organization"
23 HREF="package.html"><LINK
24 REL="PREVIOUS"
25 TITLE="Package Organization"
26 HREF="package.html"><LINK
27 REL="NEXT"
28 TITLE="Package Contents and Layout"
29 HREF="package.contents.html"></HEAD
30 ><BODY
31 CLASS="SECT1"
32 BGCOLOR="#FFFFFF"
33 TEXT="#000000"
34 LINK="#0000FF"
35 VLINK="#840084"
36 ALINK="#0000FF"
37 ><DIV
38 CLASS="NAVHEADER"
39 ><TABLE
40 SUMMARY="Header navigation table"
41 WIDTH="100%"
42 BORDER="0"
43 CELLPADDING="0"
44 CELLSPACING="0"
45 ><TR
46 ><TH
47 COLSPAN="3"
48 ALIGN="center"
49 >The <SPAN
50 CLASS="APPLICATION"
51 >eCos</SPAN
52 > Component Writer's Guide</TH
53 ></TR
54 ><TR
55 ><TD
56 WIDTH="10%"
57 ALIGN="left"
58 VALIGN="bottom"
59 ><A
60 HREF="package.html"
61 ACCESSKEY="P"
62 >Prev</A
63 ></TD
64 ><TD
65 WIDTH="80%"
66 ALIGN="center"
67 VALIGN="bottom"
68 >Chapter 2. Package Organization</TD
69 ><TD
70 WIDTH="10%"
71 ALIGN="right"
72 VALIGN="bottom"
73 ><A
74 HREF="package.contents.html"
75 ACCESSKEY="N"
76 >Next</A
77 ></TD
78 ></TR
79 ></TABLE
80 ><HR
81 ALIGN="LEFT"
82 WIDTH="100%"></DIV
83 ><DIV
84 CLASS="SECT1"
85 ><H1
86 CLASS="SECT1"
87 ><A
88 NAME="PACKAGE.VERSIONS">Package Versioning</H1
89 ><P
90 >Below each package directory there can be one or more version
91 sub-directories, named after the versions. This is a requirement of
92 the component framework: it must be possible for users to install
93 multiple versions of a package and select which one to use for any
94 given application. This has a number of advantages to users: most
95 importantly it allows a single component repository to be shared
96 between multiple users and multiple projects, as required; also it
97 facilitates experiments, for example it is relatively easy to try out
98 the latest version of some package and see if it makes any difference.
99 There is a potential disadvantage in terms of disk space. However
100 since <SPAN
101 CLASS="APPLICATION"
102 >eCos</SPAN
103 > packages generally consist of source code intended for
104 small embedded systems, and given typical modern disk sizes, keeping a
105 number of different versions of a package installed will usually be
106 acceptable. The administration tool can be used to remove versions
107 that are no longer required.</P
108 ><DIV
109 CLASS="INFORMALFIGURE"
110 ><A
111 NAME="AEN217"><P
112 ></P
113 ><DIV
114 CLASS="MEDIAOBJECT"
115 ><P
116 ><IMG
117 SRC="version.png"
118 ALIGN="CENTER"></P
119 ></DIV
120 ><P
121 ></P
122 ></DIV
123 ><P
124 >The version <TT
125 CLASS="FILENAME"
126 >current</TT
127 > is special. Typically it
128 corresponds to the very latest version of the sources, obtained by
129 anonymous <SPAN
130 CLASS="APPLICATION"
131 >CVS</SPAN
132 >. These sources may change frequently, unlike full
133 releases which do not change (or only when patches are produced).
134 Component writers may also want to work on the
135 <TT
136 CLASS="FILENAME"
137 >current</TT
138 > version.</P
139 ><P
140 >All other subdirectories of a package correspond to specific releases
141 of that package. The component framework allows users to select the
142 particular version of a package they want to use, but by default the
143 most recent one will be used. This requires some rules for ordering
144 version numbers, a difficult task because of the wide variety of ways
145 in which versions can be identified.</P
146 ><P
147 ></P
148 ><OL
149 TYPE="1"
150 ><LI
151 ><P
152 >The version <TT
153 CLASS="FILENAME"
154 >current</TT
155 > is always considered to be
156 the most recent version.</P
157 ></LI
158 ><LI
159 ><P
160 >If the first character of both strings are either <TT
161 CLASS="LITERAL"
162 >v</TT
163 >
164 or <TT
165 CLASS="LITERAL"
166 >V</TT
167 >, these are skipped because it makes little
168 sense to enforce case sensitivity here. Potentially this could result
169 in ambiguity if there are two version directories
170 <TT
171 CLASS="LITERAL"
172 >V1.0</TT
173 > and <TT
174 CLASS="LITERAL"
175 >v1.0</TT
176 >, but this will
177 match the confusion experienced by any users of such a package.
178 However if two subsequent releases are called <TT
179 CLASS="LITERAL"
180 >V1.0</TT
181 >
182 and <TT
183 CLASS="LITERAL"
184 >v1.1</TT
185 >, e.g. because of a minor mix-up when
186 making the distribution file, then the case difference is ignored.</P
187 ></LI
188 ><LI
189 ><P
190 >Next the two version strings are compared one character at a time.
191 If both strings are currently at a digit then a string to number
192 conversion takes place, and the resulting numbers are compared.
193 For example <TT
194 CLASS="LITERAL"
195 >v10</TT
196 > is a more recent release than
197 <TT
198 CLASS="LITERAL"
199 >v2</TT
200 >. If the two numbers are the same then processing
201 continues, so for <TT
202 CLASS="LITERAL"
203 >v2b</TT
204 > and <TT
205 CLASS="LITERAL"
206 >v2c</TT
207 >
208 the version comparison code would move on to <TT
209 CLASS="LITERAL"
210 >b</TT
211 > and
212 <TT
213 CLASS="LITERAL"
214 >c</TT
215 >. </P
216 ></LI
217 ><LI
218 ><P
219 >The characters dot <TT
220 CLASS="LITERAL"
221 >.</TT
222 >, hyphen <TT
223 CLASS="LITERAL"
224 >-</TT
225 >
226 and underscore <TT
227 CLASS="LITERAL"
228 >_</TT
229 > are treated as equivalent
230 separators, so if one release goes out as <TT
231 CLASS="LITERAL"
232 >v1_1</TT
233 > and
234 the next goes out as <TT
235 CLASS="LITERAL"
236 >v1.2</TT
237 > the separator has no
238 effect.</P
239 ></LI
240 ><LI
241 ><P
242 >If neither string has yet terminated but the characters are different,
243 ASCII comparison is used. For example <TT
244 CLASS="LITERAL"
245 >V1.1b</TT
246 > is
247 more recent than <TT
248 CLASS="LITERAL"
249 >v1.1alpha</TT
250 >.</P
251 ></LI
252 ><LI
253 ><P
254 >If one version string terminates before the other, the current
255 character determines which is the more recent. If the other string is
256 currently at a separator character, for example
257 <TT
258 CLASS="LITERAL"
259 >v1.3.1</TT
260 > and <TT
261 CLASS="LITERAL"
262 >v1.3</TT
263 >, then the former
264 is assumed to be a minor release and hence more recent than the
265 latter. If the other string is not at a separator character, for
266 example <TT
267 CLASS="LITERAL"
268 >v1.3beta</TT
269 >, then it is treated as an
270 experimental version of the <TT
271 CLASS="LITERAL"
272 >v1.3</TT
273 > release and hence
274 older. </P
275 ></LI
276 ><LI
277 ><P
278 >There is no special processing of dates, so with two versions
279 <TT
280 CLASS="LITERAL"
281 >ss-20000316</TT
282 > and <TT
283 CLASS="LITERAL"
284 >ss-20001111</TT
285 >
286 the numerical values <TT
287 CLASS="LITERAL"
288 >20001111</TT
289 > and
290 <TT
291 CLASS="LITERAL"
292 >20000316</TT
293 > determine the result: larger values are
294 more recent. It is suggested that the full year be used in such cases
295 rather than a shorthand like <TT
296 CLASS="LITERAL"
297 >00</TT
298 >, to avoid
299 Y2100 problems.</P
300 ></LI
301 ><LI
302 ><P
303 >There is no limit on how many levels of versioning are used, so
304 there could in theory be a <TT
305 CLASS="LITERAL"
306 >v3.1.4.1.5.9.2.7</TT
307 > release
308 of a package. However this is unlikely to be of benefit to typical
309 users of a package.</P
310 ></LI
311 ></OL
312 ><P
313 >The version comparison rules of the component framework may not be
314 suitable for every version numbering scheme in existence, but they
315 should cope with many common cases.</P
316 ><DIV
317 CLASS="CAUTION"
318 ><P
319 ></P
320 ><TABLE
321 CLASS="CAUTION"
322 BORDER="1"
323 WIDTH="100%"
324 ><TR
325 ><TD
326 ALIGN="CENTER"
327 ><B
328 >Caution</B
329 ></TD
330 ></TR
331 ><TR
332 ><TD
333 ALIGN="LEFT"
334 ><P
335 >There are some issues still to be resolved before it is possible to
336 combine the <TT
337 CLASS="FILENAME"
338 >current</TT
339 > sources available via
340 anonymous <SPAN
341 CLASS="APPLICATION"
342 >CVS</SPAN
343 > and full releases of <SPAN
344 CLASS="APPLICATION"
345 >eCos</SPAN
346 > and additional packages in
347 a single component repository. The first problem relates to the
348 <SPAN
349 CLASS="DATABASE"
350 >ecos.db</SPAN
351 > database: if a new package is added via
352 the CVS repository then this requires a database update, but the
353 administration tool is bypassed. The second problem arises if an
354 organization chooses to place its component repository under source
355 code control using <SPAN
356 CLASS="APPLICATION"
357 >CVS</SPAN
358 >, in which case different directories will
359 belong to different <SPAN
360 CLASS="APPLICATION"
361 >CVS</SPAN
362 > servers. These issues will be addressed in a
363 future release.</P
364 ></TD
365 ></TR
366 ></TABLE
367 ></DIV
368 ></DIV
369 ><DIV
370 CLASS="NAVFOOTER"
371 ><HR
372 ALIGN="LEFT"
373 WIDTH="100%"><TABLE
374 SUMMARY="Footer navigation table"
375 WIDTH="100%"
376 BORDER="0"
377 CELLPADDING="0"
378 CELLSPACING="0"
379 ><TR
380 ><TD
381 WIDTH="33%"
382 ALIGN="left"
383 VALIGN="top"
384 ><A
385 HREF="package.html"
386 ACCESSKEY="P"
387 >Prev</A
388 ></TD
389 ><TD
390 WIDTH="34%"
391 ALIGN="center"
392 VALIGN="top"
393 ><A
394 HREF="cdl-guide.html"
395 ACCESSKEY="H"
396 >Home</A
397 ></TD
398 ><TD
399 WIDTH="33%"
400 ALIGN="right"
401 VALIGN="top"
402 ><A
403 HREF="package.contents.html"
404 ACCESSKEY="N"
405 >Next</A
406 ></TD
407 ></TR
408 ><TR
409 ><TD
410 WIDTH="33%"
411 ALIGN="left"
412 VALIGN="top"
413 >Package Organization</TD
414 ><TD
415 WIDTH="34%"
416 ALIGN="center"
417 VALIGN="top"
418 ><A
419 HREF="package.html"
420 ACCESSKEY="U"
421 >Up</A
422 ></TD
423 ><TD
424 WIDTH="33%"
425 ALIGN="right"
426 VALIGN="top"
427 >Package Contents and Layout</TD
428 ></TR
429 ></TABLE
430 ></DIV
431 ></BODY
432 ></HTML
433 >