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 - metrics - download
Index: B T

⟦b6ae3e7c3⟧ TextFile

    Length: 6530 (0x1982)
    Types: TextFile
    Names: »B«

Derivation

└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
    └─⟦5cb1d1d7f⟧ »DATA« 
        └─⟦3b1ee7bd8⟧ 
            └─⟦this⟧ 

TextFile

with Log;
with Errors;
with Library;
with Profile;
with Subtypes;
use Subtypes;
with Arguments;
with Pathnames;
with Assertions;
with Debug_Tools;
with Set_Defaults;
with System_Utilities;
procedure Build_Catalog (Named : in Simple_Name := ">> CATALOG NAME<<";
                         Initial_Version : in Simple_Name :=
                            ">> VERSION IDENTIFIER <<";
                         Make_Default : in Boolean := True;
                         Response : in String := "<PROFILE>") is
    --
    Old_Response_Profile : Profile.Response_Profile := Profile.Get;
    New_Response_Profile : Profile.Response_Profile := Profile.Value (Response);
    --
    The_User : constant User_Name := System_Utilities.User_Name;
    --
    package Error is
       new Errors  
              (Old_Response_Profile, New_Response_Profile, "Build_Catalog");
    --
begin
    Profile.Set (New_Response_Profile);
    Log.Put_Line ("[Build_Catalog (Named => """ & Named &
                  """, Initial_Version => """ & Initial_Version &
                  """, Make_Default => " & Boolean'Image (Make_Default) &
                  ", Response => """ & Response & """)]",
                  Profile.Auxiliary_Msg);
    declare
        The_Catalog : constant Full_Name :=  
           Arguments.Catalog_From (Named);
        The_Sections_Context : constant Full_Name :=
           Pathnames.Sections_Context_For (The_Catalog);
        The_Versions_Context : constant Full_Name :=
           Pathnames.Versions_Context_For (The_Catalog);
        The_Version : constant Full_Name :=  
           Arguments.Version_From (Named, Initial_Version);
        The_Data_File : constant Full_Name :=
           Pathnames.Data_File_For (The_Version);
        The_Document_Setup_File : constant Full_Name :=
           Pathnames.Document_Setup_File_For (The_Version);
        The_Printer_Options_File : constant Full_Name :=
           Pathnames.Printer_Options_File_For (The_Version);
        The_Release_Notice : constant Full_Name :=
           Pathnames.Release_Notice_For (The_Version);
        The_Browser_View_Name_File : constant Full_Name :=
           Pathnames.Browser_View_Name_File_For (The_Version);
    begin
        Assertions.Assert_Catalog_Does_Not_Exist (The_Catalog);
        Library.Create (Name => The_Catalog,
                        Kind => Library.World,
                        Model => "",
                        Response => Response);
        Assertions.Assert_Catalog_Exists (The_Catalog);
        Library.Create (Name => The_Sections_Context,
                        Kind => Library.World,
                        Model => "",
                        Response => Response);
        Assertions.Assert_Has_Sections_Context (The_Catalog);
        Library.Create (Name => The_Versions_Context,
                        Kind => Library.World,
                        Model => "",
                        Response => Response);
        Assertions.Assert_Has_Versions_Context (The_Catalog);
        Library.Create (Name => The_Version,
                        Kind => Library.World,
                        Model => "",
                        Response => Response);
        Assertions.Assert_Version_Exists (The_Version);
        Library.Copy (From => Pathnames.Document_Setup_File_Template,
                      To => The_Document_Setup_File,
                      Response => Response);
        Assertions.Assert_Has_Document_Setup_File (The_Version);
        Library.Copy (From => Pathnames.Printer_Options_File_Template,
                      To => The_Printer_Options_File,
                      Response => Response);
        Assertions.Assert_Has_Printer_Options_File (The_Version);
        Library.Copy (From => Pathnames.Data_File_Template,
                      To => The_Data_File,
                      Response => Response);
        Assertions.Assert_Has_Data_File (The_Version);
        Library.Copy (From => Pathnames.Release_Notice_Template,
                      To => The_Release_Notice,
                      Response => Response);
        Assertions.Assert_Has_Release_Notice (The_Version);
        Library.Copy (From => Pathnames.Browser_View_Name_File_Template,
                      To => The_Browser_View_Name_File,
                      Response => Response);
        Assertions.Assert_Has_Browser_View_Name_File (The_Version);
        if (Make_Default) then  
            Log.Put_Line ("Setting defaults for user");
            begin
                Set_Defaults (Catalog => Named,
                              Version => Initial_Version,
                              User => The_User,
                              Response => "PROPAGATE," & Response);
                --
            exception
                when others =>
                    Error.Report ("Could not set defaults, quitting",
                                  Nested => True);
            end;
        end if;
    end;
    Log.Put_Line ("[end of Build_Catalog operation--no errors(s) detected]");
    Profile.Set (Old_Response_Profile);
    --
exception
    when Arguments.Invalid_Catalog =>
        Error.Report ("Specified catalog is invalid");
    when Arguments.Invalid_Version =>
        Error.Report ("Specified version is invalid");
    when Assertions.Catalog_Already_Exists =>
        Error.Report ("Catalog already exists");
    when Assertions.No_Such_Catalog =>
        Error.Report ("Unable to create catalog");
    when Assertions.Has_No_Sections_Context =>
        Error.Report ("Unable to create sections context");
    when Assertions.Has_No_Versions_Context =>
        Error.Report ("Unable to create versions context");
    when Assertions.No_Such_Version =>
        Error.Report ("Unable to create version");
    when Assertions.Has_No_Document_Setup_File =>
        Error.Report ("Unable to create document setup file");
    when Assertions.Has_No_Printer_Options_File =>
        Error.Report ("Unable to create printer options file");
    when Assertions.Has_No_Data_File =>
        Error.Report ("Unable to create data file");
    when Assertions.Has_No_Release_Notice =>
        Error.Report ("Unable to create release notice");
    when Assertions.Has_No_Browser_View_Name_File =>
        Error.Report ("Unable to create browser view name file");
    when Error.Propagate =>
        raise;
    when Error.Quit =>
        null;
    when others =>
        Error.Report ("EXCEPTION: " & Debug_Tools.Get_Exception_Name,
                      This_Type => Profile.Exception_Msg);
        --
end Build_Catalog;