DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦8b29f2f68⟧ TextFile

    Length: 7208 (0x1c28)
    Types: TextFile
    Notes: R1k Text-file segment

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦25bbb01b4⟧ 
            └─⟦this⟧ 

TextFile

INSTALL_PATCH => (Do_Step("USERS_CHECK,
                           CONFIGURATION_CHECK,
                           RELEASE_RESTORE,
                           INSTALL_PRODUCT,
                           SHUTDOWN",
                          
"!Machine.Release.Archive.Environment.D_12_7_4.Command_Data.Steps");)

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, and must log off before proceeding",
                    Profile.Warning_Msg);
            end if;
            Next (Iter);
        end loop;
    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;

  -- Check Environment Rev              
        
       if Version (Env_Config) < 120703 then
          Log.Put_Line ("This release requires Environment release D_12_7_3. " &  
          "Please read section on PREREQUISITES TO INSTALLATION. " &
          "This machine is running Environment release: " &
           Env_Config,
           Profile.Warning_Msg);
        else
             Log.Put_Line ("Environment version PREREQUISITE OK.");
        end if;                                                  
        
    end;
)


RELEASE_RESTORE => (
    Io.Set_Output
       ("!Machine.Release.Archive.Environment.D_12_7_4.Logs.Restore_Release_Log");
    Library.Unfreeze (Existing => "!Copyright_Rational", Response => "<ERRORS>");
    Archive.Restore (Options => "promote new_objects replace",
                     Device => "Release");
    -- Log.Put_Line ("Restoring help files");
    -- Library.Delete (Existing => "!Machine.Editor_Data.Session_Switch_Help");
    -- Library.Delete (Existing => "!Machine.Editor_Data.Help_Data.@");
    -- Archive.Restore (Options => "Promote, Replace",
    --               Device => "Help_Files");
    Io.Reset_Output;
    Log.Filter_Errors
       (Log_File =>
           "!Machine.Release.Archive.Environment.D_12_7_4.Logs.Restore_Release_Log",
        Destination =>
           "!Machine.Release.Archive.Environment.D_12_7_4.Logs.Restore_Release_Log_Summary",
        Auxiliaries => False,
        Warnings => False,
        Exceptions => True);
    Common.Definition
       ("!Machine.Release.Archive.Environment.D_12_7_4.Logs.Restore_Release_Log_Summary");
)


INSTALL_PRODUCT => (
    Library.Context (To_Be => "!Machine.Release.Environment.D_12_7_4");
    System_Utilities.Set_Page_Limit (16_000);    
     Io.Set_Output
       ("!Machine.Release.Archive.Environment.D_12_7_4.Logs.Install_Product_Log");
    "!Machine.Release.Environment.D_12_7_4".Install_Product;
    Log.Put_Line ("Install_Product program completed");
    Io.Reset_Output;
    Log.Filter_Errors
       (Log_File =>
           "!Machine.Release.Archive.Environment.D_12_7_4.Logs.Install_Product_Log",
        Destination =>
           "!Machine.Release.Archive.Environment.D_12_7_4.Logs.Install_Product_Log_Summary",
        Auxiliaries => False,
        Warnings => False,
        Exceptions => True);
    
    Common.Definition
       ("!Machine.Release.Archive.Environment.D_12_7_4.Logs.Install_Product_Log_summary");
)

SHUTDOWN => (
    Op.Shutdown_Warning (300.0);
    Op.Shutdown (Reason => "Release",
                 Explanation => "Install_Environment_Patch_Release_D_12_7_4");

    -- Library.Context (To_Be => "!Machine.Release.Environment.D_12_7_4.Install_Patch");
    -- System_Utilities.Set_Page_Limit (16_000);
    -- "!Machine.Release.Environment.D_12_7_4.Install_Product".Reboot_For_New_Release;

)


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

DESTROY_ARCHIVE => (
    Library.Delete ("!Machine.Release.Archive.Environment.D_12_7_4");
)

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