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: ┃ B T

⟦2dc02c7fa⟧ TextFile

    Length: 6883 (0x1ae3)
    Types: TextFile
    Names: »B«

Derivation

└─⟦25882cbde⟧ Bits:30000536 8mm tape, Rational 1000, RCI_RS6000_AIX_IBM 2_0_2
    └─ ⟦b8efda8ac⟧ »DATA« 
        └─⟦7061b4ee8⟧ 
            └─⟦this⟧ 

TextFile

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/bin/ada; export PATH";
    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;