-
Notifications
You must be signed in to change notification settings - Fork 24
/
pkg-states.txt
165 lines (128 loc) · 5.43 KB
/
pkg-states.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
pkg
PACKAGE STATES
:vim set expandtab:
1. Server states
We phrase the state machine in terms of a single removal state,
ABANDONED, which covers both the never-created package instance
(even with a series of never-finished transaction events). It may
be more appropriate to separate the ABANDONED state into
TX_ABANDONED and PKG_DELETED.
0
|
|
v
+--> TRANSACTING --> ABANDONED <--+
| | ^ |
| | | |
| v | |
| SUBMITTED ----> INCOMPLETE |
| | | |
| | | |
+--- PUBLISHED <---------+ |
| |
| |
+------------------------+
0 -> TRANSACTING
On initial package creation.
TRANSACTING -> ABANDONED
If initial package transaction never committed, commitment
failed, or explicitly dropped.
TRANSACTING -> SUBMITTED
On successful package transaction commitment. Packages with
syntax errors or immediate inconsistencies would have failed in
commitment.
SUBMITTED:
The package modified by the transaction is known by a specific
version. Its contents are in the repository.
SUBMITTED -> INCOMPLETE
If commitment included a deferred inconsistency (package
dependency is the only expected form), then the package is left
in the incomplete state.
INCOMPLETE:
The package with the specific version string is on the
incomplete list. Its contents are in the repository.
INCOMPLETE -> ABANDONED
If incomplete package explicitly removed. (Possibly by
timeout from arrival in INCOMPLETE.)
SUBMITTED -> PUBLISHED
If commitment had no deferred inconsistencies, then the package
is considered ready for publication.
INCOMPLETE -> PUBLISHED
If the deferred inconsistencies, upon reevaluation, are now held
to no longer be inconsistent, then the package is considered
ready for publication.
PUBLISHED:
The package with the specific version string is present in the
catalog. Its contents remain in the repository.
PUBLISHED -> ABANDONED
On manual request for package decommissioning, the package will
be moved to the abandoned state.
ABANDONED:
A package with a specific version string is no longer in the
catalog or on the incomplete list. Its contents, if they were
in the repository, should be removed from the repository.
XXX ARCHIVED might be a special state connected to PUBLISHED, or
merely a substate. An archived package has its manifest and
contents in the repository, but cannot be installed on a client.
The point of including ARCHIVED packages is to allow client
deduction on a system not installed by the pkg system.
2. Client states
0
|
v
IN_CATALOG ---------> OUT_CATALOG
| ^
+--->---+---<-------+ |
| | | |
| v | |
| INSTALLED --> FROZEN |
| | |
| | |
| v |
+-- PRESERVED |
| | |
| | |
| v |
+-- DELETED -------------------+
0 -> IN_CATALOG:
A catalog update with new entries.
IN_CATALOG:
An entry for this package is available in the locally installed
catalog.
IN_CATALOG -> OUT_CATALOG:
Entry formerly present on local catalog is no longer published by any
repository. (Package never locally installed.)
OUT_CATALOG:
Although a formerly known package, no entry for this package is
available in the locally installed catalog. An INSTALLED or
FROZEN package can never be OUT_CATALOG, as the system will
preserve the entry until the package is no longer in a locally
public state.
IN_CATALOG -> INSTALLED:
Transition takes place on package installation.
INSTALLED -> FROZEN:
Transition takes place if manually frozen or frozen by virtue of
reference from another package group.
FROZEN -> INSTALLED:
Manually unfrozen, or unfrozen by reference drop due to
change in formerly referring package group.
INSTALLED -> PRESERVED:
Old copies moved aside during upgrade of package components, but
not removed.
PRESERVED -> DELETED:
Old copies removed.
DELETED -> OUT_CATALOG:
Package has been removed from client catalog. Client software
would take a PRESERVED package through DELETED automatically to
reach OUT_CATALOG.
PRESERVED -> INSTALLED:
Package reinstalled or reversed.
DELETED -> INSTALLED:
Package reinstalled.
XXX How does the ZFS snapshot (that we might have taken prior to an
operation) get represented in the state? Is there an image state
machine model as well?
XXX Need a substate of INSTALLED for damaged packages.
XXX Need a substate of INSTALLED for packages where the global zone
portion is available, but local installation has not finished. Can
we generalize this state for all diskless installs?