DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ S T

⟦cab6448f2⟧ TextFile

    Length: 17339 (0x43bb)
    Types: TextFile
    Names: »STEPS«

Derivation

└─⟦bfaa708f6⟧ Bits:30000531 8mm tape, Rational 1000, INSIGHT 1_3_0
    └─ ⟦c51948655⟧ »DATA« 
        └─⟦this⟧ 

TextFile

INSTALL_INSIGHT => (Do_Step("AUTHORIZATION_CHECK,
                          RELEASE_RESTORE,
                          INSTALL_PRODUCT,
                          RESTORE_NOTES,
                          RECORD_INSTALLATION",
                  "!Machine.Release.Archive.Insight.Release1_3_0.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,Insight"); 
    Token_Iter : Pp.Iterator := Pp.Parse ("Insight");
    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.Insight.Release1_3_0.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;            
)


RELEASE_RESTORE => (
    Io.Set_Output
       ("!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Release_Log");
    Archive.Restore (Options => "promote replace",
                     Device => "!Machine.Release.Archive.Insight.Release1_3_0.Release");
    Io.Reset_Output;
    Log.Filter_Errors
       (Log_File =>
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Release_Log",
        Destination =>
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Release_Log_Summary",
        Auxiliaries => False,
        Warnings => False,
        Exceptions => True);
    Common.Definition
       ("!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Release_Log_Summary");
)

INSTALL_PRODUCT => (
    Library.Context (To_Be => "!Machine.Release.Insight.Release1_3_0");
    System_Utilities.Set_Page_Limit (16_000);
    Io.Set_Output
       ("!Machine.Release.Archive.Insight.Release1_3_0.Logs.Install_Product_Log");
    "!Machine.Release.Archive.Insight.Release1_3_0.Command_Data".Insight_Buyout;
    "!Machine.Release.Insight.Release1_3_0".R1000_Install;
    Io.Reset_Output;
    Log.Filter_Errors
       (Log_File =>
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Install_Product_Log",
        Destination =>
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Install_Product_Log_Summary",
        Auxiliaries => False,
        Warnings => False,
        Exceptions => True);
    Common.Definition
       ("!Machine.Release.Archive.Insight.Release1_3_0.Logs.Install_Product_Log_Summary");
)

CHECK_ENVIRONMENT => (
declare
    Env_Release : String (1 .. 50);
    Length : Natural;
    File_Handle : Text_Io.File_Type;
begin
    Text_Io.Open (File => File_Handle,
                  Mode => Text_Io.In_File,
                  Name => "!Machine.Release.Environment.Current",
                  Form => "");  
    Text_Io.Get_Line (File => File_Handle, Item => Env_Release, Last => Length);
    Text_Io.Close (File => File_Handle);
    if (System_Utilities.System_Boot_Configuration /=
        Env_Release (Env_Release'First .. Length)) then
        Text_Io.Create (File => File_Handle,
                        Mode => Text_Io.Out_File,
                        Name => "!Machine.Release.Environment.Current",
                        Form => "");  
        Text_Io.Put_Line (File_Handle,
                          System_Utilities.System_Boot_Configuration);
        Text_Io.Close (File_Handle);
    end if;
end;
)

ACTIVITY_UPDATE => (
    Log.Put_Line ("Updating System Activity for Insight_Commands");
    Activity.Create (The_Activity => "!machine.temporary.activity",
                     Source => Activity.Nil,
                     Mode => Activity.Exact_Copy,
                     Response => "<ERRORS>");

    Activity.Add (Subsystem => "!Tools.Design.Insight.Insight_Commands",
                  Load_Value => "Code1_3_0",
                  Spec_Value => "Rev1_2_Spec",
                  The_Activity => "!Machine.Temporary.Activity",
                  Mode => Activity.Exact_Copy,
                  Response => "<ERRORS>");
    
    Activity.Merge (Source => "!Machine.Temporary.Activity",
                    Subsystem => "?",
                    Spec_View => "?",
                    Load_View => "?",
                    Mode => Activity.Exact_Copy,
                    Target => "!Machine.Release.Current.Activity",
                    Response => "<ERRORS>");
    Lib.Delete (Existing => "!Machine.Temporary.Activity",
                Limit => "<DIRECTORIES>",
                Response => "<ERRORS>");
)

RESTORE_NOTES => (
    Io.Set_Output
       ("!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Notes_Log");
    Archive.Restore (Options => "Replace",
                     Device => "!Machine.Release.Archive.Insight.Release1_3_0.Release_Notes");
    Io.Reset_Output;
    Log.Filter_Errors
       (Log_File =>
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Notes_Log",
        Destination =>
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Notes_Log_Summary",
        Auxiliaries => False,
        Warnings => False,
        Exceptions => True);
    Common.Definition
       ("!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Notes_Log_Summary");
)

RESTORE_TESTS => (
    Io.Set_Output
       ("!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Tests_Log");
    Archive.Restore (Options => "Promote, Replace",
                     Device => "!Machine.Release.Archive.Insight.Release1_3_0.Tests");
    Io.Reset_Output;
    Log.Filter_Errors
       (Log_File =>
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Tests_Log",
        Destination =>
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Tests_Log_Summary",
        Auxiliaries => False,
        Warnings => False,
        Exceptions => True);
    Common.Definition
       ("!Machine.Release.Archive.Insight.Release1_3_0.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
    Log.Put_Line ("Allowing unlimited logins", Profile.Positive_Msg);
    Operator.Limit_Login;
    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;
)

SHUTDOWN_SYSTEM => (
declare
    use Editor, Text, Common;
    Current_Terminal_Type : constant String := System_Utilities.Terminal_Type;
begin
    -- check to see if we are using old or new style initialization
    if not Directory_Tools.Object.Is_Ok
          (The_Object => Directory_Tools.Naming.Resolution
                            (("!Machine.Initialization.Rational"))) then
        if Directory_Tools.Ada_Object."="
              (Directory_Tools.Ada_Object.State ("!machine.initialize'body"),
               Directory_Tools.Ada_Object.Coded) then

            -- !Machine.initialize'body is coded, let's check keymaps
            if Directory_Tools.Ada_Object."="
                  (Directory_Tools.Ada_Object.State
                      ("!machine.editor_data.rational_commands'body"),
                   Directory_Tools.Ada_Object.Coded) or
               Directory_Tools.Ada_Object."="
                  (Directory_Tools.Ada_Object.State
                      ("!machine.editor_data.rational_commands'body"),
                   Directory_Tools.Ada_Object.Installed) then

                -- rational_commands'body is installed or coded

                if Directory_Tools.Ada_Object."="
                      (Directory_Tools.Ada_Object.State
                          ("!machine.editor_data.facit_commands'body"),
                       Directory_Tools.Ada_Object.Coded) or
                   Directory_Tools.Ada_Object."="
                      (Directory_Tools.Ada_Object.State
                          ("!machine.editor_data.facit_commands'body"),
                       Directory_Tools.Ada_Object.Installed) then

                    -- o.k. facit_commands'body is fine, check the current terminal type.
                    if Directory_Tools.Ada_Object."="
                          (Directory_Tools.Ada_Object.State
                              ("!machine.editor_data." &
                               Current_Terminal_Type & "_commands'body"),
                           Directory_Tools.Ada_Object.Coded) or
                       Directory_Tools.Ada_Object."="
                          (Directory_Tools.Ada_Object.State
                              ("!machine.editor_data." &
                               Current_Terminal_Type & "_commands'body"),
                           Directory_Tools.Ada_Object.Installed) then

                        -- o.k. current terminal type is fine, let's shutdown in 5 min.

                        Op.Shutdown_Warning (300.0);
                        Op.Shutdown (Reason => "Release",
                                     Explanation =>
                                        "Install RDF Release1_3_0");
                    else
                        -- Current terminal type is NOT installed or coded
                        Log.Put_Line (Message =>
                                         "!Machine.Editor_Data." &
                                            Current_Terminal_Type &
                                            "_Commands'Body " &
                                            "is not INSTALLED or CODED.",
                                      Kind => Profile.Error_Msg);
                    end if;
                else
                    -- Facit commands is NOT installed or coded
                    Log.Put_Line
                       (Message =>
                           "!Machine.Editor_Data.Facit_Commands'Body " &
                              "is not INSTALLED or CODED.",
                        Kind => Profile.Error_Msg);
                end if;
            else
                -- rational_commands'body is NOT installed or coded
                Log.Put_Line
                   (Message =>
                       "!Machine.Editor_Data.Rational_Commands'Body " &
                          "is not INSTALLED or CODED.",
                    Kind => Profile.Error_Msg);
            end if;
        else
            -- !Machine.initialize'body is not coded, tell 'em.
            Log.Put_Line (Message =>
                             "!Machine.Initialize is NOT coded.  Promote " &
                                "to coded and run this step again",
                          Kind => Profile.Error_Msg);
        end if;
    else 
        Op.Shutdown_Warning (300.0);
        Op.Shutdown (Reason => "Release", 
                     Explanation => "Install Insight Release1_3_0");
    end if;
end;
)          


CLEAN_UP => (
    Library.Destroy ("!Machine.Release.Insight.@", Positive'Last);
    Library.Destroy ("!Machine.Release.Archive.Insight.@", Positive'Last);
    Library.Expunge ("!Machine.Release.[Insight,Archive.Insight]");
)

CLEANUP => (
    Library.Destroy ("!Machine.Release.Insight.@", Positive'Last);
    Library.Destroy ("!Machine.Release.Archive.Insight.@", Positive'Last);
    Library.Expunge ("!Machine.Release.[Insight,Archive.Insight]");
)

AUTHORIZE_PRODUCT => (
    "!Implementation".Product_Authorization.Register
            (Product_Name => ">>Product Name<<",
             Authorization_Code => ">> Code <<");
)


USERS_CHECK => (
    declare
        Iter : System_Utilities.Session_Iterator;
        Total : Natural := 0;
        use System_Utilities;
    begin
        Operator.Limit_Login (Sessions => 1);
        Log.Put_Line ("Limited logins to 1 user", Profile.Positive_Msg);
        Init (Iter);
        while not Done (Iter) loop
            if Value (Iter) /= Get_Session then
                Log.Put_Line
                   ("User " & User_Name (Value (Iter)) &
                    " is still logged in.  Have s/he log off before proceeding",
                    Profile.Warning_Msg);
            end if;
            Next (Iter);
        end loop;
    end;
)

AUTHORIZE_TOKEN => (
    Common.Create_Command;
    Editor.Char.Insert_String ("Accept_Tokens;");
    Common.complete;
    Editor.Search.Previous ("begin");
    Editor.Line.End_Of;
    Editor.Line.Insert;
    Editor.Char.Insert_String ("Operator.Enable_Privileges;");
    Editor.Line.Insert;
    Editor.Char.Insert_String ("if Operator.Privileged_Mode then ");
    Editor.Search.Next ("end");
    Editor.Line.beginning_Of;
    Editor.Char.Insert_String ("else");
    Editor.Line.Insert;
    Editor.Char.Insert_String ("     Log.Put_Line (Message => ""Failed to enable Privileged mode"", Kind => Profile.Error_Msg, Response => ""<PROFILE>"");");
    Editor.Line.Insert;
    Editor.Char.Insert_string ("end if;");
    Editor.Line.Insert;
    Editor.Image.Beginning_Of;
    Editor.Cursor.Next;              
    Editor.Char.Insert_string ("Insight");
    Editor.Cursor.Next;
)



INSTALL_TUTORIAL =>(
    Io.Set_Output
        ("!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Tutorial_Log");
    Archive.Restore (Options => "changed_objects,promote",
                     Device => "!Machine.Release.Archive.Insight.Release1_3_0.Tutorial");          
    Io.Reset_Output;
    Log.Filter_Errors
        (Log_File =>
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Tutorial_Log",
         Destination => 
           "!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Tutorial_Log_Summary",
          Auxiliaries => False,
          Warnings => False,
          Exceptions => True);
    Common.Definition
        ("!Machine.Release.Archive.Insight.Release1_3_0.Logs.Restore_Tutorial_Log_Summary");
)


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);
)