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

⟦c5e5827d7⟧ Ada Source

    Length: 10240 (0x2800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Make_Path_Postprocess, seg_049d30, separate Library_Extensions

Derivation

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

E3 Source Code



separate (Library_Extensions)
procedure Make_Path_Postprocess (Host_Path_Name : String;
                                 For_Release : Boolean;
                                 Remote_Machine : String;
                                 Remote_Directory : String;
                                 Remote_Program_Library : String;
                                 Status : in out Simple_Status.Condition) is
    Remote_Connection : Remote_Command_Interface.Context;

    Set_Path_Command : constant String :=
       "PATH=$PATH:/usr/lpp/bin/ada; export PATH";
    --    "PATH=$PATH:/usr/bin/ada; export PATH";
    -- Modification du chemin d'acces en /usr/lpp/bin/ada

    Stripped_Machine : constant String :=
       String_Utilities.Strip (From => Remote_Machine, Filler => ' ');
    Stripped_Directory : constant String :=
       String_Utilities.Strip (From => Remote_Directory, Filler => ' ');
    Stripped_Program_Library : constant String :=
       String_Utilities.Strip (From => Remote_Program_Library, Filler => ' ');
    Dir_Exists : Boolean := False;
    Fil_Exists : Boolean := False;
    Local_Status : Simple_Status.Condition;
    Old_Context : Directory.Naming.Context;
    View_Obj : Directory.Object := Es.Get_View (Host_Path_Name);
    Trace_On : constant Boolean := Rsi.Trace_On (View_Obj);
    procedure Display_Information is
    begin
        if Stripped_Machine = "" then
            Log.Put_Line (Message => "A null remote machine name was provided.",
                          Kind => Profile.Warning_Msg);
        end if;

        if Stripped_Directory = "" then
            Log.Put_Line (Message =>
                             "A null remote directory name was provided.",
                          Kind => Profile.Warning_Msg);
        end if;


    end Display_Information;

begin

    if Rci_Switch_Implementation.Is_Host_Only (Get_View (Host_Path_Name)) then
        Log.Put_Line (Message => "Not executing Make_Path_Postprocess.  " &
                                    Host_Path_Name & " is a Host_Only View.  ",
                      Kind => Profile.Note_Msg);
        Simple_Status.Initialize (Status);
        return;
    else
        Log.Put_Line (Message => "Executing Make_Path_Postprocess",
                      Kind => Profile.Note_Msg);

    end if;


    if Stripped_Machine = "" or else Stripped_Directory = "" then
        Display_Information;

        Set_Status
           (Status => Status,
            Message => "Insufficient remote machine or directory  information.",
            Severity => Simple_Status.Problem);
        return;
    end if;


    Remote_Command_Interface.Acquire (Remote_Connection => Remote_Connection,
                                      Status => Status,
                                      Target_Key => "Rs6000_Aix_Ibm",
                                      Trace_Command => Trace_On,
                                      Remote_Machine => Remote_Machine);

    if not Simple_Status.Error (Status) then
        Remote_Command_Interface.Execute_Command
           (Command_Line => Set_Path_Command,
            Remote_Connection => Remote_Connection,
            Status => Status);
    end if;

    Set_Context (Old_Context => Old_Context,
                 View => Host_Path_Name,
                 Status => Local_Status);

    if Simple_Status.Error (Status) then
        Log.Put_Line (Message => Simple_Status.Message (Status),
                      Kind => Profile.Negative_Msg);
        Set_Status (Status => Status,
                    Message => "Make_Path_Postprocess Failed");
        return;
    end if;

    Directory_Exists (Remote_Directory => Stripped_Directory,
                      Remote_Machine => Remote_Machine,
                      Status => Status,
                      Trace_On => Trace_On,
                      Exists => Dir_Exists);

    if Dir_Exists then
        Log.Put_Line (Message =>
                         "Directory " & Stripped_Directory & " already exists.",
                      Kind => Profile.Warning_Msg);
        Log.Put_Line (Message => "Using an existing directory.",
                      Kind => Profile.Note_Msg);

    else
        Log.Put_Line (Message => "Creating a new remote directory," &
                                    Stripped_Directory,
                      Kind => Profile.Note_Msg);


        Create_Remote_Directory (Remote_Machine => Stripped_Machine,
                                 Remote_Directory => Stripped_Directory,
                                 Trace_On => Trace_On,
                                 Status => Status);

        if Simple_Status.Error (Status) then
            Reset_Context (Old_Context);
            return;
        end if;
    end if;


    File_Exists (Remote_Filename =>
                    Stripped_Directory & "/" & Default_Target_List_File,
                 Remote_Machine => Remote_Machine,
                 Status => Status,  
                 Trace_On => Trace_On,
                 Exists => Fil_Exists);

    declare
        Library_Name : constant String :=
           Program_Library_Name (Stripped_Program_Library);
    begin
        Directory_Exists (Remote_Directory =>
                             Stripped_Directory & "/" & Library_Name,
                          Remote_Machine => Remote_Machine,
                          Status => Status,
                          Trace_On => Trace_On,
                          Exists => Dir_Exists);

        if Dir_Exists or else Fil_Exists then
            Log.Put_Line (Message => "A program library already exists in " &
                                        Stripped_Directory & ".",
                          Kind => Profile.Warning_Msg);  
            Log.Put_Line (Message =>
                             "The existing program library will be used.",
                          Kind => Profile.Warning_Msg);  
            Reset_Context (Old_Context);
            return;
        else
            Log.Put_Line (Message =>
                             "Creating a new remote program library, " &
                                Stripped_Directory & "/" & Library_Name & ".",
                          Kind => Profile.Note_Msg);
            Create_Program_Library (Host_View => Host_Path_Name,
                                    Remote_Machine => Stripped_Machine,
                                    Remote_Program_Library => Library_Name,
                                    Remote_Directory => Stripped_Directory,
                                    Status => Status);
            if Simple_Status.Error (Status) then
                Set_Status
                   (Status => Status,
                    Message => "Unable to build remote program library " &
                                  Library_Name & ".");
            end if;
        end if;
    end;
    Reset_Context (Old_Context);
exception
    when others =>
        Unhandled_Exception (Status, "Make_Path_Postprocess");
        Reset_Context (Old_Context);
end Make_Path_Postprocess;



E3 Meta Data

    nblk1=9
    nid=0
    hdr6=12
        [0x00] rec0=15 rec1=00 rec2=01 rec3=03c
        [0x01] rec0=02 rec1=00 rec2=09 rec3=044
        [0x02] rec0=1a rec1=00 rec2=02 rec3=022
        [0x03] rec0=1c rec1=00 rec2=03 rec3=04a
        [0x04] rec0=1b rec1=00 rec2=04 rec3=00a
        [0x05] rec0=1a rec1=00 rec2=05 rec3=044
        [0x06] rec0=17 rec1=00 rec2=06 rec3=008
        [0x07] rec0=15 rec1=00 rec2=07 rec3=03a
        [0x08] rec0=06 rec1=00 rec2=08 rec3=000
    tail 0x21547475686667d8626e8 0x42a00088462060003