Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
221 vnguyen 1
CREATE PROCEDURE "RELEASE_MANAGER"."REBUILD_ENVIRONMENT" ( NNrtag_id IN NUMBER ) IS
2
 
3
/* ---------------------------------------------------------------------------
4
    Version: 3.3
5
   --------------------------------------------------------------------------- */
6
    rowCnt NUMBER := 0;
7
    iteration NUMBER := 2;          -- Iterations counter
8
    maxIterations NUMBER := 50;    -- Maximum number of iterations allowed.
9
                                    -- This will prevent infinite loops if cyrcular dependencies are found
10
    sessionNum NUMBER;
11
BEGIN
12
    SELECT SEQ_session_num.nextval INTO sessionNum FROM DUAL;
13
 
14
 
15
    -- Redo Patch Ignore warnings
16
    Ignore_Dependency_Warnings ( NNrtag_id, NULL, NULL, TRUE );
17
 
18
 
19
    Level_One_Conflicts ( NNrtag_id, sessionNum );
20
 
21
    LOOP
22
        Level_N_Conflicts ( NNrtag_id, sessionNum, rowCnt, iteration );
23
        iteration := iteration + 1;
24
        EXIT WHEN (rowCnt < 1) OR (iteration > maxIterations);
25
    END LOOP;
26
 
27
    Update_Package_States ( NNrtag_id, sessionNum );
28
 
29
    DELETE FROM temp_env_states WHERE temp_env_states.session_num = sessionNum;
30
 
31
    -- Flag Packages with New Patches Available
32
    Check_New_Patches ( NNrtag_id );
33
 
34
	Clean_Do_Not_Ripple( NNrtag_id );
35
 
36
 
37
	/* Circular Dependency Flag */
38
    /*
39
	IF iteration > maxIterations
40
	THEN
41
		UPDATE release_tags SET
42
		   	   circular_dependency = 'Y'
43
		 WHERE rtag_id = NNrtag_id;
44
	ELSE
45
		UPDATE release_tags SET
46
		   	   circular_dependency = NULL
47
		 WHERE rtag_id = NNrtag_id;
48
	END IF;
49
    */
50
END Rebuild_Environment;
51
/