1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28There are three extensions in various versions:
29
301  version_XXX/plain.oxt has no dependencies and no license.
312a version_XXX/dependency.oxt has an unsatisfied dependency and no license.
322b version_nodependencies_XXX/dependency.oxt is identical to 2a but without the
33   dependency.
343  version_XXX/license.oxt has no dependencies and a license.
35
36The different versions are:
37
38A  version_none contains no version element (treated as version "0").
39B  version_badelement contains a bad <version val="1"/> (not allowed by the
40   specification, but treated by the current implementation as version "0").
41C  version_badvalue contains a bad <version value="1.a"/> (not allowed by the
42   specification, but treated by the current implementation as version "1").
43D  version_0.0 contains <version value="0.0"/> (same as version "0").
44E  version_1.2.3 contains <version value="1.2.3"/>.
45F  version_1.2.4.7 contains <version value="1.2.4.7"/>.
46G  version_1.02.4.7.0 contains <version value="1.02.4.7.0"/> (same as version
47   "1.2.4.7").
48H  version_1.2.15.3 contains <version value="1.2.15.3"/>.
49
50The total order among the various versions is thus
51
52  A = B = D < C < E < F = G < H.
53
54Things to watch for:
55
56- If version y of extension e is to be installed and version x < y of
57  extension e is already installed, then
58   unopkg add e
59  will replace x with y.
60
61- If version y of extension e is to be installed and version x >= y of
62  extension e is already installed, then
63   unopkg add e
64  will fail with an error message.
65
66- If version y of extension e is to be installed and any version x of
67  extension e is already installed, then
68   unopkg add -f e
69  will replace x with y.
70
71- If version y of extension e is to be installed and any version x of
72  extension e is already installed, then
73   unopkg gui "Add..."
74  and
75   soffice "Tools - Package Manager... - Add..."
76  will query with a dialog whether to replace x with y.  The dialog will have
77  "OK" (replace) preselected if x < y, and "Cancel" otherwise.
78
79- If replacing an installed version x of an extension e with a version y fails
80  because y has unsatisfied dependencies, or because y has a license to wich the
81  user does not agree, version x is left installed afterwards.
82
83- Checking for already installed versions of an extension is only done within a
84  single layer (unopkg versus unopkg --shared; "My Packages" versus
85  "OpenOffice Packages" in unopkg gui/soffice), not across layers.
86