source: branches/2.2/setup/doc/setup3-3.html @ 2

Revision 2, 9.2 KB checked in by niltonneto, 17 years ago (diff)

Removida todas as tags usadas pelo CVS ($Id, $Source).
Primeira versão no CVS externo.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<HTML
2><HEAD
3><TITLE
4>   The install/upgrade process
5  </TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.59"><LINK
9REL="HOME"
10TITLE="   eGroupWare Setup
11  "
12HREF="setup3.html"><LINK
13REL="PREVIOUS"
14TITLE="   Developer Tools
15  "
16HREF="setup3-2.html"><LINK
17REL="NEXT"
18TITLE="   Conclusion
19  "
20HREF="setup3-4.html"></HEAD
21><BODY
22CLASS="SECT1"
23><DIV
24CLASS="NAVHEADER"
25><TABLE
26WIDTH="100%"
27BORDER="0"
28CELLPADDING="0"
29CELLSPACING="0"
30><TR
31><TH
32COLSPAN="3"
33ALIGN="center"
34>eGroupWare Setup</TH
35></TR
36><TR
37><TD
38WIDTH="10%"
39ALIGN="left"
40VALIGN="bottom"
41><A
42HREF="setup3-2.html"
43>Prev</A
44></TD
45><TD
46WIDTH="80%"
47ALIGN="center"
48VALIGN="bottom"
49></TD
50><TD
51WIDTH="10%"
52ALIGN="right"
53VALIGN="bottom"
54><A
55HREF="setup3-4.html"
56>Next</A
57></TD
58></TR
59></TABLE
60><HR
61ALIGN="LEFT"
62WIDTH="100%"></DIV
63><DIV
64CLASS="SECT1"
65><H1
66CLASS="SECT1"
67><A
68NAME="AEN177"
69>The install/upgrade process</A
70></H1
71><DIV
72CLASS="SECT2"
73><H2
74CLASS="SECT2"
75><A
76NAME="AEN179"
77>Overview</A
78></H2
79><DIV
80CLASS="SECT3"
81><H3
82CLASS="SECT3"
83><A
84NAME="AEN181"
85>Setup internal upgrade functions</A
86></H3
87><P
88>     Setup uses a common set of functions for new installs and upgrades. These are implemented as multi-pass loops. For a single application install or upgrade, a single pass is done. For multiple application installs or upgrades, multiple passes are done automatically. The order of install in a mass install or upgrade is determined by application dependencies. The other determining factor is the order in which the application directories and setup.inc.php files are read from the filesystem.
89    </P
90></DIV
91></DIV
92><DIV
93CLASS="SECT2"
94><H2
95CLASS="SECT2"
96><A
97NAME="AEN184"
98>New installs</A
99></H2
100><DIV
101CLASS="SECT3"
102><H3
103CLASS="SECT3"
104><A
105NAME="AEN186"
106>Detection</A
107></H3
108><P
109>     Each run of index.php or applications.php in setup3 first runs a set of detection routines. These read the data from each setup.inc.php file, and from the 'applications' or 'phpgw_applications' table as appropriate, and only if one of these tables exists. This data is parsed into the $setup_info array. In this case, this array contains information about all applications. Based on the information gathered, a status flag is set to one of the following values:
110    </P
111><P
112></P
113><UL
114><LI
115><P
116>     U - Upgrade required/available
117     </P
118></LI
119><LI
120><P
121>     R - upgrade in pRogress
122     </P
123></LI
124><LI
125><P
126>     C - upgrade Completed successfully
127     </P
128></LI
129><LI
130><P
131>     D - Dependency failure
132     </P
133></LI
134><LI
135><P
136>     F - upgrade Failed
137     </P
138></LI
139><LI
140><P
141>     V - Version mismatch at end of upgrade
142     </P
143></LI
144><LI
145><P
146>     M - Missing files at start of upgrade (Not used, proposed only)
147     </P
148></LI
149></UL
150><P
151>     Using this information, the setup logic in index.php determines what mode we are in. index.php is not capable of being selective about which application it found as being out of sync. It is designed only for 'Simple Application Management', which is Step 1 of the setup process. For more selective application manipulation, use applications.php. index.php then tells the user that 1) their applications are current 2) some of their applications are out of sync 3) no db exists, etc. For a new install, all applications will be out of sync, since there is not even an 'phpgw_applications' table in the database to tell setup what the status is for any application.
152    </P
153></DIV
154><DIV
155CLASS="SECT3"
156><H3
157CLASS="SECT3"
158><A
159NAME="AEN205"
160>Selection</A
161></H3
162><P
163>     There is no selection for application installs in 'new install' mode. All physically present applications will be installed, or at least attempted.
164    </P
165></DIV
166><DIV
167CLASS="SECT3"
168><H3
169CLASS="SECT3"
170><A
171NAME="AEN208"
172>Installation</A
173></H3
174><P
175>     Once the setup user clicks the magic button to install all applications, the following occurs:
176    </P
177><P
178></P
179><UL
180><LI
181><P
182>     The setup_info array is passed to the process_pass() function, using a method='new'
183     </P
184></LI
185><LI
186><P
187>     Applications whose status flag='U' (API on first pass) are then handed off to the process_current() function. This handles inclusion and installation of the application's tables_current.inc.php file.
188     </P
189></LI
190><LI
191><P
192>     The application is registered as a new application in the 'phpgw_applications' table. If for some reason there is old data in this table for this application, it will be updated instead. Its hooks, if any, are registered in the 'phpgw_hooks' table.
193     </P
194></LI
195><LI
196><P
197>     Next, this array is passed to the process_default_records() function. If this file is present in the current application's setup directory, the queries here are run to install the data to the application's table(s).
198     </P
199></LI
200><LI
201><P
202>     The above is repeated until all application status flags equal 'C'. However, if an application install failed for some reason, it will then be skipped on the next pass. This keeps the loop from running away.
203     </P
204></LI
205></UL
206></DIV
207></DIV
208><DIV
209CLASS="SECT2"
210><H2
211CLASS="SECT2"
212><A
213NAME="AEN222"
214>Upgrades</A
215></H2
216><DIV
217CLASS="SECT3"
218><H3
219CLASS="SECT3"
220><A
221NAME="AEN224"
222>Detection</A
223></H3
224><P
225>     Only an API version mismatch will trigger an automated request for the user to upgrade their install. Once the api is current, they can move on to applications.php for more 'Advanced Application Management', which is Step 4 of the setup process. However, if the API is out of sync, clicking 'Upgrade' in index.php will also attempt to upgrade other applications which may be out of sync, as well. As the phpgwapi continues to stabilize, it is felt that this method of upgrading will become less and less common.
226    </P
227></DIV
228><DIV
229CLASS="SECT3"
230><H3
231CLASS="SECT3"
232><A
233NAME="AEN227"
234>Selection</A
235></H3
236><P
237>     Within applications.php, a color-coded matrix of application status and actions is displayed. Depending on the status flag of each application, certain actions will be either enabled or disabled. These actions include 'install', 'upgrade', 'remove'. If something is very wrong with previous attempts to install or upgrade an application, another column called 'resolution' will then display a link. This link will display additional information which would be helpful for determining how to resolve the problem. Assuming all is well, the user can select applications requiring upgrade from this list. Once selected, they submit the form. This runs the follow three routines in order:
238    </P
239><P
240></P
241><UL
242><LI
243><P
244>     remove
245     </P
246></LI
247><LI
248><P
249>     install
250     </P
251></LI
252><LI
253><P
254>     upgrade
255     </P
256></LI
257></UL
258></DIV
259><DIV
260CLASS="SECT3"
261><H3
262CLASS="SECT3"
263><A
264NAME="AEN237"
265>Upgrade</A
266></H3
267><P
268>     The idea here is that multiple actions can be selected and run in order in one click. In any case, once they select an application for upgrade, the following occurs:
269    </P
270><P
271></P
272><UL
273><LI
274><P
275>     A stripped down version of the setup_info array is passed to the process_upgrade() function. This array contains only the information for the selected application
276     </P
277></LI
278><LI
279><P
280>     Within process_upgrade(), the tables_baseline.inc.php file for the application is loaded.
281     </P
282></LI
283><LI
284><P
285>     The tables_update.inc.php file for the application is loaded
286     </P
287></LI
288><LI
289><P
290>     The contents of the test array is used to loop through the entire list of upgrade functions for the application. The application's unique function names are rebuilt, then run.
291     </P
292></LI
293><LI
294><P
295>     When the currentver (installed) matches the version (available), process_upgrade() exits, setting the status flag for the app to 'C'.
296     </P
297></LI
298><LI
299><P
300>     Just prior to exiting, the application and its hooks are updated into the 'phpgw_applications' and 'phpgw_hooks' tables.
301     </P
302></LI
303></UL
304></DIV
305></DIV
306><DIV
307CLASS="SECT2"
308><H2
309CLASS="SECT2"
310><A
311NAME="AEN253"
312>Uninstallation/Removal</A
313></H2
314><DIV
315CLASS="SECT3"
316><H3
317CLASS="SECT3"
318><A
319NAME="AEN255"
320>Selection</A
321></H3
322><P
323>     Selective removal of an application is done via applications.php, in a manner similar to the method above for upgrades.
324    </P
325></DIV
326><DIV
327CLASS="SECT3"
328><H3
329CLASS="SECT3"
330><A
331NAME="AEN258"
332>Uninstallation</A
333></H3
334><P
335>     Once an application is selected for removal:
336    </P
337><P
338></P
339><UL
340><LI
341><P
342>     A stripped down version of the setup_info array is passed to the process_droptables() function. This function removes all of the application's defined tables, but only after first checking to see if the tables are there. In this way, we attempt to cut down on the number of errors sent to the browser.
343     </P
344></LI
345><LI
346><P
347>     The application's hooks are deregistered (removed from 'phpgw_hooks').
348     </P
349></LI
350><LI
351><P
352>     The application itself is deregistered (removed from 'phpgw_applications').
353     </P
354></LI
355></UL
356></DIV
357></DIV
358></DIV
359><DIV
360CLASS="NAVFOOTER"
361><HR
362ALIGN="LEFT"
363WIDTH="100%"><TABLE
364WIDTH="100%"
365BORDER="0"
366CELLPADDING="0"
367CELLSPACING="0"
368><TR
369><TD
370WIDTH="33%"
371ALIGN="left"
372VALIGN="top"
373><A
374HREF="setup3-2.html"
375>Prev</A
376></TD
377><TD
378WIDTH="34%"
379ALIGN="center"
380VALIGN="top"
381><A
382HREF="setup3.html"
383>Home</A
384></TD
385><TD
386WIDTH="33%"
387ALIGN="right"
388VALIGN="top"
389><A
390HREF="setup3-4.html"
391>Next</A
392></TD
393></TR
394><TR
395><TD
396WIDTH="33%"
397ALIGN="left"
398VALIGN="top"
399>Developer Tools</TD
400><TD
401WIDTH="34%"
402ALIGN="center"
403VALIGN="top"
404>&nbsp;</TD
405><TD
406WIDTH="33%"
407ALIGN="right"
408VALIGN="top"
409>Conclusion</TD
410></TR
411></TABLE
412></DIV
413></BODY
414></HTML
415>
Note: See TracBrowser for help on using the repository browser.