|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 21044 (0x5234)
Types: TextFile
Notes: R1k Text-file segment
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦331c50a0a⟧
└─⟦this⟧
INSTALL_RCF => (
Do_Step
(Step => "AUTHORIZATION_CHECK,
RELEASE_RESTORE,
INSTALL_PRODUCT,
START_RCF,
RECORD_INSTALLATION",
Step_File =>
"!MACHINE.RELEASE.ARCHIVE.RCF.RELEASE1_0_3.COMMAND_DATA.STEPS");
)
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, RCF");
Token_Iter : Pp.Iterator := Pp.Parse ("RCF");
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
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);
Do_Step ("PROMPT=AUTHORIZE_PRODUCT");
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
"!Machine.Release.Archive.RCF.Release1_0_3.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;
if Error /= 0 then
Do_Step ("PROMPT=AUTHORIZE_TOKEN");
end if;
end;
else
Log.Put_Line
("Machine has not been configured for per session pricing (product tokens)." &
" Skipping product token check");
end if;
end;
)
AUTHORIZE_TOKEN => (
Accept_Tokens (Product => [STRING-expression],
Donation => [POSITIVE-expression],
Resulting_Count => [POSITIVE-expression],
Code => [STRING-expression],
Response => "<PROFILE>");
)
AUTHORIZE_PRODUCT => (
"!Implementation".Product_Authorization.Register
(Product_Name => ">>Product Name<<",
Authorization_Code => ">> Code <<");
)
RELEASE_RESTORE => (
Io.Set_Output
("!Machine.Release.Archive.RCF.Release1_0_3.Logs.Restore_Release_Log");
Archive.Restore (Options => "promote, replace",
Device => "Release");
Archive.Restore (Options => "promote, replace",
Device => "Release_Addendum_Ui");
Archive.Restore (Options => "promote, replace",
Device => "Release_Reusable_Components");
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
if Directory_Tools.Object.Is_Ok
(The_Object =>
Directory_Tools.Naming.Resolution
("!Machine.Initialization.Rational.Initialize_RCF")) then
Compilation.Destroy
(Unit => "!Machine.Initialization.Rational.Initialize_RCF",
Threshold => 2,
Limit => "<WORLDS>",
Response => "<ERRORS>");
end if;
Library.Move
(From => "!Machine.Initialize_RCF",
To => "!Machine.Initialization.Rational.Compilation_Integrator");
end if;
Io.Reset_Output;
Log.Filter_Errors
(Log_File =>
"!Machine.Release.Archive.RCF.Release1_0_3.Logs.Restore_Release_Log",
Destination =>
"!Machine.Release.Archive.RCF.Release1_0_3.Logs.Restore_Release_Log_Summary",
Auxiliaries => False,
Warnings => False,
Exceptions => True);
Common.Definition
("!Machine.Release.Archive.RCF.Release1_0_3.Logs.Restore_Release_Log_Summary");
)
INSTALL_PRODUCT => (
declare
F : Io.File_Type;
begin
Io.Set_Output
("!Machine.Release.Archive.RCF.Release1_0_3.Logs.Install_Product_Log");
Library.Context (To_Be => "!Targets.Implementation.Rcf_Release1_0_0");
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.Rcf_Release1_0_0".Install_Rcf_Proc;
Activity.Set_Load_View
(Load_View => "Code1_0_3",
Subsystem => "!Targets.Implementation.Rcf_User_Interface",
The_Activity => "!Machine.Release.Current.Activity",
Response => "<PROFILE>");
Cmvc.Destroy_View
(What_View => "!Targets.Implementation.Rcf_User_Interface.Code1_0_0",
Demote_Clients => False,
Destroy_Configuration_Also => True,
Comments => "",
Work_Order => "<DEFAULT>",
Response => "<PROFILE>");
Io.Reset_Output;
Log.Filter_Errors
(Log_File =>
"!Machine.Release.Archive.RCF.Release1_0_3.Logs.Install_Product_Log",
Destination =>
"!Machine.Release.Archive.RCF.Release1_0_3.Logs.Install_Product_Log_Summary",
Auxiliaries => False,
Exceptions => True);
Common.Definition
("!Machine.Release.Archive.RCF.Release1_0_3.Logs.Install_Product_Log_Summary");
end;
)
START_RCF => (
declare
Count : Natural := 0;
procedure Kill_Job (Job_Name : String) is
begin
for J in System_Utilities.Job_Id loop
begin
if String_Utilities.Equal
(System_Utilities.Job_Name (J), Job_Name) then
Log.Put_Line ("Killing job " & Job_Name,
Profile.Positive_Msg);
Job.Kill (J);
end if;
exception
when others =>
null;
end;
end loop;
end Kill_Job;
function Job_Running (Job_Name : String) return Boolean is
begin
for J in System_Utilities.Job_Id loop
begin
if String_Utilities.Equal
(System_Utilities.Job_Name (J), Job_Name) then
return True;
end if;
exception
when others =>
null;
end;
end loop;
return False;
end Job_Running;
begin
Kill_Job ("Rs6000_Library_Extension");
Kill_Job ("RCF_Rs6000_Compiler");
Kill_Rcf_Main;
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>");
else
Program.Run_Job (S =>
"""!Machine"".Initialize_Rcf;",
Options => "Output=!Machine.Error_Logs.RCF_Log",
Response => "<PROFILE>");
end if;
loop
delay 1.0;
if Job_Running ("Rcf_Compiler Rev1_0_3") then
Log.Put_Line ("RCF_Compiler has started", Profile.Positive_Msg);
exit;
else
Count := Count + 1;
if Count > 60 then
Log.Put_Line ("RCF_Compiler job has not started",
Profile.Error_Msg);
Common.Definition (Name => "!Machine.Error_Logs.RCF_Log");
exit;
end if;
end if;
end loop;
end;
)
SETUP_INITIALIZE => (
if Directory_Tools.Naming.Full_Name ("!Machine.Initialization.Rational") =
"" then
Common.Definition ("!Machine.Initialize'Body");
Editor.Image.Beginning_Of (Offset => 0);
Editor.Search.Next (Target => "io.reset_output", Wildcard => False);
Editor.Line.Beginning_Of (Offset => 0);
Ada.Install_Unit;
Common.Object.Insert;
Editor.Char.Insert_String
(Value => "Program.Run (""""""!Machine"""".Initialize_RCF;"");");
Common.Promote;
Common.Promote;
else
Log.Put_Line
("New machine initialization scheme appears to be present; no setup necessary.");
end if;
)
RESTORE_NOTES => (
Archive.Restore (Device => "Release_Notes");
)
TEST_RESTORE => (
Io.Set_Output
("!Machine.Release.Archive.RCF.Release1_0_3.Logs.Restore_Tests_Log");
Archive.Restore (Options => "Promote", Device => "Tests");
Io.Reset_Output;
Log.Filter_Errors
(Log_File =>
"!Machine.Release.Archive.RCF.Release1_0_3.Logs.Restore_Tests_Log",
Destination =>
"!Machine.Release.Archive.RCF.Release1_0_3.Logs.Restore_Tests_Log_Summary",
Auxiliaries => False,
Warnings => False,
Exceptions => True);
Common.Definition
("!Machine.Release.Archive.RCF.Release1_0_3.Logs.Restore_Tests_Log_Summary");
)
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;
)
SCHEDULE_SHUTDOWN => (
declare
use Directory_Tools;
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 RCF 1_0_3");
end if;
end;
)
DESTROY_OLD_RELEASES => (
Io.Set_Output
("!Machine.Release.Archive.RCF.Release1_0_3.Logs.Destroy_Old_Releases_Log");
Cmvc.Destroy_View
(What_View =>
"!Targets.Implementation.Rcf_Release1_0_0.[[_install_activity]$$^.@'C(Spec_View,Load_View),~[_install_activity]]",
Demote_Clients => False,
Destroy_Configuration_Also => True,
Comments => "",
Work_Order => "<DEFAULT>",
Response => "<PROFILE>");
Compilation.Destroy
(Unit => "!Targets.Implementation.[Rcf_Release@,~Rcf_Release1_0_0]",
Threshold => 999,
Limit => "<ALL_WORLDS>",
Response => "<PROFILE>");
Io.Reset_Output;
Log.Filter_Errors
(Log_File =>
"!Machine.Release.Archive.RCF.Release1_0_3.Logs.Destroy_Old_Releases_Log",
Destination =>
"!Machine.Release.Archive.RCF.Release1_0_3.Logs.Destroy_Old_Releases_Log_Summary",
Auxiliaries => False,
Warnings => False,
Exceptions => True);
Common.Definition
("!Machine.Release.Archive.RCF.Release1_0_3.Logs.Destroy_Old_Releases_Log_Summary");
)
CLEANUP => (
Cmvc.Destroy_View
(What_View => "!Targets.Implementation.Rcf_User_Interface.Code1_0_0",
Demote_Clients => False,
Destroy_Configuration_Also => True,
Response => "<ERRORS>");
Compilation.Destroy
(Unit =>
"[!Machine.Release.Archive.RCF.Release1_0_3" &
",!Targets.Implementation.RCF_Release1_0_0.[@,~Install_Activity]]",
Threshold => 999,
Limit => "<ALL_WORLDS>",
Response => "<ERRORS>");
)
VERIFY_RELEASE_OBJECTS => (
declare
function Get_Line (Prompt : String; Default : String := "") return String is
begin
Io.Put (Prompt);
if Default /= "" then
Io.Put (" [" & Default & "] : ");
end if;
declare
S : constant String := Io.Get_Line;
begin
if S = "" then
return Default;
else
return S;
end if;
end;
end Get_Line;
function Strip (N : String; S : String) return String is
Index : Natural := String_Utilities.Locate (N, S);
begin
if Index /= 0 then
return S (Index + N'Length .. S'Last);
else
return "";
end if;
end Strip;
begin
loop
begin
declare
use Directory_Tools;
Default_Product : constant String :=
Strip ("!Machine.Release.Archive.", Directory_Tools.Naming.Full_Name ("^"));
Default_Release : constant String :=
Strip ("Release", Directory_Tools.Naming.Simple_Name
(Directory_Tools.Naming.Full_Name ("$")));
Product : constant String := Get_Line ("Enter Product Name : ", Default_Product);
Release : constant String := Get_Line ("Enter Release (X_Y_Z) : ", Default_Release);
Display_Missing : Boolean :=
Boolean'Value (Get_Line ("Display Missing Objects (True|False)?", "FALSE"));
Total_Missing : Natural := 0;
Total_Objects : Natural := 0;
Product_Release : constant String :=
"!Machine.Release.Versions." & Product & "_Release" & Release;
Release_File_Exists : Boolean := Object.Is_Ok
(The_Object => Naming.Resolution (Product_Release));
Iter : Object.Iterator := Naming.Resolution ('_' & Product_Release);
Hdl : Object.Handle;
begin
if Release_File_Exists then
if Object.Is_Bad (Object.Err_Code (Iter)) then
Io.Set_Input (Product_Release);
while not Io.End_Of_File loop
Hdl := Naming.Resolution (Io.Get_Line);
if Object.Is_Bad (Hdl) then
Total_Missing := Total_Missing + 1;
if Display_Missing then
Log.Put_Line (Object.Message (Hdl), Profile.Error_Msg);
end if;
end if;
Total_Objects := Total_Objects + 1;
end loop;
if Total_Missing = Total_Objects then
Log.Put_Line ("None of the objects in the release are present",
Profile.Error_Msg);
else
Log.Put_Line ("There are" & Natural'Image (Total_Missing) &
" objects missing from a total of" &
Natural'Image (Total_Objects) & " objects in the release",
Profile.Error_Msg);
end if;
else
Log.Put_Line ("The release is present", Profile.Positive_Msg);
end if;
else
Log.Put_Line ("The release file does not exist, cannot verify release installation",
Profile.Warning_Msg);
end if;
end;
exit;
exception
when others =>
Log.Put_Line ("Error in input", Profile.Error_Msg);
end;
end loop;
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);