|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ S T ┃
Length: 39710 (0x9b1e) Types: TextFile Names: »STEPS«
└─⟦5829e5ed5⟧ Bits:30000534 8mm tape, Rational 1000, RCI 2_0_5 └─ ⟦c9a165082⟧ »DATA« └─⟦this⟧
UPGRADE_FROM_RCF_1_1_1 => ( Do_Step (Step => "AUTHORIZATION_CHECK, CHECK_RCF, UNCODE_UNITS, RELEASE_RESTORE, INSTALL_PRODUCT, BUILD_PL, START_RCI, RELEASE2_0_0_SWITCH_CONVERSIONS, RELEASE2_0_0_STATE_CONVERSIONS, RECORD_INSTALLATION"); ) UPGRADE_FROM_RCF_1_2_2 => ( Do_Step (Step => "AUTHORIZATION_CHECK, RELEASE_RESTORE, INSTALL_PRODUCT, START_RCI, RELEASE2_0_0_SWITCH_CONVERSIONS, RELEASE2_0_0_STATE_CONVERSIONS, RECORD_INSTALLATION"); ) UPGRADE_FROM_RCI_2_0_0 => ( Do_Step (Step => "AUTHORIZATION_CHECK, RELEASE_RESTORE, INSTALL_PRODUCT, START_RCI, RECORD_INSTALLATION"); ) INSTALL_RCI => ( Do_Step (Step => "AUTHORIZATION_CHECK, RELEASE_RESTORE, INSTALL_PRODUCT, START_RCI, RECORD_INSTALLATION"); ) AUTHORIZATION_CHECK => ( declare subtype Bogus is Natural range 0 .. 1; package Pp is new Parameter_Parser (Bogus); Iter : Pp.Iterator := Pp.Parse ("CMVC, CMVC.Source_Control, RCI"); Token_Iter : Pp.Iterator := Pp.Parse ("RCI"); Error : Natural := 0; function Product_Name (Iter : Pp.Iterator) return String is begin if String_Utilities.Equal (Pp.Name (Iter), "NAME") then return Pp.Get_Image (Iter); else return Pp.Name (Iter); end if; end Product_Name; begin "Command_Data".Convert_Rcf_To_Rci; while not Pp.Done (Iter) loop declare Name : constant String := Product_Name (Iter); begin if "!Implementation".Product_Authorization.Is_Registered (Name) then Log.Put_Line (Name & " is authorized", Profile.Positive_Msg); else Log.Put_Line ("Need to Authorize " & Name, Profile.Error_Msg); Error := Error + 1; end if; end; Pp.Next (Iter); end loop; if Error /= 0 then Log.Put_Line ("Do not proceed until all these products have been authorized", Profile.Error_Msg); end if; if Get_Site /= "" and then not Pp.Done (Token_Iter) then Error := 0; Log.Put_Line ("Checking Token Count"); declare Limit, Current, Buy_Out : Natural; begin while not Pp.Done (Token_Iter) loop "Command_Data". Token_Information (Product_Name (Token_Iter), Limit, Buy_Out, Current); if Limit = 0 then Error := Error + 1; Log.Put_Line ("No tokens (sessions) for " & Product_Name (Token_Iter) & " have been authorized. Do not proceed until you have authorized tokens for this product", Profile.Error_Msg); elsif (Buy_Out /= Current) and Current = Limit then Log.Put_Line ("Tokens (Sessions) have been authorized for " & Product_Name (Token_Iter) & ", but all are in use", Profile.Error_Msg); Log.Put_Line ("Have users which are using these tokens log off (and then back on) before continuing", Profile.Error_Msg); Show_Tokens (Product_Filter => Product_Name (Token_Iter)); else Log.Put_Line (Product_Name (Token_Iter) & " has available tokens", Profile.Positive_Msg); end if; Pp.Next (Token_Iter); end loop; end; else Log.Put_Line ("Machine has not been configured for per session pricing (product tokens)." & " Skipping product token check"); end if; end; ) CHECK_RCF => ( declare use Directory_Tools; Count : Natural := 0; Rel : constant String := Naming.Simple_Name (Naming.Full_Name ("$")); Rev : constant String := Rel (Rel'Last - 4 .. Rel'Last); package Pp is new Parameter_Parser (Boolean); function Job_Running (Job_Name : String) return Boolean is begin for J in System_Utilities.Job_Id loop begin if String_Utilities.Locate (Job_Name, System_Utilities.Job_Name (J)) /= 0 then return True; end if; exception when others => null; end; end loop; return False; end Job_Running; begin if Object.Is_Ok (The_Object => Naming.Resolution ("!Targets.Implementation.RCF_User_Interface")) then if not Job_Running ("Rcf_Compiler Rev") then Log.Put_Line ("RCF_Compiler is not running", Profile.Error_Msg); Log.Put_Line ("Before continuing, ensure the RCF compiler and all customization extension jobs are running", Profile.Negative_Msg); else Log.Put_Line ("RCF_Compiler appears to be executing", Profile.Positive_Msg); end if; else Log.Put_Line ("The RCF has not been installed on this machine"); end if; end; ) UNCODE_UNITS => ( declare Time_Stamp : constant String := Time_Utilities.Image (Time_Utilities.Get_Time, Time_Utilities.Ada, Time_Utilities.Ada); function Job_Running (Job_Name : String) return Boolean is begin for J in System_Utilities.Job_Id loop begin if String_Utilities.Locate (Job_Name, System_Utilities.Job_Name (J)) /= 0 then return True; end if; exception when others => null; end; end loop; return False; end Job_Running; begin if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Targets.Implementation.RCF_User_Interface")) then if not Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.RCF.Program_Library_Version")) then Io.Set_Output ("Logs.Uncode_Units_Log"); if not Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.RCF")) then Library.Create_World (Name => "!Machine.RCF", Kind => Library.World, Vol => Library.Nil, Model => "", Response => "<PROFILE>"); end if; if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.RCF")) then -- verify compiler is running! if Job_Running ("Rcf_Compiler Rev") then Program.Run (S => "RCF_UNCODE_UNITS", Context => "command_data", Response => "<PROFILE>"); -- Save output from compute recoding incase UNCODE is run again Library.Copy (From => "!Machine.Rcf.Rcf1_2_@", To => "!Machine.Rcf.Rcf1_2_@_" & Time_Stamp, Response => "<PROFILE>"); if not Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.Temporary.RCF_Uncode")) then -- Create a "flag" to indicate UNCODING was done. Text.Create (Image_Name => "!Machine.Temporary.RCF_Uncode", Kind => Text.File); end if; else Log.Put_Line ("RCF_Compiler is not running", Profile.Error_Msg); Log.Put_Line ("Ensure the RCF compiler and all customization extension jobs are running, then restart install with this step.", Profile.Negative_Msg); end if; else Log.Put_Line ("Aborting execution of UNCODE_UNITS: Couldn't create !Machine.RCF", Profile.Error_Msg); end if; Io.Reset_Output; Log.Filter_Errors (Log_File => "Logs.Uncode_Units_Log", Destination => "Logs.Uncode_Units_Log_Summary", Auxiliaries => False, Warnings => False, Exceptions => True); Common.Definition ("Logs.Uncode_Units_Log_Summary"); else Log.Put_Line ("RCF Release1_2_2 has already been installed on this machine. Skipping RCF Release1_2_2 conversions."); end if; else Log.Put_Line ("The RCI has not been previously installed on this machine, skipping UNCODE_UNITS step", Profile.Warning_Msg); end if; end; ) CONFIGURATION_CHECK => ( declare Time_Stamp : constant String := Time_Utilities.Image (Time_Utilities.Get_Time, Time_Utilities.Ada, Time_Utilities.Ada); Env_Config : constant String := System_Utilities.System_Boot_Configuration; function Version (S : String; Factor : Natural := 1) return Natural is subtype Numeric is Character range '0' .. '9'; Start, First : Natural := String_Utilities.Reverse_Locate ('_', S); Last : Natural := S'Last; Ver : Natural := 0; begin if First = 0 then First := S'First; else First := First + 1; end if; while First <= Last and then not (S (First) in Numeric) loop First := First + 1; -- scan back to first numeric value end loop; while Last >= First and then not (S (Last) in Numeric) loop Last := Last - 1; -- scan forward to first numeric value end loop; if First > Last then return 0; -- stop at this point as no numeric values found else Ver := Natural'Value (S (First .. Last)); end if; if Start = 0 then return Ver * Factor; else return Version (S (S'First .. Start - 1), Factor * 100) + (Ver * Factor); end if; end Version; function Job_Running (Job_Name : String) return Boolean is begin for J in System_Utilities.Job_Id loop begin if String_Utilities.Locate (Job_Name, System_Utilities.Job_Name (J)) /= 0 then return True; end if; exception when others => null; end; end loop; return False; end Job_Running; begin if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Targets.Implementation.RCF_User_Interface")) and not Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Targets.Implementation.RCI_User_Interface")) then if not Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.RCF.Program_Library_Version")) and not Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.RCI.Program_Library_Version")) then Log.Put_Line ("RCF Release1_1_1 is installed on this machine. Use the UPGRADE_FROM_RCF_1_1_1 step for this upgrade."); else Log.Put_Line ("RCF Release1_2_2 is installed on this machine. Use the UPGRADE_FROM_RCF_1_2_2 step for this upgrade."); end if; else if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Targets.Implementation.RCI_User_Interface")) then Log.Put_Line ("RCI Release2_0_0 is installed on this machine. Use the UPGRADE_FROM_RCI_2_0_0 step for this upgrade."); else Log.Put_Line ("The RCF has not been previously installed on this machine, Use the INSTALL_RCI step for this installation."); end if; end if; -- Check Environment rev if Version (Env_Config) < 120605 then Log.Put_Line ("This release requires Environment release D_12_6_5 or later. " & "This machine is running Environment release: " & Env_Config, Profile.Warning_Msg); else Log.Put_Line ("Environment version prerequsite OK."); end if; end; ) OLD_UNCODE_UNITS => ( declare Time_Stamp : constant String := Time_Utilities.Image (Time_Utilities.Get_Time, Time_Utilities.Ada, Time_Utilities.Ada); begin if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Targets.Implementation.RCF_User_Interface")) then if not directory_tools.object.is_ok (the_object => directory_tools.naming.resolution ("!Machine.RCF.Program_Library_Version")) then Io.Set_Output ("Logs.Uncode_Units_Log"); if not Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.RCF")) then Library.Create_World (Name => "!Machine.RCF", Kind => Library.World, Vol => Library.Nil, Model => "", Response => "<PROFILE>"); end if; if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.RCF")) then -- Archive.Restore -- (Objects => -- "!TARGETS.IMPLEMENTATION.RCF_RELEASE1_2_2.[RCF_UNCODE_UNITS,RCF_RECODE_UNITS]", -- Options => "Promote,Replace", -- Device => "Release", -- Response => "<PROFILE>"); -- Lib.Delete -- (Existing => "!TARGETS.IMPLEMENTATION.RCF_RELEASE1_2_2.RCF_@"); -- Lib.Copy (From => "Release_Unrecode.@", -- To => "!TARGETS.IMPLEMENTATION.RCF_RELEASE1_2_2"); -- verify compiler is running! Program.Run (S => "RCF_UNCODE_UNITS", Context => "command_data", Response => "<PROFILE>"); -- Save output from compute recoding incase UNCODE is run again Library.Copy (From => "!Machine.Rcf.Rcf1_2_@", To => "!Machine.Rcf.Rcf1_2_@_" & Time_Stamp, Response => "<PROFILE>"); else Log.Put_Line ("Aborting execution of UNCODE_UNITS: Couldn't create !Machine.RCF", Profile.Error_Msg); end if; Io.Reset_Output; Log.Filter_Errors (Log_File => "Logs.Uncode_Units_Log", Destination => "Logs.Uncode_Units_Log_Summary", Auxiliaries => False, Warnings => False, Exceptions => True); Common.Definition ("Logs.Uncode_Units_Log_Summary"); else log.put_line ("RCF Release1_2_2 has already been installed on this machine. Skipping RCF Release1_2_2 conversions.") end if; else Log.Put_Line ("The RCI has not been previously installed on this machine, skipping UNCODE_UNITS step", Profile.Warning_Msg); end if; end; ) RELEASE_RESTORE => ( declare Dependents : constant String := "Logs.Dependent_Objects"; Dependents_Log : constant String := Dependents & "_Log"; Frozen : constant String := "Logs.Frozen_Objects"; function Job_Running (Job_Name : String) return Boolean is begin for J in System_Utilities.Job_Id loop begin if String_Utilities.locate (Job_Name, System_Utilities.Job_Name (J)) /= 0 then return True; end if; exception when others => null; end; end loop; return False; end Job_Running; procedure Unfreeze_Spec_Dependents is use Directory_Tools; Iter : Object.Iterator; Status : Object.Error_Code; F : Io.File_Type; begin Io.Set_Output (Dependents_Log); Comp.Dependents (Unit => "[!Targets.Implementation.[Rci_Customization_Interface,Rci_Programmatic_Interface,Rci_User_Interface].@'c(Spec_View).Units.?'Spec]", Transitive => False, Response => ""); Io.Reset_Output; Io.Set_Output (Dependents); Io.Set_Input (Dependents_Log); while not Io.End_Of_File loop declare Line : constant String := Io.Get_Line; begin if Line (Line'First) = ' ' then Io.Put_Line (Line); end if; end; end loop; Io.Reset_Output; Io.Reset_Input; Iter := Naming.Resolution ("[[_" & Dependents & "]$?'c(ada)]"); Io.Create (F, Name => Frozen); while not Object.Done (Iter) loop if Any_Object.Is_Frozen (Object.Value (Iter)) then Any_Object.Unfreeze (Object.Value (Iter), False, Status); if Object.Is_Bad (Status) then Object.Report (Status); Log.Put_Line ("Cannot unfreeze " & Naming.Full_Name (Object.Value (Iter)), Profile.Negative_Msg); end if; Io.Put_Line (F, Naming.Full_Name (Object.Value (Iter)) & Naming.Part_Attribute (Naming.Unique_Full_Name (Object.Value (Iter)))); end if; Object.Next (Iter); end loop; Io.Close (F); end Unfreeze_Spec_Dependents; procedure Refreeze_Spec_Dependents is use Directory_Tools; Iter : Object.Iterator; Status : Object.Error_Code; begin Iter := Naming.Resolution ('_' & Frozen); while not Object.Done (Iter) loop Any_Object.Freeze (Object.Value (Iter), False, Status); if Object.Is_Bad (Status) then Object.Report (Status); Log.Put_Line ("Cannot re-freeze " & Naming.Full_Name (Object.Value (Iter)), Profile.Negative_Msg); end if; Object.Next (Iter); end loop; end Refreeze_Spec_Dependents; begin Io.Set_Output ("Logs.Release_Restore_Log"); if Job_Running ("Rcf_Compiler Rev") then Program.Run (S => "KILL_RCF_MAIN", Context => "!TARGETS.IMPLEMENTATION.RCF_USER_INTERFACE'SPEC_VIEW.UNITS", Response => "<PROFILE>"); if Job_Running ("Rcf_Compiler Rev") then Io.Reset_Output; Log.Put_Line ("Failed to kill RCF compiler", Profile.Error_Msg); Log.Put_Line ("Aborting RELEASE_RESTORE", Profile.Negative_Msg); return; end if; end if; if Job_Running ("Rci_Compiler Rev") then Program.Run (S => "KILL_RCI_MAIN", Context => "!TARGETS.IMPLEMENTATION.RCI_USER_INTERFACE'SPEC_VIEW.UNITS", Response => "<PROFILE>"); if Job_Running ("Rci_Compiler Rev") then Io.Reset_Output; Log.Put_Line ("Failed to kill RCI compiler", Profile.Error_Msg); Log.Put_Line ("Aborting RELEASE_RESTORE", Profile.Negative_Msg); return; end if; end if; if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!MACHINE.TARGET_BUILDER.RCF_ERRORS")) and then "Command_Data".File_Is_Locked ("!MACHINE.TARGET_BUILDER.RCF_ERRORS") then Log.Put_Line ("!MACHINE.TARGET_BUILDER.RCF_ERRORS is locked, please kill job that has a lock on this file and rerun this step", Profile.Error_Msg); elsif Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!MACHINE.TARGET_BUILDER.RCI_ERRORS")) and then "Command_Data".File_Is_Locked ("!MACHINE.TARGET_BUILDER.RCI_ERRORS") then Log.Put_Line ("!MACHINE.TARGET_BUILDER.RCI_ERRORS is locked, please kill job that has a lock on this file and rerun this step", Profile.Error_Msg); else Unfreeze_Spec_Dependents; Archive.Restore (Options => "PROMOTE, REPLACE, CHANGED_OBJECTS", Device => "Release"); -- Lib.Delete (Existing => -- "!TARGETS.IMPLEMENTATION.RCF_RELEASE1_2_2.RCF_@"); -- Lib.Copy (From => "Release_Unrecode.@", -- To => "!TARGETS.IMPLEMENTATION.RCF_RELEASE1_2_2"); Archive.Restore (Options => "PROMOTE, REPLACE, CHANGED_OBJECTS", Device => "Release_Reusable_Components"); Refreeze_Spec_Dependents; if Directory_Tools.Object.Is_Ok (The_Objects => Directory_Tools.Naming.Resolution ("Release_Notes.[Data,Index]")) then Archive.Restore (Options => "promote, replace", Device => "Release_Notes"); end if; if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.Initialization.Rational")) then Archive.Restore (Objects => "!Machine.Initialize_RCI", Use_Prefix => "!Machine.Initialization.Rational.Compilation_Integrator", For_Prefix => "!Machine.Initialize_RCI", Options => "promote,replace", Device => "Release"); Comp.Destroy (Unit => "!Machine.Initialize_RCI", Threshold => 2, Limit => "<WORLDS>", Response => "<PROFILE>"); else Log.Put_Line ("Missing !Machine.Initialization.Rational; pre D_12_5_0 Environment suspected", Profile.Error_Msg); Log.Put_Line ("This release of the RCI is designed to be installed on D_12_5_0 or later systems", Profile.Error_Msg); end if; end if; Io.Reset_Output; Log.Filter_Errors (Log_File => "Logs.Release_Restore_Log", Destination => "Logs.Release_Restore_Log_Summary", Auxiliaries => False, Warnings => False, Exceptions => True); Common.Definition ("Logs.Release_Restore_Log_Summary"); end; ) INSTALL_PRODUCT => ( declare use Directory_Tools; F : Io.File_Type; Context : constant string := Naming.Default_Context; begin Io.Set_Output ("Logs.Install_Product_Log"); Library.Context (To_Be => "!Targets.Implementation.Rci_Release2_0_5"); System_Utilities.Set_Page_Limit (16_000); begin Log.Put_Line ("Localhost name resolved " & String (Transport_Name.Host_To_Network_Name ("localhost")), Profile.Positive_Msg); exception when Transport_Name.Undefined => Log.Put_Line ("Adding Localhost to Transport_Name_Map", Profile.Positive_Msg); Io.Append (F, Name => ("!Machine.Transport_Name_Map")); Io.Put_Line (F, "tcp/ip 127.0.0.1 localhost"); Io.Close (F); begin Log.Put_Line ("Localhost name resolved " & String (Transport_Name.Host_To_Network_Name ("localhost")), Profile.Positive_Msg); exception when Transport_Name.Undefined => Log.Put_Line ("Failed to successfully add Localhost to Transport_Name_Map", Profile.Error_Msg); Log.Put_Line ("Check for blank lines before the 'localhost' entry in !Machine.Transport_Name_Map; remove them if present", Profile.Negative_Msg); end; end; "!Targets.Implementation.Rci_Release2_0_5".Install_Product; Io.Reset_Output; Library.Context (To_Be => Context, Response => "<ERRORS>"); Log.Filter_Errors (Log_File => "Logs.Install_Product_Log", Destination => "Logs.Install_Product_Log_Summary", Auxiliaries => False, Exceptions => True); Common.Definition ("Logs.Install_Product_Log_Summary"); end; ) BUILD_PL => ( declare use Directory_Tools; Iter : Object.Iterator; Pl_Log : constant String := "!Machine.RCI.Build_Program_Libraries_@"; Count : Natural := 0; Rel : constant String := Naming.Simple_Name (Naming.Full_Name ("$")); Rev : constant String := Rel (Rel'Last - 4 .. Rel'Last); function Job_Running (Job_Name : String) return Boolean is begin for J in System_Utilities.Job_Id loop begin if String_Utilities.Locate (Job_Name, System_Utilities.Job_Name (J)) /= 0 then return True; end if; exception when others => null; end; end loop; return False; end Job_Running; begin Library.Delete (Existing => "!Machine.RCF.Program_Library_Version", Response => ""); Log.Put_Line ("Killing any running RCF or RCI jobs"); if Job_Running ("Rcf_Compiler Rev") then Program.Run ("Kill_Rcf_Main;"); -- setup to start everything using system init routine end if; if Job_Running ("Rci_Compiler Rev") then Kill_Rci_Main; -- setup to start everything using system init routine end if; Log.Put_Line ("Starting RCI compiler; building program libraries"); Program.Run_Job (S => "Start_RCI_Main", Response => "<ERRORS>"); Log.Put_Line ("Waiting for RCI compiler to finish building program libraries"); loop exit when Job_Running ("Rci_Compiler Rev"); delay 30.0; end loop; Log.Put_Line ("RCF compiler finished building program libraries"); Iter := Naming.Resolution (Pl_Log); if Object.Is_Ok (Iter) then Object.Invert (Iter); -- get last log made loop exit when not "Command_Data".File_Is_Locked (Naming.Full_Name (Object.Value (Iter))); Log.Put_Line ("Waiting for log file to complete writing"); Count := Count + 1; exit when Count > 48; delay 5.0; end loop; Log.Put_Line ("Summarizing " & Naming.Simple_Name (Object.Value (Iter))); Library.Copy (Naming.Full_Name (Object.Value (Iter)), "Logs." & Naming.Simple_Name (Object.Value (Iter)), Response => "<ERRORS>"); Log.Filter_Errors (Log_File => "Logs." & Naming.Simple_Name (Object.Value (Iter)), Destination => "Logs." & Naming.Simple_Name (Object.Value (Iter)) & "_Summary", Auxiliaries => False, Warnings => True, Exceptions => True); Common.Definition ("Logs." & Naming.Simple_Name (Object.Value (Iter)) & "_Summary"); Log.Put_Line ("Examine .Logs." & Naming.Simple_Name (Object.Value (Iter)) & "_Summary for RCI related errors", Profile.Warning_Msg); else Log.Put_Line ("Could not find " & Pl_Log, Profile.Negative_Msg); end if; if Job_Running ("Rcf_Compiler Rev") then Program.Run ("Kill_Rcf_Main;"); -- setup to start everything using system init routine end if; if Job_Running ("Rci_Compiler Rev") then Kill_Rci_Main; -- setup to start everything using system init routine end if; end; ) START_RCI => ( declare use Directory_Tools; Iter : Object.Iterator; Count : Natural := 0; Rel : constant String := Naming.Simple_Name (Naming.Full_Name ("$")); Rev : constant String := Rel (Rel'Last - 4 .. Rel'Last); function Job_Running (Job_Name : String) return Boolean is begin for J in System_Utilities.Job_Id loop begin if String_Utilities.Locate (Job_Name, System_Utilities.Job_Name (J)) /= 0 then return True; end if; exception when others => null; end; end loop; return False; end Job_Running; begin if Job_Running ("Rcf_Compiler Rev") then Program.Run ("Kill_Rcf_Main;"); -- setup to start everything using system init routine end if; if Job_Running ("Rci_Compiler Rev") then Kill_Rci_Main; -- setup to start everything using system init routine end if; if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.Initialization.Rational")) then Program.Run_Job (S => """!Machine.Initialization.Rational"".Compilation_Integrator;", Options => "Output=!Machine.Error_Logs.RCF_Log", Response => "<PROFILE>"); loop delay 1.0; if Job_Running ("Rci_Compiler Rev") then Log.Put_Line ("RCI_Compiler has started", Profile.Positive_Msg); exit; end if; Count := Count + 1; if Count > 120 then Log.Put_Line ("RCI_Compiler job has not started", Profile.Error_Msg); Log.Put_Line ("Examine Compilation_Integrator_Initialization_Log for errors", Profile.Negative_Msg); Common.Definition (Name => "!Machine.Error_Logs.Compilation_Integrator_Initialization_Log"); exit; end if; end loop; else Log.Put_Line ("Pre D_12_5_0 Environment present, will not run RCI initialization procedure", Profile.Error_Msg); end if; end; ) RECORD_INSTALLATION => ( declare Product : constant String := Directory_Tools.Naming.Simple_Name (Directory_Tools.Naming.Full_Name ("^")); Release : constant String := Directory_Tools.Naming.Simple_Name (Directory_Tools.Naming.Full_Name ("$")); Product_Info : constant String := "(RELEASE => " & Release & ", DATE => (" & Time_Utilities.Image (Time_Utilities.Get_Time, Time_Utilities.Year_Month_Day) & "), USER => " & System_Utilities.User_Name & '.' & System_Utilities.Session_Name & ")"; Product_Filename : constant String := "!Machine.Release.Current.Products"; F : Io.File_Type; begin Io.Append (F, Name => Product_Filename); Io.Put_Line (F, Product & " => " & Product_Info); Io.Close (F); Log.Put_Line ("Recording product " & Product & " current release as " & Release, Profile.Positive_Msg); end; ) RECODE_UNITS => ( declare use Directory_Tools; Iter : Object.Iterator := Naming.Resolution ("!Machine.Rcf.Rcf1_2_@"); begin if Directory_Tools.Object.Is_Ok (The_Object => Directory_Tools.Naming.Resolution ("!Machine.Temporary.RCF_Uncode")) then if Directory_Tools.Object.Is_Ok (The_Objects => Iter) then Log.Put_Line ("Running Rcf_Recode_Units"); Io.Set_Output ("Logs.Recode_Units_Log"); Library.Destroy("!Machine.Temporary.RCF_Uncode"); Program.Run (S => "RCF_RECODE_UNITS", Context => "Command_Data", Response => "<PROFILE>"); Io.Reset_Output; Log.Filter_Errors (Log_File => "Logs.Recode_Units_Log", Destination => "Logs.Recode_Units_Log_Summary", Auxiliaries => False, Exceptions => True); Common.Definition ("Logs.Recode_Units_Log_Summary"); else Log.Put_Line ("Cannot find unit state files; appears that UNCODE_UNITS step was not run or there were no units to uncode", Profile.Warning_Msg); end if; end if; end; ) SCHEDULE_SHUTDOWN => ( declare use Directory_Tools; Rel : constant String := Naming.Simple_Name (Naming.Full_Name ("$")); Current_Terminal_Type : constant String := System_Utilities.Terminal_Type; function Is_State (Object : String; Goal_State : Directory_Tools.Ada_Object.Unit_State) return Boolean; function Is_Coded (Object : String; Goal_State : Directory_Tools.Ada_Object.Unit_State := Directory_Tools.Ada_Object.Coded) return Boolean renames Is_State; function Is_Installed (Object : String; Goal_State : Directory_Tools.Ada_Object.Unit_State := Directory_Tools.Ada_Object.Installed) return Boolean renames Is_State; function Is_State (Object : String; Goal_State : Directory_Tools.Ada_Object.Unit_State) return Boolean is use Directory_Tools.Ada_Object; Is_Ok : Boolean := (Unit_State'Pos (State (Object)) >= Unit_State'Pos (Goal_State)); begin if not Is_Ok then Log.Put_Line (Object & " is not at the " & Unit_State'Image (Goal_State) & " state", Profile.Error_Msg); end if; return Is_Ok; end Is_State; begin if (Object.Is_Ok (The_Object => Naming.Resolution ("!Machine.Initialization.Rational")) or else Is_Coded ("!Machine.Initialize'Body")) and Is_Installed ("!Machine.Editor_Data.Rational_Commands'Body") and Is_Installed ("!Machine.Editor_Data.Facit_Commands'Body") and Is_Installed ("!Machine.Editor_Data." & Current_Terminal_Type & "_Commands'Body") then Log.Put_Line ("Scheduling shutdown in 5 minutes"); Op.Shutdown_Warning (300.0); Op.Shutdown (Reason => "Release", Explanation => "Install RCI " & Rel); end if; end; ) CLEANUP => ( Compilation.Destroy (Unit => "[$,!Targets.Implementation.RCI_Release2_0_5.[@,~Install_Activity]]", Threshold => 999, Limit => "<ALL_WORLDS>", Response => "<ERRORS>"); ) RELEASE2_0_0_SWITCH_CONVERSIONS => ( Io.Set_Output ("Logs.Switch_Conversion_Log"); "!Targets.Implementation.RCI_Programmatic_Interface.Rev2_2_Spec.units".Utilities.Conversions.Convert_RCF_Switches; Io.Reset_Output; Log.Filter_Errors (Log_File => "Logs.Switch_Conversion_Log", Destination => "Logs.Switch_Conversion_Log_Summary", Auxiliaries => False, Exceptions => True); Common.Definition ("Logs.Switch_Conversion_Log_Summary"); ) RELEASE2_0_0_STATE_CONVERSIONS => ( Log.Put_Line ("Execute Convert_RCF_State_Files in the Command Window below"); Common.Create_Command; Editor.Char.Insert_String ("""!Targets.Implementation.RCI_Programmatic_Interface.Rev2_2_Spec.units"".Utilities.Conversions.Convert_RCF_State_Files;"); Common.Complete; ) COPY_RCF_TEXT_FILES => ( declare Config_Loc : constant String := "!machine.initialization."; begin Archive.Copy (Objects => "!Machine.Rcf_targets", Use_Prefix => "!machine.rci_targets", For_Prefix => "!machine.rcf_targets", Options => "changed_objects,replace", Response => "<PROFILE>"); Archive.Copy (Objects => "!Machine.Rcf", Use_Prefix => "!machine.rci", For_Prefix => "!machine.rcf", Options => "changed_objects,replace", Response => "<PROFILE>"); Archive.Copy (Objects => Config_Loc & "Local.rcf_configuration", Use_Prefix => Config_Loc & "Local.rci_configuration", For_Prefix => Config_Loc & "Local.rcf_configuration", Options => "changed_objects,replace", Response => "<PROFILE>"); Archive.Copy (Objects => Config_Loc & "Site.rcf_configuration", Use_Prefix => Config_Loc & "Site.rci_configuration", For_Prefix => Config_Loc & "Site.rcf_configuration", Options => "changed_objects,replace", Response => "<PROFILE>"); end; ) STEP_CHECK => ( -- This must remain the last step in the step file and is used -- as a first level verification of the step file parse and -- tape load. Log.Put_Line ("Step File parses correctly", Profile.Positive_Msg); )