class RBT::PostinstallationStep
Constants
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
Public Class Methods
[](i = '')
click to toggle source
new( hash = {}, run_already = true ) { || ... }
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/postinstallation_step/postinstallation_step.rb, line 30 def initialize( hash = {}, run_already = true ) reset set_internal_hash( hash ) if block_given? yielded = yield case yielded when :do_not_run_yet run_already = false end end run if run_already end
Public Instance Methods
compile_which_program?()
click to toggle source
consider_symlinking_appdir_libraries_into_the_usr_lib_hierarchy()
click to toggle source
#¶ ↑
consider_symlinking_appdir_libraries_into_the_usr_lib_hierarchy
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/postinstallation_step/postinstallation_step.rb, line 339 def consider_symlinking_appdir_libraries_into_the_usr_lib_hierarchy unless do_not_symlink? if is_on_roebe? and uses_appdir_approach? and no_error_has_occurred? target = prefix?+'lib/' RBT.symlink_appdir_libraries_into_usr_lib_directory(target) end end end
create_symlinks( i = compile_which_program?, shall_we_invoke_symlink_program = shall_we_invoke_symlink_program?, use_this_as_program_version = program_version? )
click to toggle source
#¶ ↑
create_symlinks
¶ ↑
This is only needed when the prefix is not traditional (i.e. Gobolinux
prefix). It will be called via the method do_postinstall_actions().
#¶ ↑
# File lib/rbt/utility_scripts/postinstallation_step/postinstallation_step.rb, line 295 def create_symlinks( i = compile_which_program?, shall_we_invoke_symlink_program = shall_we_invoke_symlink_program?, use_this_as_program_version = program_version? ) if shall_we_invoke_symlink_program opne "Now running #{sfancy('RBT::SymlinkThisProgram')} to "\ "symlink the content of `#{sdir(i)}`." do_invoke_symlink_program(i, use_this_as_program_version) end end
dataset_to_use?()
click to toggle source
#¶ ↑
dataset_to_use?¶ ↑
Which dataset is to be used - this reader method returns that result.
#¶ ↑
# File lib/rbt/utility_scripts/postinstallation_step/postinstallation_step.rb, line 86 def dataset_to_use? @internal_hash[:dataset_to_use] end
Also aliased as: cookbook_dataset?, dataset?
delete_libtool_files?()
click to toggle source
do_not_symlink?()
click to toggle source
do_register_the_program?()
click to toggle source
do_run_fetch_all_m4_macros?()
click to toggle source
ensure_that_useful_internal_values_exist()
click to toggle source
#¶ ↑
ensure_that_useful_internal_values_exist
(default tag, def tag)¶ ↑
This method will ensure that some default internal-values exist.
#¶ ↑
# File lib/rbt/utility_scripts/postinstallation_step/postinstallation_step.rb, line 323 def ensure_that_useful_internal_values_exist unless @internal_hash.has_key? :use_tags @internal_hash[:use_tags] = false end unless @internal_hash.has_key? :do_register_the_program @internal_hash[:do_register_the_program] = true # This is the default. end unless @internal_hash.has_key? :do_run_fetch_all_m4_macros @internal_hash[:do_run_fetch_all_m4_macros] = true # This is the default. end @internal_hash[:symlink_program] = RBT::SymlinkThisProgram.new { :do_not_run_yet } end
full_configure_command?()
click to toggle source
#¶ ↑
full_configure_command?¶ ↑
The @full_configure_command contains the full configure command that we will use. The advantage in using this is that we can easily copy/paste this at a later time, should we need to do so.
#¶ ↑
# File lib/rbt/utility_scripts/postinstallation_step/postinstallation_step.rb, line 98 def full_configure_command? @internal_hash[:full_configure_command] end
Also aliased as: return_full_configure_command
internal_hash?()
click to toggle source
opne(i = '')
click to toggle source
postinstall?()
click to toggle source
prefix?()
click to toggle source
program_version?()
click to toggle source
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/postinstallation_step/postinstallation_step.rb, line 177 def run prefix = real_prefix? # ======================================================================= # # Consider removing the libtool .la files next # ======================================================================= # if use_appdir_prefix? @internal_hash[:symlink_program].set_prefix(prefix?) # ===================================================================== # # First we must create a new 'Current' symlink: # ===================================================================== # create_a_new_current_symlink_here(real_prefix?.to_s) consider_removing_libtool_la_files # <- This will check whether we will remove .la files or not. consider_symlinking_cmake_modules if symlink_into_usr_lib_dir? RBT::SymlinkIntoUsrLibDirectory.new( rds(real_prefix?.to_s+'/lib/') ) end run_post_install_class_unless_postinstall_is_empty end # ======================================================================= # # Eliminate stray symlinks from the /System/Tags/ directory, should # this directory exist. # ======================================================================= # cleanup_system_tag_directory # ======================================================================= # # Next, consider symlinking the .h files into the "/usr/include/" # hierarchy. This is, by default, NOT done; only some programs # may do so, and it will only happen for programs that are # installed via an AppDir way. # ======================================================================= # consider_symlinking_header_files_into_the_usr_include_hierarchy # ======================================================================= # # === Check as to whether we will instally only programs from the # bin/ subdirectory. If so, we will delete the other files. # ======================================================================= # check_whether_we_will_install_only_programs_from_the_bin_subdirectory # ======================================================================= # # === The AppDir approach comes next # # If you need to tie actions related to the "/Programs/" directory # based installations, aka AppDirs, then this is the way to go. # ======================================================================= # if prefix.include? programs_directory? # ===================================================================== # # === Create the Architecture file on GoboLinux systems next # ===================================================================== # create_architecture_file create_symlinks(prefix) symlink_m4_macros(prefix) consider_symlinking_lib64_into_lib consider_symlinking_appdir_libraries_into_the_usr_lib_hierarchy register_program(prefix) # Register it into the AppDir-database. # ===================================================================== # # We next store into the "Resources/" directory, but only for # programs compiled via an AppDir prefix. This has to happen # after register_program() was called because we don't want to # keep track of these files in the database. # ===================================================================== # store_full_configure_command_into_resources_directory else # ===================================================================== # # Else we still may check for a few things, if we are on roebe that # is. For example, we will run the postinstallation step for bash # symlinking bin/bash towards bin/sh. # ===================================================================== # if is_on_roebe? and prefix.start_with?(home_dir?) run_post_install_class_unless_postinstall_is_empty end end # ======================================================================= # # Next, we symlink into /System/Tags. # ======================================================================= # symlink_into_tags( compile_which_program?, real_prefix?.to_s, cookbook_dataset?, use_tags? ) # ======================================================================= # # Cleanup: We must get rid of special files. # ======================================================================= # remove_compiling_is_in_progress # ======================================================================= # # We may play a song, irrespective over as to whether we have used # an AppDir installation or not. # ======================================================================= # play_song if play_song? end
run_post_install_class_unless_postinstall_is_empty()
click to toggle source
#¶ ↑
run_post_install_class_unless_postinstall_is_empty
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/postinstallation_step/postinstallation_step.rb, line 277 def run_post_install_class_unless_postinstall_is_empty unless postinstall?.empty? # ===================================================================== # # Delegate to class RBT::PostInstall next, but only if the # postinstall setting in the cookbook .yml file is NOT empty. # ===================================================================== # RBT::PostInstall.new(dataset?) {{ use_this_compile_prefix: real_prefix?.to_s }} end end
set_internal_hash(i = '')
click to toggle source
shall_we_invoke_symlink_program?()
click to toggle source