|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 6889 (0x1ae9)
Types: TextFile
Names: »B«
└─⟦516dceb10⟧ Bits:30000751 8mm tape, Rational 1000, RCI_VADS
└─⟦9a14c9417⟧ »DATA«
└─⟦this⟧
separate (Library_Extensions)
procedure Destroy_View_Preprocess (Host_Path_Name : String;
Status : in out Simple_Status.Condition) is
Machine_Result : constant Library_Interface.String_Result :=
Library_Interface.Remote_Machine (View => Host_Path_Name);
Remote_Machine : constant String :=
Machine_Result.Result (1 .. Machine_Result.Size);
Directory_Result : constant Library_Interface.String_Result :=
Library_Interface.Remote_Directory (View => Host_Path_Name);
View_Directory : constant String :=
Su.Lower_Case (Directory_Result.Result (1 .. Directory_Result.Size));
Remote_Connection : Remote_Command_Interface.Context;
Delete_Lib_Command : constant String := "a.rmlib -f " & View_Directory;
Unfreeze_Command : constant String := "chmod 777 " & View_Directory;
Remove_Recursive_Command : constant String := "rm -r " & View_Directory;
Unfreeze_Recursive_Command : constant String :=
"chmod -R 777 " & View_Directory;
begin
Log.Put_Line
(Message => "Destroy_View_Preprocess ( host_path_name =>" &
Naming.Get_Simple_Name (Host_Path_Name) & ")",
Kind => Profile.Sharp_Msg);
Simple_Status.Initialize (Status);
-- Acquire a remote connection to the target
Acquire_Connection
(Remote_Connection => Remote_Connection,
Remote_Machine => Remote_Machine,
Status => Status);
if not Simple_Status.Error (Status) then
begin
-- Delete the Ada libraries contained in the view directory.
-- Then remove the view directory and everything
-- contained therein.
-- Open all protections under the View_Directory.
Log.Put_Line
(Message => "Executing remote command: " &
Unfreeze_Recursive_Command,
Kind => Profile.Note_Msg);
Rci.Execute_Command
(Command_Line => Unfreeze_Recursive_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);
Set_Status
(Status => Status,
Message => "Remote Execution Unsuccessful.");
end if;
-- Open the protections for the View_Directory itself.
Log.Put_Line
(Message => "Executing remote command: " & Unfreeze_Command,
Kind => Profile.Note_Msg);
Rci.Execute_Command
(Command_Line => Unfreeze_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);
Set_Status
(Status => Status,
Message => "Remote Execution Unsuccessful.");
end if;
Log.Put_Line
(Message => "Executing remote command: " & Delete_Lib_Command,
Kind => Profile.Position_Msg);
Rci.Execute_Command
(Command_Line => Delete_Lib_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);
Set_Status
(Status => Status,
Message =>
"Unable to remove the contents of the Ada library in " &
View_Directory);
else
Log.Put_Line
(Message => "Executing remote command: " &
Remove_Recursive_Command,
Kind => Profile.Position_Msg);
Rci.Execute_Command
(Command_Line => Remove_Recursive_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);
Set_Status
(Status => Status,
Message => "Unable to remove the contents of " &
View_Directory);
end if;
end if;
end;
Rci.Release
(Remote_Connection => Remote_Connection,
Status => Status,
Trace_Command => Trace_Rci_Commands);
else
Log.Put_Line
(Message => Simple_Status.Message (Status),
Kind => Profile.Negative_Msg);
Set_Status
(Status => Status,
Message => "Unable to acquire connection to " & Remote_Machine);
end if;
exception
when others =>
Unhandled_Exception (Status, "Destroy_View_Preprocess");
begin
Rci.Release
(Remote_Connection => Remote_Connection,
Status => Status,
Trace_Command => Trace_Rci_Commands);
exception
when others =>
null;
end;
end Destroy_View_Preprocess;