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

⟦a24cfb16a⟧ TextFile

    Length: 4770 (0x12a2)
    Types: TextFile
    Names: »B«

Derivation

└─⟦516dceb10⟧ Bits:30000751 8mm tape, Rational 1000, RCI_VADS
    └─ ⟦9a14c9417⟧ »DATA« 
        └─⟦this⟧ 

TextFile

separate (Library_Extensions)
procedure Remove_Import_Postprocess (View_To_Remove : Directory.Object;
                                     From_View : String;
                                     Status : in out Simple_Status.Condition) is

    Machine_Result : constant Library_Interface.String_Result :=
       Library_Interface.Remote_Machine (View => From_View);

    Directory_Result : constant Library_Interface.String_Result :=
       Library_Interface.Remote_Directory (View => From_View);

    Remote_Machine : constant String :=
       Machine_Result.Result (1 .. Machine_Result.Size);

    Remote_Directory : constant String :=
       Directory_Result.Result (1 .. Directory_Result.Size);

    View_Directory : constant String :=
       Su.Lower_Case (Directory_Result.Result (1 .. Directory_Result.Size));

    Old_Context : Directory.Naming.Context;

    View_To_Remove_Path : constant String :=
       Naming.Get_Full_Name (Entity => View_To_Remove);

    Remote_Directory_Result : constant Library_Interface.String_Result :=
       Library_Interface.Remote_Directory (View => View_To_Remove_Path);

    Remote_View_Directory : constant String :=
       Su.Lower_Case (Remote_Directory_Result.Result
                         (1 .. Remote_Directory_Result.Size));

    Remove_Import_Command : constant String :=
       "a.path -L " & View_Directory & " -r " & Remote_View_Directory;

    procedure Display_Information is
    begin
        if Remote_Machine = "" then
            Log.Put_Line (Message => "A null remote machine name was provided.",
                          Kind    => Profile.Warning_Msg);
        end if;
        if Remote_Directory = "" then
            Log.Put_Line (Message =>
                             "A null remote directory name was provided.",
                          Kind    => Profile.Warning_Msg);
        end if;
    end Display_Information;

begin
    Log.Put_Line  
       (Message => "Remove_Import_Postprocess ( View_To_Remove => " &
                      View_To_Remove_Path & ", From_View => " & From_View & ")",
        Kind    => Profile.Sharp_Msg);

    Simple_Status.Initialize (Status);

    -- Sanity checks
    if Remote_Machine = "" or else Remote_Directory = "" then
        Display_Information;
        Set_Status
           (Status   => Status,
            Message  => "Insufficient remote program library information.",
            Severity => Simple_Status.Problem);
        return;
    elsif View_Directory = Remote_View_Directory then
        return;
    end if;

    Set_Context  
       (Old_Context => Old_Context,  
        View        => From_View,  
        Status      => Status);

    if not Simple_Status.Error (Status) then
        declare

            Remote_Connection : Rci.Context;

        begin

            Acquire_Connection  
               (Remote_Connection => Remote_Connection,
                Remote_Machine    => Remote_Machine,
                Status            => Status);

            if not Simple_Status.Error (Status) then
                begin
                    Rci.Execute_Command  
                       (Command_Line          => Remove_Import_Command,
                        Remote_Connection     => Remote_Connection,
                        Status                => Status,
                        Error_Pattern         => "",
                        Parse_Error_Output    => False,
                        Parse_Standard_Output => False,
                        Show_Parsed_Output    => True,
                        Trace_Command         => Trace_Rci_Commands);

                    if Simple_Status.Error (Status) then
                        Log.Put_Line  
                           (Message => Simple_Status.Message (Status),
                            Kind    => Profile.Negative_Msg);

                        Simple_Status.Initialize (Status);

                    end if;

                exception
                    when others =>
                        Rci.Release  
                           (Remote_Connection => Remote_Connection,
                            Status            => Status,
                            Trace_Command     => Trace_Rci_Commands);
                        raise;
                end;

                Rci.Release  
                   (Remote_Connection => Remote_Connection,
                    Status            => Status,
                    Trace_Command     => Trace_Rci_Commands);

            end if;

        exception
            when others =>
                Reset_Context (Old_Context);
                raise;
        end;
        Reset_Context (Old_Context);
    end if;



exception
    when others =>
        Unhandled_Exception (Status, "Remove_Import_Postprocess");

end Remove_Import_Postprocess;