Class: RBT::Action::SoftwareManager

Inherits:
RBT::Action show all
Includes:
Compile::Constants, CompileBaseModule
Defined in:
lib/rbt/actions/individual_actions/software_manager/run.rb,
lib/rbt/actions/individual_actions/software_manager/menu.rb,
lib/rbt/actions/individual_actions/software_manager/misc.rb,
lib/rbt/actions/individual_actions/software_manager/reset.rb,
lib/rbt/actions/individual_actions/software_manager/actions.rb,
lib/rbt/actions/individual_actions/software_manager/setters.rb,
lib/rbt/actions/individual_actions/software_manager/deprecated.rb,
lib/rbt/actions/individual_actions/software_manager/initialize.rb,
lib/rbt/actions/individual_actions/software_manager/software_manager.rb,
lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb,
lib/rbt/actions/individual_actions/software_manager/extract_related_code.rb,
lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb

Overview

RBT::Action::SoftwareManager

Defined Under Namespace

Modules: Deprecated

Constant Summary

Constants included from Compile::Constants

Compile::Constants::ALSO_AUTOMATICALLY_INSTALL_THE_UPDATED_GEM, Compile::Constants::ARRAY_CHECK_FOR_BINARY_DUPLICATES_OPTIONS, Compile::Constants::ARRAY_FEEDBACK_CONFIGURE_OPTIONS, Compile::Constants::ARRAY_FEEDBACK_MAKE_OPTIONS, Compile::Constants::ARRAY_HELP_ALL_AVAILABLE_PROGRAMS, Compile::Constants::ARRAY_HELP_AVAILABLE_PROGRAM_VERSIONS, Compile::Constants::ARRAY_HELP_CHECK_ALL_TAGS_OPTIONS, Compile::Constants::ARRAY_HELP_CONFIG_OPTIONS, Compile::Constants::ARRAY_HELP_CREATE_SHELLSCRIPT_OPTIONS, Compile::Constants::ARRAY_HELP_DISABLE_AUTOGEN, Compile::Constants::ARRAY_HELP_DONT_KEEP_EXTRACTED_OPTIONS, Compile::Constants::ARRAY_HELP_DOWNLOAD_THE_SOURCE_OPTIONS, Compile::Constants::ARRAY_HELP_DO_COMPILE_IN_A_NON_TRADITIONAL_WAY_OPTIONS, Compile::Constants::ARRAY_HELP_DO_COMPILE_IN_A_TRADITIONAL_WAY_OPTIONS, Compile::Constants::ARRAY_HELP_DO_NOT_COMPILE_OPTIONS, Compile::Constants::ARRAY_HELP_DO_NOT_SYMLINK_OPTIONS, Compile::Constants::ARRAY_HELP_DO_USE_STOW_OPTIONS, Compile::Constants::ARRAY_HELP_ENABLE_STATIC, Compile::Constants::ARRAY_HELP_FEEDBACK_ALL_BINARIES_OPTIONS, Compile::Constants::ARRAY_HELP_FEEDBACK_EVERY_CASE_OPTION_OPTIONS, Compile::Constants::ARRAY_HELP_FEEDBACK_LAST_COMPILED_OPTIONS, Compile::Constants::ARRAY_HELP_FEEDBACK_PROGRAM_VERSION_OPTIONS, Compile::Constants::ARRAY_HELP_FEEDBACK_VERSIONS_OPTIONS, Compile::Constants::ARRAY_HELP_FIND_ALL_ARCHIVES, Compile::Constants::ARRAY_HELP_GENERATE_ALL_SLACK_DESC_FILES_OPTIONS, Compile::Constants::ARRAY_HELP_GENERATE_HOMEPAGE_OPTIONS, Compile::Constants::ARRAY_HELP_GENERATE_PDF_TUTORIAL_OPTIONS, Compile::Constants::ARRAY_HELP_GENERATE_SHELL_COMPLETION_OPTIONS, Compile::Constants::ARRAY_HELP_GENERATE_SLACK_DESC_FILE, Compile::Constants::ARRAY_HELP_INCLUDED_OPTIONS, Compile::Constants::ARRAY_HELP_KEEP_EXTRACTED_OPTIONS, Compile::Constants::ARRAY_HELP_LAST_COMPILED_OPTIONS, Compile::Constants::ARRAY_HELP_LAST_COMPILED_PROGRAM_OPTIONS, Compile::Constants::ARRAY_HELP_LAST_CONFIGURE_OPTIONS, Compile::Constants::ARRAY_HELP_LAST_DOWNLOADED_OPTIONS, Compile::Constants::ARRAY_HELP_LOG_DIR_OPTIONS, Compile::Constants::ARRAY_HELP_OUTPUT_ALL_URLS_OPTIONS, Compile::Constants::ARRAY_HELP_PACKAGE_RBT_OPTIONS, Compile::Constants::ARRAY_HELP_PREFIX_IN_USE, Compile::Constants::ARRAY_HELP_PURGE_ALL_MAN_ENTRIES, Compile::Constants::ARRAY_HELP_QUERY_THE_EXISTANCE_OF_A_BINARY_NAME, Compile::Constants::ARRAY_HELP_REMOVE_ALL_SYMLINKS_OPTIONS, Compile::Constants::ARRAY_HELP_REPLACE_SYMLINKS_OPTIONS, Compile::Constants::ARRAY_HELP_REPORT_N_PROGRAMS_OPTIONS, Compile::Constants::ARRAY_HELP_SCAN_SOURCE_ARCHIVE_OPTIONS, Compile::Constants::ARRAY_HELP_SHOW_ALL_OPTIONS, Compile::Constants::ARRAY_HELP_SHOW_HIGHEST_PROGRAMS_OPTIONS, Compile::Constants::ARRAY_HELP_SHOW_LAST_UPDATE_OPTIONS, Compile::Constants::ARRAY_HELP_SHOW_REGISTERED_KEYS, Compile::Constants::ARRAY_HELP_SHOW_WHICH_COLOURS_WILL_BE_USED, Compile::Constants::ARRAY_HELP_SIMULATION_MODE_OPTIONS, Compile::Constants::ARRAY_HELP_SKIP_EXTRACTING_OPTIONS, Compile::Constants::ARRAY_HELP_TEMP_DIR, Compile::Constants::ARRAY_HELP_TOGGLE_DEBUG_VALUE_OPTIONS, Compile::Constants::ARRAY_HELP_UPDATE_BINARY_NAMES_OPTIONS, Compile::Constants::ARRAY_HELP_USE_AUTOGEN, Compile::Constants::ARRAY_HELP_USE_BUILD_DIRECTORY_OPTIONS, Compile::Constants::ARRAY_HELP_VIEW_AVAILABLE_LICENSES_OPTIONS, Compile::Constants::ARRAY_SHOW_LAST_UPDATED_OPTIONS, Compile::Constants::ARRAY_SYMLINK_ALL_PROGRAMS_OPTIONS, Compile::Constants::DEFAULT_NAME_FOR_THE_BUILD_DIRECTORY, Compile::Constants::DEFAULT_PROGRAM, Compile::Constants::OPTIONS_NO_COLOURS, Compile::Constants::TEMP_DIR, Compile::Constants::TEMP_DIR_FOR_RBT, Compile::Constants::THIS_FILE

Constants included from CompileBaseModule

CompileBaseModule::FILE_AUTOGEN

Constants inherited from LeanPrototype

LeanPrototype::ALL_COLOUR_METHODS, LeanPrototype::ARRAY_KDE_KONSOLE_COLOURS_IN_USE, LeanPrototype::DAY_NAMES, LeanPrototype::NAMESPACE, LeanPrototype::SILENT_REDIRECTION

Class Method Summary collapse

Instance Method Summary collapse

Methods included from CompileBaseModule

#always_show_dependencies?, #capitalize_program_names?, #check_whether_we_will_install_only_programs_from_the_bin_subdirectory, #cleanup_system_tag_directory, #consider_removing_libtool_la_files, #consider_symlinking_cmake_modules, #consider_symlinking_header_files_into_the_usr_include_hierarchy, #consider_symlinking_lib64_into_lib, #cookbook_dataset_autosymlink_lib64?, #create_a_new_current_symlink_here, #create_architecture_file, #do_invoke_symlink_program, #do_play_song, #editor_to_use?, #email?, #exit_on_unregistered_cookbook_entries?, #host_cpu?, #install_only_binaries?, #installer_constant?, make_command?, #no_error_has_occurred?, #play_song?, #recipes_dir?, #register_program, #remove_compiling_is_in_progress, #report_to_developers, #reset_the_module, #return_build_type, #return_files_from_the_profiles_directory, #return_these_programs, #shall_we_symlink_the_header_files_into_the_usr_include_hierarchy?, #store_full_configure_command_into_resources_directory, #symlink_into_tags, #symlink_into_usr_lib_dir?, #symlink_m4_macros, #symlink_program, #symlink_program?, #update_kde_apps, #use_gobolinux_symlinkprogram?, #use_mrxvt?, #use_stow?, #use_tags?, #validate_the_cookbook_aliases

Methods inherited from LeanPrototype

#a_or_an?, #abbreviations?, #absolute_path, #action, #add_to_the_commandline_arguments, #all_binaries?, #all_files_from, #all_libraries?, #allowed_cookbook_entries?, #appdir_location_of?, #append_onto_the_internal_hash, #append_what_into, #archive_type_of?, #available_programs?, #be_quiet?, #be_verbose?, #begins_with_a_comment?, #capitalize_first_alphabetical_character, #cd_to_the_log_directory, #cd_to_the_temp_directory, #change_directory, #change_permission, #cheering_person?, #chmod, #chop_off_archive, #clear_commandline_arguments, #cliner, #coloured_and_padded_e, #coloured_and_padded_esystem, #coloured_esystem, #colourize_directory_for_system_results, #colourize_this_error, #colourize_this_file_path, #colourize_this_warning, #commandline_arguments?, #commandline_arguments_without_hyphens?, #comment, #convert_dd_mm_yyyy_to_its_long_variant, #convert_env_variable, #copy_directory, #copy_files, #cpr, #create_directory, #current_hour?, #dd_mmm_yyy, #debug, #debug?, #directory_expanded_cookbooks?, #display_md5sum?, #do_not_debug, #does_the_cookbook_include_this_program?, #does_this_expanded_cookbook_file_exist_for_this_program?, #does_this_file_exist_and_is_it_a_file?, #e, #eblue, #ecomment, #ecrimson, #edir, #editor?, #efancy, #eimp, #enable_colours, #enable_debug, #ensure_main_encoding_for, #eparse, #esystem, #esystem_gold, #etomato, #ewarn, #exit_program, #expanded_cookbooks_directory_exists?, #file_compiled_programs?, #file_dirname_retaining_trailing_slash, #file_predefined_installation_instructions?, #file_specification_of_registered_cookbook_entries, #find_cookbook_alias_for, #find_this_yaml_file, #first_argument?, #first_non_hyphen_argument?, #get_all_directories_from, #get_all_files_from, #get_all_programs, #get_date, #get_extended_date, #get_files_and_directories_from, #go_to_base_dir, #home_dir?, #host_system?, #infer_the_namespace, #internal_hash?, #internal_hash_set_commandline_arguments, #is_an_archive?, #is_directory?, #is_file?, #is_github_url?, #is_make_available?, #is_meson_installed?, #is_on_windows?, #is_roebe?, #is_superuser?, #is_symlink?, #is_this_a_header?, #is_this_a_library?, #iso_encoding?, #load_dataset_from_this_expanded_cookbook, #load_yaml, #load_yaml_file_from_the_cookbook_directory_for_this_program, #log_directory?, #main_encoding?, #meson_build_file_exists?, #months?, #move_file, #n_programs_are_available?, #n_programs_available?, #namespace?, #no_directory_exists_at, #no_directory_was_found_at, #no_opn, #no_such_file_exists, #open_in_browser, #open_in_editor, #opncomment, #opne, #opnef, #opnerev, #opnerror, #opnesystem, #opnewarn, #opnfancy, #packages_directory?, #path_to_this_expanded_cookbooks_dataset, #pkgconfig_directory?, #populate_the_internal_hash_with_default_values, #predefined_installation_instructions?, #prepend_this_commandline_argument, #program_version_of?, #project_base_directory?, #project_yaml_directory?, #query_path?, #rarrow?, #read_file, #read_file_in_default_encoding, #read_file_with_default_encoding, #readlines, #readlines_with_proper_encoding, #registered_cookbook_entries?, #remove, #remove_archive_from_the_end, #remove_comments_from_each_line, #remove_directory, #remove_double_slashes, #remove_file, #remove_newlines, #remove_parens, #remove_symlink, #remove_the_first_commandline_argument, #remove_this_commandline_argument, #remove_this_entry_from_the_commandline_arguments, #remove_trailing_ANSII_escape_code, #remove_unnecessary_data_from_url, #rename, #report_pwd, #require_the_rbt_aliases, #reset_the_internal_hash, #return_all_archives_from_this_directory, #return_commandline_arguments_with_leading_hyphens, #return_current_hour_minutes_second, #return_date, #return_day_of_the_month_based_on_utc, #return_full_time, #return_hours_minutes_seconds_based_on_utc, #return_location_to_this_programs_yaml_file, #return_month_based_on_this_number, #return_month_based_on_utc, #return_opnn, #return_program_information, #return_program_name_for_gobolinux_systems, #return_pwd, #return_unicode_warning_symbol_or_empty_string, #return_utc, #return_utc_time_in_a_format_similar_to_slackware, #return_weekday_based_on_utc, #return_year_based_on_utc, #rev, #run_simulation=, #run_simulation?, #sdir, #sdir_return_pwd, #set_be_silent, #set_be_verbose, #set_first_commandline_argument, #set_namespace, #set_use_opn, #set_xorg_buffer, #sfancy, #sfile, #silent_redirection?, #silently_create_this_directory_if_it_does_not_yet_exist, #simp, #source_base_directory?, #ssym, #stderr, #store_into_this_directory?, #string_right_arrow?, #swarn, #symlink, #sysbin_directory?, #sysetc_directory?, #sysinclude_directory?, #syslib_directory?, #sysshare_directory?, #system_directory?, #temp_directory?, #to_bool, #to_camelcase, #to_iso_encoding, #to_unicode, #today?, #touch, #try_to_require_beautiful_url, #try_to_require_the_environment_information_gem, #try_to_require_the_extracter_gem, #try_to_require_the_open_gem, #try_to_require_the_xorg_buffer, #try_to_require_wget, #try_to_return_a_special_compile_component, #unicode_cliner, #unicode_middle_cliner, #use_colours=, #use_colours?, #use_opn=, #utf_encoding?, #verbose_truth, #word_wrap, #write_what_into, #write_what_into_via_unicode, #yes_or_no

Constructor Details

#initialize(commandline_arguments = ARGV, run_already = true, &block) ⇒ SoftwareManager

#

initialize

The first argument to this method will contain the commandline arguments for class RBT::Action::SoftwareManager. These are usually the name of the program (or programs) that the uses wishes to compile / install.

So, for instance, “htop” could be passed as the first argument to this method. You can also pass in an Array here, and this class will then attempt to batch-compile these programs.

#


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/rbt/actions/individual_actions/software_manager/initialize.rb', line 27

def initialize(
    commandline_arguments = ARGV, # ← This should usually be an Array of programs that should be installed.
    run_already           = true,
    &block
  )
  register_sigint
  reset
  if commandline_arguments.is_a?(Array) and commandline_arguments[1] and
     commandline_arguments[1].is_a?(Symbol)
    run_already = commandline_arguments[1] # Handle :dont_run early.
  end
  if commandline_arguments.is_a?(Array)
    last = commandline_arguments.last
    case last
    # ===================================================================== #
    # === :do_not_run_yet
    # ===================================================================== #
    when :do_not_run_yet
      run_already = false
    end
  end
  # ======================================================================= #
  # === Handle Symbols given to the commandline arguments next
  #
  # Handle symbols given as first argument next. This should come before
  # we call set_commandline_arguments().
  # ======================================================================= #
  case commandline_arguments
  # ======================================================================= #
  # === :do_not_run_yet
  # ======================================================================= #
  when :do_not_run_yet,
       :do_not_yet_run,
       :dont_run_yet
    run_already = false
    commandline_arguments = []
  end
  # ======================================================================= #
  # Finally set the commandline arguments here:
  # ======================================================================= #
  set_commandline_arguments(
    commandline_arguments
  )
  # ======================================================================= #
  # === Handle blocks next
  # ======================================================================= #
  if block_given?
    yielded = yield
    # ===================================================================== #
    # Handle Symbols first:
    # ===================================================================== #
    if yielded.is_a? Symbol
      case yielded
      # =================================================================== #
      # === :do_not_run_yet
      # =================================================================== #
      when :do_not_run_yet,
           :do_not_run,
           :dont_run_yet
        run_already = false
      # =================================================================== #
      # === :do_not_check_whether_the_program_exists
      # =================================================================== #
      when :do_not_check_whether_the_program_exists
        do_not_check_whether_the_program_exists # ← This method exists, so use it too.
      # =================================================================== #
      # === :use_root_prefix
      # =================================================================== #
      when :use_root_prefix
        do_use_root_prefix
      end
    # ===================================================================== #
    # === Handle Hashes next
    # ===================================================================== #
    elsif yielded.is_a? Hash
      # =================================================================== #
      # === :run_already
      #
      # This entry point should be checked last. 
      # =================================================================== #
      if yielded.has_key? :run_already
        case yielded[:run_already]
        when :do_not_run_yet
          run_already = false
        end
      end
      # =================================================================== #
      # === :use_this_prefix
      # =================================================================== #
      if yielded.has_key? :use_this_prefix
        set_use_this_prefix(yielded[:use_this_prefix])
      end
      # =================================================================== #
      # === :shall_we_check_whether_the_program_exists
      # =================================================================== #
      if yielded.has_key? :shall_we_check_whether_the_program_exists
        case yielded[:shall_we_check_whether_the_program_exists]
        # ================================================================= #
        # === nope
        #
        # In this case we will not check whether the program exists.
        # ================================================================= #
        when :nope, false
          do_not_check_whether_the_program_exists
        end
      end
      # =================================================================== #
      # === :prefix
      #
      # Handle prefix-related keys first.
      # =================================================================== #
      if yielded.has_key? :prefix
        set_user_prefix(yielded.delete(:prefix)) # ← Set the new prefix via a method call.
      # =================================================================== #
      # === :use_this_prefix
      # =================================================================== #
      elsif yielded.has_key? :use_this_prefix
        set_user_prefix(yielded.delete(:use_this_prefix))
      # =================================================================== #
      # === :use_this_as_prefix
      # =================================================================== #
      elsif yielded.has_key? :use_this_as_prefix
        set_user_prefix(yielded.delete(:use_this_as_prefix))
      end
      # =================================================================== #
      # === :symlink_after_compilation_has_finished
      # =================================================================== #
      if yielded.has_key? :symlink_after_compilation_has_finished
        value = yielded.delete(:symlink_after_compilation_has_finished)
        if value == false
          set_do_not_symlink(:be_verbose) # Disable symlinking after compilation.
        end
      end
      # =================================================================== #
      # Add commandline_arguments if the key is :commandline_arguments
      #
      # Such a Hash may have a key like this:
      #
      #   {:commandline_arguments=>["--dont-use-colours", "ntrad"]}
      # =================================================================== #
      if yielded.has_key? :commandline_arguments
        append_to_the_commandline(
          yielded.delete(:commandline_arguments)
        )
      end
    else
      append_to_the_commandline(yielded)
    end
  end
  # ======================================================================= #
  # Handle special symbols passed to run_already next:
  # ======================================================================= #
  case run_already
  # ======================================================================= #
  # === :do_not_run_yet
  # ======================================================================= #
  when :do_not_run_yet,
       :dont_run_yet,
       :do_not_run_already
    run_already = false
  end
  consider_entering_the_log_directory # This should come before we handle blocks.
  # ======================================================================= #
  # Next store the first snapshot, which is the start-mark. This should
  # come after we handled any block given to this method.
  # ======================================================================= #
  time_snapshot
  run if run_already
end

Class Method Details

.[](i = ARGV) ⇒ Object

#

RBT::Action::SoftwareManager[]

#


11066
11067
11068
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11066

def self.[](i = ARGV)
  new(i)
end

.display_standard_help_options(exit_now = :default) ⇒ Object

#

RBT::Action::SoftwareManager.display_standard_help_options

Set the standard help-options only here.

You can view them by issuing this command:

rbt --help
#


10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10844

def self.display_standard_help_options(
    exit_now = :default
  )
  case exit_now
  when :default
    exit_now = false
  end
  pad_to_most_right = ' ' * 40
  lpad = '  '
  middle_pad = 44
  # RBT::Action::SoftwareManager.output_namespace? # ← Disabled as of 03.10.2020.
  e
  efancy lpad+'The following help subsection describes some of '
  efancy lpad+'the available help options for the'
  efancy lpad+::RBT.steelblue('Compile-Section')+
         sfancy(' of the RBT scripts.')
  e
  efancy lpad+'The '+
         RBT.mediumslateblue('basic ')+
         sfancy('command to ')+
         RBT.steelblue('compile a program')+
         sfancy(' is:')
  e
  e
  e lpad+RBT.gold('    rbt [NAME_OF_THE_PROGRAM]')
  e lpad+RBT.gold('    rbt python')+RBT.orange(' # ← example input; here we '\
      'would try to compile python')
  e lpad+RBT.gold('    rbt htop')+RBT.orange('   # ← here, RBT would try to '\
      'compile htop')
  e lpad+RBT.gold('    rbt php')+RBT.orange('    # ← here, RBT would try to '\
      'compile php')
  e
  e
  efancy lpad+lpad+'-b      --build-dir=[]                        Set a specific build directory'
  efancy lpad+lpad+'-h      --help                                Display this help subsection here'
  efancy lpad+'          --permanently_extract_to=[]           permanently extract the '\
         'archives to another directory'
  efancy lpad+lpad+'-e      --extract_to=[]                       extract '\
         'the archives to another directory'
  efancy '                                                  (--homedir= is an alias to this setting)'
  efancy lpad+lpad+'-k      --keep_extracted                      Keep '\
         'the sourceball extracted (normally the extracted'
  efancy '                                                  archive is '\
         'removed after compilation)'
  efancy lpad+'          --batch-compile=                      Batch-compile some '\
         'programs such as batch compiling'
  e
  e      (' ' * middle_pad)+
         RBT.royalblue("        rbt --batch-compile=mate\n")
  efancy lpad+
         '          --dont-use-configure-options          Do not use any configure options '\
         'from the .yml file'
  efancy lpad+lpad+'-n      --no-harm                             Run in simulation mode'
  efancy lpad+lpad+'-nc     --nocolour / --nocolor                Disable colours'
  efancy lpad+
         '          --use-old-configure-options           Re-use old configure '\
         'options, e. g. from GCC'
  efancy lpad+lpad+'-sl     --sleep<number>                       Sleep for <number> seconds before continuing'
  efancy lpad+
         '          --permanently-disable-ccache          Permanently disable ccache, '\
         'via the commandline'
  efancy lpad+
         '          --disable-ccache                      Do not use ccache for the current run'
  efancy lpad+lpad+'-S      --no-symlink                          Do not symlink the AppDir that was compiled'
  efancy lpad+lpad+'-P      --no-postinstall                      Do not run the postinstall instructions'
  efancy lpad+
         '          --preinstall="sh bootstrap"           Run the specified pre-install action'
  efancy lpad+
         '          --use-gobolinux-symlinkprogram        Use the GoboLinux SymlinkProgram rather than '
  efancy '                                                  '\
         'class RBT::SymlinkProgram, for symlinking'
  efancy lpad+
         '          --use-meson                           Use the meson build system'
  efancy lpad+lpad+'-no     --no-extract                          Do not extract tarball '\
         'again (skip extracting the source archive)'
  efancy lpad+lpad+'-cmake  --cmake                               Use cmake rather than make'
  efancy lpad+lpad+'-clang  --clang                               Use clang '\
         'rather than the default GCC to compile C/C++ programs'
  efancy lpad+
         '          --create-yaml-file-for=subversion     Create a .yml file '\
         'for this program, holding the relevant '
  efancy '                                                  '\
         'information for compiling the program from source'
  efancy '                                                  (Note that this requires the clang '\
                                                            'compiler of LLVM being'
  efancy '                                                  available, of course.)'
  efancy lpad+
         '          --create-log-directory                Create the log directory.'
  efancy lpad+
         '          --paste-blfs-page                     Fetch and paste remote '\
         'data from the BLFS page of the given program'
  efancy lpad+lpad+'-slack  --slack-desc                          Create a Slackware slack-desc file'
  efancy lpad+
         '          --purge-traditional-binaries-of=gnupg Purge binaries of this program'
  efancy lpad+
         '          --valid-sys-tags?                     Show which '+
         sdir('/System/Tag')+
          sfancy(' entries are valid')
  efancy lpad+
         '          --symlink-headers                     Symlink all .h files into '\
         'the '+sdir('/usr/include/')+
         sfancy(' hierarchy')
  efancy lpad+
         '          --symlink-all-upcased-programs-to-downcased-variants Create '\
         'symlinks'
  efancy (' ' * (middle_pad-2))+'        '\
         'for all upcased program entries under '+
         sdir(RBT.programs_dir?)+'.' 
  efancy lpad+
         '          --homedir                             Compile the program into your '\
         'HOME directory such as '+
         sdir('/home/name/')+sfancy('.')
  efancy lpad+lpad+'-ver    --verbose                             Be verbose in the output'
  efancy lpad+
         '          --do-not-use-special-flags            Do not use ENV (environmental '\
         'flags) at all.'
  efancy lpad+
         "          --update-entry                        Update a program, such "\
         "as via\n"
  e      RBT.royalblue(
           (' ' * middle_pad)+
           "        rbt --update-entry "\
           "http://ftp.gnu.org/gnu/grep/grep-3.5.tar.xz\n"
         )
  efancy lpad+
         '          --edit-file=htop                      Open the '+
         ::Colours.sfile('htop.yml')+
         sfancy(' cookbook-file, in order to inspect '\
         'and/or edit it;')
  efancy '                                                  the '+simp('$EDITOR')+
         sfancy(' variable can be used to specify which editor is to be used.')
  efancy lpad+
         "          --remove-la-files                     Remove "\
         ".la files of this program (requires the --prefix to include "\
         "#{sdir(::RBT.programs_dir?)})"
  efancy lpad+
         '          --suggest-cookbook-for=glib           Show a possible '\
         'content of glib.yml file'
  efancy lpad+lpad+
         "-v      --version                             Use a "\
         "specific version, such as, for instance:\n"
  efancy (' ' * middle_pad)+
         RBT.royalblue('        rbt bluefish --version=1.0.7')

  efancy '                                                  '\
         'ignore errors via '+simp('--ignore-errors')
  e
  # ======================================================================= #
  # === Documented help options for the GUI section
  # ======================================================================= #
  efancy lpad+gold('[GUI section]')
  e
  efancy lpad+
         '          --libui                               start the libui-wrapper for RBT (in '\
         'regards to compiling programs from source)'
  efancy lpad+
         '          --gtk                                 start the ruby-gtk3 interface '\
         '(tabbed notebook interface)'
  if RBT.is_on_gobolinux?
    # ===================================================================== #
    # If we are on gobolinux then we also mention how to create
    # gobolinux-recipes.
    # ===================================================================== #
    efancy '   --gobolinux-recipe                            '\
           'Create a GoboLinux recipe. (The "-" can be omitted.'
    efancy pad_to_most_right+'        A usage example follows next.)'
    efancy pad_to_most_right+'        Usage example: '+
           simp('rbt zenity --gobolinux-recipe')
  end
  e
  efancy lpad+'Some shorter commandline options exist for '\
         'toplevel methods:'
  e
  efancy lpad+'  rbt --download htop # This will download htop into '\
         'the local directory'
  efancy lpad+'  rbt --extract htop  # This will extract htop; or '\
         'download and extract it,'
  efancy lpad+'# should it not exist locally'.rjust(51)
  e # Need a spacer before we display the next part.
  e
  eimp lpad+'Also note that these options can be chained together. '\
       'Abbreviations '
  eimp lpad+'can be used as well. The options '+
       sfancy('noext nocol')+
       simp(' will all work fine,  ')
  eimp lpad+
       simp('being equal to ')+
       sfancy('--no-extract --nocolor')+simp('.')
  e
  eimp lpad+'Abbreviations allow us to have to type less, but '\
       'the longer variants '
  eimp lpad+
       'als work, in the event that you wish '\
       'to be more explicit.'
  e
  exit if exit_now
end

.do_not_show_names?Boolean

#

RBT::Action::SoftwareManager.do_not_show_names?

#

Returns:

  • (Boolean)


48
49
50
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 48

def self.do_not_show_names?
  ::RBT.do_not_show_names?
end

.e(i = '') ⇒ Object

#

RBT::Action::SoftwareManager.e

#


13124
13125
13126
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13124

def self.e(i = '')
  ::RBT.e(i)
end

.efancy(i = '') ⇒ Object

#

RBT::Action::SoftwareManager.efancy

#


13131
13132
13133
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13131

def self.efancy(i = '')
  ::RBT.efancy(i)
end

.eimp(i = '') ⇒ Object

#

RBT::Action::SoftwareManager.eimp

#


11052
11053
11054
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11052

def self.eimp(i = '')
  ::RBT.eimp(i)
end

.gold(i = '') ⇒ Object

#

RBT::Action::SoftwareManager.gold

#


13138
13139
13140
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13138

def self.gold(i = '')
  ::RBT.gold(i)
end

.is_this_program_included?(i, be_verbose = :default) ⇒ Boolean

#

RBT::Action::SoftwareManager.is_this_program_included?

ry --included?
#

Returns:

  • (Boolean)


13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13155

def self.is_this_program_included?(
    i,
    be_verbose = :default
  )
  case be_verbose
  # ======================================================================= #
  # === :include_abbreviations_and_be_quiet
  # ======================================================================= #
  when :include_abbreviations_and_be_quiet
    be_verbose = false
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default
    be_verbose = true
  # ======================================================================= #
  # === :be_quiet
  # ======================================================================= #
  when :be_quiet,
       :silent
    be_verbose = false
  end
  if i.is_a? Array
    i.each {|entry| is_this_program_included?(entry, be_verbose) }
  else
    i = i.to_s.dup
    i.delete!('-')
    i.delete!('_')
    # ===================================================================== #
    # Note that RBT.does_include? tries harder to find a program
    # than does RBT.is_this_program_included?.
    # ===================================================================== #
    is_included = RBT.does_include?(i)
    if is_included
      if be_verbose
        RBT::Action::SoftwareManager.opne "The program `#{RBT.simp(i)}` is included."
      end
      @is_included = true
    else
      if be_verbose
        RBT::Action::SoftwareManager.opne "The program `#{RBT.simp(i)}` is "\
                               "#{RBT.swarn('not')} included."
      end
      @is_included = false
    end
  end
end

.opnn(i = { namespace: RBT.namespace?, use_colours: RBT.use_colours? }) ⇒ Object

#

RBT::Action::SoftwareManager.opnn

Use this method when you wish to output the RBT::Action::SoftwareManager namespace to the user.

#


13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13101

def self.opnn(
    i = {
      namespace:   RBT.namespace?,
      use_colours: RBT.use_colours?
    }
  )
  if i.is_a? Hash
    # ===================================================================== #
    # === :use_colours
    # ===================================================================== #
    unless i.has_key? :use_colours
      i.update(use_colours: RBT.use_colours?)
    end
  end
  if RBT.show_the_classname?
    ::RBT.opnn(i) # Delegate to the module_method here.
  # else # else we will not use Opn at all.
  end
end

.program_is_included?Boolean

#

RBT::Action::SoftwareManager.program_is_included?

Query-method over as to whether the program is included or not.

#

Returns:

  • (Boolean)


425
426
427
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 425

def self.program_is_included?
  @is_included
end

.sdir(i = '') ⇒ Object

#

RBT::Action::SoftwareManager.sdir

#


13145
13146
13147
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13145

def self.sdir(i = '')
  ::RBT.sdir(i)
end

.sfancy(i = '') ⇒ Object

#

RBT::Action::SoftwareManager.sfancy

#


11045
11046
11047
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11045

def self.sfancy(i = '')
  ::RBT.sfancy(i)
end

.show_the_classname?Boolean

#

RBT::Action::SoftwareManager.show_the_classname?

#

Returns:

  • (Boolean)


13213
13214
13215
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13213

def self.show_the_classname?
  ::RBT.show_the_classname?
end

.simp(i = '') ⇒ Object

#

RBT::Action::SoftwareManager.simp

#


11059
11060
11061
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11059

def self.simp(i = '')
  ::RBT.simp(i)
end

.the_program_is_includedObject

#

RBT::Action::SoftwareManager.the_program_is_included

#


60
61
62
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 60

def self.the_program_is_included
  @is_included = true
end

.use_colours?Boolean

#

RBT::Action::SoftwareManager.use_colours?

#

Returns:

  • (Boolean)


13206
13207
13208
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13206

def self.use_colours?
  config?.use_colours.to_s
end

Instance Method Details

#a_program_has_been_initialized?Boolean

#

a_program_has_been_initialized?

#

Returns:

  • (Boolean)


1777
1778
1779
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1777

def a_program_has_been_initialized?
  !main_dataset?.nil?
end

#action_chained_programs?Boolean

#

action_chained_programs?

#

Returns:

  • (Boolean)


899
900
901
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 899

def action_chained_programs?
  action(:chained_programs) # Load the chained actions, then return it.
end

#action_generate_a_big_shell_scriptObject

#

action_generate_a_big_shell_script

#


18
19
20
# File 'lib/rbt/actions/individual_actions/software_manager/actions.rb', line 18

def action_generate_a_big_shell_script
  action(:generate_a_big_shell_script)
end

#action_install_only_headers(from_this_directory = "#{extract_to_this_directory?}"\ "#{program_name_and_program_version?}/", be_verbose = be_verbose? ) ⇒ Object

#

action_install_only_headers

This method handles the actual copying of all headers. It must be called at the proper time.

#


4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4055

def action_install_only_headers(
    from_this_directory = "#{extract_to_this_directory?}"\
                          "#{program_name_and_program_version?}/",
    be_verbose          = be_verbose?
  )
  from_this_directory = from_this_directory.to_s.dup
  from_this_directory << '/' unless from_this_directory.end_with? '/'
  _ = ''.dup
  all_headers = Dir["#{from_this_directory}*.h"]
  _ = all_headers.join(',')[0..3] unless all_headers.empty?
  orev "Now copying all found #{steelblue(_.size.to_s)} "\
       "#{rev}headers from `#{sdir(from_this_directory)}#{rev}`"\
       " to #{sdir('/usr/include/')}#{rev}:"
  copy_recursively(all_headers, '/usr/include/', be_verbose)
  if be_verbose
    orev "The following #{royalblue(_.size.to_s)} #{rev}headers were copied:"
    e
    all_headers.each {|entry|
      e "  #{steelblue(entry)} "\
        "#{tomato('')} "\
        "#{lightgreen('/usr/include/'+File.basename(entry))} "
    }
    e
  end
  do_not_continue_after_configure_step
  do_not_continue_after_make_step
  be_silent
end

#action_rbt_versionObject

#

action_rbt_version

#


10340
10341
10342
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10340

def action_rbt_version
  action(:rbt_version)
end

#add_package_user(name = compile_which_program? ) ⇒ Object

#

add_package_user

This allows you to add a package-user.

Usage example:

ry htop add_package_user
#


1015
1016
1017
1018
1019
1020
1021
1022
1023
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1015

def add_package_user(
    name = compile_which_program?
  )
  _ = '/Users/Packages/'
  cmd_to_run = 'useradd -m -d '+_+name.capitalize+' '+name
  create_directory _ unless File.directory? _
  orev "Adding a new user called `#{simp(name)}#{rev}`:"
  custom_system cmd_to_run
end

#adhoc_fix_gccObject

#

adhoc_fix_gcc

#


8456
8457
8458
8459
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8456

def adhoc_fix_gcc
  require 'rbt/misc/classes_for_individual_programs/change_lib64_to_lib.rb'
  RBT::ClassesForIndividualPrograms::Gcc::ChangeLib64ToLib.new
end

#all_available_programs?Boolean

#

all_available_programs?

To invoke and test this:

ry --all_available_programs?
#

Returns:

  • (Boolean)


110
111
112
113
114
115
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 110

def all_available_programs?
  e
  orev 'These programs are available:'
  e
  RBT.feedback_available_programs
end

#all_configure_options?Boolean

#

all_configure_options?

Use this method to show all configure options for a given program.

This means all options available through “./configure –help”.

Invocation example:

ry htop allconfigureoptions?
#

Returns:

  • (Boolean)


2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2131

def all_configure_options?
  ensure_that_the_main_dataset_exists
  #_ = extract_to? # TEMP_DIR+File.basename(compile_this_program?)
  _ = ::RBT.temp_dir?+
      program_name_and_program_version?
  # ======================================================================= #
  # The target may be empty though. Rescue this case.
  # ======================================================================= #
  _ = rbt_log_directory? if _.nil? or _.empty?
  orev 'Will extract to '+sdir(_)+'. In the event that you need '\
       'to know '
  orev 'where the extracted archive resides.'
  orev "All configure options for "\
       "#{simp(compile_this_program?)} will be shown next, "\
       "before exiting."
  set_extract_to(_)
  consider_extracting_this_program(
    program_path?
  )
  _ = rbt_log_directory?+program_name_and_version?
  orev "We will next cd (change directory) into `#{sdir(_)}#{rev}`."
  cd _, :be_quiet # Now we should be in the proper directory.
  e
  RBT::BeautifyConfigureHelpOutput.new # Delegate to this class next.
  e
  exit_program
end

#an_error_has_occurred?Boolean Also known as: has_an_error_occurred?, did_we_encounter_an_error?

#

an_error_has_occurred?

Query-method over as to whether an error has occurred.

#

Returns:

  • (Boolean)


1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1016

def an_error_has_occurred?
  if false # For now this will always ignore false. This has to be changed lateron.
  result = @internal_hash[:an_error_has_occurred]
  ignore_errors = ignore_errors?
  case ignore_errors
  # ======================================================================= #
  # === :infer
  # ======================================================================= #
  when :infer
    ignore_errors = cookbook_dataset_ignore_errors?
  end
  result = false if ignore_errors
  result = false if result.is_a?(Array) and result.empty?
  return result
  end
end

#appdir_prefix_points_at?Boolean

#

appdir_prefix_points_at?

#

Returns:

  • (Boolean)


55
56
57
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 55

def appdir_prefix_points_at?
  prefix_object?.prefix?
end

#append_disable_static_to_the_configure_optionsObject

#

append_disable_static_to_the_configure_options

This method is somewhat similar to the method called append_enable_shared_to_the_configure_options in that it will also modify the configure options; but it will add “–disable-static” to the configure options.

#


2651
2652
2653
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2651

def append_disable_static_to_the_configure_options
  append_this_to_the_configure_options(:disable_static)
end

#append_enable_shared_to_the_configure_optionsObject

#

append_enable_shared_to_the_configure_options

This method will simply add –enable-shared onto the configure options.

This can then be used by GNU configure sripts or meson builds or even cmake builds (though the latter may use another format, so keep this in mind for the time being; the primary use cases are for GNU configure scripts and meson builds).

#


1101
1102
1103
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1101

def append_enable_shared_to_the_configure_options
  append_this_to_the_configure_options(:enable_shared)
end

#append_make_options(i) ⇒ Object Also known as: append_make_option, append_parameters_to_make, append_this_to_make

#

append_make_options

This will append parameters issued to “make”. It will also start with a ‘ ’, always.

#


3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3105

def append_make_options(i)
  if i
    make_object?.append_make_options(i)
    append_this = i.to_s.dup
    if parameters_to_make?
      joined_make_options = parameters_to_make?
      if joined_make_options.respond_to? :join
        joined_make_options = joined_make_options.join(' ').strip
      end
      unless append_this.include? joined_make_options
        append_this.prepend(joined_make_options.dup)
      end
    end
    # ====================================================================== #
    # Prepend a ' ' for some spacing.
    # ====================================================================== #
    unless append_this.empty?
      append_this.prepend(' ') unless append_this.start_with? ' '
      set_make_options(append_this)
    end
  end
end

#append_onto_the_cflags(i) ⇒ Object

#

append_onto_the_cflags

This method can be used to append the given value onto the CFLAGS.

#


10148
10149
10150
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10148

def append_onto_the_cflags(i)
  ENV['CFLAGS'] = "#{old_cflags?} #{i}" 
end

#append_shell_error_code?Boolean

#

append_shell_error_code?

#

Returns:

  • (Boolean)


506
507
508
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 506

def append_shell_error_code?
  @internal_hash[:append_shell_error_code]
end

#append_static_onto_the_cflagsObject

#

append_static_onto_the_cflags

This method will, sort of, “enable” static compilation.

#


11831
11832
11833
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11831

def append_static_onto_the_cflags
  ENV['CFLAGS'] = old_cflags?+' -static -g'
end

#append_these_configure_options(i = nil) ⇒ Object

#

append_these_configure_options

This method will only append non-nil entries to the extra configure options.

#


1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1573

def append_these_configure_options(
    i = nil
  )
  case i
  # ======================================================================= #
  # === :release
  # ======================================================================= #
  when :release
    i = '-DCMAKE_BUILD_TYPE=Release'
  end
  if i
    if @internal_hash[:append_this_to_the_configure_options].nil?
      # =================================================================== #
      # In this case we must turn it into a String.
      # =================================================================== #
      @internal_hash[:append_this_to_the_configure_options] = ''.dup
    end
    @internal_hash[:append_this_to_the_configure_options] << " #{i}"
  end
end

#append_this_to_full_configure_command(i = ' build') ⇒ Object

#

append_this_to_full_configure_command

#


3258
3259
3260
3261
3262
3263
3264
3265
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3258

def append_this_to_full_configure_command(i = ' build')
  unless i.end_with? ' '
    i = i.dup if i.frozen?
    i << ' ' # Properly pad it here.
  end
  i.squeeze!(' ')
  @internal_hash[:full_configure_command] << i
end

#append_this_to_the_configure_options(i = :enable_bootstrap) ⇒ Object

#

append_this_to_the_configure_options

This method can be used to append options to the ./configure line, such as –enable-shared, without having to type the long version. So for example, the Symbol :libdir64 will be expanded to mean –libdir=/usr/lib64. That way the user can get away with typing less on the commandline.

#


9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9282

def append_this_to_the_configure_options(
    i = :enable_bootstrap
  )
  # ======================================================================= #
  # The following case-when menu could be replaced with generic code
  # that turns the Symbol-input into the equivalent String e. g.
  # --disable-something or --enable-something. However had, for the
  # time being (Dec 2018) I will leave it as it is. In April 2021,
  # I decided to retain the symbol-as-input approach, since some
  # symbols get expanded to longer strings than other symbols.
  # ======================================================================= #
  case i
  # ======================================================================= #
  # === :disable_static
  # ======================================================================= #
  when :disable_static
    i = ' --disable-static'
  # ======================================================================= #
  # === :libdir
  # ======================================================================= #
  when :libdir
    i = ' --libdir=/usr/lib'
  # ======================================================================= #
  # === :libdir64
  # ======================================================================= #
  when :libdir64
    i = ' --libdir=/usr/lib64'
  # ======================================================================= #
  # === :enable_shared
  # ======================================================================= #
  when :enable_shared
    i = ' --enable-shared'
  # ======================================================================= #
  # === :enable_bootstrap
  # ======================================================================= #
  when :enable_bootstrap
    i = ' --enable-bootstrap'
  end
  _ = @internal_hash[:configure_options]
  _ = ''.dup if _.nil?
  unless i.start_with? ' '
    i = i.dup if i.frozen?
    i.prepend(' ')
  end
  # ======================================================================= #
  # Next simply append these to the configure options.
  # ======================================================================= #
  _ << i
  @internal_hash[:configure_options] = _
end

#append_this_to_the_configure_options?Boolean

#

append_this_to_the_configure_options?

#

Returns:

  • (Boolean)


337
338
339
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 337

def append_this_to_the_configure_options?
  @internal_hash[:append_this_to_the_configure_options]
end

#apply_sed_operation_on(sed_line) ⇒ Object Also known as: run_this_sed_instruction

#

apply_sed_operation_on

This method will either use class SedWrapper, or it will use the sed-binary.

#


9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9052

def apply_sed_operation_on(sed_line)
  if sed_line.is_a? Array
    sed_line.each {|entry|
      apply_sed_operation_on(entry)
    }
  else
    if sed_binary_is_available?
      run_this_system_command_in_a_coloured_and_padded_manner(sed_line)
    else
      if use_the_internal_sed_wrapper?
        # ================================================================== #
        # In this case, use the SedWrapper as a fallback.
        # ================================================================== #
        SedWrapper.new(sed_line)
      else
        # ================================================================== #
        # Else we will default to the system-sed.
        # ================================================================== #
        orev 'We can not use the sed line '+
             sfancy(sed_line)+' because '\
             'sed is not available'
        orev ', and no commandline option has been passed to allow '\
             'us to use the sed wrapper.'
      end
    end
  end
end

#archive_type?Boolean Also known as: archive?, cookbooks_archive_type?

#

archive_type?

#

Returns:

  • (Boolean)


485
486
487
488
489
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 485

def archive_type?
  if cookbook_dataset?
    cookbook_dataset?.archive_type?
  end
end

#array_sys_command_string?Boolean Also known as: sys_command_string?

#

array_sys_command_string?

The array is fed in line by line.

#

Returns:

  • (Boolean)


1492
1493
1494
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1492

def array_sys_command_string?
  @internal_hash[:array_sys_command_string]
end

#assemble_program_pathObject

#

assemble_program_path

#


9799
9800
9801
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9799

def assemble_program_path
  cookbook_dataset?.assemble_program_path
end

#assign_to_the_main_dataset(i, check_for_stringent_input = true) ⇒ Object Also known as: use_this_as_cookbook, use_this_as_cookbook=

#

assign_to_the_main_dataset

This method should be used when we wish to assign to the main dataset at hand. The expected input should be class ::RBT::Action::Cookbooks::SanitizeCookbook. If it is not then this will raise an argument error.

The second argument to this method can be used to control how strict the method shall behave.

#


5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5657

def assign_to_the_main_dataset(
    i, check_for_stringent_input = true
  )
  if check_for_stringent_input
    unless i.respond_to?(:is_sanitize_cookbook?)
      raise ArgumentError,
            'The method assign_to_the_main_dataset() expects input as '\
            'class RBT::Action::Cookbooks::SanitizeCookbook'
    end
    set_on_ihash(:cookbook_dataset, i)
  end
end

#assume_default_archive_typeObject

#

assume_default_archive_type

#


6315
6316
6317
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6315

def assume_default_archive_type
  cookbook_dataset?.assume_default_archive_type
end

#attach_program_name_and_program_versionObject

#

attach_program_name_and_program_version

#


9853
9854
9855
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9853

def attach_program_name_and_program_version
  cookbook_dataset?.attach_program_name_and_program_version
end

#automatically_create_package?Boolean

#

automatically_create_package?

#

Returns:

  • (Boolean)


11302
11303
11304
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11302

def automatically_create_package?
  RBT.automatically_create_package?
end

#automatically_infer_program_name_and_program_version_from_this_input(i, optional_arguments = nil) ⇒ Object

#

automatically_infer_program_name_and_program_version_from_this_input

This method will try to automatically set the program_name and

#


312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 312

def automatically_infer_program_name_and_program_version_from_this_input(
    i,
    optional_arguments = nil
  )
  if compile_which_program?.nil?
    set_program_name(
      program_information_return_program_real_name(i)
    )
  end
  if program_version?.nil?
    set_program_version(
      program_information_return_program_version(i)
    )
  end
  case optional_arguments
  when :overwrite_old_values_should_they_exist
    set_program_name    program_information_return_program_real_name(i)
    set_program_version program_information_return_program_version(i)
  end
  set_program_name_and_program_version(
    compile_which_program?+'-'+program_version?
  )
end

#autoswitch_python?Boolean

#

autoswitch_python?

This query-method determines whether we will autoswitch the python version or not.

#

Returns:

  • (Boolean)


11684
11685
11686
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11684

def autoswitch_python?
  config?.autoswitch_python
end

#backup_program(i = compile_which_program? ) ⇒ Object

#

backup_program

Backup an existingp rogram under the /Programs/ hierarchy.

#


59
60
61
62
63
# File 'lib/rbt/actions/individual_actions/software_manager/actions.rb', line 59

def backup_program(
    i = compile_which_program?
  )
  action(:backup_program, i)
end

#base_dir?Boolean

#

base_dir?

#

Returns:

  • (Boolean)


1770
1771
1772
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1770

def base_dir?
  cookbook_for?.base_dir?.to_s
end

#batch_download_all_source_archivesObject

#

batch_download_all_source_archives

For this method we have to delegate towards class Cookbooks::DownloadAllSourceArchives.

#


2230
2231
2232
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2230

def batch_download_all_source_archives
  action(:download_all_source_archives)
end

#batch_validate_the_cookbooksObject

#

batch_validate_the_cookbooks

#


10799
10800
10801
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10799

def batch_validate_the_cookbooks
  action(:BatchValidateTheCookbookRecipes)
end

#be_completely_quietObject

#

be_completely_quiet

#


12857
12858
12859
12860
12861
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12857

def be_completely_quiet
  @internal_hash[:original_stdout] = $stdout
  # $stdout = StringIO.new # This is the redirection.
  $stdout = File.open(IO::NULL, 'w') # This one works better, according to drbrain.
end

#binary?(i = compile_which_program? ) ⇒ Boolean

#

binary?

Wrapper towards answering the question of binary pointing.

#

Returns:

  • (Boolean)


834
835
836
837
838
839
840
841
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 834

def binary?(
    i = compile_which_program?
  )
  i = i.first if i.is_a? Array
  i = i.downcase
  orev "Checking for a binary name called `#{simp(i)}#{rev}` next:"
  return_program_based_on_this_binary(i)
end

#blfs?Boolean

#

blfs?

#

Returns:

  • (Boolean)


818
819
820
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 818

def blfs?
  dataset?.blfs?
end

#build_directory_object?Boolean

#

build_directory_object?

#

Returns:

  • (Boolean)


267
268
269
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 267

def build_directory_object?
  @internal_hash[:build_directory]
end

#build_static?Boolean Also known as: do_we_compile_statically?, compile_statically?

#

build_static?

We have to first check the build_static entry of the cookbook dataset, before we query the value of the @internal_hash.

#

Returns:

  • (Boolean)


452
453
454
455
456
457
458
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 452

def build_static?
  _ = cookbook_dataset_build_static?
  unless @internal_hash[:build_static].nil?
    _ = @internal_hash[:build_static]
  end
  return _
end

#can_be_compiled_statically?Boolean

#

can_be_compiled_statically?

#

Returns:

  • (Boolean)


9343
9344
9345
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9343

def can_be_compiled_statically?
  cookbooks_dataset?.send(__method__)
end

#can_we_continue?Boolean

#

can_we_continue?

#

Returns:

  • (Boolean)


1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1663

def can_we_continue?
  result = @internal_hash[:can_we_continue]
  # if cookbook_dataset?.nil?
  #   initialize_dataset_for(compile_which_program?)
  # end
  # ignore_errors = @internal_hash[:ignore_errors]
  # case ignore_errors
  # # ======================================================================= #
  # # === :infer
  # # ======================================================================= #
  # when :infer
  #     ignore_errors = cookbook_dataset_ignore_errors? if cookbook_dataset?
  # end
  # if ignore_errors
  #   result = true
  # end
  return result
end

#cd_into_the_rbt_log_directory?Boolean

#

cd_into_the_rbt_log_directory?

#

Returns:

  • (Boolean)


9127
9128
9129
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9127

def cd_into_the_rbt_log_directory?
  @internal_hash[:cd_into_the_rbt_log_directory]
end

#cd_to_the_build_directoryObject Also known as: cd_to_the_extracted_directory

#

cd_to_the_build_directory

This method will always delegate towards class BuildDirectory.

#


563
564
565
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 563

def cd_to_the_build_directory
  build_directory_object?.cd_to_the_build_directory
end

#cd_to_the_configure_base_directory(be_verbose_or_be_quiet = :be_quiet) ⇒ Object Also known as: cd_to_the_configure_base_directory_to_be_used

#

cd_to_the_configure_base_directory

This method can be used to cd into the configure base directory.

It can report what it is doing to, in the verbose variant.

#


3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3863

def cd_to_the_configure_base_directory(
    be_verbose_or_be_quiet = :be_quiet
  )
  target = @internal_hash[:configure_base_directory].dup
  case be_verbose_or_be_quiet
  # ======================================================================= #
  # === :be_quiet
  # ======================================================================= #
  when :be_quiet
    cd target, :be_quiet
  else
    opnn; cd target, :be_verbose
  end
end

#cd_to_the_extracted_archive(to = "#{extract_to_this_directory?}"\ "#{program_name_and_program_version?}") ⇒ Object

#

cd_to_the_extracted_archive

This method can be used to quickly cd to the extracted archive.

This assumes that:

(a) the archive exists
(b) the archive has been extracted to its designated target
#


12556
12557
12558
12559
12560
12561
12562
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12556

def cd_to_the_extracted_archive(
    to = "#{extract_to_this_directory?}"\
         "#{program_name_and_program_version?}"
  )
  target = to
  cd target
end

#cflags?Boolean Also known as: default_cflags?, cflags_in_use?

#

cflags?

Just a convenience wrapper over the CFLAGS environment variable. A getter method, which will tell us the CFLAGS in use of the environment.

#

Returns:

  • (Boolean)


538
539
540
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 538

def cflags?
  ENV['CFLAGS'].to_s.dup
end

#check_all_tags_under_programs_directoryObject

#

check_all_tags_under_programs_directory

Use this method to check for all entries in the PROGRAMS_DIRECTORY, whether they also have an entry in /System/Tags.

To invoke this method, try:

ry --check-all-tags
#


1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1422

def check_all_tags_under_programs_directory
  entries = Dir["#{programs_directory?}*"].map {|entry|
    entry << '/Current/'
  }.sort
  entries.each {|entry|
    # ===================================================================== #
    # A particular entry may look like this:
    #   /Programs/Zip/Current/
    # ===================================================================== #
    # Must check whether the directory exists.
    # ===================================================================== #
    if Dir.exist? entry
      splitted = entry.split('/') # ← e. g. "/Programs/Zip/Current/"
      program_name = splitted[2]
      program_name.downcase!
      dataset = instantiate_a_new_cookbook_for(program_name)
      symlink_into_tags(entry, dataset)
    end
  }
  orev 'All done now.'
end

#check_for_available_versions(for_this_program = program? ) ⇒ Object

#

check_for_available_versions

Use this method if you wish to check for available program versions.

Usage examples:

ry bluefish available_versions
ry gcc available_versions
#


875
876
877
878
879
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 875

def check_for_available_versions(
    for_this_program = program?
  )
  action(:CheckForAvailableVersions, for_this_program) { :be_verbose }
end

#check_for_binary_duplicates_in_this_directory(i = return_pwd) ⇒ Object

#

check_for_binary_duplicates_in_this_directory

This method can be used to check for binary duplicates, aka binaries that exist more than once on the given system, in the given (passed) directory.

#


7446
7447
7448
7449
7450
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7446

def check_for_binary_duplicates_in_this_directory(
    i = return_pwd
  )
  action(:check_for_duplicate_binaries, i)
end

#check_for_inclusionObject

#

check_for_inclusion

We will check the source directory for program-inclusion.

To invoke this method, try something like this:

ry htop --check_for_inclusion
#


10139
10140
10141
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10139

def check_for_inclusion
  RBT::Cookbooks::CheckForInclusion.new # bl $RUBY_COOKBOOKS/lib/cookbooks/check_for_inclusion.rb
end

#check_for_latestObject

#

check_for_latest

Method-Wrapper over class LocalCheckForLatest.

Invocation example:

ry --checkforlatest
#


10552
10553
10554
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10552

def check_for_latest
  action(:LocalCheckForLatest) # bl $RUBY_COOKBOOKS/lib/cookbooks/local_check_for_latest.rb
end

#check_for_sed_action(_ = sed? # Note that this ought to be an Array. ) ⇒ Object

#

check_for_sed_action (sed tag)

Some programs have a sed-entry. We thus need a method to handle these sed entries.

As of August 2017, we will delegate towards class RBT::SedWrapper to deal with sed-related editing. However had, since as of February 2018, we will use system-sed (the binary called “sed”), if it is available. The reason as to why is because my sed-wrapper is incomplete and buggy.

Perhaps one day class SedWrapper may work reliably, but for the time being, and as new default, we will not use the SedWrapper by default.

#


8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8731

def check_for_sed_action(
    _ = sed? # Note that this ought to be an Array.
  )
  if _ and !_.empty?
    if use_the_internal_sed_wrapper?
      unless _.empty?
        notify_the_user_that_we_will_use_sed_from_the_pwd
        _.each {|sed_line| # Must be an Array.
          orev 'Next applying the following sed-operation:'
          apply_sed_operation_on(sed_line)
        }
      end
    else
      # =================================================================== #
      # Else we will delegate towards class ApplySedOperations.
      # =================================================================== #
      action(:ApplySedOperations, _)
    end
  end
end

#check_for_this_licence?Boolean

#

check_for_this_licence?

#

Returns:

  • (Boolean)


9461
9462
9463
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9461

def check_for_this_licence?
  @internal_hash[:check_for_this_licence]
end

#check_if_source_directories_existObject

#

check_if_source_directories_exist

#


8478
8479
8480
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8478

def check_if_source_directories_exist
 action(:check_if_source_directories_exist)
end

#check_whether_the_given_input_is_a_file_and_does_exist?Boolean Also known as: do_we_check_whether_the_program_exists?

#

check_whether_the_given_input_is_a_file_and_does_exist?

#

Returns:

  • (Boolean)


1062
1063
1064
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1062

def check_whether_the_given_input_is_a_file_and_does_exist?
  @internal_hash[:check_whether_the_given_input_is_a_file_and_does_exist]
end

#chop_off_revision_numberObject

#

chop_off_revision_number

#


9777
9778
9779
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9777

def chop_off_revision_number
  cookbook_dataset?.chop_off_revision_number
end

#clear_configure_optionsObject

#

clear_configure_options

This method will clear the old configure options.

#


1134
1135
1136
1137
1138
1139
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1134

def clear_configure_options
  @internal_hash[:configure_options] = nil
  if cookbook_dataset?
    cookbook_dataset?.clear_configure_options
  end
end

#clear_env(be_verbose = true) ⇒ Object

#

clear_env

This method will clear ENV. This may sometimes be necessary to start from a clean state.

#


8896
8897
8898
8899
8900
8901
8902
8903
8904
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8896

def clear_env(
    be_verbose = true
  )
  if be_verbose
    orev "Clearing (resetting) the environment variable of "\
         "ruby via #{slateblue('ENV.clear()')}#{rev}."
  end
  ENV.clear
end

#clear_env_variables_but_ensure_the_path_variable_worksObject

#

clear_env_variables_but_ensure_the_path_variable_works

#


1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1053

def clear_env_variables_but_ensure_the_path_variable_works
  old_path = query_path?
  clear_env
  unless old_path.empty?
    # ===================================================================== #
    # Set a new PATH here, as otherwise compilation would fail.
    # ===================================================================== #
    orev "Note that this will lead to compile-time failures because "\
         "#{orange('$PATH')}"
    orev "would not be set. We will use the old path entry "\
         "there as a consequence:"
    opne sfancy("  #{old_path}")
    set_path(old_path)
  end
end

#clear_global_flagsObject

#

clear_global_flags

Clear the global files in use that may be stored in the file global_flags.yml.

#


12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12032

def clear_global_flags
  _ = RBT.file_global_flags
  if File.exist?(_) and !File.empty?(_)
    zero_this_global_flag_file(_)
  end
  if is_on_roebe? # And on my home system as well.
    _ = ROEBE_FILE_GLOBAL_FLAGS
    zero_this_global_flag_file(_)
  end
end

#clear_old_configure_optionsObject

#

clear_old_configure_options

#


9932
9933
9934
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9932

def clear_old_configure_options
  set_configure_options('')
end

#clear_the_original_cookbook_datasetObject

#

clear_the_original_cookbook_dataset

#


1663
1664
1665
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1663

def clear_the_original_cookbook_dataset
  set_cookbook_dataset(nil)
end

#cmake_exists?Boolean Also known as: is_cmake_available?

#

cmake_exists?

This method will try to determine whether “cmake” exists on the local computer host or whether it does not.

#

Returns:

  • (Boolean)


10192
10193
10194
10195
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10192

def cmake_exists?
  result = `cmake #{ERROR_LINE}`
  !result.include?('cmake: command not found')
end

#cmake_file_exists?Boolean Also known as: cmake_file?

#

cmake_file_exists?

#

Returns:

  • (Boolean)


1513
1514
1515
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1513

def cmake_file_exists?
  File.exist? 'CMakeLists.txt'
end

#colourize_parser?Boolean

#

colourize_parser?

#

Returns:

  • (Boolean)


5883
5884
5885
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5883

def colourize_parser?
  @internal_hash[:colourize_parser]
end

#compile_all_gamesObject

#

compile_all_games

This method can be used to compile all registered games.

#


2948
2949
2950
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2948

def compile_all_games
  compile_all_programs_that_belong_to_this_tag(:game)
end

#compile_all_kde5_plasma_components(be_verbose = true) ⇒ Object

#

compile_all_kde5_plasma_components

This entry point allows us to compile all the various KDE5 plasma components.

Invocation example:

ry --compile-all-kde5-plasma-components
#


1152
1153
1154
1155
1156
1157
1158
1159
1160
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1152

def compile_all_kde5_plasma_components(be_verbose = true)
  _ = return_kde5_plasma
  be_verbose = false if be_verbose == :be_quiet
  if be_verbose
    orev "We will next compile all #{lightgreen(_.size)} "\
         "#{rev}KDE5 plasma-components:"
  end
  set_compile_these_programs(_)
end

#compile_all_kde_foundationObject

#

compile_all_kde_foundation

#


2354
2355
2356
2357
2358
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2354

def compile_all_kde_foundation
  set_compile_these_programs(
    return_these_programs(:kde5_foundation)
  )
end

#compile_all_lxqt_componentsObject

#

compile_all_lxqt_components

This entry point allows us to compile all LxQT components, e. g. for the lxqt-desktop.

To compile all LXQT components, try this on the commandline:

ry --compile-lxqt
#


1504
1505
1506
1507
1508
1509
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1504

def compile_all_lxqt_components
  set_array_compile_these_programs(
    return_lxqt_components,
    :do_not_replace
  )
end

#compile_all_of_gstreamerObject

#

compile_all_of_gstreamer

This entry point allows us to compile all of gstreamer.

To invoke this, try something like:

ry --gstreamer1
#


2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2190

def compile_all_of_gstreamer
  array = %w(
    gstreamer
    gstreamerpluginsbase
    gstpluginsgood
    gstpluginsbad
  )
  orev 'Now compiling the various '+
       steelblue('gstreamer components')+
       "#{rev} (#{array.size.to_s} components)."
  # do_compile_these_programs(array)
  set_install_these_programs(array)
end

#compile_all_of_kdeObject

#

compile_all_of_kde

To invoke this method, do:

ry --compile-all-of-kde
#


2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2489

def compile_all_of_kde
  _ = []
  # ======================================================================= #
  # === The KDE foundation (including extra-cmake-modules)
  # ======================================================================= #
  _ << return_these_programs(:kde5_foundation)
  # ======================================================================= #
  # === The KDE applications
  # ======================================================================= #
  _ << return_kde5_applications
  # ======================================================================= #
  # === The KDE plasma stack
  # ======================================================================= #
  _ << return_kde5_plasma
  # ======================================================================= #
  # === The KDE porting aids
  # ======================================================================= #
  _ << return_kde5_porting_aids
  _.flatten!
  set_compile_these_programs(_) # ← Set it just in case.
end

#compile_all_of_xfceObject

#

compile_all_of_xfce

#


3499
3500
3501
3502
3503
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3499

def compile_all_of_xfce
  _ = return_xfce_components
  set_compile_these_programs(_)
  orev 'Finished compiling '+steelblue(_.size.to_s)+"#{rev} XFCE components."
end

#compile_all_programs(shall_we_exit = true) ⇒ Object

#

compile_all_programs

This method is a direct approach to compile every program that we have registered, in our database.

This method accepts one argument, which decides whether we will quit afterwards or whether we will not.

Invocation example:

ry --compile_all_programs
#


6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6120

def compile_all_programs(
    shall_we_exit = true
  )
  case shall_we_exit
  when :do_exit_afterwards
    shall_we_exit = true
  end
  _ = return_available_programs.shuffle # We shuffle for more "randomness".
  n_programs = _.size.to_s
  clear_commandline_options
  opne sfancy('Compiling all available programs next (by a brute'\
       'force approach - we found ')+
       simp(n_programs)+sfancy(' programs):')
  compile_every_program(_)
  exit_program if shall_we_exit
end

#compile_all_programs_that_belong_to_this_tag(i) ⇒ Object

#

compile_all_programs_that_belong_to_this_tag

Invocation examples:

rbt --compile-this-tag=gnome
rbt --compile-this-tag=kde
rbt --compile-this-tag=kde5
rbt --compile-this-tag=game
#


6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6950

def compile_all_programs_that_belong_to_this_tag(i)
  # ======================================================================= #
  # (1) first obtain all programs that belong to a particular tag
  # ======================================================================= #
  these_programs = RBT.return_array_of_this_tag(i)
  orev "Determining all programs that belong to the "\
       "tag #{steelblue(i)}#{rev} -"
  orev "note that this may take a moment or two."
  # ======================================================================= #
  # (2) then set to the main array
  # ======================================================================= #
  set_compile_these_programs(
    these_programs
  )
end

#compile_all_up_until_konsoleObject

#

compile_all_up_until_konsole

This method can be used to quickly get to compile konsole - and, prior to that, the programs that KDE Konsole depends on.

Invocation example:

ry --compile-towards-konsole
#


5247
5248
5249
5250
5251
5252
5253
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5247

def compile_all_up_until_konsole
  _ = []
  _ << return_these_programs(:kde5_foundation) # ← This is fine.
  _ << :konsole
  _.flatten!
  set_compile_these_programs(_) # ← Set it just in case.
end

#compile_gcc_with_only_c_and_cppObject

#

compile_gcc_with_only_c_and_cpp

To invoke this method, try:

ry gcc --only-c-and-cpp
#


6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6215

def compile_gcc_with_only_c_and_cpp
  initialize_dataset_for(:gcc)
  clear_configure_options
  # ===================================================================== #
  # --disable-multilib is necessary as otherwise it won't work.
  # ===================================================================== #
  append_this_to_the_configure_options(
    '--enable-languages=c,c++ --disable-multilib'
  )
end

#compile_into_the_home_directoryObject

#

compile_into_the_home_directory

#


4676
4677
4678
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4676

def compile_into_the_home_directory
  set_user_prefix('$HOME')
end

#compile_into_the_home_directory_as_appdirObject

#

compile_into_the_home_directory_as_appdir

This method will enable compilation into the user’s home directory, via AppDir style.

Invocation example:

ry xwd --homedir
#


8705
8706
8707
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8705

def compile_into_the_home_directory_as_appdir
  set_user_prefix("$HOME#{static_appdir_prefix?}")
end

#compile_kde_appsObject

#

compile_kde_apps

#


2345
2346
2347
2348
2349
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2345

def compile_kde_apps
  set_compile_these_programs(
    return_kde5_applications
  )
end

#compile_mate_desktop_components_into_one_standalone_directoryObject

#

compile_mate_desktop_components_into_one_standalone_directory

To invoke this method from the commandline, do:

ry --mate-desktop-into-standalone-dir
#


4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4662

def compile_mate_desktop_components_into_one_standalone_directory
  _ = return_mate_desktop_components
  # ======================================================================= #
  # We currently (Oct 2018) will use a hardcoded path. This may change
  # at a later point in the future.
  # ======================================================================= #
  use_this_prefix = "#{programs_dir?}Mate/1.26/"
  set_use_this_prefix(use_this_prefix)
  set_compile_these_programs(_)
end

#compile_mouse_and_keyboard_xorg_server_components(array_components = %w( xf86-input-evdev xf86-input-joystick xf86-input-libinput xf86-input-synaptics xf86-input-mouse xf86-input-vmmouse xf86-input-wacom )) ⇒ Object

#

compile_mouse_and_keyboard_xorg_server_components

The input-argument to this method defaults to the components that we wish to compile.

To compile the entries in this method, issue:

ry --compile-mouse-and-keyboard
#


9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9142

def compile_mouse_and_keyboard_xorg_server_components(
    array_components = %w(
      xf86-input-evdev
      xf86-input-joystick
      xf86-input-libinput
      xf86-input-synaptics
      xf86-input-mouse
      xf86-input-vmmouse
      xf86-input-wacom
    )
  )
  orev "Next compiling "\
       "`#{royalblue(array_components.size.to_s)}#{rev}` programs:"
  set_compile_these_programs(array_components)
end

#compile_mouse_componentsObject

#

compile_mouse_components

This method will compile mouse-related components (on a linux system, aka using the xorg-server).

#


3884
3885
3886
3887
3888
3889
3890
3891
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3884

def compile_mouse_components
  compile_mouse_and_keyboard_xorg_server_components(
    %w(
      xf86-input-vmmouse
      xf86-input-mouse
    )
  )
end

#compile_or_install_string?Boolean

#

compile_or_install_string?

#

Returns:

  • (Boolean)


10302
10303
10304
10305
10306
10307
10308
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10302

def compile_or_install_string?
  if has_to_be_compiled?
    'compiled'
  else
    'installed'
  end
end

#compile_post_xorg_server_componentsObject

#

compile_post_xorg_server_components

Invocation example for this method:

insta --post-xorg-server
#


32
33
34
35
36
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 32

def compile_post_xorg_server_components
  _ = RBT.report_post_xorg_server_components
  orev "Next compiling `#{royalblue(_.size.to_s)}#{rev}` programs:"
  set_compile_these_programs(_)
end

#compile_the_initial_lfs_toolchainObject

#

compile_the_initial_lfs_toolchain

#


12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12046

def compile_the_initial_lfs_toolchain
  ENV['PATH'] = '/tools/bin:/bin:/usr/bin'
  orev 'We will next try to install a LFS-like toolchain - aka, similar to'
  orev 'How the Linux from Scratch system is bootstrapped.'
  e
  orev 'In order to do so, certain '+
        steelblue('assumptions')+' will have to be made.'
  e
  # ======================================================================= #
  # Next comes the general LFS prefix to use.
  # ======================================================================= #
  use_this_prefix    = '/home/LFS/'
  prefix_for_tools   = use_this_prefix+'tools'
  # ======================================================================= #
  # === tools_lib_path
  # ======================================================================= #
  tools_lib_path     = prefix_for_tools+'/lib'
  prefix_for_sources = use_this_prefix+'sources'
  orev 'The target directory for this boostrapped toolchain will be at:'
  e
  e "  #{steelblue(use_this_prefix)}"
  e
  mkdir(use_this_prefix)
  mkdir(prefix_for_tools)
  mkdir(prefix_for_sources)
  mkdir(tools_lib_path)
  unless File.symlink? '/tools'
    run_this_system_command_in_a_coloured_and_padded_manner("ln -sv #{prefix_for_tools} /")
  end
  # ======================================================================= #
  # === Create .bash_profile next:
  # ======================================================================= #
  this_file = File.expand_path('~/.bash_profile')
  unless File.exist? this_file
    what = <<-EOF
exec env -i HOME=$HOME TERM=$TERM PS1=' ' /bin/bash
EOF
    orev 'Next storing into the file `'+sfile(this_file)+rev+'`.'
    write_what_into(what, this_file)
  end
  # ======================================================================= #
  # === Create .bashrc next:
  # ======================================================================= #
  this_file = File.expand_path('~/.bashrc')
  # ======================================================================= #
  # Overrule for the LFS user:
  # ======================================================================= #
  this_file = File.expand_path('/home/lfs/.bashrc')
  architecture = `uname -m`.strip
  # ======================================================================= #
  # === lfs_target_architecture
  #
  # Specify which target architecture is to be used. Oddly enough GCC
  # seems to be picky about the name chosen here.
  # ======================================================================= #
  lfs_target_architecture = "#{architecture}-pc-linux-gnu"
  unless File.exist? this_file
    what = "set +h
umask 022
LFS=#{use_this_prefix}
LC_ALL=POSIX
LFS_TGT=#{lfs_target_architecture}
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL LFS_TGT PATH
"
    orev 'Next storing into the file `'+sfile(this_file)+
         rev+'`.'
    write_what_into(what, this_file)
  end
  # ======================================================================= #
  # Next compile binutils, first pass - see also this URL:
  #
  #   http://www.linuxfromscratch.org/lfs/view/development/chapter05/binutils-pass1.html
  #
  # ======================================================================= #
  _ = RBT::Action::SoftwareManager.new(:binutils) { :do_not_run_yet }
  _.clear_configure_options
  _.set_prefix_to_use('/tools')
  _.do_not_store_the_compile_time
  use_these_configure_options = <<-EOF
--with-sysroot=#{use_this_prefix}
--with-lib-path=/tools/lib
--target=#{lfs_target_architecture}
--disable-nls
--disable-werror
EOF
  _.set_internal_hash_configure_options use_these_configure_options.tr("\n", ' ')
  _.skip_postinstallation_step
  _.do_not_register_the_last_compiled_program
  _.run
  if is_on_64_bit?
    cd prefix_for_tools
    run_this_system_command_in_a_coloured_and_padded_manner 'ln -sv lib /tools/lib64'
  end
  # ======================================================================= #
  # Next prepare GCC
  # ======================================================================= #
  cd log_dir?
  _ = action(:Installer, :gcc) { :do_not_run_yet }
  extract_what_to(
    _.cookbook_dataset_program_path?,
    _.extracted_path?
  )
  target_dir = _.extracted_path?+
               remove_archive_from_the_end(
                 File.basename(_.cookbook_dataset_program_path?)
               )
  orev "Changing directory into #{sdir(target_dir)}#{rev} next."
  cd target_dir
  path_to_mpfr = return_path_to_the_archive_of_this_program(:mpfr)
  path_to_gmp  = return_path_to_the_archive_of_this_program(:gmp)
  path_to_mpc  = return_path_to_the_archive_of_this_program(:mpc)
  extract_what_to(
    path_to_mpfr,
    return_pwd
  )
  unless File.directory? 'mpfr'
    opnn; mv remove_archive_from_the_end(File.basename(path_to_mpfr)),'mpfr'
  end
  extract_what_to(
    path_to_gmp,
    return_pwd
  )
  unless File.directory? 'gmp'
    opnn; mv remove_archive_from_the_end(File.basename(path_to_gmp)),'gmp'
  end
  extract_what_to(
    path_to_mpc,
    return_pwd
  )
  unless File.directory? 'mpc'
    opnn; mv remove_archive_from_the_end(File.basename(path_to_mpc)),'mpc'
  end
  what = <<-EOF
for file in gcc/config/{linux,i386/linux{,64}}.h
do
cp -uv $file{,.orig}
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' -e 's@/usr@/tools@g' $file.orig > $file
echo '
#undef STANDARD_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
touch $file.orig
done

EOF
  run_this_system_command_in_a_coloured_and_padded_manner(what)
  adhoc_fix_gcc
  _.clear_configure_options
  _.set_prefix_to_use(prefix_for_tools)
  _.do_not_store_the_compile_time
  use_these_configure_options = <<-EOF
--target=#{lfs_target_architecture}
--with-glibc-version=2.11
--with-sysroot=#{use_this_prefix}
--with-newlib
--without-headers
--with-local-prefix=/tools
--with-native-system-header-dir=/tools/include
--enable-languages=c,c++
--disable-nls
--disable-shared
--disable-multilib
--disable-decimal-float
--disable-threads
--disable-libatomic
--disable-libgomp
--disable-libquadmath
--disable-libssp
--disable-libvtv
--disable-libstdcxx

EOF
  _.set_internal_hash_configure_options use_these_configure_options.tr("\n", ' ').squeeze(' ')
  _.skip_postinstallation_step
  _.do_not_register_the_last_compiled_program
  _.run
  # ======================================================================= #
  # Next install the linux kernel header files:
  # ======================================================================= #
  path_to_linux = return_path_to_the_archive_of_this_program(:linux)
  extract_what_to(
    path_to_linux,
    return_pwd
  )
  cd remove_archive_at_the_end(File.basename(path_to_linux))
  orev 'We are in the directory '+sdir(return_pwd)+rev+
       ' and will run three commands:'
  run_this_system_command_in_a_coloured_and_padded_manner 'make mrproper'
  run_this_system_command_in_a_coloured_and_padded_manner 'make headers'
  run_this_system_command_in_a_coloured_and_padded_manner 'cp -rv usr/include/* /tools/include'
  # ======================================================================= #
  # Next glibc:
  # ======================================================================= #
  cd log_dir?
  _ = action(:Installer, :glibc) { :do_not_run_yet }
  extract_what_to(
    _.cookbook_dataset_program_path?,
    _.extracted_path?
  )
  target_dir = _.extracted_path?+
               remove_archive_from_the_end(
                 File.basename(_.cookbook_dataset_program_path?)
               )
  orev "Changing directory into #{sdir(target_dir)}#{rev} next."
  _.clear_configure_options
  _.set_prefix_to_use(prefix_for_tools)
  _.do_not_store_the_compile_time
  use_these_configure_options = <<-EOF
--host=#{lfs_target_architecture}
--build=$(../scripts/config.guess)
--enable-kernel=3.2
--with-headers=/tools/include
EOF
  _.set_internal_hash_configure_options use_these_configure_options.tr("\n", ' ').squeeze(' ')
  _.skip_postinstallation_step
  _.do_not_register_the_last_compiled_program
  _.run
  # ======================================================================= #
  # Next install Libstdc++
  # ======================================================================= #
  cd log_dir?
  _ = action(:Installer, :gcc) { :do_not_run_yet }
  extract_what_to(
    _.cookbook_dataset_program_path?,
    _.extracted_path?
  )
  target_dir = _.extracted_path?+
               remove_archive_from_the_end(
                 File.basename(_.cookbook_dataset_program_path?)
               )
  orev "Changing directory into #{sdir(target_dir)}#{rev} next."
  cd target_dir
  mkdir 'build'
  cd 'build'
  orev 'We are now in the directory '+sdir(target_dir)+rev+'.'
  ENV['LD_CONFIG_PATH'] = tools_lib_path
  run_this_system_command_in_a_coloured_and_padded_manner "../libstdc++-v3/configure
  --host=#{lfs_target_architecture}
  --prefix=/tools
  --disable-bootstrap
  --disable-multilib
  --disable-nls
  --disable-libstdcxx-threads
  --disable-libstdcxx-pch
  --with-system-zlib
  --with-newlib
  --disable-libquadmath
  --with-gxx-include-dir=/tools/#{lfs_target_architecture}/include/c++/9.2.0".squeeze(' ').tr("\n",' ').squeeze(' ')
  # ======================================================================= #
  # This here may lead to problems - in that event, have a look at the
  # config.log file, as it should show why, for example, link tests
  # were disabled. --disable-libquadmath should help in that case,
  # by the way.
  # ======================================================================= #
  run_make_command
  run_make_install_command
end

#compile_the_main_program_including_the_dependenciesObject

#

compile_the_main_program_including_the_dependencies

#


3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3473

def compile_the_main_program_including_the_dependencies
  ensure_that_the_main_dataset_exists
  # ======================================================================= #
  # Prepend to this chain the known dependencies.
  # ======================================================================= #
  _ = compile_these_programs?
  _.prepend(
    required_deps_on?
  )
  _.flatten!
  set_array_compile_these_programs(_)
end

#compile_the_python_addons(array = ) ⇒ Object

#

compile_the_python_addons

This method can be used to compile all the various python addons.

Invocation example:

installer --python-addons
#


1775
1776
1777
1778
1779
1780
1781
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1775

def compile_the_python_addons(
    array = chained_programs?['python_addons']
  )
  orev "Installing various registered "\
       "python-addons (#{array.size.to_s}#{rev}) next."
  set_compile_these_programs(array)
end

#compile_the_ruby_addonsObject Also known as: install_the_ruby_addons

#

compile_the_ruby_addons

This method can be used to compile all the various ruby addons.

Invocation example:

ry --ruby-addons
#


5547
5548
5549
5550
5551
5552
5553
5554
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5547

def compile_the_ruby_addons
  array = chained_programs?['ruby_addons'].reject {|entry|
    entry == 'ruby'
  }
  orev "Installing various registered ruby-addons "\
       "(#{steelblue(array.size.to_s)}#{rev}) next."
  set_compile_these_programs(array, :do_not_replace)
end

#compile_these_programs?Boolean Also known as: compile_which_programs?, compile_array?

#

compile_these_programs?

#

Returns:

  • (Boolean)


1243
1244
1245
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1243

def compile_these_programs?
  @internal_hash[:compile_these_programs]
end

#compile_these_tags(i) ⇒ Object

#

compile_these_tags

Invocation example:

rbt --tag_compile=science
#


351
352
353
354
355
356
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 351

def compile_these_tags(i)
  orev "We will next find all programs that have the "\
       "tag `#{sfancy(i)}#{rev}`."
  _ = ::RBT.return_array_of_this_tag(i) # This depends on ScanForTags.
  set_compile_these_programs(_)
end

#compile_this_existing_file(i = first_argument? ) ⇒ Object Also known as: extract_this_archive_then_compile_it

#

compile_this_existing_file

This method can be used to compile an existing file.

#


6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6615

def compile_this_existing_file(
    i = first_argument?
  )
  _ = extract_to?.dup
  extract_this_source_archive(i, _)
  sanitized_first_argument = remove_archive_at_the_end(
    return_program_name_hyphen_then_program_version_or_first_argument
  )
  unless _.end_with? sanitized_first_argument
    _ << sanitized_first_argument
  end
  _ = remove_archive_from_the_end(_)
  orev "Changing directory into #{sdir(_)} #{rev}next."
  cd _
  run_configure
  run_make_then_make_install
end

#compile_this_program?Boolean Also known as: internal_program_name?, install_which_program?, install_this_program?, install_which_programs?, compile_which_program?, program_to_compile?, which_program?, this_program?, program?, array?, array_compile_these_programs?, program_name?, handle_this_program?, handle_which_program?, first_arg, name_of_program?, real_program_name?, name?, search_for_this_program?

#

compile_this_program?

This is the variable that will keep track of the program that the user wants to install or compile next.

It has to be set anew whenever a new program is compiled.

#

Returns:

  • (Boolean)


391
392
393
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 391

def compile_this_program?
  @internal_hash[:compile_this_program]
end

#compile_xcb_componentsObject

#

compile_xcb_components

To invoke this method, issue:

ry --compile-xcb-components
#


12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12959

def compile_xcb_components
  orev "Now compiling the various #{steelblue('xcb components')}#{rev}."
  # ======================================================================= #
  # The array should be kept in the correct order - xcbutilrenderutil
  # must come before xcbutilcursor, for instance.
  # ======================================================================= #
  array = %i(
    xcbproto
    libxcb
    xcbutil
    xcbutilerrors
    xcbutilimage
    xcbutilkeysyms
    xcbutilrenderutil
    xcbutilcursor
    xcbutilwm
    xcbutilxrm
  )
  set_array_compile_these_programs(array)
end

#compile_xfce_components_into_one_standalone_directoryObject

#

compile_xfce_components_into_one_standalone_directory

To invoke this method from the commandline, do:

ry --xfce-into-standalone-dir
#


1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1554

def compile_xfce_components_into_one_standalone_directory
  _ = return_xfce_components
  # ======================================================================= #
  # We currently (Oct 2018) will use a hardcoded path. This may change
  # at a later point in the future.
  # ======================================================================= #
  use_this_prefix = programs_dir?+'Xfce/4.16/'
  set_use_this_prefix(
    use_this_prefix
  )
  batch_compile_the_programs(_)
end

#compile_xorg_librariesObject

#

compile_xorg_libraries

Invocation example for this method:

ry --compile_xorg_libraries
#


3031
3032
3033
3034
3035
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3031

def compile_xorg_libraries
  _ = RBT.return_xorg_server_libraries
  orev "Next compiling `#{royalblue(_.size.to_s)}#{rev}` programs:"
  set_compile_these_programs(_)
end

#compiled_programs?(from_this_file = file_compiled_programs? ) ⇒ Boolean

#

compiled_programs?

This will grab the full dataset of compiled_programs.yml

#

Returns:

  • (Boolean)


1433
1434
1435
1436
1437
1438
1439
1440
1441
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1433

def compiled_programs?(
    from_this_file = file_compiled_programs?
  )
  if File.exist? from_this_file
    return load_yaml(from_this_file)
  else
    orev "The file at #{sfile(from_this_file)} #{rev}does not exist."
  end
end

#compiler_to_use?Boolean Also known as: compiler?

#

compiler_to_use?

#

Returns:

  • (Boolean)


478
479
480
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 478

def compiler_to_use?
  @internal_hash[:compiler_to_use]
end

#configuration?Boolean Also known as: config?

#

configuration?

#

Returns:

  • (Boolean)


1637
1638
1639
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1637

def configuration?
  RBT.configuration?
end
#
#

Returns:

  • (Boolean)


1279
1280
1281
1282
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1279

def configuration_setting_for_symlink_gir_files?
  RBT.configuration? and 
  RBT.configuration?.symlink_gir_files
end

#configure_base_directory?Boolean Also known as: configure_base_dir?, configure_base_directory_to_use?

#

configure_base_directory?

This should always have a trailing ‘/’ character IF it is defined. class Cookbook will make sure of that.

#

Returns:

  • (Boolean)


11709
11710
11711
11712
11713
11714
11715
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11709

def configure_base_directory?
  _ = @internal_hash[:configure_base_directory]
  if _.nil?
    _ = cookbook_dataset_configure_base_directory?
  end
  return _
end

#configure_command_to_use?Boolean

#

configure_command_to_use?

#

Returns:

  • (Boolean)


1644
1645
1646
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1644

def configure_command_to_use?
  cookbook_dataset?.configure_command_to_use?
end

#configure_has_a_higher_priority_than_meson?Boolean

#

configure_has_a_higher_priority_than_meson?

This method will return true if “configure” has a higher priority than “meson”. A yaml file keeps track of these priorities.

#

Returns:

  • (Boolean)


763
764
765
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 763

def configure_has_a_higher_priority_than_meson?
  ::RBT.configure_has_a_higher_priority_than_meson?
end

#configure_options?(_ = cookbook_dataset_configure_options? ) ⇒ Boolean

#

configure_options?

This method will retrieve the configure options. We default to using the configure-options stored in the cookbook dataset, but the user can overrule this on the commandline, where it will then be stored onto the appropriate @internal_hash variable.

#

Returns:

  • (Boolean)


313
314
315
316
317
318
319
320
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 313

def configure_options?(
    _ = cookbook_dataset_configure_options?
  )
  if @internal_hash[:configure_options]
    _ = @internal_hash[:configure_options]
  end
  return _
end

#configure_options_based_on_the_build_system_in_use?Boolean

#

configure_options_based_on_the_build_system_in_use?

#

Returns:

  • (Boolean)


282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 282

def configure_options_based_on_the_build_system_in_use?
  _ = use_which_build_system?
  case _
  # ======================================================================== #
  # === :configure
  # ======================================================================== #
  when :configure
    return configure_options?
  # ======================================================================== #
  # === :meson
  # ======================================================================== #
  when :meson
    return meson_configure_options?
  # ======================================================================== #
  # === :cmake
  # ======================================================================== #
  when :cmake
    return cmake_configure_options?
  else
    ''
  end
end

#configure_script_exists?Boolean Also known as: configure_script?

#

configure_script_exists?

#

Returns:

  • (Boolean)


471
472
473
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 471

def configure_script_exists?
  File.exist?('configure')
end

#consider_applying_a_patchObject

#

consider_applying_a_patch

Check whether we should apply a patch_set or not.

This should happen before we make use of preinstall, and after displaying an optional start message.

#


968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 968

def consider_applying_a_patch
  apply_patch = apply_patch?
  if apply_patch
    patchset = apply_patch
    patchset = [patchset] unless patchset.is_a? Array
    patchset.flatten.each {|this_patchset|
      cliner {
        this_dir = configure_base_directory?
        opne simp('Trying to ')+
             orange('apply a patch')+
             simp(' next:')+
             simp(' (in ')+
             sdir(this_dir)+
             simp(')')
        orev "  #{this_patchset}"
      }
      # =================================================================== #
      # (1) Download the patch unless it exists locally.
      # =================================================================== #
      unless File.exist? File.basename(this_patchset)
        orev 'Next trying to download '+steelblue(this_patchset)+"#{rev}."
        do_download_this_program(this_patchset)
      end
      this_command = "patch -Np1 -i #{File.basename(this_patchset)}"
      orev "Running this command next (from the directory "\
           "#{sdir(return_pwd)}#{rev}):"
      e
      e "#{sfancy(this_command)}"
      e
      # =================================================================== #
      # (2) Run the patchset.
      # =================================================================== #
      custom_system(this_command) # Delegate to Kernel#system.
    }
  end
end

#consider_changing_the_tab_title(i = return_program_name_then_hyphen_then_the_program_version, shall_we_rename_the_tab_title = rename_tab_title? ) ⇒ Object Also known as: set_title, rename_shell, change_tab_title, consider_renaming_the_kde_konsole_tab

#

consider_changing_the_tab_title (shell tag)

Use this method to change the title of a tab in a Terminal like Bash.

#


9994
9995
9996
9997
9998
9999
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9994

def consider_changing_the_tab_title(
    i                             = return_program_name_then_hyphen_then_the_program_version,
    shall_we_rename_the_tab_title = rename_tab_title?
  )
  action(:change_tab_title, [i, shall_we_rename_the_tab_title])
end

#consider_checking_whether_the_compiled_binaries_are_already_registeredObject

#

consider_checking_whether_the_compiled_binaries_are_already_registered

#


1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1310

def consider_checking_whether_the_compiled_binaries_are_already_registered
  if is_on_roebe? and # ← Only allow this on roebe-systems.
     is_app_dir? and
     has_to_be_compiled? and
     # compiled_successfully? and
     !prefix?.include?('Toolchain') # Make /home/Programs/Toolchain exempt from this.
    locally_existing_executables = Dir["#{prefix?}bin/*"].map {|entry|
      File.basename(entry)
    }
    locally_existing_executables << Dir["#{prefix?}sbin/*"].map {|entry|
      File.basename(entry)
    }
    locally_existing_executables.flatten!
    locally_existing_executables.uniq!
    registered_binaries = cookbooks_binaries?
    # ====================================================================== #
    # Next compare these entries:
    # ====================================================================== #
    locally_existing_executables.each {|entry|
      if registered_binaries.include? entry
        # In this case all is fine.
      else
        compile_this_program = compile_which_program?
        # ==================================================================== #
        # Else it is a not-registered binary, so report it.
        # ==================================================================== #
        cliner
        opne crimson('The entry ')+steelblue(entry)+
             crimson(' is not a registered')
        opne crimson('binary for the program ')+
             royalblue(compile_this_program)+
             crimson('.')
        opne olivedrab('^^^ Consider changing this. ^^^')
        cliner
        # ==================================================================== #
        # Since as of 09.12.2019 we will also store this result into a
        # log file.
        # ==================================================================== #
        what = "#{entry} belongs to the program called "\
               "#{rarrow?} #{compile_this_program}"
        into = "#{log_dir?}these_binaries.yml"
        orev "Storing "+steelblue(entry)+rev+
             "#{rev} into the file "+
             sfile(into)+
             "#{rev} as well."
        append_what_into("#{what}#{N}", into)
      end
    }
  end
end

#consider_comparing_the_installed_libraries_versus_the_assumed_libraries(i = compile_which_program? ) ⇒ Object

#

consider_comparing_the_installed_libraries_versus_the_assumed_libraries

This method will try to compare the installed libraries in an AppDir with the ones that are registered in the various cookbook .yml files.

This will happen ONLY if we are on a roebe-system; and ONLY if we use an AppDir approach.

#


4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4481

def consider_comparing_the_installed_libraries_versus_the_assumed_libraries(
    i = compile_which_program?
  )
  if is_on_roebe? and is_an_appdir_installation? # and
    # has_been_installed_successfully?
    require 'rbt/actions/individual_actions/cookbooks/suggest_cookbook_for/suggest_cookbook_for.rb'
    assumed_libraries = RBT.infer_these_libraries_will_be_installed_by( # <- this is defined ^^^
      i
    )
    if assumed_libraries
      libraries?.each {|this_already_registered_library|
        # ================================================================== #
        # The variable this_already_registered_library may be something
        # like 'libgmodule-2.0.so'.
        # ================================================================== #
        if assumed_libraries.any? {|entry|
            entry.include? this_already_registered_library
          }
        else
          orev "The library "\
               "#{orange(this_already_registered_library)}"\
               " #{rev}is not registered."
          orev "Consider #{crimson('updating')}#{rev} it (file: "\
               "#{sfile(i.to_s+'.yml')}#{rev})."
        end
      }
    end
  end
end

#consider_creating_a_log_file_containing_information_about_the_used_environment_and_time_of_compilationObject

#

consider_creating_a_log_file_containing_information_about_the_used_environment_and_time_of_compilation

This method will create a log file that will contain the information about all environment information.

#


4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4837

def consider_creating_a_log_file_containing_information_about_the_used_environment_and_time_of_compilation
  base_dir_to_use = rbt_log_dir?+'log_files/'
  mkdir(base_dir_to_use) unless File.directory?(base_dir_to_use)
  # ======================================================================= #
  # We must designate where we store this information. This will be
  # stored under log_files/.
  # ======================================================================= #
  store_where = "#{base_dir_to_use}"\
                "environment_information_for_the_program_#{program_name?.to_s}.md"
  create_log_file = RBT::CreateLogFile.new {{
    clear_the_main_hash:   true,
    store_where:           store_where,
    use_environment_flags: true,
    uses_appdir_prefix:    app_dir_prefix?,
    program_name:          program_name?
  }}
  if app_dir_prefix?
    # ===================================================================== #
    # We will also store into the appdir prefix.
    # ===================================================================== #
    create_log_file.do_store_into_the_appdir(
      prefix?.to_s+'Resources/'+File.basename(store_where)
    )
  end
end

#consider_creating_and_populating_the_pkgconfig_directoryObject

#

consider_creating_and_populating_the_pkgconfig_directory

#


1731
1732
1733
1734
1735
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1731

def consider_creating_and_populating_the_pkgconfig_directory
  if uses_an_appdir_prefix?
    action(:create_and_populate_pkgconfig_directory, appdir_prefix?)
  end
end

#consider_creating_appdir_skeleton_then_consider_running_autoconf_then_run_configure_then_make_then_make_installObject

#

consider_creating_appdir_skeleton_then_consider_running_autoconf_then_run_configure_then_make_then_make_install

#


2831
2832
2833
2834
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2831

def consider_creating_appdir_skeleton_then_consider_running_autoconf_then_run_configure_then_make_then_make_install
  consider_creating_appdir_skeleton
  consider_running_autoconf_then_run_configure_then_make_then_make_install
end

#consider_creating_the_build_directoryObject Also known as: consider_handling_build_directory

#

consider_creating_the_build_directory

This method can create a build directory, that is, a directory which will keep other generated files and directories inside of it.

Since as of April 2024, class BuildDirectory will handle this specific subtask.

#


330
331
332
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 330

def consider_creating_the_build_directory
  build_directory_object?.consider_creating_the_build_directory_and_then_entering_it
end

#consider_displaying_the_start_messageObject

#

consider_displaying_the_start_message

#


8145
8146
8147
8148
8149
8150
8151
8152
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8145

def consider_displaying_the_start_message
  _ = cookbook_dataset?.optional_start_message
  if _
    unless _.empty? 
      opne sfancy(_)
    end
  end
end

#consider_enabling_python2(shall_we_enable_python_2 = (on_roebe? and !do_we_use_python3?)) ⇒ Object Also known as: do_use_python2

#

consider_enabling_python2

This may ensure that we will use python 2.x, primarily due to the meson build system. Right now it only works on roebe-systems though.

It can also be enabled from the commandline, such as by issuing the following command:

rbt --enable-python2
#


4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4530

def consider_enabling_python2(
    shall_we_enable_python_2 = (on_roebe? and !do_we_use_python3?)
  )
  if shall_we_enable_python_2
    # ====================================================================== #
    # Try to use python version 3 here.
    # ====================================================================== #
    if File.directory?(programs_directory?+'Python/')
      availabe_python_versions = Dir[programs_directory?+'Python/*'].select {|entry|
        File.directory? entry
      }.select {|entries_with_numbers|
        entries_with_numbers =~ /\d+/
      }.select {|entries_that_might_be_python_version_two|
        entries_that_might_be_python_version_two.include? 'Python/2'
      }
      unless availabe_python_versions.empty?
        use_this_python_version = availabe_python_versions.first
        action(:ToCurrent, use_this_python_version)
        return true # Determine that it was a success.
      end
    end
  end
  false
end

#consider_enabling_python3(shall_we_enable_python_3 = (on_roebe? and !do_we_use_python3?)) ⇒ Object Also known as: do_use_python3

#

consider_enabling_python3

This may ensure that we will use python 3.x, primarily due to the meson build system. Right now it only works on roebe-systems though.

It can also be enabled from the commandline, such as by issuing the following command:

rbt --enable-python3
#


3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3363

def consider_enabling_python3(
    shall_we_enable_python_3 = (on_roebe? and !do_we_use_python3?)
  )
  if shall_we_enable_python_3
    # ====================================================================== #
    # Try to use python version 3 here.
    # ====================================================================== #
    if File.directory?(programs_directory?+'Python/')
      availabe_python_versions = Dir[programs_directory?+'Python/*'].select {|entry|
        File.directory? entry
      }.select {|entries_with_numbers|
        entries_with_numbers =~ /\d+/
      }.select {|entries_that_might_be_python_version_three|
        entries_that_might_be_python_version_three.include? 'Python/3'
      }
      unless availabe_python_versions.empty?
        use_this_python_version = availabe_python_versions.first
        action(:ToCurrent, use_this_python_version)
        return true # Determine that it was a success.
      end
    end
  end
  false
end

#consider_entering_the_log_directoryObject

#

consider_entering_the_log_directory

#


8262
8263
8264
8265
8266
8267
8268
8269
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8262

def consider_entering_the_log_directory
  # ======================================================================= #
  # cd into the main log directory:
  # ======================================================================= #
  if cd_into_the_rbt_log_directory?
    cd(rbt_log_directory?, :be_quiet)
  end
end

#consider_making_use_of_cookbook_aliasesObject

#

consider_making_use_of_cookbook_aliases

#


5434
5435
5436
5437
5438
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5434

def consider_making_use_of_cookbook_aliases
  unless make_use_of_cookbook_aliases? == :user_disabled_this_setting_via_the_commandline
    @internal_hash[:make_use_of_cookbook_aliases] = true
  end
end

#consider_modifying_postinstall_with_this_prefix(i = program_version? ) ⇒ Object Also known as: consider_modifying_postinstall

#

consider_modifying_postinstall_with_this_prefix

This method can be used to modify all prefix-targets in the postinstall Array.

We will only modify the program_version normally here.

#


8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8169

def consider_modifying_postinstall_with_this_prefix(
    i = program_version?
  )
  return unless i
  unless i.start_with? '/'
    i = i.dup if i.frozen?
    i.prepend('/') # A bit hackish as a workaround but this works.
  end
  # ======================================================================= #
  # The regex is also stored here:
  #
  #   https://rubular.com/r/U7J9cbbqUBPI
  # 
  # ======================================================================= #
  regex_to_use = /\/(\d{1,2}\.?\d{1,2}\.?\d{0,2})/
  cookbook_dataset_postinstallation = cookbook_dataset_postinstallation?
  if cookbook_dataset_postinstallation
    set_postinstallation(
      cookbook_dataset_postinstallation.map {|line|
        # =================================================================== #
        # We must use .gsub!() here rather than .sub!() because the
        # full line may be like this:
        #
        #   ln -s /Programs/Gtk+/3.24.1/include/gtk-2.0 /Programs/Gtk+/3.24.1/include/gtk
        #
        # =================================================================== #
        line.gsub!(regex_to_use, i)
        line
      }
    )
  end
end

#consider_removing_empty_subdirectories(prefix = prefix?.to_s) ⇒ Object Also known as: consider_running_cleanup_actions

#

consider_removing_empty_subdirectories

We will remove empty subdirectories but only from AppDir-like prefixes.

#


10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10808

def consider_removing_empty_subdirectories(
    prefix = prefix?.to_s # ← This will be like "/Programs/Gcide/0.52/".
  )
  if uses_an_appdir_prefix?
    subdirectories = Dir[prefix+'*'].select {|entry|
      File.directory?(entry) and Dir.empty?(entry)
    }
    # ===================================================================== #
    # Since as of December 2022 we will remove only some empty
    # subdirectories.
    # ===================================================================== #
    subdirectories.select! {|entry|
      RBT::SymlinkFromToCurrent::ARRAY_ALLOWED_SUBDIRECTORIES.include?(
        File.basename(entry)
      )
    }
    remove_directories(
      subdirectories
    )
    consider_removing_the_current_symlink_if_the_directory_is_empty
    consider_removing_the_settings_directory_if_it_is_empty
    consider_removing_the_empty_versioned_directory
    consider_removing_the_empty_base_directory_of_the_program
  end
end
#
#


650
651
652
653
654
655
656
657
658
659
660
661
662
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 650

def consider_removing_the_current_symlink_if_the_directory_is_empty
  if uses_an_appdir_prefix?
    prefix = prefix?.to_s
    symlink_current = rds(
      File.dirname(prefix)+'/Current'
    )
    if File.symlink?(symlink_current) and 
       File.directory?(File.readlink(symlink_current)) and
       Dir.empty?(File.readlink(symlink_current))
      delete_this_symlink(symlink_current)
    end
  end
end

#consider_removing_the_empty_base_directory_of_the_programObject

#

consider_removing_the_empty_base_directory_of_the_program

#


10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10436

def consider_removing_the_empty_base_directory_of_the_program
  if uses_an_appdir_prefix? and !is_a_gem_file?
    # ===================================================================== #
    # The variable called target may be a String such as
    # '/home/Programs/Htop/'.
    # ===================================================================== #
    target = rds(
      "#{programs_dir?}#{program_name?.to_s.capitalize.delete('-_')}/"
    )
    if File.directory?(target) and
       Dir.empty?(target)
      opne tomato('Removing')+
           "#{rev} the empty directory at `"+
           sdir(target)+"#{rev}` next."
      remove_this_directory(target)
    end
  end
end

#consider_removing_the_empty_versioned_directoryObject

#

consider_removing_the_empty_versioned_directory

#


4104
4105
4106
4107
4108
4109
4110
4111
4112
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4104

def consider_removing_the_empty_versioned_directory
  if uses_an_appdir_prefix?
    prefix = prefix?.to_s
    if File.directory?(prefix) and
      Dir.empty?(prefix) and !(prefix == '/')
      remove_this_directory(prefix)
    end
  end
end

#consider_removing_the_old_extracted_directory_if_it_exists(i = remove_archive_stuff_from_the_end(will_be_extracted_towards?)) ⇒ Object

#

consider_removing_the_old_extracted_directory_if_it_exists

#


1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1680

def consider_removing_the_old_extracted_directory_if_it_exists(
    i = remove_archive_stuff_from_the_end(will_be_extracted_towards?)
  )
  i = rds(i) if i.include?('//')
  # ======================================================================= #
  # We also check whether the target is or appears to be under the
  # log-directory that RBT uses.
  # ======================================================================= #
  if File.directory?(i) and i.include?(log_dir?) and !(i == '/')
    if i == log_dir? # The log-directory can not be removed via this method.
      orev "Can not remove #{sdir(i)}#{rev}."
    else
      orev "#{steelblue('Removing')}#{rev}"\
           " the old, extracted directory at #{sdir(i)}"\
           "#{rev} next."
      remove_directory(i)
    end
  end
end

#consider_removing_the_settings_directory_if_it_is_emptyObject

#

consider_removing_the_settings_directory_if_it_is_empty

This method will attempt to remove the /Settings subdirectory, if it is empty.

#


4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4090

def consider_removing_the_settings_directory_if_it_is_empty
  if uses_an_appdir_prefix?
    prefix = prefix?.to_s
    settings_directory = File.dirname(prefix)+'/Settings'
    if File.directory?(settings_directory) and
       Dir.empty?(settings_directory)
      remove_this_directory(settings_directory)
    end
  end
end

#consider_reporting_the_cflags_we_will_useObject

#

consider_reporting_the_cflags_we_will_use

Notify the user which CFLAGS he is using.

#


9019
9020
9021
9022
9023
9024
9025
9026
9027
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9019

def consider_reporting_the_cflags_we_will_use
  _ = cflags?
  unless _.empty?
    orev "The #{steelblue('CFLAGS')} #{rev}in use are:"
    e
    e "  #{simp(_)}"
    e
  end
end

#consider_reporting_the_time_it_took_to_compile_this_programObject

#

consider_reporting_the_time_it_took_to_compile_this_program

#


1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1597

def consider_reporting_the_time_it_took_to_compile_this_program
  if time_the_compilation? # and no_error_has_occurred?
    program_name = compile_which_program?.to_s # Keep a reference.
    _ = @internal_hash[:array_time_compilation]
    # ===================================================================== #
    # We need the start-time and the end-time, in order to calculate
    # the difference.
    # ===================================================================== #
    start_time = @internal_hash[:array_time_compilation][-2]
    end_time   = @internal_hash[:array_time_compilation][-1]
    # ===================================================================== #
    # We must next check that both end time and start time exist, as
    # otherwise we would run into an error.
    # ===================================================================== #
    if start_time and end_time
      duration   = (end_time - start_time)
      rounded_duration = duration.round(3)
      in_minutes = (rounded_duration.to_f / 60.0).round(2)
      if has_to_be_compiled?
        compiling_or_installing = 'Compiling'
      else
        compiling_or_installing = 'Installing'
      end
      # =================================================================== #
      # Notify the user how long it took to compile/install the given
      # program at hand.
      # =================================================================== #
      orev "#{compiling_or_installing} the program `"\
           "#{olivedrab(program_name)}"\
           "#{rev}` took #{sfancy(rounded_duration.to_s)} #{rev}seconds "\
           "(aka #{sfancy(in_minutes)} #{rev}minutes)."
      # =================================================================== #
      # Also store this now into a file.
      # =================================================================== #
      _ = RBT.file_storing_the_time_it_took_to_compile_programs
      if File.exist? _
        dataset = YAML.load_file(_)
      else
        dataset = {} # Use a Hash format.
      end
      dataset[program_name] = rounded_duration
      orev "Also storing this information into the file"
      orev "  #{sfile(_)}"
      write_what_into(YAML.dump(dataset), _)
    else
      orev 'Can not store the time as the variable tracking the time'
      orev 'is incorrect. It will be displayed next, to aid in debugging:'
      e
      pp @internal_hash[:array_time_compilation][-1]
      e
    end
  end
end

#consider_running_autoconf_then_run_configure_then_make_then_make_installObject

#

consider_running_autoconf_then_run_configure_then_make_then_make_install

#


1301
1302
1303
1304
1305
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1301

def consider_running_autoconf_then_run_configure_then_make_then_make_install
  consider_running_the_pre_configure_steps
  decide_whether_to_invoke_the_autoconf_command
  run_configure_then_make_then_make_install
end

#consider_running_the_pre_configure_stepsObject

#

consider_running_the_pre_configure_steps

This method will perform the pre-configure steps, if they were given at all that is.

#


1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1111

def consider_running_the_pre_configure_steps
  _ = pre_configure_steps?
  unless _.empty?
    _.each {|entry|
      e steelblue('Running the following command next, '\
        'as a pre-configure step')
      e peru(' (in the directory ')+
        sdir(return_pwd)+
        peru(')')+
        steelblue(':')
      e
      e mediumseagreen("  #{entry}")
      system entry
      e
    }
  end
end

#consider_sanitizing_the_program_pathObject

#

consider_sanitizing_the_program_path

This method will only be used when @internal_hash has been set.

#


2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2982

def consider_sanitizing_the_program_path
  if @internal_hash[:use_this_specific_program_version]
    # ===================================================================== #
    # The above variable is nil by default, so if it has another value
    # we can use this.
    # ===================================================================== #
    splitted    = @internal_hash[:use_this_specific_program_version].split('/')
    last        = splitted.last # ← This will hold the new program version.
    old_value   = cookbook_dataset_program_path?.dup
    old_version = program_information_return_version(old_value)
    set_cookbook_dataset_program_version(
      last
    )
    old_value.sub!(/#{old_version}/, last)
    set_cookbook_dataset_program(
      remove_extension(
        File.basename(old_value)
      )
    )
    set_cookbook_dataset_program_path(old_value)
  end
end

#consider_showing_the_flexbox(compile_this_program = compile_which_program? ) ⇒ Object Also known as: do_show_the_infobox, infobox_for

#

consider_showing_the_flexbox

#


1670
1671
1672
1673
1674
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1670

def consider_showing_the_flexbox(
    compile_this_program = compile_which_program?
  )
  show_flexbox(compile_this_program) if show_flexbox?
end

#consider_storing_a_snapshotObject Also known as: snapshot, time_snapshot, store_time_snapshot

#

consider_storing_a_snapshot

This method may store the compilation time into an Array.

#


10164
10165
10166
10167
10168
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10164

def consider_storing_a_snapshot
  if @internal_hash[:time_compilation]
    @internal_hash[:array_time_compilation] << Time.now
  end
end

#consider_symlinking_glib_schema_files_into_the_usr_share_hierarchyObject

#

consider_symlinking_glib_schema_files_into_the_usr_share_hierarchy

Invoke this method if we wish to symlink the schema files into the /usr/ hierarchy.

#


12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12496

def consider_symlinking_glib_schema_files_into_the_usr_share_hierarchy
  if uses_appdir_prefix? and
     use_glib_schema? and
    !an_error_has_occurred?
    # ===================================================================== #
    # Delegate towards class SymlinGlibSchema eventually:
    # ===================================================================== #
    symlink_glib_schema
  end
end

#consider_symlinking_the_pkgconfig_filesObject Also known as: consider_symlinking_pkgconfig_files

#

consider_symlinking_the_pkgconfig_files

If the cookbook has symlinking_pkgconfig_files set to true, and if the program is compiled, as AppDir, then we will symlink .pc files into /usr/lib/pkgconfig/, if the latter one exists.

#


5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5483

def consider_symlinking_the_pkgconfig_files
  target_dir = '/usr/lib/pkgconfig/'
  if symlink_pkgconfig_files? and
     is_appdir_compilation_style? and
     File.directory?(target_dir) and
     !do_not_symlink?
    appdir_target_with_pc_files = "#{return_appdir_prefix}lib/pkgconfig/"
    # ===================================================================== #
    # Delegate towards class SymlinkPkgconfigFiles next.
    # ===================================================================== #
    SymlinkPkgconfigFiles.new(appdir_target_with_pc_files)
  end
end

#consider_to_run_ldconfigObject Also known as: consider_running_ldconfig

#

consider_to_run_ldconfig (ldconfig tag)

Run ‘ldconfig’ here in this method.

Check whether we are allowed to invoke this method before calling it however.

#


617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 617

def consider_to_run_ldconfig
  return if are_we_on_windows?
  if continue_after_make_step? # Makes only sense if we are past the make-step.
    # ====================================================================== #
    # ruby and python add-ons normally do not require ldconfig,
    # so we don't have to invoke it.
    # ====================================================================== #
    if tags?.include?('ruby') or
       tags?.include?('python')
      do_not_run_ldconfig
    end
    # ====================================================================== #
    # Only run it if the config-file tells us to do so and only for
    # those programs that have to be compiled.
    #
    # class RBT::Action::SoftwareManager will, however had, NOT run ldconfig when the
    # program has failed to install - that is specifically if an
    # error has occurred.
    # ====================================================================== #
    if run_ldconfig? and
       has_to_be_compiled? and
       can_we_continue? #and
      #!a_problem_has_occurred? and # Also check for no problem.
      #!an_error_has_occurred?
      # ====================================================================== #
      # Build up the command to run next.
      # ====================================================================== #
      cmd_to_run = 'ldconfig'.dup
      # ====================================================================== #
      # We could be verbose, but it is not that useful, so uncomment it.
      # cmd_to_run << ' -v'
      # ====================================================================== #
      # Since as of July 2011, we will be quieter and ignore whether
      # ldconfig exists or not.
      # ====================================================================== #
      cmd_to_run << " #{SHELL_ERROR_CODE}"
      # ====================================================================== #
      # Check for superuser privilege next. ldconfig requires the
      # superuser.
      # ====================================================================== #
      if is_superuser?
        orev "Now running `#{sfancy(cmd_to_run)}#{rev}`." # We output the ldconfig command variant here.
        system cmd_to_run
      else
        orev "You are not the superuser so we will not "\
             "try to run `#{sfancy(cmd_to_run)}#{rev}`."
      end
    end
  end
end

#consider_uploading_binaries(upload_binaries = upload_binaries? ) ⇒ Object

#

consider_uploading_binaries

This method can be used to upload some binaries.

Invocation example:

ry htop uploadbinaries
#


7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7648

def consider_uploading_binaries(
    upload_binaries = upload_binaries?
  )
  if upload_binaries
    orev 'We will next upload any files found in the bin/ subdirectory.'
    _ = "#{dataset?.prefix}bin/"
    files = Dir["#{_}*"]
    if files.empty?
      orev "No files were found in #{sdir(_)}#{rev}."
    else
      upload_to(
        files, :default, 'bin'
      )
    end
  end
end

#consider_using_maximum_speed_for_compilationObject

#

consider_using_maximum_speed_for_compilation

This method also has to check whether we will compile the given program at all or whether we will not.

#


3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3043

def consider_using_maximum_speed_for_compilation
  if use_maximum_speed_for_compilation? and
     the_program_has_to_be_compiled? and
     can_we_continue?
    orev "The configuration file "\
         "#{sfile('use_maximum_speed_for_compilation.yml')}#{rev}"\
         " specified"
    orev "that maximum speed should be used for compilation."
    orev "This means to pass the #{orange('-j')} #{rev}"\
         "option to the program #{slateblue('make')}#{rev},"
    orev "with the number of processors this computer "+
         'has ('+
         steelblue(this_computer_has_how_many_processors?.to_s)+
         "#{rev})."
    speed_up_the_compilation
  end
end

#consider_using_this_file_for_the_configure_options_that_are_to_be_used(this_file) ⇒ Object

#

consider_using_this_file_for_the_configure_options_that_are_to_be_used

The argument to this method should be the file that contains the configure-options.

#


5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5611

def consider_using_this_file_for_the_configure_options_that_are_to_be_used(
    this_file
  )
  if File.exist? this_file
    orev 'Making use of the file '+sfile(this_file)+rev+' for configure-options.'
    dataset = File.read(this_file).strip.tr("\n", ' ').squeeze(' ')
    orev 'The options are:'
    e
    e sfancy("  #{dataset}")
    e
    clear_configure_options
    @internal_hash[:configure_options] = dataset
  else
    opnn; no_file_exists_at(this_file)
  end
end

#considering_creating_the_build_directory(i = DEFAULT_NAME_FOR_THE_BUILD_DIRECTORY) ⇒ Object

#

considering_creating_the_build_directory

#


181
182
183
184
185
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 181

def considering_creating_the_build_directory(
    i = DEFAULT_NAME_FOR_THE_BUILD_DIRECTORY
  )
  create_the_build_directory(i) if use_build_directory?
end

#considering_setting_any_special_environment_variable(be_verbose = true) ⇒ Object

considering_setting_any_special_environment_variable

This is the method that will be used to determine whether we have to set any special environment variable.

#


12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12741

def considering_setting_any_special_environment_variable(
    be_verbose = true
  )
  _ = set_env_variables?
  if _ and !extract_only? # If we only extract something, then we don't need to do the rest.
    if be_verbose
      orev "Making use of these #{aliceblue('special environment variables')}#{rev}:"
      e # And an elegant extra line, as of July 2021.
    end
    set_these_env_variables(
      _, :do_set_these_variables, :be_verbose
    )
    e
  end
end

#continue_after_make_step?Boolean

#

continue_after_make_step?

#

Returns:

  • (Boolean)


1864
1865
1866
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1864

def continue_after_make_step?
  @internal_hash[:continue_after_make_step]
end

#convert_to_non_traditional(i = program?) ) ⇒ Object

#

convert_to_non_traditional

Use this method to convert a program to non-traditional (Gobolinux style) again.

#


8886
8887
8888
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8886

def convert_to_non_traditional(i = program?)
  RBT::ConvertToNonTraditional.new(i)
end

#convert_to_traditional(i = compile_which_program? ) ⇒ Object

#

convert_to_traditional

Convert to traditional format via this method here.

Invoke this by doing something like:

ry php ctotrad
#


4599
4600
4601
4602
4603
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4599

def convert_to_traditional(
    i = compile_which_program?
  )
  RBT::ConvertToTraditional.new(i) # bl ConvertToTraditional
end

#cookbook_aliases?Boolean

#

cookbook_aliases?

#

Returns:

  • (Boolean)


920
921
922
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 920

def cookbook_aliases?
  @internal_hash[:cookbook_aliases]
end

#cookbook_dataset_apply_patch?Boolean Also known as: apply_patch?

#

cookbook_dataset_apply_patch?

#

Returns:

  • (Boolean)


1265
1266
1267
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1265

def cookbook_dataset_apply_patch?
  cookbook_dataset?.apply_patch?
end

#cookbook_dataset_base_dir?Boolean

#

cookbook_dataset_base_dir?

#

Returns:

  • (Boolean)


1703
1704
1705
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1703

def cookbook_dataset_base_dir?
  cookbook_dataset?.base_dir?
end

#cookbook_dataset_build_static?Boolean

#

cookbook_dataset_build_static?

#

Returns:

  • (Boolean)


464
465
466
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 464

def cookbook_dataset_build_static?
  cookbook_dataset?.build_static?
end

#cookbook_dataset_cmake_configure_options?Boolean Also known as: cmake_configure_options?

#

cookbook_dataset_cmake_configure_options?

This method will return all options used for the “cmake” build system of the program at hand, should cmake be used at all.

If GNU configure is used then this method will not be used.

#

Returns:

  • (Boolean)


330
331
332
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 330

def cookbook_dataset_cmake_configure_options?
  cookbook_dataset?.cmake_configure_options?
end

#cookbook_dataset_configure_base_directory?Boolean Also known as: cookbook_dataset_configure_base_dir?

#

cookbook_dataset_configure_base_directory?

We ask the cookbook-dataset object for the configure base directory.

Most programs will NOT have such a setting.

#

Returns:

  • (Boolean)


1402
1403
1404
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1402

def cookbook_dataset_configure_base_directory?
  cookbook_dataset?.configure_base_directory?
end

#cookbook_dataset_configure_command_to_use?Boolean Also known as: cookbook_dataset_configure_command?, configure_command?

#

cookbook_dataset_configure_command_to_use?

Most programs may use GNU autoconfigure, and thus “configure”, but a few programs such as openssl, require another program name, such as “/config”. This method here will query whether the given program needs such a name. If this is the case then this will be used as name rather than the alternative name “configure”.

#

Returns:

  • (Boolean)


519
520
521
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 519

def cookbook_dataset_configure_command_to_use?
  cookbook_dataset?.configure_command_to_use?
end

#cookbook_dataset_flatpak_url?Boolean Also known as: flatpak_url?, flatpak?

#

cookbook_dataset_flatpak_url?

#

Returns:

  • (Boolean)


745
746
747
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 745

def cookbook_dataset_flatpak_url?
  cookbook_dataset?.flatpak_url
end

#cookbook_dataset_has_been_initialized?Boolean

#

cookbook_dataset_has_been_initialized?

#

Returns:

  • (Boolean)


669
670
671
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 669

def cookbook_dataset_has_been_initialized?
  cookbook_dataset?.nil?
end

#cookbook_dataset_headers?Boolean Also known as: headers?

#

cookbook_dataset_headers?

#

Returns:

  • (Boolean)


882
883
884
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 882

def cookbook_dataset_headers?
  cookbook_dataset?.headers?
end

#cookbook_dataset_ignore_errors?Boolean

#

cookbook_dataset_ignore_errors?

#

Returns:

  • (Boolean)


1791
1792
1793
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1791

def cookbook_dataset_ignore_errors?
  cookbook_dataset? and cookbook_dataset?.ignore_errors?
end

#cookbook_dataset_keep_extracted?Boolean Also known as: dataset_keep_extracted?

#

cookbook_dataset_keep_extracted?

This method simply wraps over the cookbook_dataset keep_extracted value.

#

Returns:

  • (Boolean)


11867
11868
11869
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11867

def cookbook_dataset_keep_extracted?
  cookbook_dataset?.keep_extracted?
end

#cookbook_dataset_libraries?Boolean Also known as: libraries?

#

cookbook_dataset_libraries?

#

Returns:

  • (Boolean)


546
547
548
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 546

def cookbook_dataset_libraries?
  cookbook_dataset?.libraries?
end

#cookbook_dataset_make_command?Boolean

#

cookbook_dataset_make_command?

#

Returns:

  • (Boolean)


1272
1273
1274
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1272

def cookbook_dataset_make_command?
  cookbook_dataset?.use_which_make_command?
end

#cookbook_dataset_manual_steps?Boolean

#

cookbook_dataset_manual_steps?

#

Returns:

  • (Boolean)


8772
8773
8774
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8772

def cookbook_dataset_manual_steps?
  cookbook_dataset?.manual_steps?
end

#cookbook_dataset_meson_configure_options?Boolean Also known as: meson_configure_options?, cookbook_meson_configure_options?

#

cookbook_dataset_meson_configure_options?

This method will return all options used for the “meson” build system of the program at hand, should meson be used at all.

#

Returns:

  • (Boolean)


1741
1742
1743
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1741

def cookbook_dataset_meson_configure_options?
  cookbook_dataset?.meson_configure_options?
end

#cookbook_dataset_parameters_to_make?Boolean Also known as: cookbook_dataset_make_options?

#

cookbook_dataset_parameters_to_make?

#

Returns:

  • (Boolean)


11674
11675
11676
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11674

def cookbook_dataset_parameters_to_make?
  cookbook_dataset?.parameters_to_make?
end

#cookbook_dataset_postinstall?(i = cookbook_dataset? ) ⇒ Boolean Also known as: cookbook_dataset_postinstallation?

#

cookbook_dataset_postinstall?

Query from the cookbook-yaml file at hand whether we will run a postinstall-step or not.

#

Returns:

  • (Boolean)


1654
1655
1656
1657
1658
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1654

def cookbook_dataset_postinstall?(
    i = cookbook_dataset?
  )
  i and i.postinstall?
end

#cookbook_dataset_pre_make_commands?Boolean

#

cookbook_dataset_pre_make_commands?

The premake options are the ones that are run before “make” is invoked.

#

Returns:

  • (Boolean)


563
564
565
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 563

def cookbook_dataset_pre_make_commands?
  cookbook_dataset?.pre_make_commands?
end

#cookbook_dataset_prefix?Boolean Also known as: cookbook_prefix?, cookbooks_prefix?, dataset_prefix?, determine_prefix_from_the_cookbook_dataset

#

cookbook_dataset_prefix?

This method name may be a slight misnomer, since class Prefix may handle the prefix here.

#

Returns:

  • (Boolean)


1072
1073
1074
1075
1076
1077
1078
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1072

def cookbook_dataset_prefix?
  if cookbook_dataset?
    cookbook_dataset?.prefix?
  else
    nil
  end
end

#cookbook_dataset_preinstall?Boolean Also known as: preinstall?

#

cookbook_dataset_preinstall?

#

Returns:

  • (Boolean)


11991
11992
11993
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11991

def cookbook_dataset_preinstall?
  cookbook_dataset?.preinstall?
end

#cookbook_dataset_program_has_to_be_compiled?Boolean Also known as: cookbook_dataset_has_to_be_compiled?, does_the_program_have_to_be_compiled?

#

cookbook_dataset_program_has_to_be_compiled?

#

Returns:

  • (Boolean)


11219
11220
11221
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11219

def cookbook_dataset_program_has_to_be_compiled?
  cookbook_dataset? and cookbook_dataset?.has_to_be_compiled?
end

#cookbook_dataset_program_name?Boolean

#

cookbook_dataset_program_name?

#

Returns:

  • (Boolean)


11660
11661
11662
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11660

def cookbook_dataset_program_name?
  cookbook_dataset?.program_name? # Delegate to cookbook_dataset? here.
end

#cookbook_dataset_program_path?(i = cookbook_dataset? ) ⇒ Boolean Also known as: cookbook_dataset_path?, full_path?, cookbooks_program_path?, cookbook_program_path?, program_path?, local_path?, cookbook_local_path?

#

cookbook_dataset_program_path?

#

Returns:

  • (Boolean)


180
181
182
183
184
185
186
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 180

def cookbook_dataset_program_path?(
    i = cookbook_dataset?
  )
  if i
    i.local_path
  end
end

#cookbook_dataset_run_configure?Boolean Also known as: cookbook_dataset_run_configure_script?, shall_we_run_configure?

#

cookbook_dataset_run_configure?

The program “manpages” is an example for a program that does not need to run configure.

#

Returns:

  • (Boolean)


11745
11746
11747
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11745

def cookbook_dataset_run_configure?
  cookbook_dataset?.run_configure?
end

#cookbook_dataset_run_make?Boolean

#

cookbook_dataset_run_make?

#

Returns:

  • (Boolean)


553
554
555
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 553

def cookbook_dataset_run_make?
  cookbook_dataset?.run_make?
end

#cookbook_dataset_set_configure_command(i) ⇒ Object Also known as: set_configure_command

#

cookbook_dataset_set_configure_command

#


8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8851

def cookbook_dataset_set_configure_command(i)
  case i
  # ======================================================================= #
  # === :meson
  # ======================================================================= #
  when :meson
    i = i.to_s
  end
  cookbook_dataset?.set_configure_command_to_use(i)
end

#cookbook_dataset_set_program_name(i) ⇒ Object

#

cookbook_dataset_set_program_name

#


4301
4302
4303
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4301

def cookbook_dataset_set_program_name(i)
  cookbook_dataset?.set_program_name(i)
end

#cookbook_dataset_set_program_version(i) ⇒ Object

#

cookbook_dataset_set_program_version

#


11874
11875
11876
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11874

def cookbook_dataset_set_program_version(i)
  cookbook_dataset?.set_program_version(i)
end

#cookbook_dataset_set_this_archive(i) ⇒ Object

#

cookbook_dataset_set_this_archive

#


9770
9771
9772
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9770

def cookbook_dataset_set_this_archive(i)
  cookbook_dataset?.set_this_archive(i)
end

#cookbook_dataset_short_name?Boolean Also known as: short_name?

#

cookbook_dataset_short_name?

#

Returns:

  • (Boolean)


1229
1230
1231
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1229

def cookbook_dataset_short_name?
  cookbook_dataset?.short_name?.to_s
end
#
#

Returns:

  • (Boolean)


570
571
572
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 570

def cookbook_dataset_symlink_headers?
  cookbook_dataset?.symlink_headers
end

#cookbook_dataset_use_autoconf?Boolean

#

cookbook_dataset_use_autoconf?

#

Returns:

  • (Boolean)


9846
9847
9848
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9846

def cookbook_dataset_use_autoconf?
  cookbook_dataset?.use_autoconf?
end

#cookbook_dataset_use_autogen?Boolean

#

cookbook_dataset_use_autogen?

Query-method over as to the cookbook-dataset has an entry called use_autogen set to true.

#

Returns:

  • (Boolean)


1326
1327
1328
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1326

def cookbook_dataset_use_autogen?
  cookbook_dataset?.use_autogen?
end

#cookbook_dataset_use_build_directory?Boolean

#

cookbook_dataset_use_build_directory?

#

Returns:

  • (Boolean)


12015
12016
12017
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12015

def cookbook_dataset_use_build_directory?
  cookbook_dataset?.use_build_directory?
end

#cookbook_dataset_use_this_build_system?Boolean Also known as: use_this_build_system?, build_system_in_use?, cookbookset_dataset_use_which_build_system?, cookbook_build_system?

#

cookbook_dataset_use_this_build_system?

Query which build-system is to be used. This will determine how we will install a given program at hand.

#

Returns:

  • (Boolean)


11903
11904
11905
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11903

def cookbook_dataset_use_this_build_system?
  cookbook_dataset?.use_which_build_system?
end

#cookbook_dataset_use_this_make_command?Boolean

#

cookbook_dataset_use_this_make_command?

#

Returns:

  • (Boolean)


584
585
586
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 584

def cookbook_dataset_use_this_make_command?
  cookbook_dataset?.use_this_make_command?
end

#cookbook_installation_steps?Boolean Also known as: installation_steps?

#

cookbook_installation_steps?

The installation-steps contain the instructions in how to install a given program at hand.

#

Returns:

  • (Boolean)


711
712
713
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 711

def cookbook_installation_steps?
  cookbook_dataset?.installation_steps?
end

#cookbook_program_name_and_program_version?Boolean Also known as: program_name_and_program_version?

#

cookbook_program_name_and_program_version?

#

Returns:

  • (Boolean)


1685
1686
1687
1688
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1685

def cookbook_program_name_and_program_version?
  cookbook_dataset? and
  cookbook_dataset?.program_name_and_program_version?
end

#cookbook_program_version?Boolean Also known as: cookbook_dataset_program_version?

#

cookbook_program_version?

#

Returns:

  • (Boolean)


69
70
71
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 69

def cookbook_program_version?
  cookbook_dataset? and cookbook_dataset?.program_version?
end

#cookbook_use_autoconf?Boolean

#

cookbook_use_autoconf?

#

Returns:

  • (Boolean)


9468
9469
9470
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9468

def cookbook_use_autoconf?
  cookbook_dataset?.use_autoconf?
end

#cookbooks_binaries?Boolean Also known as: binaries?

#

cookbooks_binaries?

#

Returns:

  • (Boolean)


1807
1808
1809
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1807

def cookbooks_binaries?
  cookbook_dataset?.binaries?
end

#cookbooks_dataset_configure_options?Boolean Also known as: cookbook_dataset_configure_options?

#

cookbooks_dataset_configure_options?

#

Returns:

  • (Boolean)


1547
1548
1549
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1547

def cookbooks_dataset_configure_options?
  cookbook_dataset?.configure_options?
end

#cookbooks_dataset_extracted_towards?Boolean

#

cookbooks_dataset_extracted_towards?

#

Returns:

  • (Boolean)


718
719
720
721
722
723
724
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 718

def cookbooks_dataset_extracted_towards?
  if cookbooks_dataset?
    cookbooks_dataset?.extracted_towards?
  else
    rbt_log_directory?
  end
end

#cookbooks_dataset_use_glib_schema?Boolean Also known as: use_glib_schema?

#

cookbooks_dataset_use_glib_schema?

Whether our dataset uses glib install schema for some .xml files.

#

Returns:

  • (Boolean)


772
773
774
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 772

def cookbooks_dataset_use_glib_schema?
  cookbook_dataset?.use_glib_schema
end

#copy_expanded_directoryObject Also known as: copy_expanded_cookbooks

#

copy_expanded_directory

This method will copy the expanded cookbooks directory.

Invocation example:

rbt --copy-expanded-directory
#


8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8026

def copy_expanded_directory
  source_directory = "#{project_yaml_dir?}expanded_cookbooks/"
  # ======================================================================= #
  # Designate the target directory to be used.
  # ======================================================================= #
  target_directory = expanded_cookbooks? # This will be e. g. '/home/Temp/rbt/expanded_cookbooks/'.
  if File.directory? source_directory
    orev 'Now copying from '+sdir(source_directory)
    orev "onto #{sdir(target_directory)}#{rev}."
    mkdir(target_directory) unless File.directory? target_directory
    # ===================================================================== #
    # Copy each individual .yml file next:
    # ===================================================================== #
    Dir["#{source_directory}*.yml"].each {|this_yaml_file|
      copy_file(this_yaml_file, target_directory) { :be_verbose }
    }
  else
    orev "No directory exists at `#{sdir(source_directory)}#{rev}`."
  end
end

#copy_headers_from(i) ⇒ Object

#

copy_headers_from

This method will copy the registered headers from the given program at hand.

The first argument to this method is the path to the header files.

Invocation examples:

ry glibc --copy-headers-from=/usr/include
ry glibc --copy-headers-to-pwd
#


1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1682

def copy_headers_from(i)
  unless i.end_with? '/'
    i = i.dup if i.frozen?
    i << '/'
  end
  to = return_pwd 
  headers = headers?
  unless headers.empty?
    headers.each {|this_header|
      from = "#{i}#{this_header}"
      if this_header.include? '/'
        # ================================================================== #
        # In this case we must create such a subdirectory.
        # ================================================================== #
        dirname = File.dirname(this_header)
        unless File.directory? File.dirname(dirname)
          mkdir(dirname)
        end
      end
      orev 'Now trying to copy `'+sfile(from)+rev+'` to `'+
        sfile(to+this_header)+"#{rev}`."
      copy_file(from, to+this_header)
    }
  end
end

#copy_rubyObject

#

copy_ruby

#


6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6473

def copy_ruby
  begin
    require 'roebe/toplevel_methods/setup.rb'
    Roebe.copy_setup_file_to_pwd
  rescue LoadError
    orev 'The method '+steelblue('Roebe.copy_setup_file_to_pwd()')+
         "#{rev} is not available."
    orev "Please install the #{slateblue('roebe')} project:"
    e
    e '  gem install roebe'
    e
  end
end

#copy_source_archive_of_this_program_into_the_current_directory(i) ⇒ Object Also known as: copy_source

#

copy_source_archive_of_this_program_into_the_current_directory

This method can be used to copy the source archive of the given input program at hand, into the current working directory.

Invocation examples:

ry --copy-source=php
ry --copy-source=ruby
#


9103
9104
9105
9106
9107
9108
9109
9110
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9103

def copy_source_archive_of_this_program_into_the_current_directory(i)
  _ = load_yaml_dataset_for_this_program(i)
  stored_where = _.program_path?
  orev "#{steelblue('=>')} Copying "\
       "#{sfile(stored_where)} #{rev}to "\
       "#{sdir(return_pwd)}#{mediumpurple(File.basename(stored_where))}"
  copy_file(stored_where, return_pwd)
end

#copy_these_archives(i = :kde5_plasma) ⇒ Object

#

copy_these_archives

This method will copy the selected applications into the current working directory.

To invoke this method from the commandline, try:

rbt --copy-archives=kde5_plasma
rbt --copy-archives=ruby
#


9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9599

def copy_these_archives(
    i = :kde5_plasma
  )
  if i.is_a? String
    i = i.split(',') if i.include? ','
  end
  case i
  when :kde5_plasma, 'kde5_plasma'
    i = return_kde_plasma_components
  end
  i = [i].flatten.compact.reject {|entry| entry.strip.empty? }.map {|entry|
    try_to_find_an_alias_to_this_input_unless_the_program_exists(entry)
  }
  if i.empty?
    orev 'Please provide at the least one argument - the '\
         'directory that is to be copied.'
  else
    orev "Now copying #{i.size.to_s} entries into the "\
         "local working directory:"
    i.each {|this_program|
      target_directory = source_dir?+this_program.downcase+'/'
      if File.directory? target_directory
        copy_directory(target_directory, :be_verbose)
      else
        orev "No directory exists at "\
             "`#{sdir(target_directory)}#{rev}`."
      end
    }
  end
end

#copy_this_yaml_file(i = compile_which_program?, , be_verbose = be_verbose? ) ⇒ Object

#

copy_this_yaml_file

#


6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6447

def copy_this_yaml_file(
    i          = compile_which_program?,
    be_verbose = be_verbose?
  )
  if is_registered? i
    orev "#{rev}Now copying the .yml file for #{steelblue(i)}"
    orev "into the current working directory."
    target_file = cookbook_directory?+i+'.yml'
    if File.exist? target_file
      opnn; copy_file(target_file) { :be_verbose }
    end
  else
    orev "Not a registered program: #{i}"
  end
end

#create_a_slackdesc_file_for_this_program(i) ⇒ Object

#

create_a_slackdesc_file_for_this_program

#


5258
5259
5260
5261
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5258

def create_a_slackdesc_file_for_this_program(i)
  require 'rbt/linux/slackware/generate_slack_desc_file.rb'
  RBT::Linux::Slackware::GenerateSlackDescFile.new(i)
end

#create_appdir_skeleton(i = return_proper_prefix, uses_an_appdir_prefix = uses_an_appdir_prefix? ) ⇒ Object Also known as: consider_creating_the_appdir_skeleton, consider_creating_appdir_skeleton, do_create_this_appdir_skeleton, create_program_skeleton, create_app_skeleton, create_program, rcp

#

create_appdir_skeleton

This method will create an AppDir skeleton, by delegating towards class RBT::Action::CreateAppDirSkeleton.new, which is a registered action.

We will only do so if the prefix includes the AppDir base directory though. By default, that base directory would hold the value of the $PROGRAMS environment variable - at the least on my system, this defaults to /Programs/. You can change this value if you modify a yaml file though. That yaml file is called “programs_dir.yml” and resides in the yaml/configuration/ subdirectory of the RBT project.

The method accepts one argument, which is either the program name, or alternatively the full name to the program in question.

Normally, the program name will be defined in the yaml data object, but since you can also overrule this setting in the yaml file, we need an argument here to allow this too.

#


1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1562

def create_appdir_skeleton(
    i                     = return_proper_prefix,
    uses_an_appdir_prefix = uses_an_appdir_prefix?
  )
  if uses_an_appdir_prefix
    # ====================================================================== #
    # Check for an AppDir prefix next:
    # ====================================================================== #
    i = i.to_s.dup
    if i.include?(programs_dir?)
      unless i =~ /\d+/
        i << program_version?
      end
      i << '/' unless i.end_with? '/'
    end
    # ====================================================================== #
    # Next, delegate towards class RBT::CreateAppDirSkeleton. Since as
    # of 20.01.2020 we will specify which programs should NOT modify
    # the old symlink, for the new 'Current →' symlink. Otherwise
    # compilation would fail, e. g. if /usr/bin/make would point to
    # a not-yet compiled target prefix.
    # ====================================================================== #
    _ = action(__method__.to_sym, [i.dup, :dont_run_yet]) {{
      use_colours: use_colours?,
      use_opn:     use_opn?,
      do_not_symlink_these_programs: %i( make gcc binutils ) # ← An exception for these programs.
    }}
    _.no_opn unless use_opn?
    _.run_simulation = run_simulation?
    _.run
  end
end

#create_appdir_skeleton?Boolean

#

create_appdir_skeleton?

#

Returns:

  • (Boolean)


6980
6981
6982
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6980

def create_appdir_skeleton?
  @internal_hash[:create_appdir_skeleton]
end

#create_dependencies_file(create_where = rbt_log_directory?, , required_deps_on = required_deps_on? ) ⇒ Object

#

create_dependencies_file

This method will create a Gobolinux dependencies file.

To invoke it, do something like:

ry htop create_dependencies_file
#


2549
2550
2551
2552
2553
2554
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2549

def create_dependencies_file(
    create_where     = rbt_log_directory?,
    required_deps_on = required_deps_on?
  )
  action(:CreateDependenciesFile, [create_where, required_deps_on])
end

#create_description_file(create_where) ⇒ Object

#

create_description_file

Creates a Description file, for use in Gobolinux systems.

#


4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4451

def create_description_file(create_where)
  if create_where.include? programs_directory?
    create_where = create_where.delete('-')
  end
  file_location = create_where+'Resources/Description'
  remove_file(file_location) if File.exist? file_location # Remove it if it already exists.
  append_what_into(
    dataset?.description?,
    file_location
  )
end

#create_log_directoryObject

#

create_log_directory

#


8442
8443
8444
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8442

def create_log_directory
  action(:create_log_directory)
end

#create_programs_url_fileObject

#

create_programs_url_file

#


68
69
70
# File 'lib/rbt/actions/individual_actions/software_manager/actions.rb', line 68

def create_programs_url_file
  action(__method__.to_sym)
end

#create_shell_scriptsObject Also known as: to_bash

#

create_shell_scripts (bash tag bashrc tag)

This method will convert the yaml dataset to bash scripts, so that the bash shell can make use this information as well.

To invoke this method, do something such as this:

ry --bash

To get the array content do this (after sourcing the file):

echo ${programs[*]}
#

cat /System/Settings/bash_programs_rc

#

cd /System/Settings/

#


3818
3819
3820
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3818

def create_shell_scripts
  action(:create_bash_scripts)
end

#create_shellscript(program = compile_which_program?, , save_into_a_file = true, display_result = false) ⇒ Object

#

create_shellscript (shell tag, script tag)

This is a wrapper over the class GenerateShellscript.

It will return a string, which contains all the information to create a specific shell script.

The first argument to this method is the name of the program in question.

To invoke this method, do:

ry htop create_shellscript
ry php cshell
#


5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5514

def create_shellscript(
    program          = compile_which_program?,
    save_into_a_file = true,
    display_result   = false
  )
  _ = GenerateShellscript.new(
    program,
    save_into_a_file,
    display_result
  )
  return _.string?
end

#create_standalone_yaml_fileObject

#

create_standalone_yaml_file

This will create standalone yaml files.

Usage example:

ry htop --csyf
#


4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4124

def create_standalone_yaml_file
  require 'rbt/cookbooks/create_cookbook_yaml_file/create_cookbook_yaml_file.rb'
  cliner {
    orev 'Dumping all available recipes next.'
  }
  store_here = RBT.configuration?.recipes_directory
  all_programs.each { |this_program|
    e sfancy("This program is: `")+simp(this_program)+sfancy('`.')
    initialize_cookbook_dataset_for(this_program)
    _ = RBT::Cookbooks::CreateCookbookYamlFile.new(this_program, :do_not_run_yet)
    _.store_where(store_here)
    _.run
  }
  cliner {
    orev sfancy('Finished dumping all Recipes into ')+
         sdir(store_here)
    orev "#{N}There were: #{sfancy(all_programs.size.to_s)} of them.#{N}"
  }
end

#create_the_build_directory(i = DEFAULT_NAME_FOR_THE_BUILD_DIRECTORY) ⇒ Object

#

create_the_build_directory

#


1152
1153
1154
1155
1156
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1152

def create_the_build_directory(
    i = DEFAULT_NAME_FOR_THE_BUILD_DIRECTORY
  )
  mkdir(i) unless File.directory?(i)
end

#create_the_build_directory_then_cd_into_it(i = DEFAULT_NAME_FOR_THE_BUILD_DIRECTORY, &block) ⇒ Object Also known as: create_build_directory_then_cd_into_it

#

create_the_build_directory_then_cd_into_it

Note that we will only cd into the directory if we actually use a build directory.

#


1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1164

def create_the_build_directory_then_cd_into_it(
    i = DEFAULT_NAME_FOR_THE_BUILD_DIRECTORY,
    &block
  )
  if use_build_directory?
    # ====================================================================== #
    # === Handle blocks next
    # ====================================================================== #
    if block_given?
      yielded = yield
      case yielded
      # ==================================================================== #
      # === :be_verbose
      # ==================================================================== #
      when :be_verbose
        orev "Changing directory into "\
             "#{sdir(absolute_path(i))} "\
             "#{rev}next,"
        orev "thus honouring the #{steelblue('use-build-directory')} "\
             "#{rev}setting."
      end
    end
    create_the_build_directory(i)
    cd i
  end
end

#create_yaml_file_for_this_program(i = compile_which_program? ) ⇒ Object Also known as: expand_this_cookbook

#

create_yaml_file_for_this_program

This method will expand a raw cookbook into an expanded cookbook, using the appropriate action.

#


11095
11096
11097
11098
11099
11100
11101
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11095

def create_yaml_file_for_this_program(
    i = compile_which_program?
  )
  e
  opnn; action(:expand_this_cookbook, i)
  e
end

#dataset_from_the_file_cookbook_chained_programs?Boolean Also known as: chained_programs?

#

dataset_from_the_file_cookbook_chained_programs?

This query-method obtains the dataset from the yaml file containing all chained-programs.

The alias-name .chained_programs?() makes accessing this information even simpler.

#

Returns:

  • (Boolean)


1526
1527
1528
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1526

def dataset_from_the_file_cookbook_chained_programs?
  @internal_hash[:dataset_from_the_file_cookbook_chained_programs]
end

#dataset_program_name_and_program_version?(cookbook_dataset = cookbook_dataset? ) ⇒ Boolean Also known as: cookbooks_program_name?, cookbook_dataset_program_name_and_program_version?, cookbook_dataset_program_name_and_program_version, program_name_and_version?

#

dataset_program_name_and_program_version?

This method will always return the program name and the associated program version of any given program, such as:

"htop-2.0.2"
#

Returns:

  • (Boolean)


233
234
235
236
237
238
239
240
241
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 233

def dataset_program_name_and_program_version?(
    cookbook_dataset = cookbook_dataset?
  )
  if cookbook_dataset
    cookbook_dataset.program_name_and_program_version? # Delegate to cookbook_for? here.
  else
    nil
  end
end

#dataset_program_short_name?Boolean Also known as: dataset_program_name?, cookbook_dataset_real_program_name?, real_short_name?

#

dataset_program_short_name?

The short name would be “gnomemusic” if the regular name is “gnome-music”.

#

Returns:

  • (Boolean)


782
783
784
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 782

def dataset_program_short_name?
  cookbook_dataset?.short_name?
end

#decide_whether_to_build_staticallyObject

#

decide_whether_to_build_statically

#


9350
9351
9352
9353
9354
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9350

def decide_whether_to_build_statically
  if build_static?
    append_static_onto_the_cflags
  end
end

#decide_whether_to_invoke_autogen(_ = FILE_AUTOGEN) ⇒ Object

#

decide_whether_to_invoke_autogen

Invoke autogen.sh if specified so, and only if the file autogen.sh actually exists.

There may be some situations where it does not make sense to invoke autogen, such as when the build type specifically tells us to use meson.

#


6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6162

def decide_whether_to_invoke_autogen(
    _ = FILE_AUTOGEN
  )
  if use_autogen?
    if uses_the_meson_build_system?
      opne crimson('The value for autogen is set to ')+
           royalblue('true')+
           crimson(', meaning "do use autogen".')
      opne crimson('The .yml file specifies to use the meson-build system, though.')
      opne crimson('Autogen is only useful for GNU configure based system, so')
      opne crimson('autogen is set to false for this run - thus, not making '\
                   'use of autogen.')
      e
      opne crimson('If you need autogen, consider changing '\
           'the information in the')
      opne crimson('.yml file ')+
           sfile("#{compile_which_program?}.yml")+
           crimson('.')
      e
      opne 'Do note that this behaviour may be changed at a later time.'
      disable_autogen
    end
    if File.exist?(_)
      do_use_autogen # This is the do-action that invokes autogen.sh
    end
  end
end

#decide_whether_to_invoke_the_autoconf_commandObject Also known as: decide_whether_to_invoke_autoconf_command, consider_invoking_autoconf, consider_running_autoconf

#

decide_whether_to_invoke_the_autoconf_command

Whether to run “autoconf” or whether we will not. Only very few programs will need this.

Note that the invocation of autoconf must happen AFTER the pre-installation step has finished, and after checking whether sed must be used or whether sed is not needed. Afterwards, we can then check whether we will use a build directory, and whether we must use another prefix.

A program that may require this is “bridgeutils”.

Invocation example:

ry bridgeutils
#


8576
8577
8578
8579
8580
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8576

def decide_whether_to_invoke_the_autoconf_command
  if use_autoconf?
    do_invoke_autoconf
  end
end

#default_download_then_exit(i = :default) ⇒ Object

#

default_download_then_exit

#


8353
8354
8355
8356
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8353

def default_download_then_exit(i = :default)
  download_program(:def, true, i) # Download here. Overrule settings.
  exit_program # Then exit.
end

#delete(this_key) ⇒ Object

#

delete

This method is similar to the method .delete() for class Hash. The method here will only return the value, though, and NOT delete anything - while this behaviour is, strictly speaking, not the same as for class Hash, there does not seem to be a big reason as to why the information should be deleted from an instance of class RBT::Action::SoftwareManager.

In other words: .delete() here is mostly a compatibility method, in order to “fake-simulate” behaviour that a Hash would normally show.

#


7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7408

def delete(this_key)
  case this_key
  # ======================================================================= #
  # === :prefix
  # ======================================================================= #
  when :prefix
    prefix?.to_s
  # ======================================================================= #
  # === :program_version
  # ======================================================================= #
  when :program_version
    program_version?.to_s
  # ======================================================================= #
  # === :description
  #
  # This is actually a pointer towards the short description, since
  # it is used primarily for autogenerating pkgconfig files.
  # ======================================================================= #
  when :description
    short_description?.to_s
  end
end

#delete_libtool_files?Boolean Also known as: remove_la_files_after_compilation?

#

delete_libtool_files?

Query whether we will delete .la files or whether we will not. If we will not, then any installed .la files will be removed.

Note that this will ONLY be honoured if compilation was a success AND we use an AppDir path as prefix - so .la files that are installed under /usr/lib/ will not be removed, ever.

#

Returns:

  • (Boolean)


10048
10049
10050
10051
10052
10053
10054
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10048

def delete_libtool_files?
  if @internal_hash[:keep_la_files]
    !@internal_hash[:keep_la_files]
  else
    RBT.configuration?.delete_libtool_files
  end
end

#depends_on_cmake?Boolean Also known as: program_uses_cmake?

#

depends_on_cmake?

#

Returns:

  • (Boolean)


1506
1507
1508
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1506

def depends_on_cmake?
  RBT.depends_on_cmake?(required_deps_on?)
end

#depends_on_ninja?Boolean

#

depends_on_ninja?

#

Returns:

  • (Boolean)


1147
1148
1149
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1147

def depends_on_ninja?
  ::RBT.depends_on_ninja?(required_deps_on?)
end

#depends_on_python?Boolean

#

depends_on_python?

Whether python is registered as a dependency.

#

Returns:

  • (Boolean)


731
732
733
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 731

def depends_on_python?
  RBT.depends_on_python?(required_deps_on?)
end

#depends_on_waf?Boolean

#

depends_on_waf?

#

Returns:

  • (Boolean)


738
739
740
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 738

def depends_on_waf?
  ::RBT.depends_on_waf?
end

#deregistering_from_the_status_file(use_this_key = 'currently_compiling_these_programs') ⇒ Object

#

deregistering_from_the_status_file

De-register the program that we are currently compiling from the status file again.

#


8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8782

def deregistering_from_the_status_file(
    use_this_key = 'currently_compiling_these_programs'
  )
  into = RBT.file_status
  dataset = {}
  if File.exist? into
    dataset.merge!(YAML.load_file(into))
  end
  if dataset.has_key? use_this_key
    _ = dataset[use_this_key]
    if _.include? compile_which_program?
      dataset[use_this_key] = dataset[use_this_key].reject {|line|
        line == compile_which_program?
      }
      what = YAML.dump(dataset)
      write_what_into(what, into)
    end
  end
end

#description?Boolean

#

description?

#

Returns:

  • (Boolean)


1222
1223
1224
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1222

def description?
  cookbook_dataset?.description?
end

#determine_program_full_nameObject

#

determine_program_full_name

#


6308
6309
6310
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6308

def determine_program_full_name
  cookbook_dataset?.determine_program_full_name
end

#determine_program_name_and_program_versionObject

#

determine_program_name_and_program_version

#


11667
11668
11669
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11667

def determine_program_name_and_program_version
  cookbook_dataset?.send(__method__)
end

#determine_the_build_system_in_use_and_consider_syncing_this_back_onto_the_cookbook_datasetObject

#

determine_the_build_system_in_use_and_consider_syncing_this_back_onto_the_cookbook_dataset

#


570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 570

def determine_the_build_system_in_use_and_consider_syncing_this_back_onto_the_cookbook_dataset
  _ = build_system?
  case _
  # ======================================================================== #
  # === :infer_automatically
  # ======================================================================== #
  when :infer_automatically
    # ====================================================================== #
    # In this case we have to guess the build type, before we proceed,
    # since we have given the path to a file that exists.
    #
    # This code was disabled in April 2021. Let's see if we will need
    # it again one day.
    #
    # In September 2022 it was re-enabled.
    # ====================================================================== #
    _ = action(:infer_build_system)
    opne "#{gold('Guessing the build-type next ...')} #{rev}the build "\
         "type is: #{slateblue(_.to_s)}" # In the past we also displayed a leading ':' here.
    if _.nil?
      _ = :inferring_the_build_system_did_not_work
    else
      _ = _.to_sym
    end
    # ====================================================================== #
    # The next clause was added in June 2023 - it will force me to add
    # all missing build-types to the .yml file at hand.
    # ====================================================================== #
    if is_on_roebe?
      opne tomato('Since as of June 2023 the build-system has to be determined')
      opne tomato('Please modify the .yml file at hand for the ')+
           tomato('program ')+sfancy(program_name?)+tomato('.')
      opne tomato('Exiting now.')
      exit
    end
  end
  cookbook_dataset?.set_build_system(_) # Sync it back here.
end

#determine_the_configure_base_directory_to_use(target = extract_to_this_dir?.dup+ yaml_dataset?.program_name_and_program_version?+ '/'+ cookbook_dataset_configure_base_directory?.to_s) ⇒ Object

#

determine_the_configure_base_directory_to_use

This method can be used to determine the full path to the configure base directory to be used.

#


4370
4371
4372
4373
4374
4375
4376
4377
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4370

def determine_the_configure_base_directory_to_use(
    target = extract_to_this_dir?.dup+
             yaml_dataset?.program_name_and_program_version?+
             '/'+
             cookbook_dataset_configure_base_directory?.to_s
  )
  set_configure_base_directory(target)
end

#determine_the_program_pathObject

#

determine_the_program_path

This method will determine the (internal) program path that is to be used, that is - the path to finding the program on the local harddisc.

A word about the variable use_this_as_short_name:

Since as of September 2019 we will also remove ‘.’ characters, so that programs such as “ruamel.yaml” can reside in a directory called “ruamelyaml”.

#


2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2849

def determine_the_program_path
  use_this_as_short_name = yaml_dataset?.program_short_name?.dup.downcase.
                           delete('-.')
  use_this_as_short_name.delete!('_')
  value = source_directory?+
          use_this_as_short_name+
          '/'+
          yaml_dataset?.program_name_and_program_version?+
          yaml_dataset?.archive_type?
  set_program_path(value)
end

#determine_the_real_commandline_arguments(i) ⇒ Object

#

determine_the_real_commandline_arguments

#


10673
10674
10675
10676
10677
10678
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10673

def determine_the_real_commandline_arguments(i)
  i = [i].flatten.compact
  @internal_hash[:real_commandline_arguments] = i.select {|entry|
    entry.start_with?('--')
  }
end

#determine_which_compiler_will_be_usedObject

#

determine_which_compiler_will_be_used

This method currently will only check if the clang-compiler is used.

#


9117
9118
9119
9120
9121
9122
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9117

def determine_which_compiler_will_be_used
  case use_which_compiler?
  when 'clang'
    do_use_clang_compiler(:be_quiet)
  end
end

#directory_rbt_profiles?Boolean

#

directory_rbt_profiles?

This will point to a location such as “/home/Programs/Ruby/2.6.5/lib/ruby/site_ruby/2.6.0/rbt/misc/profiles/”

#

Returns:

  • (Boolean)


28
29
30
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 28

def directory_rbt_profiles?
  DIRECTORY_RBT_PROFILES
end

#disable_autogen(be_verbose = true) ⇒ Object

#

disable_autogen

#


5395
5396
5397
5398
5399
5400
5401
5402
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5395

def disable_autogen(
    be_verbose = true
  )
  if be_verbose
    orev 'We will not make use of autogen.'
  end
  @internal_hash[:use_autogen] = false # Enable the use of autogen in our dataset here.
end

#disable_ccacheObject

#

disable_ccache

Use this method to temporarily disable ccache, that is - for the current run. If you do not want to use ccache at all, simply set the content of the corresponding .yml file to false.

#


11842
11843
11844
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11842

def disable_ccache
  @internal_hash[:use_ccache] = false
end

#disable_colours(be_verbose = be_verbose? ) ⇒ Object Also known as: no_colours

#

disable_colours (colours tag)

Disable colours with this method. This will not be permanent, it will be valid only for the running instance (this object). If you want to permanently disable colours, use:

rbt_config --disable-colours

To use this specific method here, do something like this:

ry htop disablecolours

Remember that you can chain together instructions, so:

ry htop disablecolours ntrad

Would compile in an appdir-like fashion, without using any colours.

#


9177
9178
9179
9180
9181
9182
9183
9184
9185
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9177

def disable_colours(
    be_verbose = be_verbose?
  )
  RBT.disable_colours  # ← Defined in rbt/colours/colours.rb
  disable_colours # This one is defined in base.rb.
  if be_verbose
    orev 'We will not use any colours.'
  end
end

#disable_internal_sedObject

#

disable_internal_sed

#


4210
4211
4212
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4210

def disable_internal_sed
  @internal_hash[:use_the_internal_sed_wrapper] = false
end

#disable_logging(be_verbose = true) ⇒ Object

#

disable_logging

We no longer log here.

#


8430
8431
8432
8433
8434
8435
8436
8437
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8430

def disable_logging(
    be_verbose = true
  )
  if be_verbose
    orev "We will not log."
  end
  @internal_hash[:may_we_log] = false
end

#disable_md5sum_calculationObject

#

disable_md5sum_calculation

This method here can be used to disable the md5sum calculation altogether.

Invocation example:

ry htop --no-md5sum
#


8331
8332
8333
8334
8335
8336
8337
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8331

def disable_md5sum_calculation
  orev 'We will not calculate the md5sum of an archive. This '\
       'should speed up'
  orev "things a little bit, in particular for very "\
       "large files."
  action(:disable_md5sum_calculation)
end

#disable_opnObject

#

disable_opn

Use this method to stop reporting any program names.

To trigger this, try one of these usage examples:

ry php noopn
ry htop nonames
#


1875
1876
1877
1878
1879
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1875

def disable_opn
  orev 'We will not use Opn (class name output, aka output-program-name)'
  RBT.do_not_show_the_classname
  @internal_hash[:use_opn] = false
end

#disable_porgObject

#

disable_porg

Disable porg via this method.

#


152
153
154
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 152

def disable_porg
  @internal_hash[:use_porg] = config?.use_porg = false
end

#disable_static_compilation(be_verbose = :be_verbose) ⇒ Object Also known as: do_not_compile_statically

#

disable_static_compilation

Use this method to disable static compilation.

#


9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9245

def disable_static_compilation(
    be_verbose = :be_verbose
  )
  case be_verbose
  when :be_verbose
    be_verbose = true
  when :do_not_be_verbose
    be_verbose = false
  end
  if be_verbose
    orev 'Disabling static compilation.'
  end
  @internal_hash[:build_static] = false
  if cflags?.include? '-static'
    set_cflags(cflags?.dup.sub(/-static/,''))
  end
end

#disable_stowObject

#

disable_stow

#


7107
7108
7109
7110
7111
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7107

def disable_stow
  configuration?.use_stow = false
  orev 'Disabling stow next.'
  configuration?.save
end

#disallow_changing_the_cookbook_datasetObject

#

disallow_changing_the_cookbook_dataset

#


11645
11646
11647
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11645

def disallow_changing_the_cookbook_dataset
  cookbook_dataset?.freeze
end

#display_barplot_statisticsObject

#

display_barplot_statistics

Invocation example from the commandline:

ry --display_barplot_statistics
#


10012
10013
10014
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10012

def display_barplot_statistics
  action(:display_barplot_statistics)
end

#display_postinstall_datasetObject

#

display_postinstall_dataset

This method will display the postinstall actions that will be done for the given program at hand.

Invocation examples:

ry perl p?
ry docbookxsl --display_postinstall
ry libraw1394 --postinstallation_steps?
ry bash --postinstallation_steps?
ry vte --postinstallation_steps?
ry lighttpd --postinstallation_steps?
#


1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1380

def display_postinstall_dataset
  result = cookbook_dataset_postinstall?
  compile_this_program = compile_which_program?
  compile_this_program = first_argument? if compile_this_program.nil?
  ensure_proper_dataset_for(compile_this_program) if result.nil?
  result = cookbook_dataset_postinstall? if result.nil?
  unless result.empty?
    orev "The postinstall instructions "\
         "for `#{royalblue(program?)}#{rev}` are:"
    result = [result].flatten.compact # ← We need an Array past this point.
    e
    result.each {|entry|
      # e
      e "  #{yellowgreen(entry)}" # Display with a slight padding.
      # e
    }
    e
    orev 'Also assigning the above result to the xorg buffer.'
    set_xorg_buffer(result.join(N))
  end if result
end

#display_standard_help_options(exit_now = true) ⇒ Object

#

display_standard_help_options (help tag)

#


1405
1406
1407
1408
1409
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1405

def display_standard_help_options(
    exit_now = true
  )
  RBT::Action::SoftwareManager.display_standard_help_options(exit_now)
end

#display_the_oldest_programsObject

#

display_the_oldest_programs

This method will report, on the commandline, the oldest programs.

#


5532
5533
5534
5535
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5532

def display_the_oldest_programs
  require 'rbt/cookbooks/show_last_updated.rb'
  RBT::Cookbooks::ShowLastUpdated.new('--sort-by-oldest')
end

#do_binary_upload_of_this_file(this_file) ⇒ Object

#

do_binary_upload_of_this_file

#


6490
6491
6492
6493
6494
6495
6496
6497
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6490

def do_binary_upload_of_this_file(this_file)
  _ = this_file
  if File.exist? _
    FtpParadise.upload_this_binary_file(_, :be_verbose)
  else
    opnn; no_file_exists_at(_)
  end
end

#do_check_for_binary_duplicatesObject

#

do_check_for_binary_duplicates

If you wish to check for binary-duplicates under /usr/bin/, then this method may be helpful to you.

#


4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4611

def do_check_for_binary_duplicates
  target_dir = :default
  # ======================================================================= #
  # The next line of code handles the situation when we are in the
  # directory /usr/sbin/, and when we are on a roebe-system (aka at home).
  # ======================================================================= #
  if is_on_roebe? and (return_pwd == '/usr/sbin/')
    target_dir = '/usr/sbin/'
  end
  array = RBT.array_binary_duplicates(:default, target_dir)
  if array.empty?
    target_dir = '/usr/bin/' if target_dir == :default
    orev "No duplicates appear to exist under the "\
         "#{sdir(target_dir)} #{rev}hierarchy."
  else
    orev 'The following duplicates were found:'
    e
    array.each {|entry|
      e "  #{sfile(entry.ljust(40))}"
    }
  end
end

#do_compile_all_available_local_version_of_this_program(i = compile_which_program? ) ⇒ Object Also known as: do_compile_all_available_local_version

#

do_compile_all_available_local_version_of_this_program

Invocation example:

ry libsigc++ --compile-all-available-local-versions
#


491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 491

def do_compile_all_available_local_version_of_this_program(
    i = compile_which_program?
  )
  orev "Checking for the locally available versions "\
       "of the program #{sfancy(i)} #{rev}next."
  target_directory = source_dir?+
                     i.downcase+'/'
  e
  orev "We will check at the directory `#{sdir(target_directory)}`."
  e
  matches = Dir[target_directory+'*']
  if matches.empty?
    orev 'No result was found at the directory `'+
         sdir(target_directory)+"#{rev}`."
    orev 'This usually indicates that the '\
         'directory does not exist - or is empty.'
  else
    matches.each {|entry|
      orev 'Working on the entry `'+sfancy(entry)+rev+'` next.'
      entry = remove_archive_at_the_end(entry)
      basename = File.basename(entry)
      program_name    = program_information_return_program_name(basename)
      program_version = program_information_return_version(basename)
      reset
      set_compile_this_program(program_name)
      initialize_dataset_for_this_program(program_name)
      set_program_version(program_version)
      do_compile_this_program(program_name) { :do_not_initialize_the_dataset }
    }
  end
end

#do_compile_all_of_mateObject

#

do_compile_all_of_mate

#


3489
3490
3491
3492
3493
3494
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3489

def do_compile_all_of_mate
  i = RBT.returned_chained_programs_of_the_mate_desktop
  orev "We will compile all #{sfancy(i.size.to_s)} #{rev}programs "\
       "of the mate-desktop."
  set_compile_these_programs(i)
end

#do_compile_in_a_non_traditional_way(program_name_and_program_version = program_name_and_program_version?, , be_verbose = be_verbose? ) ⇒ Object Also known as: do_run_via_nontraditional_way, compile_as_appdir, set_standalone_compilation, use_non_traditional_prefix, do_use_an_appdir_prefix, ntrad

#

do_compile_in_a_non_traditional_way

We enable Gobolinux-style compilation here, as in AppDir-like compilation.

#


1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1743

def do_compile_in_a_non_traditional_way(
    program_name_and_program_version = program_name_and_program_version?,
    be_verbose                       = be_verbose?
  )
  if cookbook_dataset?.nil?
    load_cookbook_dataset_for(compile_which_program?)
  end
  if can_we_continue?
    case program_name_and_program_version
    # ====================================================================== #
    # === :be_silent
    # ====================================================================== #
    when :be_silent,
         :be_quiet
      be_verbose = false
      program_name_and_program_version = program_name_and_program_version?
    end
    case be_verbose
    # ====================================================================== #
    # === :be_silent
    # ====================================================================== #
    when :be_silent,
         :be_quiet
      be_verbose = false
    end
    if be_verbose
      orev 'Overruling any potential traditional setting.'
    end
    @internal_hash[:counter_called_traditional_or_non_traditional_compilation] += 1
    # ensure_that_a_cookbook_object_has_been_instantiated
    _ = prefix_object?.do_use_appdir_prefix_from_this_input(
          program_name_and_program_version?
        )
    # set_user_prefix(:ntrad)
    @internal_hash[:shall_we_use_an_appdir_prefix] = true
    set_user_prefix(_.to_s) # The raw-user prefix must be set here as well.
    set_use_this_prefix(_)
    orev "Enabling #{steelblue('AppDir prefix')}#{rev}."
    # enable_non_traditional_compilation(
    #   program_name_and_program_version
    # )
  end
end

#do_compile_in_a_traditional_way(be_verbose = true, can_we_continue = can_we_continue? ) ⇒ Object Also known as: enable_traditional_compilation

#

do_compile_in_a_traditional_way

Use this method when you want to use ‘/usr/’ as the main prefix of compilation.

Usage example:

ry php --trad
#


5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5088

def do_compile_in_a_traditional_way(
    be_verbose      = true,
    can_we_continue = can_we_continue?
  )
  if can_we_continue
    @internal_hash[:we_tried_to_compile_this_program_n_times] += 1
    if be_verbose
      orev 'Using a "'+sfancy(:traditional)+rev+
           '" strategy for compilation '\
           '(which means prefix '+sdir('/usr/')+
           "#{rev})."
    end
    set_user_prefix '/usr/' # Specify a user-prefix here.
  end
end

#do_compile_in_both_traditional_and_non_traditional_mannerObject

#

do_compile_in_both_traditional_and_non_traditional_manner

This method combines both main strategies for compilation - first, into the /usr/ prefix, and then into the appdir prefix.

#


6539
6540
6541
6542
6543
6544
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6539

def do_compile_in_both_traditional_and_non_traditional_manner
  orev 'We will first compile in the traditional way, and then after that'
  orev 'we will compile in the non-traditional (appdir) way.'
  do_compile_in_a_traditional_way # First, compile in a traditional way.
  @internal_hash[:extra_compilation] = true
end

#do_compile_libstdc_plus_plusObject

#

do_compile_libstdc_plus_plus

This method will compile/install libstdc++, which is part of GCC.

To invoke this method try:

ry --install-libstdc++
#


4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4996

def do_compile_libstdc_plus_plus
  set_compile_these_programs :gcc
  opne steelblue('libstdc++')+', from GCC, will be installed next.'
  opne royalblue('1')+') The GCC-archive of GCC will be extracted first.'
  dataset = return_dataset_for_this_program(compile_which_program?)
  path = dataset.path?
  gcc_version = dataset.program_version?
  if File.exist? path
    orev 'Extracting '+sfile(path)+' to '+sdir(log_dir?)+'.'
    extract_what_to(path, log_dir?)
    # ===================================================================== #
    # cd into the right target:
    # ===================================================================== #
    target = log_dir?+cookbook_dataset_program_name_and_program_version?+'/libstdc++-v3/'
    orev royalblue('2')+') cd to the target directory at '+sdir(target)+' next.'
    cd(target)
    opne royalblue('3')+') create the build directory, then cd into it next.'
    mkdir 'BUILD_DIRECTORY'
    cd 'BUILD_DIRECTORY'
    orev royalblue('4')+') Running configure, then "make", then "make install" next.'
    # ===================================================================== #
    # Find out the prefix that we wish to use (required for a cd-action
    # lateron.
    # ===================================================================== #
    use_this_prefix = rds(
      programs_dir?+'Libstdc++/'+gcc_version+'/'
    )
    cmd = (
      '../configure '\
      '--prefix='+use_this_prefix+'
      --disable-multilib 
      --disable-nls 
      --disable-libstdcxx-threads 
      --disable-libstdcxx-pch'
    ).squeeze(' ').gsub(/\n/,' ').squeeze(' ')
    e
    e steelblue(cmd)
    e
    run_this_system_command_in_a_coloured_and_padded_manner(cmd)
    run_make_then_make_install
    RBT.to_current(use_this_prefix)
    cd use_this_prefix
    rnsymc
  end
end

#do_compile_the_perl_addons(i = ) ⇒ Object

#

do_compile_the_perl_addons

#


8549
8550
8551
8552
8553
8554
8555
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8549

def do_compile_the_perl_addons(
    i = chained_programs?['perl_addons']
  )
  array = i.reject {|entry| entry == 'perl' }
  orev "Installing various registered perl-addons (#{array.size}) next."
  set_compile_these_programs(array)
end

#do_create_a_slackware_package(i = return_pwd) ⇒ Object

#

do_create_a_slackware_package

#


5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5464

def do_create_a_slackware_package(
    i = return_pwd
  )
  require 'rbt/linux/slackware/create_slackware_package.rb'
  this_program = File.basename(i)
  if this_program.include? '-'
    this_program = program_information_return_name(this_program)
  end
  RBT::CreateSlackwarePackage.new(this_program) { :do_not_autoinstall }
end

#do_download_this_program(i) ⇒ Object Also known as: do_download, download_this_remote_program, wget

#

do_download_this_program (download tag)

This is simply a plain wget wrapper.

#


81
82
83
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 81

def do_download_this_program(i)
  run_this_system_command_in_a_coloured_and_padded_manner("wget #{i}")
end

#do_enable_static_compilationObject Also known as: enable_static?

#

do_enable_static_compilation

Enable static compilations.

#


11822
11823
11824
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11822

def do_enable_static_compilation
  @internal_hash[:build_static] = true
end

#do_exit_before_makeObject

#

do_exit_before_make

#


1072
1073
1074
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1072

def do_exit_before_make
  @internal_hash[:exit_before_make] = true
end

#do_exit_before_make_installObject

#

do_exit_before_make_install

#


1079
1080
1081
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1079

def do_exit_before_make_install
  @internal_hash[:exit_before_make_install] = true
end

#do_expand_the_cookbooksObject

#

do_expand_the_cookbooks

#


8309
8310
8311
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8309

def do_expand_the_cookbooks
  action(:expand_cookbooks, :all_of_them)
end

#do_extensively_report_the_build_statisticsObject

#

do_extensively_report_the_build_statistics

#


6566
6567
6568
6569
6570
6571
6572
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6566

def do_extensively_report_the_build_statistics
  report_the_compile_strategies
  # ======================================================================= #
  # Since as of July 2020 we will also show how many files are tracked.
  # ======================================================================= #
  action(:show_how_many_files_are_tracked)
end

#do_handle_the_post_installation_stepsObject Also known as: consider_performing_postinstallation_actions

#

do_handle_the_post_installation_steps

#


1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1364

def do_handle_the_post_installation_steps
  # ======================================================================== #
  # === (16) Consider symlinking glib-schema files into the /usr/
  #          hierarchy.
  #
  # This should come before we symlink other things, and after the
  # configure-step.
  # ======================================================================== #
  consider_symlinking_glib_schema_files_into_the_usr_share_hierarchy
  if appdir_prefix? and can_we_continue?
    # ====================================================================== #
    # === (18) Prepare SymlinkProgram
    #
    # Make our instance of SymlinkProgram behave properly - this should
    # come before we perform postinstallation actions, and after the
    # glib schema files were symlinked.
    # ====================================================================== #
    prepare_symlink_program_instance
    _ = appdir_prefix_points_at?
    orev "Trying to update or create the #{steelblue('Current')}"\
         "#{rev} symlink next."
    action(:ToCurrent, _) # Run ToCurrent here.
    orev 'Trying to symlink various entries from '+steelblue(_)+
         rev+' next.'
    if force_symlinks_when_appdir_prefix_is_used?
      action(:symlink_from_to_current2, _) # Run SymlinkFromToCurrent here.
    else
      action(:symlink_from_to_current, _) # Run SymlinkFromToCurrent here.
    end
    # Next we do some error-handling:
    # if has_an_error_occurred? or RBT::Errors::MapLineToASpecificError.all_programs_and_errors?.flatten.any? {|inner_line|
    #       inner_line.to_s.include?('.h: No such file or directory')
    #     }
    #     opne swarn('An error has occurred in the directory ')+
    #          sdir(return_pwd)+
    #          swarn('.')
    #     opne swarn('We will most likely not be able to continue.')
    #     try_to_give_additional_information_to_the_user_if_the_missing_header_is_registered
    #     case ignore_errors?
    #     when true
    #       # =============================================================== #
    #       # pass through
    #       # =============================================================== #
    #     when :infer # This is the new default.
    #       we_can_not_continue
    #     else
    #       we_can_not_continue
    #     end
    #   end
    # ====================================================================== #
    # ====================================================================== #
    # === (19) Check for registered, compiled binaries
    #
    # Make sure that the registered binaries are already registered,
    # if the program has been compiled successfully. This will only
    # be run on my home setup, though.
    # ====================================================================== #
    consider_checking_whether_the_compiled_binaries_are_already_registered
    consider_comparing_the_installed_libraries_versus_the_assumed_libraries
    # ====================================================================== #
    # === (19) Consider running "ldconfig" next
    # ====================================================================== #
    consider_running_ldconfig
    # ====================================================================== #
    # === (20) Consider storing the configure-options that were used
    #          into a fancy markdown file
    #
    # Note that this will only be done if the configure options are
    # NOT empty. In other words, the .yml file must have specified
    # some configure options to be used.
    # ====================================================================== #
    if did_we_use_an_appdir_prefix?
      # ==================================================================== #
      # And store this into the app-dir prefix, but only if we actually
      # did use an appdir-prefix.
      # ==================================================================== #
      do_store_the_configure_options_that_were_used_into_a_markdown_file
      # ==================================================================== #
      # === Handle .gir files since as of 22.02.2020.
      # ==================================================================== #
      if has_gir_files? and symlink_gir_files?
        target_directory = '/usr/share/gir-1.0/'
        symlink_the_available_gir_files_into_this_target_directory(target_directory)
      end
    end
    # ====================================================================== #
    # Else a problem or an error may have occurred. We will thus check
    # for that. The error will be re-set more on the beginning of
    # this method rather than its end.
    # ====================================================================== #
    # check_for_common_problems_and_common_errors
    # ====================================================================== #
    # Also register it to the file that keeps track of which
    # programs were compiled successfully.
    # ====================================================================== #
    register_last_compiled_program
    # ====================================================================== #
    # === Go back to the temp-directory again
    #
    # Return to the temp-directory as starting directory again. This
    # has to happen because the underlying directory may have been
    # removed, so weneed to go to a "stable" directory instead.
    #
    # The second argument exists so that we are silent about this.
    # ====================================================================== #
    change_directory(temp_directory?, :do_not_report_anything)
  end
end

#do_include_clang_for_the_llvm_compilationObject

#

do_include_clang_for_the_llvm_compilation

Here we have to do four steps in particular - extract two programs into the extracted directory of LLVM.

The code below is not very elegant and quite hackish; I simply wanted to finish this on the same day as I had this idea, which was on 09.09.2020. At a later point this should be cleaned up.

Invocation examples:

ry llvm --include-clang-for-compilation
ry llvm --compile-clang
#


6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6242

def do_include_clang_for_the_llvm_compilation
  # ======================================================================= #
  # First, we must extract LLVM.
  # ======================================================================= #
  initialize_dataset_for(:llvm)
  extracted_to = extract(cookbook_dataset_program_path?)+
                 cookbook_dataset_program_name_and_program_version?
  cd extracted_to # cd into that directory.
  initialize_dataset_for(:clang)
  extract_what_to(cookbook_dataset_program_path?, return_pwd+'tools')
  rename(
    'tools/'+cookbook_dataset_program_name_and_program_version?,
    'tools/clang'
  )
  initialize_dataset_for(:compilerrt)
  extract_what_to(cookbook_dataset_program_path?, return_pwd+'compiler-rt')
  # ======================================================================= #
  # First, we must extract LLVM.
  # ======================================================================= #
  initialize_dataset_for(:llvm)
  create_build_directory_then_cd_into_it
  set_this_env_variable 'CC=gcc'
  set_this_env_variable 'CXX=g++'
  # ======================================================================= #
  # The next cmake-line is a hack - at a later point we should clean this
  # up.
  # ======================================================================= #
  cmd = 'cmake -DCMAKE_INSTALL_PREFIX='+appdir_prefix?(:llvm)+'
         -DLLVM_ENABLE_FFI=ON
         -DCMAKE_BUILD_TYPE=Release
         -DLLVM_BUILD_LLVM_DYLIB=ON
         -DLLVM_LINK_LLVM_DYLIB=ON
         -DLLVM_ENABLE_RTTI=ON
         -DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF"
         -DLLVM_BUILD_TESTS=ON
         -Wno-dev -G Ninja ..'.delete(N).
                               squeeze(' ')
  run_this_system_command_in_a_coloured_and_padded_manner(cmd)
  do_run_ninja
  do_run_ninja_install
  rnsymc(appdir_prefix?(:llvm))
  exit_program
end

#do_install_only_binariesObject

#

do_install_only_binaries

#


3347
3348
3349
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3347

def do_install_only_binaries
  @internal_hash[:install_only_binaries] = true
end

#do_install_only_the_headers(of_this_program = compile_these_programs?.first) ⇒ Object

#

do_install_only_the_headers

This method will only intall the headers of a program. You must call the method action_install_only_headers() for real action.

#


12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12894

def do_install_only_the_headers(
    of_this_program = compile_these_programs?.first
  )
  do_not_compile
  do_not_run_configure
  disable_logging # We dont want to log.
  orev "Installing only headers for the program `"\
       "#{sfancy(of_this_program)}#{rev}` now."
  @internal_hash[:install_only_the_headers] = true
end

#do_install_these_programs(i = compile_which_program? ) ⇒ Object Also known as: batch_compile_the_programs, batch_compile_these_programs, start_to_compile_the_programs, start_to_compile, do_initiate_batch_compilation, do_install_the_programs, do_compile_these_programs, compile_this_program_again, compile_every_program

#

do_install_these_programs

The logic for this task will be handled internally, on a per-program basis, through the method try_to_install_this_program().

The argument to this method should be an Array which holds the programs that the user wishes to compile. This is normally set elsewhere in class RBT::Action::SoftwareManager.

#


2396
2397
2398
2399
2400
2401
2402
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 2396

def do_install_these_programs(
    i = compile_which_program?
  )
  [i].flatten.compact.each {|this_program|
    try_to_install_this_program(this_program)
  }
end

#do_invoke_autoconfObject Also known as: invoke_autoconf

#

do_invoke_autoconf

This variant invokes autoconf without any additional check.

#


9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9808

def do_invoke_autoconf
  cmd = 'autoconf' # " #{SHELL_ERROR_CODE}"
  cliner
  orev "Doing `#{teal(cmd)}#{rev}` in the directory"
  orev "#{sdir_return_pwd}"
  orev 'using this command next:'
  orev N
  orev sfancy("  #{cmd}")
  orev N
  cliner
  `#{cmd}`
end

#do_keep_la_filesObject

#

do_keep_la_files

Use this method if you wish to keep the libtool .la files. This may sometimes be necessary, even though libtool .la files are a fairly bad solution altogether.

#


837
838
839
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 837

def do_keep_la_files
  @internal_hash[:keep_la_files] = true
end

#do_not_check_whether_the_program_existsObject Also known as: do_not_honour_check_to_ensure_that_the_program_exists

#

do_not_check_whether_the_program_exists

#


6466
6467
6468
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6466

def do_not_check_whether_the_program_exists
  @internal_hash[:check_whether_the_given_input_is_a_file_and_does_exist] = false
end

#do_not_compile(be_verbose = be_verbose? ) ⇒ Object

#

do_not_compile

This method can be invoked to set the :continue_after_configure_step entry in the internal hash to false.

If set to false then we will NOT compile a program. Instead, we will run the configure script and quit after having done so.

#


12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12872

def do_not_compile(
    be_verbose = be_verbose?
  )
  case be_verbose
  when :be_quiet
    be_verbose = false
  end
  if be_verbose
    orev 'We will not continue after the '+
         steelblue('configure phase')+rev+'.'
  end
  @internal_hash[:continue_after_configure_step] = false
  @internal_hash[:do_not_compile] = true
  set_do_not_symlink(be_verbose) # So we don't run advanced symlink.
end

#do_not_compile?Boolean

#

do_not_compile?

#

Returns:

  • (Boolean)


825
826
827
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 825

def do_not_compile?
  @internal_hash[:do_not_compile]
end

#do_not_continue_after_configure_stepObject Also known as: do_not_continue_past_the_make_step

#

do_not_continue_after_configure_step

#


7507
7508
7509
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7507

def do_not_continue_after_configure_step
  @internal_hash[:continue_after_configure_step] = false
end

#do_not_continue_after_make_stepObject

#

do_not_continue_after_make_step

#


8464
8465
8466
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8464

def do_not_continue_after_make_step
  @internal_hash[:continue_after_make_step] = false
end

#do_not_create_the_appdir_skeletonObject

#

do_not_create_the_appdir_skeleton

#


8316
8317
8318
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8316

def do_not_create_the_appdir_skeleton
  @internal_hash[:create_appdir_skeleton] = false
end

#do_not_display_the_flexboxObject Also known as: do_not_show_the_flexbox

#

do_not_display_the_flexbox

#


10720
10721
10722
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10720

def do_not_display_the_flexbox
  @internal_hash[:show_the_flexbox] = false
end

#do_not_downloadObject

#

do_not_download

Setter-method to disable downloading the remote source package.

#


8363
8364
8365
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8363

def do_not_download
  ihash?[:may_we_download] = false
end

#do_not_exit_after_a_rubygem_has_been_installedObject

#

do_not_exit_after_a_rubygem_has_been_installed

#


6377
6378
6379
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6377

def do_not_exit_after_a_rubygem_has_been_installed
  @internal_hash[:exit_after_a_rubygem_has_been_installed] = false
end

#do_not_initialize_a_new_cookbook_datasetObject

#

do_not_initialize_a_new_cookbook_dataset

#


1847
1848
1849
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1847

def do_not_initialize_a_new_cookbook_dataset
  @internal_hash[:may_we_initialize_a_new_cookbook_dataset] = false
end

#do_not_register_into_the_yaml_databaseObject

#

do_not_register_into_the_yaml_database

#


11529
11530
11531
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11529

def do_not_register_into_the_yaml_database
  RBT.do_not_register_into_the_yaml_database
end

#do_not_register_the_last_compiled_programObject

#

do_not_register_the_last_compiled_program

#


10417
10418
10419
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10417

def do_not_register_the_last_compiled_program
  @internal_hash[:register_the_last_compiled_program] = false
end

#do_not_rename_the_kde_konsole_tabObject

#

do_not_rename_the_kde_konsole_tab

#


8301
8302
8303
8304
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8301

def do_not_rename_the_kde_konsole_tab
  orev "We will not rename the KDE Konsole tab."
  @internal_hash[:rename_tab_title] = false
end

#do_not_run_configure(be_verbose = true) ⇒ Object Also known as: do_not_invoke_configure

#

do_not_run_configure

Do not run the configure script. Since Jan 2012 we also disable running ldconfig in this method.

#


2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2625

def do_not_run_configure(
    be_verbose = true
  )
  if be_verbose
    orev 'We will not compile - or run any configure script.'
  end
  do_not_run_the_configure_script
  do_not_use_ldconfig
  no_postinstall_actions
end

#do_not_run_configure_scriptObject Also known as: do_not_run_the_configure_script

#

do_not_run_configure_script

#


2639
2640
2641
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2639

def do_not_run_configure_script
  @internal_hash[:run_configure_script] = false
end

#do_not_run_ldconfigObject

#

do_not_run_ldconfig

#


5457
5458
5459
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5457

def do_not_run_ldconfig
  do_not_use_ldconfig :be_silent
end

#do_not_run_makeObject

#

do_not_run_make

#


6417
6418
6419
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6417

def do_not_run_make
  @internal_hash[:run_make_command] = false
end

#do_not_run_make_install(be_verbose = false) ⇒ Object Also known as: dont_make_install

#

do_not_run_make_install

Use this method if you wish to specifically skipping the “make install” step.

#


788
789
790
791
792
793
794
795
796
797
798
799
800
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 788

def do_not_run_make_install(
    be_verbose = false
  )
  @internal_hash[:run_make_install] = false
  if be_verbose
    orev 'We will not run the "'+slateblue('make install')+
         rev+'" command.'
  end
  # ======================================================================= #
  # Running ldconfig seems pointless, so it is also disabled (silently).
  # ======================================================================= #
  do_not_use_ldconfig(:do_not_be_verbose)
end

#do_not_run_ninjaObject

#

do_not_run_ninja

#


6549
6550
6551
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6549

def do_not_run_ninja
  @internal_hash[:may_we_run_ninja] = false 
end

#do_not_skip_extractingObject

#

do_not_skip_extracting

This method will set towards extracting the archive.

#


6646
6647
6648
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6646

def do_not_skip_extracting
  @internal_hash[:skip_extracting] = false
end

#do_not_store_the_compile_timeObject

#

do_not_store_the_compile_time

#


2776
2777
2778
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2776

def do_not_store_the_compile_time
  @internal_hash[:time_compilation] = false
end

#do_not_strip_binaries?Boolean Also known as: do_not_strip_the_binaries?

#

do_not_strip_binaries?

#

Returns:

  • (Boolean)


1140
1141
1142
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1140

def do_not_strip_binaries?
  !strip_binaries?
end

#do_not_strip_the_binariesObject Also known as: do_not_strip_binaries

#

do_not_strip_the_binaries

This is the non-verbose variant to disable stripping of binaries.

If you need the verbose variant, use the method called verbose_do_not_strip_the_binaries() instead.

#


2894
2895
2896
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2894

def do_not_strip_the_binaries
  @internal_hash[:strip_binaries] = false
end

#do_not_symlink?Boolean

#
#

Returns:

  • (Boolean)


1236
1237
1238
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1236

def do_not_symlink?
  @internal_hash[:do_not_symlink]
end
#

This will disable symlinking the header files. By default, we will not be verbose and thus do not output anything to the user.

#


8225
8226
8227
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8225

def do_not_symlink_header_files
  @internal_hash[:symlink_headers] = false
end
#
#


7851
7852
7853
7854
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7851

def do_not_symlink_in_general_and_also_do_not_symlink_header_files
  set_do_not_symlink
  do_not_symlink_header_files
end
#
#


461
462
463
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 461

def do_not_symlink_pkgconfig_files
  set_pkgconfig_symlink(false)
end

#do_not_try_to_autofixObject

#

do_not_try_to_autofix

This method will specifically disable any attempts to try to autofix libtool-related problems. It is currently silent, all of the time.

#


9035
9036
9037
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9035

def do_not_try_to_autofix
  @internal_hash[:try_to_autofix] = false
end

#do_not_use_a_build_directory(&block) ⇒ Object

#

do_not_use_a_build_directory

#


11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11803

def do_not_use_a_build_directory(&block)
  if block_given?
    yielded = yield
    case yielded
    # ===================================================================== #
    # === :be_verbose
    # ===================================================================== #
    when :be_verbose
      orev 'We will not use a build directory.'
    end
  end
  @internal_hash[:use_build_directory] = false
end

#do_not_use_a_prefixObject

#

do_not_use_a_prefix

Do not use any prefix in general, no matter whether we will use GNU configure, meson/ninja, cmake or any other build system..

#


8345
8346
8347
8348
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8345

def do_not_use_a_prefix
  orev 'No '+steelblue('--prefix')+rev+' option will be used.'
  @internal_hash[:use_a_prefix] = false
end

#do_not_use_any_compile_time_flagsObject

#

do_not_use_any_compile_time_flags

If you do not want to use any compile-time flags, aka CFLAGS, then you can use this method here.

#


6063
6064
6065
6066
6067
6068
6069
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6063

def do_not_use_any_compile_time_flags
  orev 'Setting compile-time flags ('+
       royalblue('CFLAGS')+', '+
       royalblue('LDFLAGS')+
       ') to empty.'
  set_cflags('')
end

#do_not_use_any_configure_option(be_verbose = be_verbose?, , &block) ⇒ Object Also known as: do_not_use_any_configure_options

#

do_not_use_any_configure_option

This option allows us to avoid using any configure option.

Invocation example from the commandline:

ry htop --dont-use-configure-options
#


12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12767

def do_not_use_any_configure_option(
    be_verbose = be_verbose?,
    &block
  )
  if block_given?
    be_verbose = yield
  end
  case be_verbose
  when :be_verbose, true
    # ===================================================================== #
    # Be verbose in this case.
    # ===================================================================== #
    orev 'No configure options will be used for this run.'
  end
  @internal_hash[:try_to_use_configure_options] = false
end

#do_not_use_autoconfObject

#

do_not_use_autoconf

#


9475
9476
9477
9478
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9475

def do_not_use_autoconf
  @internal_hash[:use_autoconf] = false
  orev "We will #{tomato('not')}#{rev} invoke autoconf."
end

#do_not_use_cookbook_aliases(be_verbose = :be_verbose) ⇒ Object

#

do_not_use_cookbook_aliases

#


8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8205

def do_not_use_cookbook_aliases(
    be_verbose = :be_verbose
  )
  case be_verbose
  # ======================================================================= #
  # === :be_verbose
  # ======================================================================= #
  when :be_verbose,
       true
    orev 'Disabling cookbook aliases for this run.'
  end
  @internal_hash[:make_use_of_the_cookbook_aliases] = false
end

#do_not_use_ldconfig(be_verbose = be_verbose? ) ⇒ Object

#

do_not_use_ldconfig

Use only this method when you wish to disable running ldconfig.

To set this, do something like:

ry htop do_not_use_ldconfig
#


5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5414

def do_not_use_ldconfig(
    be_verbose = be_verbose?
  )
  case be_verbose
  # ======================================================================= #
  # === :do_not_be_verbose
  # ======================================================================= #
  when :do_not_be_verbose,
       :be_silent
    be_verbose = false
  end
  if be_verbose
    opne "#{rev}We will not run `#{teal('ldconfig')}#{rev}`."
  end
  RBT.configuration?.run_ldconfig = false
end

#do_not_use_sed(be_verbose = false) ⇒ Object

#

do_not_use_sed

Disable the use of sed through this method.

#


11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11972

def do_not_use_sed(
    be_verbose = false
  )
  case be_verbose
  # ======================================================================= #
  # === :be_verbose
  # ======================================================================= #
  when :be_verbose
    be_verbose = true
  end
  if be_verbose
    orev "We will not be using #{lightgreen('sed')}#{rev}."
  end
  @internal_hash[:sed] = false
end

#do_perform_an_intelligent_bootstrapObject

#

do_perform_an_intelligent_bootstrap

Usage example:

rbt --intelligent-bootstrap
#


7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7879

def do_perform_an_intelligent_bootstrap
  begin
    require 'environment_information'
  rescue LoadError; end
  orev 'Attempting to perform an '+
       steelblue('intelligent bootstrap operation next')+"#{rev}."
  if Object.const_defined? :EnvironmentInformation
    EnvironmentInformation.initialize
    array_of_outdated_programs = EnvironmentInformation.return_array_of_outdated_programs
    # ===================================================================== #
    # Now that we have these programs, we must sort them based on
    # filesize.
    # ===================================================================== #
    array_of_outdated_programs = array_of_outdated_programs.sort_by {|this_program|
      result = 1_000_000 # Use a bogus entry here, to sort it towards the bottom.
      target_yaml_file = ::RBT.path_to_expanded_directory?+this_program.to_s+'.yml'
      if File.exist? target_yaml_file
        dataset = YAML.load_file(target_yaml_file)
        if dataset.has_key? 'archive_size'
          result = dataset['archive_size']
        end
      end
      result
    }
    array_of_outdated_programs.each {|this_program|
      orev "Now compiling #{steelblue(this_program)}#{rev}."
      action(:Installer, this_program)
    }
  end
end

#do_perform_simplified_bzip_installationObject

#

do_perform_simplified_bzip_installation

Invocation example:

ry --simple-bzip
#


3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3830

def do_perform_simplified_bzip_installation
  ensure_that_the_cookbook_dataset_exists(:bzip2)
  _ = cookbook_dataset_manual_steps?.lstrip.split("\n").reject {|line|
    line.to_s.strip.empty? or line.to_s.start_with?('#')
  }
  program_path = program_path?
  orev 'Extracting the archive at '+sfile(program_path)+"#{rev} next."
  location = extract_what_to(program_path) { :be_verbose }.extract_to?+
             File.basename(program_path)
  location = remove_archive_from_the_end(location)
  if File.directory? location
    cd(location)
    if _.any? {|line|
        line.start_with?('Or the AppDir variant')
      }
      new_index = _.find_index {|line|
        line.start_with?('Or the AppDir variant')
      }
      _ = _[0, new_index]
    end
    _.each {|entry|
      esystem(entry) { :do_colourize }
    }
  end
end

#do_permanently_disable_ccache(into = FILE_CCACHE, what = "false\n") ⇒ Object

#

do_permanently_disable_ccache

#


7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7941

def do_permanently_disable_ccache(
    into = FILE_CCACHE,
    what = "false\n"
  )
  write_what_into(what, into)
  orev "Permanently disabling the use of ccache "\
       "(Stored into this file: `#{sfile(into)}#{rev}`)."
  if is_on_roebe?
    into = "#{RUBY_SRC_DIRECTORY}rbt/lib/rbt/yaml/configuration/"\
           "#{File.basename(into)}"
    write_what_into(what, into)
    orev "Permanently disabling the use of ccache "\
         "(Stored into this file: `#{sfile(into)}#{rev}`)."
  end
end

#do_permanently_disable_the_coloursObject

#

do_permanently_disable_the_colours

This method can be used to permanently disable the colours.

Invoke this method by issuing:

ry --permanent-no-colours
#


3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3903

def do_permanently_disable_the_colours
  orev 'Now permanently disabling the colours.'
  configuration?.use_colours = false
  what = false
  into = RBT.file_use_colours
  write_what_into(what, into)
  if is_on_roebe?
    into = RUBY_SRC_DIR_RBT_YAML_AT_HOME+'configuration/'+
           File.basename(into)
    orev "Also storing in `#{sfile(into)}#{rev}`."
    write_what_into(what, into)
  end
end

#do_permanently_enable_ccache(into = FILE_CCACHE, what = "true\n") ⇒ Object

#

do_permanently_enable_ccache

#


6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6923

def do_permanently_enable_ccache(
    into = FILE_CCACHE,
    what = "true\n"
  )
  write_what_into(what, into)
  orev "Permanently enabling the use of ccache "\
       "(Stored into this file: `#{sfile(into)}#{rev}`)."
  if is_on_roebe?
    into = "#{RUBY_SRC_DIRECTORY}rbt/lib/rbt/yaml/configuration/"\
           "#{File.basename(into)}"
    write_what_into(what, into)
    orev "Permanently enabling the use of ccache "\
         "(Stored into this file: `#{sfile(into)}#{rev}`)."
  end
end

#do_permanently_enable_the_coloursObject

#

do_permanently_enable_the_colours

This method can be used to permanently enable the colours.

Invoke this method by issuing:

ry --permanent-enable-colours
#


4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4433

def do_permanently_enable_the_colours
  orev 'Now permanently enable the colours.'
  configuration?.use_colours = true
  into = RBT.file_use_colours
  write_what_into(false, into)
  if is_on_roebe?
    into = RUBY_SRC_DIR_RBT_YAML_AT_HOME+'configuration/'+
           File.basename(into)
    orev "Also storing in `#{sfile(into)}#{rev}`."
    write_what_into(true, into)
  end
end

#do_permanently_use_clangObject

#

do_permanently_use_clang

This method will permanently enable clang, the compiler, on a project-wide default.

Invocation example:

ry --do-permanently-use-clang
#


8975
8976
8977
8978
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8975

def do_permanently_use_clang
  configuration?.use_this_compiler = :clang
  configuration?.do_save
end

#do_permanently_use_psychObject

#

do_permanently_use_psych

Use this method if you wish to permanently use psych, rather than syck.

#


3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3011

def do_permanently_use_psych
  orev 'We will use the psych module for yaml-datasets from now on.'
  orev 'This will be stored in the file '+sfile(FILE_USE_PSYCH_OR_SYCK)
  write_what_into(YAML.dump(:psych), FILE_USE_PSYCH_OR_SYCK)
  if is_on_roebe?
    write_what_into(YAML.dump(:psych),
      ROEBE_PATH_TO_COOKBOOKS+'yaml/configuration/'+
      File.basename(FILE_USE_PSYCH_OR_SYCK)
    )
  end
end

#do_permanently_use_syckObject

#

do_permanently_use_syck

Use this method if you wish to permanently use syck, rather than psych.

#


2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2045

def do_permanently_use_syck
  orev 'We will use the syck module for yaml-datasets from now on.'
  orev "This will be stored in the "\
       "file #{sfile(FILE_USE_PSYCH_OR_SYCK)}"
  write_what_into(YAML.dump(:syck), FILE_USE_PSYCH_OR_SYCK)
  if is_on_roebe?
    write_what_into(YAML.dump(:syck),
      "#{ROEBE_PATH_TO_COOKBOOKS}yaml/configuration/"+
      File.basename(FILE_USE_PSYCH_OR_SYCK)
    )
  end
end

#do_remove_la_files_after_compilationObject

#

do_remove_la_files_after_compilation

#


2114
2115
2116
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2114

def do_remove_la_files_after_compilation
  @internal_hash[:keep_la_files] = false
end

#do_remove_the_extracted_archiveObject

#

do_remove_the_extracted_archive

This is the method that will remove the extracted archive again. Only invoke it when we are absolutely certain that the archive has to be extracted.

#


472
473
474
475
476
477
478
479
480
481
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 472

def do_remove_the_extracted_archive
  _ = remove_archive_stuff_from_the_end(
        extract_where_to?+
        File.basename(program_path?.to_s)
      )
  if File.directory?(_) and remove_the_extracted_archive?
    orev "Next, the directory at `#{sdir(_)}#{rev}` will be removed."
    remove_directory(_)
  end
end

#do_run_GNU_configure_then_make_then_make_install(use_this_configure_command = use_this_build_system? ) ⇒ Object Also known as: run_the_configure_command, run_configure_then_make_then_make_install, run_the_gnu_configure_steps

#

do_run_GNU_configure_then_make_then_make_install (configure tag)

#


197
198
199
200
201
202
203
204
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 197

def do_run_GNU_configure_then_make_then_make_install(
    use_this_configure_command = use_this_build_system?
  )
  if shall_we_run_configure?
    run_traditional_GNU_configure
  end
  run_premake_make_then_make_install
end

#do_run_ninja_and_then_ninja_installObject Also known as: run_ninja, ninja_install, ninjait

#

do_run_ninja_and_then_ninja_install

This entry point will run “ninja” and then “nina install”.

#


775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 775

def do_run_ninja_and_then_ninja_install
  if may_we_run_ninja? # Always check first whether we may run ninja.
    this_file = FILE_BUILD_NINJA
    if File.exist?(this_file) or
       File.exist?(File.absolute_path(this_file))
      # ==================================================================== #
      # === Run "ninja" next:
      # ==================================================================== #
      run_ninja
      # ==================================================================== #
      # === Run "ninja install" next:
      # ==================================================================== #
      run_ninja_install
    else # else the file "build.ninja" was not found.
      orev "No file called #{sfile(this_file)} #{rev}could be "\
           "found in the directory"
      orev "#{sdir(return_pwd)}#{rev} - thus, the build tool called"
      orev "#{orange('ninja')} #{rev}can not be run."
      # ==================================================================== #
      # Register this error as well:
      # ==================================================================== #
      # error_is :could_not_find_file_called_build_ninja
    end
  end
end

#do_run_simulationObject

#

do_run_simulation

#


8449
8450
8451
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8449

def do_run_simulation
  @internal_hash[:run_simulation] = true
end

#do_run_with_this_input(i) ⇒ Object

#

do_run_with_this_input

#


18
19
20
21
22
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 18

def do_run_with_this_input(i)
  menu
  set_install_these_programs(i)
  do_install_the_programs
end

#do_set_keep_extracted(be_verbose = be_verbose? ) ⇒ Object Also known as: do_set_keep_extracted_archive

#

do_set_keep_extracted

This delegates towards the method set_keep_the_extracted_archive and may also report to the end-user as to what is being done.

#


10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10562

def do_set_keep_extracted(
    be_verbose = be_verbose?
  )
  case be_verbose
  # ======================================================================= #
  # === :be_silent
  # ======================================================================= #
  when :be_silent,
       :be_quiet
    be_verbose = false
  end
  if be_verbose
    orev 'The extracted directory will not be removed '\
         'after compilation / installation has finished.'
  end
  set_keep_the_extracted_archive
end

#do_show_the_flexboxObject

#

do_show_the_flexbox

#


10727
10728
10729
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10727

def do_show_the_flexbox
  @internal_hash[:show_the_flexbox] = true
end

#do_skip_extractingObject Also known as: skip_extracting

#

do_skip_extracting

Not every archive has to be extracted. For example, .gem files do not have to be extracted.

#


6559
6560
6561
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6559

def do_skip_extracting
  @internal_hash[:skip_extracting] = true
end

#do_skip_the_postinstallation_stepObject Also known as: skip_postinstallation_step

#

do_skip_the_postinstallation_step

#


10200
10201
10202
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10200

def do_skip_the_postinstallation_step
  @internal_hash[:run_postinstall_actions] = false
end

#do_start_the_sinatra_interfaceObject

#

do_start_the_sinatra_interface

#


7499
7500
7501
7502
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7499

def do_start_the_sinatra_interface
  require 'rbt/sinatra/app.rb'
  RBT.run_app
end

#do_store_the_configure_options_that_were_used_into_a_markdown_file(store_this = configure_options_based_on_the_build_system_in_use?.dup) ⇒ Object

#

do_store_the_configure_options_that_were_used_into_a_markdown_file

This method is only invoked for an AppDir program. It will store the configure options, but not the full configure command; for that another .md file is used.

#


2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 2359

def do_store_the_configure_options_that_were_used_into_a_markdown_file(
    store_this = 
      configure_options_based_on_the_build_system_in_use?.dup
  )
  if store_this and !store_this.empty?
    # ====================================================================== #
    # We will remove some stuff from it before storing:
    # ====================================================================== #
    if store_this.include? rbt_temp_dir?
      store_this.sub!(
        /#{Regexp.quote(rbt_temp_dir?)}/, ''
      )
      _ = program_name_and_program_version?
      if store_this.include? _
        store_this.sub!(/#{_}/, '.')
      end
    end
    into = "#{prefix?}Resources/configure_options.md"
    orev "Storing the configure options that were used "\
         "into the file:"
    e
    e "  #{sfile(into)}"
    e
    write_what_into("#{store_this}\n", into)
  end
end

#do_strip_the_compiled_binaries(strip_how = '--strip-unneeded') ⇒ Object

#

do_strip_the_compiled_binaries

This method will strip the compiled binaries, but only if we install them in an AppDir-prefix, that is, a path such as:

/Programs/Htop/2.0.2/
/home/Programs/Htop/2.0.2/

This stripping-operation will be done by the program called “strip”, which is part of the binutils suite.

There are three major ways how to use the strip functionality essentially:

(1) --strip-unneeded
(2) --strip-debug
(3) --strip-all

“strip –strip-unneeded” will remove all symbols that are not needed for relocation processing.

“strip –strip-debug” will only remove the debugging symbols.

“strip –strip-all” will remove all symbols.

Note that you can also strip the symbol table, from an object file, by using the “-s option” of the strip command.

When I tested different strip variants, in particular –strip-debug and –strip-unneeded, the latter one was producing significantly smaller binary files. When I used –strip-all and compared it to –strip-unneeded, the results were the same - so based on this, I am setting “–strip-unneeded” as the default.

#


3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3172

def do_strip_the_compiled_binaries(
    # ===================================================================== #
    # Determine which strip-variant to use next:
    #   strip_how = '--strip-debug'
    #   strip_how = '--strip-all'
    # ===================================================================== #
    strip_how = '--strip-unneeded' # ← This is the current default.
  )
  # ======================================================================= #
  # Do not strip the binaries if an error has occurred or if the user
  # has not enabled this option.
  # ======================================================================= #
  return unless can_we_continue?
  return if an_error_has_occurred?
  return if do_not_strip_the_binaries?
  # ======================================================================= #
  # First, we must determine whether we will use the strip command or
  # whether we will not. Presently, we will use the strip command if
  # the user_prefix either includes the programs directory - or if
  # we use a path that is NOT using /usr as part of its prefix.
  #
  # As of January 2019, the above has been changed - we will only use
  # this if the real prefix includes the programs directory. Any other
  # prefixes will be ignored.
  #
  # As of December 2019, the method also has to check whether
  # real_prefix? returns a value other than nil (or false). The
  # reason for this is because RBT::Action::SoftwareManager is able to respond
  # to --no-prefix again, so this requires more checks.
  # ======================================================================= #
  if real_prefix? and real_prefix?.include?(programs_dir?) # or
     # !real_prefix?.include?('/usr')
    _ = rds(real_prefix?.to_s+'/bin/')
    # ===================================================================== #
    # Next obtain all entries in the bin/ subdirectory there. This may
    # lead to wrong results, though, as it may also include other files
    # if we are not careful.
    # ===================================================================== #
    all_files_in_the_bin_subdirectory = Dir["#{_}*"]
    # ===================================================================== #
    # Since as of 01.02.2019 we will only keep entries that are also
    # registered under "binaries:" in the corresponding .yml file.
    # This was specifically done to prevent running strip on e. g.
    # /usr/bin/* or /root/bin/*.
    # ===================================================================== #
    binaries = binaries?
    all_files_in_the_bin_subdirectory.select! {|entry|
      binaries.include?(File.basename(entry))
    }
    strip_command = "strip #{strip_how.lstrip}"
    unless all_files_in_the_bin_subdirectory.empty?
      how_many = sfancy(all_files_in_the_bin_subdirectory.size.to_s)
      # =================================================================== #
      # Notify the user how many executables will be modified
      # through strip next.
      # =================================================================== #
      text = "#{rev}Next running \"#{sfancy(strip_command)}#{rev}\" on".dup
      if all_files_in_the_bin_subdirectory.size > 1
        text << ' all'
      end
      text << "#{rev} #{how_many}#{rev}" # Add the number here.
      if all_files_in_the_bin_subdirectory.size > 1
        text << ' binaries.'
      else
        text << ' binary.'
      end
      # =================================================================== #
      # Display our findings to the user next:
      # =================================================================== #
      orev text
      all_files_in_the_bin_subdirectory.each {|this_file|
        # ================================================================== #
        # The following command will usually run:
        #   "strip --strip-unneeded *"
        # ================================================================== #
        cmd = "#{strip_command} #{this_file}"
        orev "  #{sfancy(cmd)}"
        system(cmd) 
      }
    end
  end
end
#
#


7434
7435
7436
7437
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7434

def do_symlink_all_programs_then_exit
  symlink_all_programs :do_it
  exit_program
end
#

This method will enable the symlinkinkg part from an AppDir path to a /usr/lib/ path.

#


8488
8489
8490
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8488

def do_symlink_appdir_lib_into_usr_lib
  @internal_hash[:symlink_into_usr_lib_dir] = true
end

#do_the_dependencies_include_this_program?(i = compile_which_program? ) ⇒ Boolean

#

do_the_dependencies_include_this_program?

This method can be used to check whether the dependencies include a given program at hand (the input).

Keep in mind that dependencies can be written in either “name” or “name >= 1.2.3” style. So we also have to check for the second possibility there.

#

Returns:

  • (Boolean)


1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1189

def do_the_dependencies_include_this_program?(
    i = compile_which_program?
  )
  dependencies = required_dependencies_on?
  # ======================================================================= #
  # Simplify the dependencies next.
  # ======================================================================= #
  dependencies.map! {|entry|
    if entry.include?(' >') or entry.include?(' <')
      entry = entry.split(' ').first.strip
    end
    entry
  }
  dependencies.include? i
end

#do_these_logic_steps(*array) ⇒ Object Also known as: do_this_logic_step

#

do_these_logic_steps (logic tag)

This is a “meta”-method - it bundles different logic-steps together.

#


1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1606

def do_these_logic_steps(*array)
  flattened = array.flatten
  flattened.each {|this_entry|
    case this_entry
    # ====================================================================== #
    # === :consider_applying_a_patch
    # ====================================================================== #
    when :consider_applying_a_patch
      consider_applying_a_patch
    # ====================================================================== #
    # === :consider_creating_the_appdir
    # ====================================================================== #
    when :consider_creating_the_appdir
      consider_creating_the_appdir_skeleton
    else # else assume a method-call as-is.
      send(this_entry.to_sym)
    end
  }
end

#do_upgrade_from_this_file(i) ⇒ Object

#

do_upgrade_from_this_file

This method can be used to read input from a file, in order to determine which programs are to be compiled.

#


1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1821

def do_upgrade_from_this_file(i)
  case i # case tag
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default, :def
    i = 'these_programs_can_be_upgraded.yml'
  end
  if File.exist? i
    if i.end_with? '.yml'
      dataset_to_use = load_yaml(i)
    else
      dataset_to_use = File.readlines(i).map {|line| line.strip }
    end
    _ = dataset_to_use
    _ = _.join(', ') if _.is_a? Array
    orev "We will use this dataset: #{slateblue(_)}#{rev}"
    set_compile_these_programs(dataset_to_use)
  else
    no_file_exists_at(i)
  end
end

#do_upload_binariesObject

#

do_upload_binaries

#


10175
10176
10177
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10175

def do_upload_binaries
  @internal_hash[:upload_binaries] = true
end

#do_upload_ruby_binaryObject

#

do_upload_ruby_binary

To invoke this, try:

ry --upload-ruby-binary
#


3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3766

def do_upload_ruby_binary
  ensure_that_the_log_directory_exists
  # ======================================================================= #
  # Obtain the path to the local ruby version in use:
  # ======================================================================= #
  path_to_ruby = "#{programs_dir?}Ruby/"
  base_directory_to_upload = "#{path_to_ruby}Current" # This is a symlink.
  ruby_version = File.readlink(base_directory_to_upload)
  cd log_dir?
  _ = path_to_ruby+ruby_version+'/' # This is the full, real path.
  # ======================================================================= #
  # Next, use tar to create an archive.
  # ======================================================================= #
  readelf_command_to_use  = "readelf -h #{_}bin/ruby"
  binary_32_bit_or_64_bit = `#{readelf_command_to_use}`
  binary_32_bit_or_64_bit = binary_32_bit_or_64_bit.split(N).select {|line|
    line.include? 'Class:'
  }
  binary_32_bit_or_64_bit = binary_32_bit_or_64_bit.to_s.dup
  binary_32_bit_or_64_bit =~ /(\d+)/
  binary_32_bit_or_64_bit = $1.to_s.dup+'-bit'
  orev "We will put this archive into `#{sdir(return_pwd)}`."
  name_of_the_ruby_archive = 'ruby-'+ruby_version+'-'+binary_32_bit_or_64_bit+'.tar.xz'
  _ = 'tar cfJv '+name_of_the_ruby_archive+' '+_
  run_this_system_command_in_a_coloured_and_padded_manner(_)
  _ = (return_pwd+name_of_the_ruby_archive).squeeze '/'
  if File.exist? _
    e 'The file now resides at `'+sfile(_)+'`.'
    do_binary_upload_of_this_file(_) # Here we finally upload the archive.
  else
    e 'Some error appears to have happened - no archive at '+sfile(_)
    e ' could be found.'
  end
end

#do_use_a_white_backgroundObject

#

do_use_a_white_background

We will silently assume that the user has a white background, and will re-assign to use a green font colour in this case, on KDE Konsole.

#


6973
6974
6975
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6973

def do_use_a_white_background
  ::Colours.table_colour_methods_to_specific_colour[:simp] = :seagreen
end

#do_use_appdir_prefixObject Also known as: compile_in_a_non_traditional_manner, do_change_the_prefix_towards_an_appdir_prefix

#

do_use_appdir_prefix

This method will call do_compile_in_a_non_traditional_way, but it will always be quiet.

#


7165
7166
7167
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7165

def do_use_appdir_prefix
  do_compile_in_a_non_traditional_way(:be_quiet)
end

#do_use_autoconfObject

#

do_use_autoconf

This method enables the use of autoconf for the current invocation run.

#


11604
11605
11606
11607
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11604

def do_use_autoconf
  @internal_hash[:use_autoconf] = true
  orev "We will #{steelblue('invoke autoconf')}#{rev}."
end

#do_use_autogen(use_this_cmd = "sh #{FILE_AUTOGEN}") ⇒ Object

#

do_use_autogen

This invokes the autogen script, by using ‘sh’.

In oldschool shell script code, this means that we will run the following command:

sh autogen.sh
#


3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3451

def do_use_autogen(
    use_this_cmd = "sh #{FILE_AUTOGEN}" # " #{SHELL_ERROR_CODE}"
  )
  cliner {
    _ = return_pwd
    opne simp('Doing `')+sfancy(use_this_cmd)+simp('` from ')+sdir(_)
    opne simp('using the following command:')
    opnn; efancy "  #{use_this_cmd}"
  }
  `#{use_this_cmd}`
end

#do_use_build_directory(be_verbose = be_verbose? ) ⇒ Object Also known as: use_build_directory, use_a_build_directory, do_use_a_build_directory

#

do_use_build_directory

Use this method to specifcally “tell” a program to do use a build directory. For cmake-based projects it is recommended to use a build directory.

Usage example:

ry htop build
#


11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11777

def do_use_build_directory(
    be_verbose = be_verbose?
  )
  case be_verbose
  # ======================================================================= #
  # === :be_verbose
  # ======================================================================= #
  when :be_verbose
    be_verbose = true
  # ======================================================================= #
  # === :be_quiet
  # ======================================================================= #
  when :be_quiet
    be_verbose = false
  end
  if be_verbose
    orev 'A build directory will be used.'
  end
  @internal_hash[:use_build_directory] = true
end

#do_use_cmakeObject Also known as: use_cmake

#

do_use_cmake

If you wish to use cmake, you can do so via this method here.

#


6291
6292
6293
6294
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6291

def do_use_cmake
  orev "We will use #{steelblue('cmake')} #{rev}rather than make."
  set_use_this_make_command 'cmake'
end

#do_use_glib_schemaObject

#

do_use_glib_schema

Use this method to enable the use of a glib-schema.

#


1893
1894
1895
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1893

def do_use_glib_schema
  @internal_hash[:use_glib_schema] = true
end

#do_use_gobolinux_symlinkprogram(be_verbose = true) ⇒ Object

#

do_use_gobolinux_symlinkprogram

#


9515
9516
9517
9518
9519
9520
9521
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9515

def do_use_gobolinux_symlinkprogram(be_verbose = true)
  if be_verbose
    orev 'Using the GoboLinux SymlinkProgram rather than '\
         'the internal RBT::SymlinkProgram script.'
  end
  @internal_hash[:use_gobolinux_symlinkprogram] = true
end

#do_use_libdirObject

#

do_use_libdir

#


7492
7493
7494
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7492

def do_use_libdir
  append_this_to_the_configure_options(:libdir)
end

#do_use_libdir64Object

#

do_use_libdir64

This method essentially equals to passing the configure flag –libdir64 to ./configure.

#


2020
2021
2022
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2020

def do_use_libdir64
  append_this_to_the_configure_options(:libdir64)
end

#do_use_mesonObject

#

do_use_meson

This method will allow us to use meson. It will, on roebe systems, also try to use Python 3 if it is not the main one in use.

#


7240
7241
7242
7243
7244
7245
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7240

def do_use_meson
  use_utf8_encoding_in_env
  set_use_this_configure_command(:meson)
  set_use_this_build_directory('build')
  consider_enabling_python3
end

#do_use_meson_and_ninjaObject

#

do_use_meson_and_ninja

#


10472
10473
10474
10475
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10472

def do_use_meson_and_ninja
  do_use_meson
  do_use_ninja_as_the_build_system
end

#do_use_ninja_as_the_build_systemObject

#

do_use_ninja_as_the_build_system

#


10465
10466
10467
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10465

def do_use_ninja_as_the_build_system
  set_use_this_make_command(:ninja)
end

#do_use_random_build_directory(be_verbose = true, the_alphabet = ('a'..'z').to_a) ⇒ Object

#

do_use_random_build_directory

This method can be used to use an ad-hoc random build directory.

#


441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 441

def do_use_random_build_directory(
    be_verbose   = true,
    the_alphabet = ('a'..'z').to_a
  )
  use_this_as_the_new_name = ''.dup
  n_times = (8 .. 16).to_a.sample
  n_times.times {
    use_this_as_the_new_name << the_alphabet.sample
  }
  if be_verbose
    orev "We will use a #{lightgreen('random directory')} #{rev}as "\
         "build directory (#{sfancy(use_this_as_the_new_name)}#{rev})."
  end
  do_use_build_directory :be_quiet
  set_name_for_the_build_directory(use_this_as_the_new_name)
end

#do_use_random_version(this_program = compile_which_program? ) ⇒ Object

#

do_use_random_version

Use a random version of a program.

Usage example:

ry gcc --use-random-version
#


4644
4645
4646
4647
4648
4649
4650
4651
4652
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4644

def do_use_random_version(
    this_program = compile_which_program?
  )
  cfav = action(:CheckForAvailableVersions, this_program)
  available_programs = cfav.programs?.map {|entry| File.basename(entry) }
  _ = available_programs.sample
  orev "We will use another version (for program #{simp(_)}#{rev})"
  dataset?.set_complex_program_version(_) # This here sets the new version.
end

#do_use_root_prefixObject

#

do_use_root_prefix

#


8050
8051
8052
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8050

def do_use_root_prefix
  set_user_prefix('/root/')
end

#do_use_the_blfs_instructions_for_compiling_this_program(this_program = compile_which_program? ) ⇒ Object

#

do_use_the_blfs_instructions_for_compiling_this_program

#


8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8805

def do_use_the_blfs_instructions_for_compiling_this_program(
    this_program = compile_which_program?
  )
  require 'rbt/linux/linux_from_scratch/parse_blfs_webpage.rb'
  _ = return_dataset_from_this_remote_blfs_page(this_program)
  _ = RBT::Linux::ParseBlfsWebpage.new(_).shell_commands?
  initialize_dataset_for(this_program)
  program_path = yaml_dataset?.program_path?
  if File.exist? program_path
    extract_what_to(program_path, :default)
    # ===================================================================== #
    # Next we must cd to the correct target, before making use of
    # the BLFS instructions.
    # ===================================================================== #
    cd_target = extracted_directory?+program_name_and_program_version?
    cd cd_target
    orev "We are in the directory #{sdir(return_pwd)}#{rev}."
    e
    orev 'Next, the '+steelblue('BLFS instructions')+
         "#{rev} acquired will be run as-is:"
    e
    esystem _
  else
    opnn; no_file_exists_at(program_path)
  end
end

#do_use_the_clang_compiler(shall_we_notify_the_user = :notify_the_user) ⇒ Object Also known as: do_use_clang_compiler

#

do_use_the_clang_compiler

Use this method if you wish to make use of the (LLVM) clang compiler rather than gcc.

Do note that you can also use special arguments or combine clang with ccache, such as shown in the following examples:

export CC='ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'

Invocation example:

ry htop --clang
#


8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8997

def do_use_the_clang_compiler(
    shall_we_notify_the_user = :notify_the_user
  )
  case shall_we_notify_the_user
  # ======================================================================= #
  # === :notify_the_user
  # ======================================================================= #
  when :notify_the_user,
       :and_notify_the_user
    orev "We will attempt to use (#{teal('LLVM')}) #{slateblue('clang')} "\
         "#{rev}to compile the code at hand."
  end
  set_this_env_variable 'CC=clang',    :be_quiet
  set_this_env_variable 'CXX=clang++', :be_quiet
  @internal_hash[:compiler_to_use] = :clang # Keep track of the compiler here.
end

#do_use_the_gcc_compiler(shall_we_notify_the_user = :notify_the_user) ⇒ Object Also known as: do_use_gcc_compiler

#

do_use_the_gcc_compiler

Use this method if you wish to make use of the GCC compiler.

Invocation example:

ry htop --use-gcc
#


3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3990

def do_use_the_gcc_compiler(
    shall_we_notify_the_user = :notify_the_user
  )
  case shall_we_notify_the_user
  # ======================================================================= #
  # === :notify_the_user
  # ======================================================================= #
  when :notify_the_user,
       :and_notify_the_user
    orev "We will attempt to use #{teal('gcc')} #{rev}to compile the "\
         "code at hand."
  end
  set_this_env_variable 'CC=gcc',    :be_quiet
  set_this_env_variable 'CXX=g++', :be_quiet
  @internal_hash[:compiler_to_use] = :gcc # Keep track of the compiler here.
end

#do_we_use_any_prefix?Boolean

#

do_we_use_any_prefix?

#

Returns:

  • (Boolean)


683
684
685
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 683

def do_we_use_any_prefix?
  @internal_hash[:use_a_prefix]
end

#do_we_use_python3?Boolean

#

do_we_use_python3?

This method will return true if we use python version 3 or higher, and false otherwise.

#

Returns:

  • (Boolean)


3432
3433
3434
3435
3436
3437
3438
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3432

def do_we_use_python3?
  version = `python -V #{SHELL_ERROR_CODE}`.chomp
  if version.include? ' '
    version = version.split(' ').last
  end
  version.start_with? '3' # ← This check has to suffice for now.
end

#does_a_python_binary_exist?Boolean

#

does_a_python_binary_exist?

This method will return true if a “python” binary can be found in the PATH variable - and it will return false otherwise.

#

Returns:

  • (Boolean)


10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10022

def does_a_python_binary_exist?
  _ = false
  check_these_directories = query_path?
  if check_these_directories.is_a?(String) and
     check_these_directories.include?(':')
    splitted = check_these_directories.split(':')
    splitted.each {|this_path|
      target = rds(this_path+'/python')
      if File.exist?(target)
        _ = true
      end
    }
  end
  _
end

#does_this_file_exist?(this_file = FILE_SCONS) ⇒ Boolean

#

does_this_file_exist?

This method checks whether the given-input argument, an assumed path to a file, exists.

The reason why this method exists is because it was necessary to do a “does this file exist” check in other directories rather than the current working directory.

#

Returns:

  • (Boolean)


6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6994

def does_this_file_exist?(
    this_file = FILE_SCONS
  )
  this_file = this_file.dup # ← We must always work on a copy.
  # ======================================================================= #
  # We have to check whether the cookbook_dataset has been initialized.
  # If it has not been initialized yet, we will not query whether we
  # ought to use a build directory or not.
  # ======================================================================= #
  if cookbook_dataset? and use_build_directory?
    this_file.prepend('../')
  end
  super(this_file)
end

#download_program(url_for_program = url1?, , may_we_download = may_we_download?, , change_to_this_directory = cookbook_dataset_base_dir?, , shall_we_update_the_dataset = true) ⇒ Object Also known as: download

#

download_program (download tag, download archive, wget tag)

The method ‘download_program` will attempt to download the given program, which is the first argument passed to this method.

An URL is expected as argument here, a String, such as

'https://hisham.hm/htop/releases/2.2.0/htop-2.2.0.tar.gz'

An Array can also be used as argument to this method. Internally the method here will make use of an Array, anyway.

For this download-related activity, we will either use a plain system() call to “wget” or we may use a ruby wget-wrapper. On Linux or BSD-based systems ‘wget’ may be simpler to use. On windows we may have to use a ruby-variant of ‘wget’ instead.

Do note that the method download_program() will always assume that the first argument given is an Array - that is, an Array of multiple urls. It will download all passed remote programs in a batch-like operation. This allows the user to, for example, download the whole KDE stack, in principle, by simply passing the Array of remote entries that constitute that KDE stack.

Please keep in mind that we will change_directory() in this method too, so you don’t have to call that on your own.

As of 05 September 2014 the method will also honour the “do_not_download” setting, if it was defined. This can be overruled in the arguments passed to this method.

The method here is used primarily to handle downloading of remote files.

#


7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7282

def download_program(
    url_for_program             = url1?,
    may_we_download             = may_we_download?,
    change_to_this_directory    = cookbook_dataset_base_dir?,
    shall_we_update_the_dataset = true
  )
  url_for_program = [url_for_program].flatten.compact
  # ======================================================================= #
  # We will handle some special Symbols next:
  # ======================================================================= #
  case shall_we_update_the_dataset
  # ======================================================================= #
  # === :do_not_update_the_dataset
  # ======================================================================= #
  when :do_not_update_the_dataset
    shall_we_update_the_dataset = false
  end
  case may_we_download
  # ======================================================================= #
  # === :do_download
  # ======================================================================= #
  when :do_download,
       :we_may_download
    may_we_download = true
  end
  case change_to_this_directory
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default
    change_to_this_directory = cookbook_dataset_base_dir?
  end
  change_to_this_directory = change_to_this_directory.to_s
  if is_on_roebe?
    unless change_to_this_directory.start_with? '/home/x/'
      this_file = RBT.file_source_directory?
      if File.exist? this_file
        if File.read(this_file).start_with? '$'
          # This is a small safeguard for my home system.
          orev 'The base directory does not seem to refer to '+
                sdir('/home/x/')
          orev 'as a base. '+
                steelblue('Has the environment been properly set up?')
          return
        end
      else
        opnn; no_file_exists_at(this_file)
      end
    end  
  end
  url_for_program.each {|use_this_remote_url|
    if may_we_download
      url_for_program = use_this_remote_url
      url_for_program = url1? if url_for_program == :def
      # ====================================================================== #
      # Since Jul 2011 we use pure wget for this. Something is odd with
      # RubyWget and until we have fixed this, plain wget has to be used.
      # ====================================================================== #
      use_svn = dataset?.svn_url?
      # ====================================================================== #
      # Check whether the base directory exists.
      # ====================================================================== #
      if !File.exist?(change_to_this_directory)
        orev simp('Creating the directory `')+
             sdir(change_to_this_directory)+
             simp('` next.')
        create_directory(change_to_this_directory)
      end
      # ====================================================================== #
      # Change into the base directory first, before continuing to try
      # to download the archive in question.
      # ====================================================================== #
      change_directory(change_to_this_directory) # cd into the archive.
      # ====================================================================== #
      # Change into the archive. Be verbose about it.
      # ====================================================================== #
      cliner {
        orev "#{simp('Downloading ')}#{sfile(url_for_program)}"
        orev simp('into the directory ')+sdir(change_to_this_directory)+
             simp(' now.')
      }
      if url_for_program.to_s.include? 'tar.gz'
        # overrule here for .tar.gz files.
        _ = cookbook_dataset? #.data
        _.set_archive_type('.tar.gz')
        _.set_program_full_name
        _.assemble_program_path
        set_cookbook_dataset(
          cookbook_dataset?.return_dataset
        )
      end
      if use_svn.nil? or use_svn.empty? # Assume no SVN was given. bl rubywget
        do_download_this_program(url_for_program)
        # RubyWget.new(url_for_program)
      else # Else, we should use svn perhaps? Hmm or not.
        if _
          do_download_this_program(_)
        else
          do_download_this_program(url_for_program)
        end
        # RubyWget.new(_)
      end
      if shall_we_update_the_dataset
        # ================================================================== #
        # We will update the dataset as well.
        # ================================================================== #
        initialize_cookbook_dataset_for(compile_which_program?)
      end
    end
  }
end

#download_the_latest_source_code_of_this_program(i = compile_which_program? ) ⇒ Object

#

download_the_latest_source_code_of_this_program

This method can be used to do a git clone checkout.

To try this method, invoke it like this:

ry mpv --git-download
#


7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7557

def download_the_latest_source_code_of_this_program(
    i = compile_which_program?
  )
  old_directory_content = Dir['*'].select {|entry| File.directory? entry }
  if compile_which_program?.nil? # Tiny safeguard.
    initialize_dataset_for(i)
  end
  _ = git_url? # Obtain the git-URL.
  if _.nil? or _.empty?
    opne tomato('No remote git-URL is known for `'+i.to_s+'`.')
    opne tomato('Consider adding such an entry to the .yml '\
         'file at hand.')
    return
  end
  # ======================================================================= #
  # Notify the user that we are about to download a remote package next:
  # ======================================================================= #
  orev "Next trying to #{royalblue('download')} #{rev}for #{simp(i)}"
  orev "from the remote URL #{steelblue(_)}#{rev}."
  # ======================================================================= #
  # Invoke the git-command next:
  # ======================================================================= #
  e
  run_this_system_command_in_a_coloured_and_padded_manner("git clone #{_}")
  e
  new_directory_content = Dir['*'].select {|entry| File.directory? entry }
  difference = new_directory_content - old_directory_content
  unless difference.empty?
    case difference.size
    when 1
      # =================================================================== #
      # Currently we only handle one entry here.
      # =================================================================== #
      this_directory = difference.first
      orev 'A directory was found at '+
            sdir(absolute_path(this_directory))+rev+'.'
      new_name = this_directory+'-'+return_current_time
      orev 'It will be renamed next, to '+sdir(new_name)+"#{rev}."
      orev 'Finally, it will be made into a .tar.xz file.'
      rename(this_directory, new_name)
      to_tar_xz(new_name)
      file_path = absolute_path(new_name)
      if is_on_roebe?
        orev "You may be able to remove the directory at "\
             "#{sdir(file_path)}#{rev} now."
      end
      return "#{file_path}.tar.xz" # We will actually return the archive file.
    end
  end
end

#download_the_remote_documentation_of_the_RBT_project(remote_URL = 'https://www.rubydoc.info/gems/rbt/') ⇒ Object

#

download_the_remote_documentation_of_the_RBT_project

This method will download the documentation of the RBT project for local use.

Usage example:

rbt --download-docu
#


12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12703

def download_the_remote_documentation_of_the_RBT_project(
    remote_URL = 'https://www.rubydoc.info/gems/rbt/'
  )
  orev "Now downlading from the remote "\
       "URL at `#{steelblue(remote_URL)}#{rev}`."
  dataset = URI.open(remote_URL).read
  into = absolute_path('rbt_documentation.html')
  write_what_into(dataset, into)
  if File.exist? into
    orev 'Storing into the local file at '+sfile(into)+rev+'.'
  end
end

#download_this_remote_url_into_that_local_directory(url = url1?, , local_directory = '/home/Temp/downloads/') ⇒ Object

#

download_this_remote_url_into_that_local_directory

The first argument should be the remote URL to the program at hand.

The second argument should be a local directory.

#


12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12598

def download_this_remote_url_into_that_local_directory(
    url             = url1?,
    local_directory = '/home/Temp/downloads/'
  )
  local_directory = local_directory.dup if local_directory.frozen?
  local_directory << '/' unless local_directory.end_with? '/'
  unless File.directory? local_directory
    create_directory(local_directory) { :be_verbose }
  end
  cd local_directory # change directory into that target
  download_program(
    url,
    :we_may_download,
    local_directory,
    :do_not_update_the_dataset
  )
end

#download_using_svn(i = compile_which_program? ) ⇒ Object

#

download_using_svn

Use this method here to download/checkout from svn. In order for this to properly work, you need to define a svn_url in the yaml file for the respective program at hand.

To try out this method, do:

ry dosbox svn
#


8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8504

def download_using_svn(
    i = compile_which_program?
  )
  dataset = dataset?
  if dataset.nil?
    dataset = initialize_dataset_for(i)
  end
  _ = "svn co #{dataset.svn_url?}"
  working_directory = sdir(return_current_pwd)
  orev "Now trying to use svn to download the source directly "\
       "(working directory is: #{steelblue(working_directory)}#{rev}."
  opnn; print '  '
  e _
  _result = `#{_}` # We may want to use this return-value at a later time.
  # ======================================================================= #
  # === Rename the trunk directory next
  # ======================================================================= #
  if File.directory? 'trunk'
    _ = "#{i}-#{today?}"
    orev "Now renaming directory `#{sdir('trunk')}#{rev}` to `#{simp(_)}#{rev}`."
    rename('trunk', _)
    if Object.const_defined? :ToTarXz
      orev "#{rev}Now trying to package the directory `#{sdir(_)}#{rev}`."
      to_tar_xz(_)
      package_name = Dir["#{_}.tar.xz"]
      unless package_name.empty?
        orev 'All should be done now. You can move this .tar.xz '\
             'package ('+simp(package_name.first)+rev+').'
      end
    end
  end
end

#ecolourize_this_important_system_command(i) ⇒ Object

#

colourize_this_important_system_command

#


5307
5308
5309
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5307

def ecolourize_this_important_system_command(i)
  e colourize_this_important_system_command(i)
end

#edit_the_yaml_file_via_the_main_editor(this_yaml_file = install_which_program?, , use_this_editor = editor_to_use? ) ⇒ Object Also known as: edit_this_yaml_file_via_the_main_editor

#

edit_the_yaml_file_via_the_main_editor

Invocation example:

rbt --edit-file=nano
#


11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11111

def edit_the_yaml_file_via_the_main_editor(
    this_yaml_file  = install_which_program?,
    use_this_editor = editor_to_use?
  )
  this_yaml_file = this_yaml_file.to_s.dup
  this_yaml_file = 'nano' if this_yaml_file.empty?
  _ = nil # Default.
  # ======================================================================= #
  # Determine which editor to use next:
  # ======================================================================= #
  _ = use_this_editor.to_s.dup+' ' if use_this_editor
  # ======================================================================= #
  # Overrule on my home system.
  # ======================================================================= #
  if is_on_roebe? or _.nil?
    _ = "#{editor?} "
  end
  unless File.exist? this_yaml_file
    unless this_yaml_file.include? '/'
      this_yaml_file = return_location_to_this_programs_yaml_file(this_yaml_file)
    end
  end
  if File.exist? this_yaml_file
    _ << this_yaml_file
  else
    _ << find_this_yaml_file(this_yaml_file)
  end
  coloured_esystem _
end

#either_report_the_total_amount_of_binaries_or_how_many_binaries_this_program_will_installObject

#

either_report_the_total_amount_of_binaries_or_how_many_binaries_this_program_will_install

#


9083
9084
9085
9086
9087
9088
9089
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9083

def either_report_the_total_amount_of_binaries_or_how_many_binaries_this_program_will_install
  if a_program_has_been_initialized?
    report_the_amount_of_binaries
  else
    action(:report_how_many_binaries_are_registered)
  end
end

#empty_archive_typeObject

#

empty_archive_type

This will clear the archive type.

#


6301
6302
6303
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6301

def empty_archive_type
  cookbook_dataset?.archive_type = ''
end

#enable_autogen(be_verbose = true) ⇒ Object

#

enable_autogen

This method will enable autogen.

#


5445
5446
5447
5448
5449
5450
5451
5452
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5445

def enable_autogen(
    be_verbose = true
  )
  if be_verbose
    orev 'We will make use of autogen.'
  end
  @internal_hash[:use_autogen] = true # Enable the use of autogen in our dataset here.
end

#enable_everything_for_the_current_compilation_runObject

#

enable_everything_for_the_current_compilation_run

Note that currently we will only work on the “–enable*” entries.

Invocation example:

ry ncurses ntrad --enable-everything --dontsymlink
#


686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 686

def enable_everything_for_the_current_compilation_run
  default_extract_step(
    use_this_local_path: cookbook_dataset?.program_path?
  )
  cd_to_the_extracted_archive
  orev 'running ./configure help ...'
  cmd = './configure --help'
  result = `#{cmd}`
  array = result.split(N)
  # ======================================================================= #
  # Entries may look like this:
  #
  #    --enable-symlinks       make tic use symbolic links not hard links\n" +
  #    --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)\n" +
  #
  # ======================================================================= #
  selection = array.select {|line|
    splitted = line.split(' ')
    line.start_with?('  --enable-') and
    (splitted[0].downcase == splitted[0]) # ← This checks for all-downcase.
    # ^^^ exclude entries such as "--enable-FEATURE[=ARG]"
  }
  selection = selection.map {|entry|
    entry.split(' ').first.to_s
  }.join(' ').strip
  clear_configure_options
  append_this_to_the_configure_options(selection)
end

#enable_is_on_gobolinuxObject Also known as: is_on_gobolinux

#

enable_is_on_gobolinux

This method can be used to default to a GoboLinux behaviour.

We should closely follow the behaviour of GoboLinux via the RBT scripts, 1:1 - no need to create incompatibilities at this point.

#


10099
10100
10101
10102
10103
10104
10105
10106
10107
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10099

def enable_is_on_gobolinux
  # ENV['IS_ON_GOBOLINUX'] = '1' # ← Disabled as of 25.09.2018; we probably no longer need to do this.
  @internal_hash[:is_on_gobolinux] = true
  use_non_traditional_prefix
  do_not_symlink_headers
  do_not_symlink_pkgconfig_files
  do_use_gobolinux_symlinkprogram # ← Trying this as of Oct 2017.
  do_not_register_into_the_yaml_database
end

#enable_non_traditional_compilation(optional_use_this_as_program_name_and_program_version = program_name_and_program_version? ) ⇒ Object

#

enable_non_traditional_compilation

This will essentially switch to app-dir prefix.

#


4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4384

def enable_non_traditional_compilation(
    optional_use_this_as_program_name_and_program_version = 
      program_name_and_program_version?
  )
  if optional_use_this_as_program_name_and_program_version
    @internal_hash[:prefix].set_program(
      optional_use_this_as_program_name_and_program_version
    )
  end
  @internal_hash[:prefix].enable_non_traditional_compilation
end

#enable_porgObject

#

enable_porg

Enable porg via this method.

#


273
274
275
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 273

def enable_porg
  @internal_hash[:use_porg] = config?.use_porg = true
end

#enable_python2Object

#

enable_python3

#


4558
4559
4560
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4558

def enable_python2
  consider_enabling_python2(true)
end

#enable_python3Object

#

enable_python3

#


3391
3392
3393
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3391

def enable_python3
  consider_enabling_python3(true)
end

#enable_shared_disable_staticObject

#

enable_shared_disable_static

This method basically combines “–enable-shared –disable-static”.

#


9268
9269
9270
9271
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9268

def enable_shared_disable_static
  append_enable_shared_to_the_configure_options
  append_disable_static_to_the_configure_options
end

#enable_simulation(optional_message = '') ⇒ Object

#

enable_simulation

Enable to run in simulation mode. The first argument is an optional message we give, in which case we will output that message.

#


617
618
619
620
621
622
623
624
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 617

def enable_simulation(
    optional_message = ''
  )
  unless optional_message.empty?
    opne optional_message
  end
  do_run_simulation
end

#enable_stowObject

#

enable_stow

This method will enable stow.

#


7153
7154
7155
7156
7157
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7153

def enable_stow
  configuration?.use_stow = true
  orev "Enabling stow next."
  configuration?.save # And store this.
end

#ensure_that_a_cookbook_object_has_been_instantiated(i = compile_these_programs?.first) ⇒ Object Also known as: ensure_there_exists_a_proper_dataset, ensure_cookbooks_object_is_there, ensure_that_the_cookbook_dataset_exists, ensure_that_this_key_has_a_dataset

#

ensure_that_a_cookbook_object_has_been_instantiated

#


6424
6425
6426
6427
6428
6429
6430
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6424

def ensure_that_a_cookbook_object_has_been_instantiated(
    i = compile_these_programs?.first
  )
  if cookbook_dataset?.nil?
    initialize_a_new_cookbook_instance(i)
  end
end

#ensure_that_all_directories_for_rbt_existObject

#

ensure_that_all_directories_for_rbt_exist

This is a separate method because we may want to create more than just one directory in the future.

#


2574
2575
2576
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2574

def ensure_that_all_directories_for_rbt_exist
  ensure_that_the_log_directory_exists
end

#ensure_that_the_configure_options_are_consistent_in_regards_to_static_compilationObject

#

ensure_that_the_configure_options_are_consistent_in_regards_to_static_compilation

#


9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9220

def ensure_that_the_configure_options_are_consistent_in_regards_to_static_compilation
  _ = configure_options?.dup
  if compile_statically?
    unless _.include? '--enable-static'
      _ << ' --enable-static' # Just to be safe.
    end
    if _.include?('--enable-static') and not
       (_.include?('--disable-shared'))
      _ << ' --disable-shared' unless _.include?('--enable-shared')
    end
    if _.include?('--enable-shared') and
       _.include?('--enable-static')
      set_configure_options(
        _.sub(/--enable-shared/, '--disable-shared')
      )
      sort_configure_options_alphabetically
    end
  end
end

#ensure_that_the_cookbook_dataset_is_there(i = compile_which_program? ) ⇒ Object

#

ensure_that_the_cookbook_dataset_is_there

#


4041
4042
4043
4044
4045
4046
4047
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4041

def ensure_that_the_cookbook_dataset_is_there(
    i = compile_which_program?
  )
  if cookbook_dataset?.nil?
    initialize_dataset_for(i)
  end
end

#ensure_that_the_log_directory_existsObject

#

ensure_that_the_log_directory_exists

This method will ensure that the log directory, usually the one at “/Depot/Temp/rbt/”, exists.

#


10693
10694
10695
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10693

def ensure_that_the_log_directory_exists
  action(:ensure_that_the_log_directory_exists)
end

#ensure_that_the_program_exists(i) ⇒ Object

#

ensure_that_the_program_exists

This method will determine whether this class can continue to run or whether it can not.

We can continue to run if the program exists as part of the cookbooks project. One exception to this rule is when the last character is a ‘*’ token. In this case we assume that he user wants to simply get a list of available programs instead, starting with that specific name, e. g. “e*” should yield a list of all programs starting with the character “e”.

You can try this out by doing:

ry e*
#


6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6337

def ensure_that_the_program_exists(
    i
  )
  i = i.to_s
  if honour_check_to_ensure_that_the_program_exists?
    unless cookbooks_include_this_program?(i)
      # =================================================================== #
      # Handle not-registered programs next:
      # =================================================================== #
      opne "#{crimson('The program `')}#{seagreen(i)}"\
           "#{crimson('` could not be found. It thus can not be compiled')}"
      opne crimson('and hence, RBT::Action::SoftwareManager can not continue. If this '\
           'file should exist,')
      opne crimson('it can be found at:')
      e
      e "  #{sfile(return_location_to_this_programs_yaml_file(i))}"
      e
      we_can_not_continue
    end unless i.end_with? '*'
  end
  return can_we_continue?
end

#ensure_that_we_can_extract_to_a_proper_directory(this_directory = temp_directory? ) ⇒ Object

#

ensure_that_we_can_extract_to_a_proper_directory

#


8117
8118
8119
8120
8121
8122
8123
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8117

def ensure_that_we_can_extract_to_a_proper_directory(
    this_directory = temp_directory?
  )
  if extract_to?.to_s.empty?
    set_extract_to(this_directory)
  end
end

#env?Boolean

#

env?

#

Returns:

  • (Boolean)


875
876
877
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 875

def env?
  ENV
end

#erun_this_sys_command(i) ⇒ Object

#

erun_this_sys_command

#


6439
6440
6441
6442
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6439

def erun_this_sys_command(i)
  e i
  run_this_sys_command(i)
end

#exit_after_a_rubygem_has_been_installed?Boolean

#

exit_after_a_rubygem_has_been_installed?

#

Returns:

  • (Boolean)


1499
1500
1501
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1499

def exit_after_a_rubygem_has_been_installed?
  @internal_hash[:exit_after_a_rubygem_has_been_installed]
end

#exit_before_make?Boolean

#

exit_before_make?

#

Returns:

  • (Boolean)


1784
1785
1786
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1784

def exit_before_make?
  @internal_hash[:exit_before_make]
end

#exit_before_make_install?Boolean

#

exit_before_make_install?

#

Returns:

  • (Boolean)


609
610
611
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 609

def exit_before_make_install?
  @internal_hash[:exit_before_make_install]
end

#extra_information?Boolean

#

extra_information?

#

Returns:

  • (Boolean)


12022
12023
12024
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12022

def extra_information?
  cookbook_dataset?.extra_information?
end

#extract_only?Boolean

#

extract_only?

#

Returns:

  • (Boolean)


1258
1259
1260
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1258

def extract_only?
  @internal_hash[:extract_only]
end

#extract_program_and_cd_to_the_configure_base_directoryObject

#

extract_program_and_cd_to_the_configure_base_directory

#


859
860
861
862
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 859

def extract_program_and_cd_to_the_configure_base_directory
  do_extract
  cd_to_the_configure_base_directory
end

#extract_the_linux_kernel_archiveObject

#

extract_the_linux_kernel_archive

To tap into this method from the commandline, do:

ry --extract-linux
#


7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7060

def extract_the_linux_kernel_archive
  result = initialize_cookbook_dataset_for(:linux)
  target = result.extract_to?
  if File.symlink? '/usr/src/linux'
    delete_symlink('/usr/src/linux')
  end
  extract_what_to(
    result.path?, target, :do_keep_the_old_directory_if_it_exists
  )
  orev "Finished extracting the linux kernel to #{sdir(target)}#{rev}."
end

#extract_to_default_directory(i = RBT.log_directory?) ⇒ Object

#

extract_to_default_directory

By default, we will extract to this directory - but the value is lateron refined to the full path instead; so the assignment done here is just so that we have a starting value we can work with.

This method will be called from within the method reset().

#


10790
10791
10792
10793
10794
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10790

def extract_to_default_directory(
    i = RBT.log_directory?
  )
  @internal_hash[:extract_to_this_directory] = i
end

#extract_to_this_directory?Boolean Also known as: extract_to?, extract_where_to?, extracted_directory?, extracted_dir?, dir?, extract_to_this_dir?, extract_to_which_directory?, extracted_path?, extracted_towards?

#

extract_to_this_directory?

This query-method tells us where we will extract (our archive) to.

The temp-directory is initially the same as RBT.rbt_log_directory?.

#

Returns:

  • (Boolean)


12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12571

def extract_to_this_directory?
  _ = @internal_hash[:extract_to_this_directory]
  # ======================================================================= #
  # Allow the user to overrule this value.
  # ======================================================================= #
  if @internal_hash[:extract_to_this_directory_as_specified_by_the_user]
    _ = @internal_hash[:extract_to_this_directory_as_specified_by_the_user]
  end
  return _
end

#extract_to_this_directory_being_one_directory_below?Boolean

#

extract_to_this_directory_being_one_directory_below?

This points to the base-directory.

#

Returns:

  • (Boolean)


1411
1412
1413
1414
1415
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1411

def extract_to_this_directory_being_one_directory_below?
  _ = extract_to_this_directory?.to_s.dup
  _ = "#{File.dirname(_)}/"
  return _
end

#extract_what_to(local_path = cookbook_dataset_program_path?, , extract_to_this_directory = extract_where_to?, , shall_we_report_to_the_user_if_the_archive_does_not_exist = true) ⇒ Object Also known as: consider_extracting_this_program, invoke_extracter, default_extract_step, do_extract_the_archive, extract_this_source_archive, extract_the_program, extract_this_program, extract_this_archive, extract, extract_package, extract_program, extract_this_program_if_it_exists, do_extract, default_extract, try_to_extract_this_archive

#

extract_what_to (extract tag, extracter tag)

This method will extract the given archive directory, by delegating towards class Extracter. This is done, since as of the year 2024, via action(:extract_what_to).

This method ought to be invoked quite early, logically; the method “consider_extracting_this_program()” may be used to invoke this method.

#


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/rbt/actions/individual_actions/software_manager/extract_related_code.rb', line 24

def extract_what_to(
    local_path                                                = cookbook_dataset_program_path?,
    extract_to_this_directory                                 = extract_where_to?,
    shall_we_report_to_the_user_if_the_archive_does_not_exist = true # This should come last.
  )
  append_to_the_commandline = ''.dup
  # ======================================================================== #
  # === Handle Hashes next
  # ======================================================================== #
  if local_path.is_a? Hash
    # ====================================================================== #
    # === :use_this_local_path
    # ====================================================================== #
    if local_path.has_key? :use_this_local_path
      local_path = local_path.delete(:use_this_local_path)
    end
  end
  local_path = local_path.to_s # Past this point we need a String.
  if local_path and File.exist?(local_path)
    if run_simulation?
      # =================================================================== #
      # Here we are in simulation-mode:
      # =================================================================== #
      orev "We would normally extract `#{sfile(local_path)}#{rev}` "\
           "to #{sdir(extract_to_this_directory)} #{rev}next,"
      orev 'but since we run in simulation-mode, we will not '\
           'extract anything.'
    else
      _ = "Next trying to extract `#{sfile(local_path)}#{rev}`".dup
      _ << " #{rev}(but do so silently)" unless show_output_from_the_extracter_class?
      _ << '.'
      orev _
      # =================================================================== #
      # Extracting the archive next, via an action - this will be handled
      # by class Extracter. The second argument is a Hash which will
      # typically carry a lot of information. This is necessary because
      # we want to "fine-tune" Extracter at this step.
      # =================================================================== #
      action(:extract_what_to, local_path,
        {
          extract_to:                     extract_to_this_directory, # ← Extract to this directory.
          use_colours:                    use_colours?,
          prepend_this_namespace:         'RBT→', # ← Use this modifier.
          run_simulation:                 run_simulation?,
          pad_opn_with_n_tokens:          RBT.n_padding_to_use_for_opn?,
          use_opn:                        show_the_classname?,
          be_verbose:                     show_output_from_the_extracter_class?,
          append_this_to_the_commandline: append_to_the_commandline,
        }
      ) { :be_quiet }
      # =================================================================== #
      # Next we will exit if the user told us that he/she is only
      # interested in extracting the program.
      # =================================================================== #
      exit_program if extract_only?
      return extract_to_this_directory # And return it too, in case downstream code needs it.
    end
  else # else the archive at hand does not exist.
    if shall_we_report_to_the_user_if_the_archive_does_not_exist
      opne swarn('No file could be found at `')+
           sfile(local_path)+swarn('` - thus,')
      opne swarn('we can not extract anything.')
      # =================================================================== #
      # Also set a specific error, so that we won't continue.
      # =================================================================== #
      # error_is 'We can not continue. Has the archive '\
      #          'been properly extracted?'
    end
    no_file_exists_at(local_path)
  end
end

#extracted_base_directory?Boolean

#

extracted_base_directory?

If you need to query the value for the path to the extracted directory, then make use of the method extract_to_this_directory? rather than the method here.

#

Returns:

  • (Boolean)


1424
1425
1426
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1424

def extracted_base_directory?
  @internal_hash[:extracted_base_directory]
end

#feedback_all(i = compile_which_program? ) ⇒ Object

#

feedback_all

#


7540
7541
7542
7543
7544
7545
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7540

def feedback_all(
    i = compile_which_program?
  )
  require 'rbt/cookbooks/display_cookbook_dataset/feedback/feedback.rb'
  RBT::Cookbooks::DisplayCookbookDataset::Feedback.feedback_all(i)
end

#feedback_all_available_formatsObject

#

feedback_all_available_formats

Invocation example:

ry --feedback_all_available_formats
#


5365
5366
5367
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5365

def feedback_all_available_formats
  RBT::Cookbooks::SanitizeCookbook.feedback_all_available_formats
end

#feedback_all_case_options_of_the_main_menuObject

#

feedback_all_case_options_of_the_main_menu

#


7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7517

def feedback_all_case_options_of_the_main_menu
  _ = THIS_FILE
  if File.exist? _
    if Object.const_defined? :CaseParser
      _ = CaseParser.parse(_)
      _.each {|entry|
        e entry
      }
    else
      orev 'The project case_parser is not available. Please install it.'
      e
      orev sfancy('  gem install case_parser')
      e
    end
  else # Else the file does not exist.
    orev "No file at #{sfile(_)} could be found. We "\
         "thus can not use CaseParser."
  end
end

#feedback_all_libraries(from_this_program = program? ) ⇒ Object

#

feedback_all_libraries

Feedback all libraries from a given program.

#


7206
7207
7208
7209
7210
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7206

def feedback_all_libraries(
    from_this_program = program?
  )
  RBT::Cookbooks::DisplayCookbookDataset::Feedback.feedback_all_libraries(from_this_program)
end

#feedback_all_libraries_and_all_binaries(of_this_program = compile_which_program? ) ⇒ Object

#

feedback_all_libraries_and_all_binaries

Invoke this method by issuing:

ry htop installs_what?
#


13088
13089
13090
13091
13092
13093
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13088

def feedback_all_libraries_and_all_binaries(
    of_this_program = compile_which_program?
  )
  feedback_all_binaries(of_this_program)
  feedback_all_libraries(of_this_program)
end

#feedback_all_registered_binaries_of_all_programsObject

#

feedback_all_registered_binaries_of_all_programs

This method will show, on the commandline, all registered binaries of all the programs together.

Invocation example:

rbt --all-binaries
#


7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7982

def feedback_all_registered_binaries_of_all_programs
  _ = action(:registered_binaries)
  orev "These #{royalblue(_.size.to_s)} #{rev}binaries are registered:"
  e
  _.each_with_index {|this_binary, index| index += 1
    padded_index = (index.to_s+') ').rjust(5)
    e "  #{lightgreen(padded_index)}"\
      "#{slateblue(this_binary)}"
  }
  e
end

#feedback_configure_options(i = compile_this_program? ) ⇒ Object

#

feedback_configure_options

To test this method, try something like this:

ry htop configure_options?
ry gcc configure_options?
#


9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9751

def feedback_configure_options(
    i = compile_this_program?
  )
  if i.nil?
    i = work_on_this_program?
  end
  orev "The configure options for the program #{sfancy(i)} #{rev}are:"
  if dataset?.nil?
    ensure_that_we_have_a_dataset(i)
  end
  _ = configure_options?
  e
  e "  #{sfancy(_)}"
  e
end

#feedback_default_values_of_the_internal_hashObject

#

feedback_default_values_of_the_internal_hash

Invocation example from the commandline:

ry --feedback-the-default-values-of-the-internal-hash
#


5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5119

def feedback_default_values_of_the_internal_hash
  dataset = return_default_internal_hash
  e
  orev "The following #{lightblue(dataset.keys.size.to_s)} "\
    "#{rev}entries are known:"
  e
  dataset.each_pair {|key, value|
    if value.nil?
      value = 'nil'
    end
    e "  #{slateblue(key)}: #{lightgreen(value)}"
  }; e
end

#feedback_dependencies_of_this_program(i = compile_which_program? ) ⇒ Object Also known as: feedback_dependencies, feedback_dependencies_of_the_program

#

feedback_dependencies_of_this_program

Feedback the dependencies of a given program through this method.

Invocation example:

ry pango --feedback_dependencies_of_this_program
#


12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12915

def feedback_dependencies_of_this_program(
    i = compile_which_program?
  )
  if dataset?.nil?
    ensure_proper_dataset(i)
  end
  dependencies = dataset?.deps_on?
  if dependencies.nil?
    no_dependency_was_found_for(i)
    return
  end
  unless dependencies.empty?
    cliner
    orev "The following dependencies were found for `#{sfancy(i)}#{rev}`:"
    e
    # =================================================================== #
    # We will next assume that dependencies is an Array.
    # =================================================================== #
    dependencies.each {|dep|
      e "  A dependency on: #{olivedrab(dep)}"
    }
    e
    cliner
  else
    no_dependency_was_found_for(i)
  end
end

#feedback_expanded_dependencies_of_this_program(i = compile_which_program? ) ⇒ Object

#

feedback_expanded_dependencies_of_this_program

#


6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6140

def feedback_expanded_dependencies_of_this_program(
    i = compile_which_program?
  )
  require 'rbt/misc/reverse_dependencies.rb'
  e "#{rev}The expanded dependencies for #{steelblue(i)} are:"
  e
  RBT::ReverseDependencies.dependencies?(i).each {|entry|
    e "  #{entry}"
  }
  e
end

#feedback_extra_description(of_this_program = program? ) ⇒ Object

#

feedback_extra_description

To trigger this method, do:

ry php edesc
#


13074
13075
13076
13077
13078
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13074

def feedback_extra_description(
    of_this_program = program?
  )
  RBT::Cookbooks::DisplayCookbookDataset::Feedback.feedback_extra_description(of_this_program)
end

#feedback_format_specification_of(i) ⇒ Object

#

feedback_format_specification_of

#


2939
2940
2941
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2939

def feedback_format_specification_of(i)
  RBT::Cookbooks::SanitizeCookbook.feedback_format_specification_of(i)
end

#feedback_last_compiled(i = :all_of_them) ⇒ Object

#

feedback_last_compiled

There are several ways how to invoke this method. We thus need to be rather flexible about feedbacking this to the user.

One of the first distinctions will be whether we have a ‘=’ token in the input or whether we do not.

Examples:

rbt --last-compiled?
rbt --last-5-compiled?
rbt --last-five-compiled?
rbt --last-compiled?=5
rbt --last-compiled?=6
#


7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7740

def feedback_last_compiled(
    i = :all_of_them
  )
  i = i.first if i.is_a? Array # Grab the first entry.
  # ======================================================================= #
  # Next, we determine the dataset of which programs have been compiled.
  # ======================================================================= #
  dataset = compiled_programs?
  dataset = dataset.keys if dataset.respond_to? :keys
  case i
  when :all_of_them
    i = dataset.size
  end
  unless dataset
    orev 'No dataset was found in this file: '+
         sfile(file_compiled_programs?)
    return
  end
  show_n_programs = 1 # This is the default.
  if i.to_s =~ /^\d+$/
    show_n_programs = i.to_i
  end
  if i and i.to_s.include?('=')
    splitted = i.split('=')
    show_n_programs = splitted.last.to_i
  elsif (show_n_programs > 1)
    # pass through in this case
  else # Else it does not include a '='.
    regex_to_use = /--last(-\d+-)compiled\?/
    i =~ regex_to_use
    show_n_programs = $1.to_s.dup.delete('-').to_i if $1
    array = HASH_ENGLISH_NUMBERS.keys
    if array.any? {|entry| i.include? entry }
      result = array.select {|entry| i.include? entry }
      result = result.first unless result.empty?
      # =================================================================== #
      # Now we must convert this:
      # =================================================================== #
      result = HASH_ENGLISH_NUMBERS[result]
      show_n_programs = result.to_i
    end
  end
  # ======================================================================= #
  # Narrow our dataset down.
  # ======================================================================= #
  if show_n_programs > dataset.size
    orev 'We have not kept track of that many ('+
          sfancy(show_n_programs.to_s)+rev+') registered programs, so'
    orev "only #{dataset.size.to_s} #{rev}programs will be shown instead."
    show_n_programs = dataset.size
  end
  dataset = dataset.reverse[0 .. (show_n_programs - 1)].reverse
  e
  orev "The last #{simp(show_n_programs.to_s)} #{rev}compiled "\
       "programs (most recent one comes first) were:"
  # ======================================================================= #
  # Now we can report this dataset, which contains our programs.
  # ======================================================================= #
  e; dataset.reverse.each {|key|
    e "  #{sfancy(key)}"
  }; e
end

#feedback_licenses(filter_for_licenses = '*') ⇒ Object

#

feedback_licenses

This will feedback all licenses, or apply a filter.

Usage example:

ry htop flicenses
#


9399
9400
9401
9402
9403
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9399

def feedback_licenses(
    filter_for_licenses = '*'
  )
  action(:feedback_licences, filter_for_licenses)
end

#feedback_local_base(i = compile_which_program? ) ⇒ Object

feedback_local_base

Feedback which local base directory is used for a particular program.

#


7632
7633
7634
7635
7636
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7632

def feedback_local_base(
    i = compile_which_program?
  )
  RBT::Cookbooks::DisplayCookbookDataset.feedback_local_base(i)
end

#feedback_local_location(i = compile_which_program? ) ⇒ Object

#

feedback_local_location

Invoke this like:

ry htop feedback_local_location
#


10633
10634
10635
10636
10637
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10633

def feedback_local_location(
    i = compile_which_program?
  )
  RBT::Cookbooks::DisplayCookbookDataset::Feedback.feedback_local_location(i)
end

#feedback_main_configObject

#

feedback_main_config

In order to invoke this method, do:

rbt config?
#


10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10510

def feedback_main_config
  orev 'We will show the configuration options set for the '\
       'RBT project next.'
  e
  cliner {
    dataset = RBT.configuration?
    array = dataset.available_methods? # Delegate to the config.
    array.each {|entry|
      value = dataset.send(entry.to_sym)
      case entry.to_s.strip
      when 'email'
        value = crimson(value.to_s.ljust(10))
      else
        value = slateblue(value.to_s.ljust(10))
      end
      key = lightgoldenrodyellow(
              "#{entry}:".ljust(46)
            )
      e "  #{key} #{value}"
    }
  }
  e
end

#feedback_main_config_then_exitObject

#

feedback_main_config_then_exit

#


10537
10538
10539
10540
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10537

def feedback_main_config_then_exit
  feedback_main_config
  exit_program
end

#feedback_make_options(i = compile_which_program? ) ⇒ Object

#

feedback_make_options

To trigger this method, do e. g.:

ry ruby make_opts
ry binutils make_opts
#


1483
1484
1485
1486
1487
1488
1489
1490
1491
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1483

def feedback_make_options(
    i = compile_which_program?
  )
  _ = cookbook_dataset_make_options?
  _ = _.first if _.is_a? Array
  e
  e royalblue(_)
  e
end

#feedback_prefix_in_use?(shall_we_exit = true) ⇒ Boolean Also known as: feedback_prefix_in_use

#

feedback_prefix_in_use?

Use this method to feedback which prefix is in use.

Usage examples:

ry allegro --prefix?
ry openmpi --prefix?
ry htop    prefix?
#

Returns:

  • (Boolean)


6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6083

def feedback_prefix_in_use?(
    shall_we_exit = true
  )
  program_name = compile_which_program?.dup
  if cookbook_dataset?.nil?
    ensure_proper_dataset_for(program_name)
  end
  e "#{rev}The prefix in use for "\
    "#{lightgreen(program_name)} #{rev}will be:"
  e "  #{sfancy(prefix?)}"
  exit_program if shall_we_exit
end

#feedback_program_description(i = program_name? ) ⇒ Object Also known as: feedback_description

#

feedback_program_description

We feedback the description here, by tapping into the method feedback_description() from class Cookbooks.

#


5893
5894
5895
5896
5897
5898
5899
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5893

def feedback_program_description(
    i = program_name?
  )
  e
  RBT.feedback_description_of(i)
  e
end

#feedback_program_versionObject

#

feedback_program_version

#


12947
12948
12949
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12947

def feedback_program_version
  RBT::Cookbooks::DisplayCookbookDataset::Feedback.feedback_program_version(program?)
end

#feedback_programs_dirObject

#

feedback_programs_dir

#


9408
9409
9410
9411
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9408

def feedback_programs_dir
  orev "The programs directory is "\
       "at `#{sfile(programs_dir?)}#{rev}`."
end

#feedback_rbt_version(ljust = 35, use_opn = true) ⇒ Object

#

feedback_rbt_version

#


10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10324

def feedback_rbt_version(
    ljust   = 35,
    use_opn = true
  )
  _ = sfancy('RBT Version: '.ljust(ljust))+
      simp(action_rbt_version)
  if use_opn
    orev _
  else
    e _
  end
end

#feedback_sanitize_dataset_version(ljust = 35, use_opn = true) ⇒ Object

#

feedback_sanitize_dataset_version

#


10313
10314
10315
10316
10317
10318
10319
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10313

def feedback_sanitize_dataset_version(
    ljust = 35, use_opn = true
  )
  opnn if use_opn
  e sfancy('RBT::Cookbooks::SanitizeCookbook version: '.ljust(ljust))+
    simp(RBT.version?)
end

#feedback_url(i = compile_which_program?, , shall_the_dataset_be_initialized_anew = false) ⇒ Object Also known as: show_the_URL_for_these_programs

#

feedback_url

Wrapper around Cookbooks functionality.

Usage examples:

ry htop url?
ry libsigc++ --show-url
ry --url-for-these-programs=php,ruby,python,m4,php
#


2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2246

def feedback_url(
    i                                     = compile_which_program?,
    shall_the_dataset_be_initialized_anew = false
  )
  case shall_the_dataset_be_initialized_anew
  # ======================================================================= #
  # === :initialize_the_dataset_anew
  # ======================================================================= #
  when :initialize_the_dataset_anew
    shall_the_dataset_be_initialized_anew = true
  end
  if i.is_a? Array
    i.each {|entry|
      feedback_url(entry, shall_the_dataset_be_initialized_anew)
    }
  else
    if i.nil? or shall_the_dataset_be_initialized_anew
      if shall_the_dataset_be_initialized_anew
        # No change necessary here.
      else
        i = first_argument?.to_s.dup
      end
      initialize_dataset_for(i)
    end
    action(:url_new, i)
  end
  # ======================================================================= #
  # The next line of code has been commented out on the 21.09.2018:
  # ======================================================================= #
  # ::RBT::Cookbooks::DisplayCookbookDataset.feedback_url.feedback_url(compile_which_program?)
  # ======================================================================= #
  # The next part may be controversial, as it sets the xorg buffer.
  # As of May 2014 it was disabled.
  # ======================================================================= #
  #   result = @cookbooks.feedback_url
  #   set_xorg_buffer(result)
  # ======================================================================= #
end

#feedback_various_versions(optional_use_opn = true, ljust = 45) ⇒ Object

#

feedback_various_versions

This actually will only feedback the RBT version in use, since we have merged the different projects together in September 2018.

To invoke this method, do:

ry htop feedback_version
#


11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11166

def feedback_various_versions(
    optional_use_opn = true,
    ljust            = 45
  )
  case optional_use_opn
  # ======================================================================= #
  # === :do_not_use_opn
  # ======================================================================= #
  when :do_not_use_opn
    optional_use_opn = false
  end
  feedback_rbt_version(ljust, optional_use_opn)
end

#feedback_what_we_are_currently_compiling?(status_file = FILE_STATUS) ⇒ Boolean

#

feedback_what_we_are_currently_compiling?

This method will feedback what we are currently compiling.

To invoke this method, do:

rbt --what-are-we-currently-compiling?
#

Returns:

  • (Boolean)


1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1093

def feedback_what_we_are_currently_compiling?(
    status_file = FILE_STATUS
  )
  if File.exist? status_file
    dataset = YAML.load_file(status_file)
  end
  this_key = 'currently_compiling_these_programs'
  if dataset.has_key?(this_key) and
     !dataset[this_key].empty? # This should work because it is an Array.
    these_programs_are_currently_compiled = dataset[this_key]
    orev 'The following programs are currently compiled:'
    e
    these_programs_are_currently_compiled.each {|this_program|
      e "  #{sfancy(this_program)}"
    }; e
  else
    orev 'No program is being currently compiled.'
  end
end

#feedback_whether_the_cookbook_will_modify_env_variables(compile_this_program = compile_which_program? ) ⇒ Object

#

feedback_whether_the_cookbook_will_modify_env_variables

#


7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7668

def feedback_whether_the_cookbook_will_modify_env_variables(
    compile_this_program = compile_which_program?
  )
  _ = set_env_variables?
  if is_this_program_registered?(compile_this_program)
    if _.nil?
      orev "The program #{sfancy(compile_this_program)} "\
           "#{rev}does not set any ENV variable."
    else
      orev 'The program '+sfancy(compile_this_program)+
           "#{rev} will modify at the least one ENV variable."
      orev 'Displaying these next:'
      e
      set_these_env_variables(_, :report_only)
      e
    end
  else
    orev 'No program with that name is known.'
  end
end

#feedback_whether_we_will_strip_or_whether_we_will_notObject

#

feedback_whether_we_will_strip_or_whether_we_will_not

Feedback whether we will run the “strip” binary or whether we will not.

Invocation example:

ry --strip?
#


1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1719

def feedback_whether_we_will_strip_or_whether_we_will_not
  _ = strip_binaries?
  case _
  when true
    orev 'Yes, we will run "'+slateblue('strip')+rev+
         '" on the resulting binaries of'
    orev 'the given program at hand.'
  when false
    orev "No, we will #{swarn('NOT')} #{rev}run \"strip\" on the "\
         "resulting binaries of"
    orev 'the given program at hand.'
  else
    orev 'Unknown value: '+steelblue(_.class.to_s)
  end
end

#feedback_whether_we_will_use_stowObject

#

feedback_whether_we_will_use_stow

To invoke this, do:

ry --use-stow?
#


7197
7198
7199
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7197

def feedback_whether_we_will_use_stow
  orev "Will stow be used? #{royalblue(verbose_truth(use_stow?))}"
end

#find_all_archive_typesObject

#

find_all_archive_types

#


7913
7914
7915
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7913

def find_all_archive_types
  RBT::Cookbooks::FindAllArchiveTypes.new.show_results
end

#find_all_keys_starting_with(i) ⇒ Object

#

find_all_keys_starting_with

This method will find all keys starting with a specific character.

Currently we will always exist when we use this method, so returning something is not hugely important.

#


12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12624

def find_all_keys_starting_with(
    i
  )
  i = i.dup if i.is_a?(String) and i.frozen?
  i.delete!('*') # Get rid of '*' since we no longer need it past this point.
  all_matches = all_programs?.select {|key| key =~ /^#{i}/ } 
  e all_matches.sort.join(', ').split(N).map {|entry| '  '+entry }.join(N)
  e
  orev "A total of #{royalblue(all_matches.size.to_s)} "\
       "#{rev}matches were found."
  return all_matches
end

#fix_libtool_la_file_from_saved_fileObject

#

fix_libtool_la_file_from_saved_file

#


2162
2163
2164
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2162

def fix_libtool_la_file_from_saved_file
  RBT.fix_libtool_la_file_from_saved_file
end
#
#

Returns:

  • (Boolean)


11638
11639
11640
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11638

def force_symlinks_when_appdir_prefix_is_used?
  @internal_hash[:force_symlinks_when_appdir_prefix_is_used]
end

#full_configure_command?Boolean Also known as: return_full_configure_command

#

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.

We can also store this into a local file, such as a .md file. In fact, this was the primary reason why it was added.

#

Returns:

  • (Boolean)


1055
1056
1057
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1055

def full_configure_command?
  @internal_hash[:full_configure_command]
end

#generate_all_gobolinux_recipesObject

#

generate_all_gobolinux_recipes

This method can be used to auto-generate all GoboLinux recipes.

Invocation example:

ry --generate-all-gobolinux-recipes
#


5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5681

def generate_all_gobolinux_recipes
  # ======================================================================= #
  # Must first change into an appropriate directory.
  # ======================================================================= #
  target_dir = "#{rbt_log_directory?}gobolinux/"
  if File.directory? target_dir
    # ===================================================================== #
    # Always remove the old directory should it exist.
    # ===================================================================== #
    remove_directory(target_dir)
  end
  mkdir(target_dir)
  if File.directory? target_dir
    opnn; cd target_dir, :be_verbose
    # ===================================================================== #
    # Next, create the subdirectories but be silent about it.
    # ===================================================================== #
    array = ('a'..'z').to_a
    # ===================================================================== #
    # Add two exceptions.
    # ===================================================================== #
    array[0,0] = '3'
    array[0,0] = '0'
    array.each {|entry| mkdir(entry, :be_quiet) }
  else
    orev "The target directory `#{sdir(target_dir)}` does not exist."
    orev 'Please create it before we can create GoboLinux recipes.'
    return
  end
  available_programs?.each {|this_program|
    orev "Now generating a GoboLinux recipe for "\
         "the program `#{sfancy(this_program)}#{rev}`."
    create_gobolinux_recipe_for(this_program)
  }
  # ======================================================================= #
  # Now that we have generated all these recipes, let's create a tarball
  # of the directory.
  # ======================================================================= #
  cd rbt_log_directory?, :be_quiet
  begin
    require 'totarxz'
    gobolinux_recipes_archive = "gobolinux-recipes-#{return_current_date}"
    mv 'gobolinux', gobolinux_recipes_archive
    to_tar_xz(gobolinux_recipes_archive)
    target_archive = "#{gobolinux_recipes_archive.dup}.tar.xz"
    if File.exist? target_archive
      orev "Everything has been packaged up into `"\
           "#{sfancy(target_archive)}` (cwd: #{sdir_return_pwd}#{rev})."
      # =================================================================== #
      # Rename the directory again.
      # =================================================================== #
      opnn; mv gobolinux_recipes_archive, 'gobolinux'
      # =================================================================== #
      # FTP upload if we are on Roebe.
      # =================================================================== #
      if is_on_roebe?
        require 'ftp_paradise'
        if File.exist? target_archive
          FtpParadise.upload_this_binary_file(target_archive)
        else
          opne 'Can not upload the file '+sfile(target_archive)
          opne 'as it does not exist.' 
        end
        # ================================================================== #
        # Next, connect and upload all the individual directories to
        # my remote FTP host.
        # ================================================================== #
      end
      # =================================================================== #
      # Next, upload the individual directories to the remote FTP host.
      # Unfortunately this has a problem so we have disabled this for now.
      # =================================================================== #

# =========================================================================== #
# DISABLED FOR NOW. MUST BE FIXED ONE DAY.
# =========================================================================== #
if false
      _ = FtpParadise.new(:shevy)
      _.remote_mkdir 'gobolinux'
      _.remote_cd    'gobolinux'
      opnn; cd 'gobolinux', :be_verbose
      array.each {|this_directory|
        _.remote_mkdir(this_directory)
        _.rcd(this_directory)
        # ================================================================== #
        # Ok, we can obtain the local directories and then upload them
        # all.
        # ================================================================== #
        local_target = this_directory+'/*'
        all_local_directories = Dir[local_target].select {|entry|
          File.directory? entry
        }
        if all_local_directories.empty?
          orev 'Nothing found under '+sfancy(local_target)+rev+'.'
        else
          all_local_directories.each {|this_entry|
            orev 'Now uploading the directory `'+sdir(this_entry)+rev+'`.'
            _.upload_this_directory(this_entry)
          }
        end
        _.rcd '..' # Return to the base directory again.
      }
end # end false clause (DEBUG - FIXME!!!)
    end
  rescue LoadError
    orev 'Please install the gem totarxz, in order to create '\
         'a '+orange('.tar.xz')+rev+' archive.'
  end
end

#generate_global_yaml_databaseObject

#

generate_global_yaml_database

#


2034
2035
2036
2037
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2034

def generate_global_yaml_database
  require 'rbt/generate_files/create_global_yaml_database.rb'
  RBT.generate_global_yaml_database
end

#generate_gobolinux_recipe(i = compile_which_program? ) ⇒ Object Also known as: create_gobolinux_recipe_for

#

generate_gobolinux_recipe

This will delegate towards Cookbooks and generate gobolinux recipe for the given program.

Invocation examples:

ry zenity --gobolinux-recipe
ry ruby --to-gobo
#


11621
11622
11623
11624
11625
11626
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11621

def generate_gobolinux_recipe(
    i = compile_which_program?
  )
  require 'rbt/linux/gobolinux/create_recipe.rb'
  RBT.create_gobolinux_recipe(i) { :store_in_alphanumeric_subdirectory }
end

#generate_homepageObject

#

generate_homepage

Generate a LFS-like homepage, which is part of the RBT project, within the Cookbooks namespace.

Invocation example:

ry --generate-homepage
#


7230
7231
7232
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7230

def generate_homepage
  action(:generate_homepage)
end

#generate_machomebrew_formula(i = compile_which_program? ) ⇒ Object Also known as: generate_homebrew_script

#

generate_machomebrew_formula

This method will generate a (hopefully valid) Homebrew script.

Commandline-invocation example:

ry htop --generate_homebrew_script
#


300
301
302
303
304
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 300

def generate_machomebrew_formula(
    i = compile_which_program?
  )
  RBT::GenerateMachomebrewFormula.new(i)
end

#generate_new_cookbook(shall_we_exit = true) ⇒ Object

#

generate_new_cookbook

This method can be used to generate a new cookbook file. It is no longer that useful, but retained mostly for legacy reasons.

To generate a new cookbook, do:

ry htop ---generate_new_cookbook
#


1925
1926
1927
1928
1929
1930
1931
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1925

def generate_new_cookbook(
    shall_we_exit = true
  )
  orev 'Will generate a new cookbook file, as instructed.'
  action(:create_new_cookbook)
  exit_program if shall_we_exit
end

#generate_shell_completion(for_this_shell = :all) ⇒ Object

#

generate_shell_completion

Generates shell completion code. Right now it will only work for Bash.

Invocation example:

ry --generate_shell_completion
#


39
40
41
42
43
# File 'lib/rbt/actions/individual_actions/software_manager/actions.rb', line 39

def generate_shell_completion(
    for_this_shell = :all
  )
  action(:GenerateShellCompletion, for_this_shell)
end

#generate_slack_desc_file_for_this_program(i = compile_which_program? ) ⇒ Object Also known as: create_slackware_description_file

#

generate_slack_desc_file_for_this_program

Trigger like so:

rbt htop --gsc
#


3322
3323
3324
3325
3326
3327
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3322

def generate_slack_desc_file_for_this_program(
    i = compile_which_program?
  )
  path_to_this_file = RBT.generate_slackware_description_file(i)
  return path_to_this_file
end

#generate_slack_desc_files_for_every_programObject

#

generate_slack_desc_files_for_every_program

#


3964
3965
3966
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3964

def generate_slack_desc_files_for_every_program
  action(:generate_all_slack_desc_files)
end

#get_packages(this_program = compile_which_program? ) ⇒ Object

#

get_packages

Get all packages from the directory /Depot/Packages and compare them to our given request.

I am no longer making heavy use of Packages but perhaps one day I may extend it, so this is one reason why it is kept.

Invoke it like so:

ry php pgk?
#


3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3657

def get_packages(
    this_program = compile_which_program?
  )
  this_program = this_program.first if this_program.is_a? Array
  packages_dir = packages_directory? # This constant is defined in Configuration.rb
  orev "Searching for matching packages to `#{simp(this_program)}#{rev}`, "\
       "inside of the directory #{sdir(packages_dir)}#{rev}."
  _ = get_files_from(packages_dir)
  if _ and !_.empty?
    result = _.grep(/#{this_program}/i)
    pp result
    return result
  else
    orev "Unfortunately no match was found in `#{sdir(packages_dir)}#{rev}`."
  end
end

#gir_files?Boolean

#

gir_files?

#

Returns:

  • (Boolean)


1453
1454
1455
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1453

def gir_files?
  cookbook_dataset?.gir_files
end

#git_url?Boolean

#

git_url?

#

Returns:

  • (Boolean)


1208
1209
1210
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1208

def git_url?
  cookbook_dataset?.git_url?
end

#guess_build_typeObject Also known as: do_guess_the_build_type

#

guess_build_type

#


1446
1447
1448
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1446

def guess_build_type
  RBT.build_type?
end

#handle_the_postinstallation_stepObject

#

handle_the_postinstallation_step

This will delegate towards class RBT::ToCurrent, to set the Current symlink.

#


5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5048

def handle_the_postinstallation_step
  if uses_appdir_prefix?
    _ = prefix?
    orev "Setting a symlink next, for #{steelblue(_)}#{rev}:"
    # ===================================================================== #
    # Delegate onto class RBT::ToCurrent next.
    # ===================================================================== #
    action(:ToCurrent, _)
  end
end

#has_a_dependency_on_meson?Boolean

#

has_a_dependency_on_meson?

#

Returns:

  • (Boolean)


1251
1252
1253
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1251

def has_a_dependency_on_meson?
  cookbook_dataset?.has_a_dependency_on_meson?
end

#has_flatpak_url?Boolean

#

has_flatpak_url?

#

Returns:

  • (Boolean)


753
754
755
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 753

def has_flatpak_url?
  !cookbook_dataset?.flatpak_url.empty?
end

#has_gir_files?Boolean

#

has_gir_files?

This method will determine whether the package at hand has .gir files or whether it does not.

#

Returns:

  • (Boolean)


1696
1697
1698
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1696

def has_gir_files?
  !cookbook_dataset?.gir_files.empty?
end

#has_key?(i) ⇒ Boolean

#

has_key?

This is a substitute method, to enable hash-like behaviour for some keys. Right now (December 2019) this is a hardcoded Array, but in the future the code may be changed - let’s see.

Do note that this method is specifically synced (closely) with class RBT::CreatePkgconfigFile.new.

#

Returns:

  • (Boolean)


1358
1359
1360
1361
1362
1363
1364
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1358

def has_key?(i)
  %i(
    description
    prefix
    program_version
  ).include? i
end

#has_linux_makefile?(i = 'Makefile.linux') ⇒ Boolean

#

has_linux_makefile?

Return true if we find a linux-specific Makefile.

#

Returns:

  • (Boolean)


356
357
358
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 356

def has_linux_makefile?(i = 'Makefile.linux')
  File.exist?(i)
end

#has_makefile?(i = 'Makefile') ⇒ Boolean

#

has_makefile?

Query whether we have a file called Makefile in the current working directory.

#

Returns:

  • (Boolean)


347
348
349
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 347

def has_makefile?(i = 'Makefile') 
  File.exist?(i)
end

#has_the_program_been_installed_successfully?Boolean Also known as: successfully_compiled?, has_been_successfully_compiled?, installation_was_successful?, compiled_successfully?

#

has_the_program_been_installed_successfully?

#

Returns:

  • (Boolean)


853
854
855
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 853

def has_the_program_been_installed_successfully?
  @internal_hash[:has_the_program_been_installed_successfully]
end

#hash?Boolean

#

hash?

#

Returns:

  • (Boolean)


1843
1844
1845
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1843

def hash?
  cookbook_dataset?.hash?
end

#highest_priority?Boolean

#

highest_priority

This method will return the main build system to use in general, if possible.

#

Returns:

  • (Boolean)


1582
1583
1584
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1582

def highest_priority?
  return_build_systems_priorities.first
end

#homepage?(cookbook_dataset = cookbook_dataset?) ) ⇒ Boolean

#

homepage?

#

Returns:

  • (Boolean)


1561
1562
1563
1564
1565
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1561

def homepage?(cookbook_dataset = cookbook_dataset?)
  if cookbook_dataset
    cookbook_dataset.homepage?
  end
end

#honour_check_to_ensure_that_the_program_exists?Boolean

#

honour_check_to_ensure_that_the_program_exists?

#

Returns:

  • (Boolean)


1116
1117
1118
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1116

def honour_check_to_ensure_that_the_program_exists?
  @internal_hash[:honour_check_to_ensure_that_the_program_exists] # This is true by default.
end

#increment_compiled_this_program_n_times_counter(by_plus_n = 1) ⇒ Object Also known as: increment_compiled_counter

#

increment_compiled_this_program_n_times_counter

By default this method will increment by +1.

#


12539
12540
12541
12542
12543
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12539

def increment_compiled_this_program_n_times_counter(
    by_plus_n = 1
  )
  @internal_hash[:we_tried_to_compile_this_program_n_times] += by_plus_n
end

#infer_information_from_this_archive(i) ⇒ Object

#

infer_information_from_this_archive

#


2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2061

def infer_information_from_this_archive(i)
  _ = remove_archive_at_the_end(
    File.basename(i)
  )
  _ = ProgramInformation.new(_)
  use_this_as_program_name    = _.program_name?
  use_this_as_program_version = _.program_version?
  # ======================================================================= #
  # Obtain a dummy-cookbook dataset first.
  # ======================================================================= #
  cookbook_dataset = load_yaml_dataset_for_this_program(
    use_this_as_program_name
  )
  # ======================================================================= #
  # Update the program_path next:
  # ======================================================================= #
  cookbook_dataset.program_path = i
  set_compile_this_program(use_this_as_program_name)
  cookbook_dataset.set_program_version(use_this_as_program_version)
  set_on_ihash(cookbook_dataset)
  cd :log_dir
  invoke_extracter(
    cookbook_dataset.program_path,
    log_dir?,
    true
  )
  cd log_dir?+remove_archive_stuff_from_the_end(File.basename(i))
  run_configure_like_stage    
  exit_program
end

#install_only_headers?Boolean Also known as: install_only_the_headers?

#

install_only_headers?

#

Returns:

  • (Boolean)


1731
1732
1733
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1731

def install_only_headers?
  @internal_hash[:install_only_the_headers]
end

#install_palemoon(path = '/home/x/src/palemoon/palemoon-'\ '28.5.2-64bit.tar.xz') ⇒ Object

#

install_palemoon

To invoke this ad-hoc method, try:

rbt --install-palemoon
#


1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1170

def install_palemoon(
    path = '/home/x/src/palemoon/palemoon-'\
           '28.5.2-64bit.tar.xz'
  )
  if File.exist? path
    _ = remove_archive_from_the_end(
      File.basename(path)
    ).sub(/-64bit$/, '')
    program_name    = program_information_return_name(_)
    program_version = program_information_return_version(_)
    target = program_dir?+program_name.capitalize+'/'+program_version+'/'
    create_app_skeleton(target)
    cd target
    extract_to = target
    extract_what_to(path, extract_to)
    orev 'Done!'
  else
    opnn; no_file_at(path)
  end
end

#install_ruby_gem(this_gem = program_path?, , shall_we_exit = exit_after_a_rubygem_has_been_installed? ) ⇒ Object Also known as: install_this_gem, install_this_ruby_gem

#

install_ruby_gem (install gem, gem install, gem tag)

Use this method to install a ruby gem, then exit.

The input argument should be the path towards the .gem file in question.

Right now we will always exit when we use this method, by default. This behaviour can be changed through the variable ‘shall_we_exit’.

Invocation example:

ry /home/x/src/ruby/gems/wirble-0.1.3.gem
ry $MY_SRC/ruby/gems/unf-0.0.5.gem
ry thor
#


5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5919

def install_ruby_gem(
    this_gem      = program_path?,
    shall_we_exit = exit_after_a_rubygem_has_been_installed?
  )
  do_not_display_the_flexbox
  do_not_symlink :be_quiet
  case this_gem
  when :default
    this_gem = program_path?
  end
  case shall_we_exit
  when :then_exit, :do_exit
    shall_we_exit = true
  when :do_not_exit
    shall_we_exit = false
  end
  # ======================================================================= #
  # === Download the gem
  #
  # If the path to a gem includes a "http" string, then we will assume
  # that we will first have to download it.
  # ======================================================================= #
  if this_gem and this_gem.include? 'http'
    go_to_base_dir
    do_download(this_gem)
  end
  # ======================================================================= #
  # Next, install the gem via a system() call. There are several ways
  # how to install a gem through, most importantly, with or without
  # dependency management by gem.
  # ======================================================================= #
  _ = ("gem install #{return_gem_install_options} #{this_gem}").squeeze(' ')
  orev _
  system _
  exit_program if shall_we_exit
end

#install_the_dependencies_of_this_program(this_program = compile_which_program? ) ⇒ Object

#

install_the_dependencies_of_this_program

Invocation example:

ry rails --install-its-dependencies
#


723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 723

def install_the_dependencies_of_this_program(
    this_program = compile_which_program?
  )
  # ======================================================================= #
  # First obtain the direct-dependencies of the given program at hand.
  # ======================================================================= #
  dependencies = required_deps_on?
  e
  orev 'Next, installing the '+orange(dependencies.size.to_s)+
       "#{rev} dependencies of the program `#{sfancy(this_program)}`."
  e
  orev 'These programs are:'
  e
  dependencies.each {|this_entry|
    e slateblue(" #{this_entry}")
  }
  e
  dependencies.each {|this_entry|
    install_that_program = true
    # ===================================================================== #
    # Consider skipping a few of these programs.
    # ===================================================================== #
    case this_entry
    when 'python'
      target = "#{programs_directory?}Python/Current/bin/python"
      if File.exist? target
        install_that_program = false
        orev "Skipping python as it is already installed at #{sfancy(target)}."
      end
    when 'ruby'
      target = "#{programs_directory?}Ruby/Current/bin/ruby"
      if File.exist? target
        install_that_program = false
        orev "Skipping ruby as it is already installed at #{sfancy(target)}."
      end
    end
    if install_that_program
      # =================================================================== #
      # We ought to not quit after a rubygem has been installed.
      # =================================================================== #
      _ = RBT::Action::SoftwareManager.new(this_entry, :do_not_run_yet)
      _.do_not_exit_after_a_rubygem_has_been_installed
      _.run
    end
  }
end

#install_the_linux_kernel_header_files_via_appdir_prefixObject

#

install_the_linux_kernel_header_files_via_appdir_prefix

This method essentially does what is described here:

http://www.linuxfromscratch.org/lfs/view/development/chapter05/linux-headers.html

The main difference is that we will use a proper appdir prefix.

Invocation examples:

ry --install-kernel-headers
ry --install-linux-headers
#


7185
7186
7187
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7185

def install_the_linux_kernel_header_files_via_appdir_prefix
  install_the_linux_kernel_header_files_via_this_prefix(:appdir_prefix)
end

#install_the_linux_kernel_header_files_via_this_prefix(use_this_prefix = :appdir_prefix) ⇒ Object

#

install_the_linux_kernel_header_files_via_this_prefix

The argument to this method is the prefix to be used. For example, the default AppDir prefix on my system for the linux kernel is “/home/Programs/Linux/5.7/”.

This method can also be used to specify a prefix for “home” which refers to the “home directory”.

#


891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 891

def install_the_linux_kernel_header_files_via_this_prefix(
    use_this_prefix = :appdir_prefix
    )
  _ = initialize_cookbook_dataset_for(:linux)
  # ======================================================================= #
  # Get the local path to the latest linux kernel next.
  # ======================================================================= #
  program_path = _.program_path?
  # ======================================================================= #
  # Designate which prefix is to be used next:
  # ======================================================================= #
  case use_this_prefix
  when :appdir_prefix,
       :default
    use_this_prefix = _.prefix?
  end
  extract_to = _.extract_to?
  extract_what_to(program_path, extract_to) { :keep_the_old_directory_if_it_exists }
  rcp _.program_name_and_program_version?
  target = extract_to+_.program_name_and_program_version?
  opne 'Now changing into the following directory: '+sdir(target)
  cd target
  run_this_system_command_in_a_coloured_and_padded_manner 'make mrproper'
  run_this_system_command_in_a_coloured_and_padded_manner 'make headers'
  if File.exist? 'usr/include/Makefile'
    remove_file 'usr/include/Makefile'
  end
  orev "We are in the directory #{sdir(target)}#{rev}."
  orev "Doing a #{steelblue('recursive copy action')}"\
       "#{rev} next."
  cpr('usr/include/', use_this_prefix)
  orev 'Done! The target was at '+sdir(use_this_prefix+'include/')
end

#install_this_flatpak(this_program) ⇒ Object

#

install_this_flatpak

This method can be used to install a flatpak from the official flatpak-URL.

#


6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6670

def install_this_flatpak(
    this_program
  )
  # ======================================================================= #
  # We must first check whether this program has a flatpak-entry. But
  # before that, we must initialize the dataset for the given program
  # at hand.
  # ======================================================================= #
  initialize_dataset_for(this_program)
  if has_flatpak_url?
    cmd = "flatpak install --user #{flatpak_url?}"
    e
    run_this_system_command_in_a_coloured_and_padded_manner(cmd)
    e
  else
    orev "The program #{sfancy(this_program)} #{rev}does "\
         "not have a registered flatpak-URL."
  end
end

#internal_configure_options?Boolean

#

internal_configure_options?

#

Returns:

  • (Boolean)


98
99
100
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 98

def internal_configure_options?
  @internal_hash[:configure_options]
end

#internal_hash_build_static?Boolean

#

internal_hash_build_static?

#

Returns:

  • (Boolean)


442
443
444
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 442

def internal_hash_build_static?
  @internal_hash[:build_static]
end

#internal_pid?Boolean

#

internal_pid?

#

Returns:

  • (Boolean)


1717
1718
1719
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1717

def internal_pid?
  @internal_hash[:pid]
end

#is_a_gem_file?(i = program_path? ) ⇒ Boolean Also known as: is_a_gem?

#

is_a_gem_file?

Query whether we have a .gem file at hand here.

#

Returns:

  • (Boolean)


37
38
39
40
41
42
43
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 37

def is_a_gem_file?(
    i = program_path?
  )
  if i
    i.to_s.end_with? '.gem'
  end
end

#is_a_kde_program?Boolean

#

is_a_kde_program?

We assume that every program that has the “kde” tag associated, is a KDE program. Thus this method will return true.

#

Returns:

  • (Boolean)


892
893
894
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 892

def is_a_kde_program?
  tags.include? 'kde'
end

#is_an_abbreviation?Boolean

#

is_an_abbreviation?

#

Returns:

  • (Boolean)


9731
9732
9733
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9731

def is_an_abbreviation?
  @internal_hash[:is_an_abbreviation]
end

#is_clang_used_as_the_main_compiler?Boolean

#

is_clang_used_as_the_main_compiler?

#

Returns:

  • (Boolean)


8960
8961
8962
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8960

def is_clang_used_as_the_main_compiler?
  @internal_hash[:compiler_to_use] == :clang
end

#is_meson_build_type?Boolean Also known as: uses_meson?

#

is_meson_build_type?

This method will return true if we can use meson in the current directory; and false otherwise.

#

Returns:

  • (Boolean)


1599
1600
1601
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1599

def is_meson_build_type?
  RBT.build_type? == :meson
end

#is_on_32_bit_system?Boolean

#

is_on_32_bit_system?

#

Returns:

  • (Boolean)


48
49
50
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 48

def is_on_32_bit_system?
  TARGET_CPU == 'i686'
end

#is_on_gobolinux?Boolean

#

is_on_gobolinux?

Query whether we are on GoboLinux or whether we are not.

In the past this was only a check for an environment variable.

Since we will allow commandline options to change this, we also had to use a proper variable to keep track of this.

#

Returns:

  • (Boolean)


934
935
936
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 934

def is_on_gobolinux?
  @internal_hash[:is_on_gobolinux]
end

#is_on_slackware?Boolean

#

is_on_slackware?

This method will return true if we are using slackware; and false otherwise.

#

Returns:

  • (Boolean)


1623
1624
1625
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1623

def is_on_slackware?
  configuration?.operating_system == 'slackware'
end

#is_registered?(i) ⇒ Boolean Also known as: is_this_program_registered?

#

is_registered?

Determine whether a given program is registered or whether it is not.

#

Returns:

  • (Boolean)


1371
1372
1373
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1371

def is_registered?(i)
  return RBT.is_available? i
end

#is_this_a_registered_binary?(i) ⇒ Boolean

#

is_this_a_registered_binary?

#

Returns:

  • (Boolean)


18
19
20
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 18

def is_this_a_registered_binary?(i)
  i != return_program_based_on_this_binary(i)
end

#is_this_a_registered_binary_name?(i) ⇒ Boolean

#

is_this_a_registered_binary_name?

#

Returns:

  • (Boolean)


1630
1631
1632
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1630

def is_this_a_registered_binary_name?(i)
  ::RBT.has_this_binary?(i)
end

#is_this_program_included?(i, be_verbose = be_verbose? ) ⇒ Boolean

#

is_this_program_included?

#

Returns:

  • (Boolean)


863
864
865
866
867
868
869
870
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 863

def is_this_program_included?(
    i,
    be_verbose = be_verbose?
  )
  RBT::Action::SoftwareManager.is_this_program_included?(
    i, be_verbose
  )
end

#keep_the_extracted_archive?Boolean Also known as: keep_extracted_archive?, keep_extracted?

#

keep_the_extracted_archive?

This is a query method towards a setting kept in the internal Hash variable.

A boolean value will be returned. This boolean value determines whether the archive will be kept after it was extracted, or whether it will be removed again after it was extracted.

#

Returns:

  • (Boolean)


11888
11889
11890
11891
11892
11893
11894
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11888

def keep_the_extracted_archive?
  _ = cookbook_dataset_keep_extracted? # ← The default.
  unless @internal_hash[:keep_the_archive_extracted].nil?
    _ = @internal_hash[:keep_the_archive_extracted]
  end
  return _
end

#kill_the_main_pid(main_pid = internal_pid? ) ⇒ Object

#

kill_the_main_pid

This will kill the process that was spawned via IO.popen. Use with care.

#


6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6386

def kill_the_main_pid(
    main_pid = internal_pid?
  )
  if main_pid
    begin
      Process.kill('KILL', main_pid)
      set_internal_pid(nil)
    rescue Errno::ESRCH
    end
  end
end

#last_error_line?Boolean

#

last_error_line?

#

Returns:

  • (Boolean)


956
957
958
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 956

def last_error_line?
  sys_command_string?.last
end

#last_system_command_was_a_success?Boolean Also known as: was_the_configure_run_a_success?, show_success_status?

#

last_system_command_was_a_success?

#

Returns:

  • (Boolean)


941
942
943
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 941

def last_system_command_was_a_success?
  $CHILD_STATUS.success?
end

#licence?Boolean

#

licence?

#

Returns:

  • (Boolean)


12426
12427
12428
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12426

def licence?
  cookbook_dataset?.licence?
end

#linux_from_scratchObject

#

linux_from_scratch (lfs tag)

We simply delegate this task to the class LFS.

#


5316
5317
5318
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5316

def linux_from_scratch
  RBT::LFS.new
end

#load_and_display_the_allowed_tags(from_this_file = RBT.file_allowed_tags) ⇒ Object

#

load_and_display_the_allowed_tags

#


12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12842

def load_and_display_the_allowed_tags(
    from_this_file = RBT.file_allowed_tags
  )
  if File.exist? from_this_file
    dataset = YAML.load_file(from_this_file).sort
    orev "The following tags are allowed/registered/valid:"
    dataset.each {|entry|
      e "  #{simp(entry)}"
    }
  end
end

#load_data_from_this_gobolinux_recipe(i) ⇒ Object

#

load_data_from_this_gobolinux_recipe

This method will allow us to load the dataset from a local GoboLinux recipe, as a drop-in replacement.

The most important setting there will be to use:

url="http://ftp.gnome.org/pub/gnome/sources/GConf/3.2/GConf-3.2.6.tar.xz"

which is part of the file called “Recipe”.

The other settings are also useful but not as important.

#


6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6803

def load_data_from_this_gobolinux_recipe(i)
  i = i.to_s.dup # Always work on a new String-copy anyway.
  case i
  when 'Dir.pwd'
    i = return_pwd
  end
  # ======================================================================= #
  # === Handle GoboLinux Recipes past that point
  # ======================================================================= #
  if i.include? '/'
    the_program_is_included # Enable the fact that the program is "included":
    # ===================================================================== #
    # Assume the input to be something like '/Depot/jjjjj/GConf/3.2.6-r3/'.
    # ===================================================================== #
    if i.count('/') > 1 # At the least two '/'.
      splitted = i.split('/')
      program_name = splitted[-2]
      program_version = splitted[-1]
      set_program_name(program_name)
      initialize_yaml_dataset(program_name, :bypass_check)
      set_program_version(program_version)
      chop_off_revision_number
      set_base_dir(i)
      # =================================================================== #
      # The position of the Description file.
      # =================================================================== #
      description_file = 'Resources/Description'
      dataset_from_the_description_file = nil
      assume_default_archive_type
      # =================================================================== #
      # Next, read in the information from the file 'Recipe'.
      # =================================================================== #
      this_file = 'Recipe'
      if File.exist? this_file
        recipe_dataset = File.read(this_file)
        use_this_regex = /^url="(.+)"/
        use_this_url = recipe_dataset.scan(use_this_regex).flatten.first
        set_url(use_this_url)
        set_this_archive(File.basename(use_this_url))
      else
        orev 'Something appears to be incorrect - no file '\
             'called '+sfile(this_file)+rev+' could be found.'
        exit_program
      end
      if File.exist? description_file
        dataset_from_the_description_file = File.read(description_file)
        # ================================================================== #
        # Next, use some regexes to properly interprete the dataset.
        # ================================================================== #
        regex_for_url1              = /\[Homepage\] (.+)/
        regex_for_license           = /\[License\] (.+)/
        regex_for_description       = /\[Description\] (.+)/
        regex_for_short_description = /\[Summary\] (.+)/
        _regex_for_name             = /\[Name\] (.+)/
        # ================================================================== #
        # Next determine some values here.
        # ================================================================== #
        dataset_from_the_description_file =~ regex_for_url1
        set_url2($1.to_s.dup) # Here we change the "homepage" URL.
        dataset_from_the_description_file =~ regex_for_license
        set_license($1.to_s.dup)
        dataset_from_the_description_file =~ regex_for_description
        set_description($1.to_s.dup)
        dataset_from_the_description_file =~ regex_for_short_description
        set_short_desc($1.to_s.dup)
        set_short_name(program_name)
        # ================================================================== #
        # The following code is probably no longer needed, but we can
        # keep it for now - maybe one day we have to use it.
        #   dataset_from_the_description_file =~ regex_for_name
        #   this_program = $1.to_s.dup.downcase
        #   set_this_program(this_program)
        # ================================================================== #
        attach_program_name_and_program_version
        determine_program_full_name # This is like: 'gnome-mahjonng-5.08.tar.xz'
        assemble_program_path
        unless File.exist?(File.basename(program_full_name?))
          e 'As the program does not exist locally, we will download it from:'
          e
          e '  '+sfancy(url?.to_s)
          e
          download_this_remote_program(url1)
        end
        # ================================================================== #
        # Now we assume that the program must exist locally.
        # ================================================================== #
        opne 'The following information is known about this program:'
        cliner
        e main_eight? # Show some more information.
        cliner
        target = File.basename(program_full_name?)
        extract_this_archive(target, return_pwd)
        new_target = dataset_program_name?
        opnn; cd new_target, :be_verbose
        do_use_appdir_prefix(:be_quiet)
        use_default_configure_command
        # ================================================================== #
        # Determine the configure options.
        # ================================================================== #
        use_this_regex = /^configure_options=\(([\s\S]+)\)$/ # See: http://rubular.com/r/Zy29SMPvLm
        set_configure_options(
          recipe_dataset.scan(use_this_regex).flatten.first
        )
        set_configure_base_dir('')
        set_use_this_build_directory('')
        do_not_remove_the_extracted_archive
        # ================================================================== #
        # Run "configure" next.
        # ================================================================== #
        run_configure_via_system(nil, :do_not_change_the_directory)
        run_premake_make_then_make_install
        run_all_actions_after_the_make_install_step
      end
    end
  end
end

#load_last_compiled_program(_ = RBT.file_compiled_programs) ⇒ Object Also known as: last_compiled_program?

#

load_last_compiled_program

This essentially does the following:

x = load_yaml('/Depot/Temp/rbt_logs/last_compiled_programs.yml')

To obtain this information from the commandline, try:

rbt --last-compiled-program?
#


2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2802

def load_last_compiled_program(
    _ = RBT.file_compiled_programs
  )
  if File.exist? _
    @internal_hash[:last_compiled_program] = load_yaml(_)
    result = @internal_hash[:last_compiled_program]
    # ===================================================================== #
    # If we store it as an Array, the last compiled program is the
    # one that comes last in that Array, too.
    # ===================================================================== #
    result = result.last if result.is_a? Array
    # ===================================================================== #
    # It may include a '#' character, in which case we will treat this
    # as a comment:
    # ===================================================================== #
    if result.include? '#'
      result = result[0, result.index('#')].strip
    end
    return result # ← And return the result here.
  else
    orev "No file exists at `#{sfile(_)}#{rev}`."
    orev 'Thus, we can not load anything.'
    exit_program
  end
end

#main_eight?Boolean

#

main_eight?

#

Returns:

  • (Boolean)


1476
1477
1478
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1476

def main_eight?
  cookbook_dataset?.main_eight?
end

#make_command?Boolean

#

make_command?

Tell us which make command we will be using.

#

Returns:

  • (Boolean)


365
366
367
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 365

def make_command?
  @internal_hash[:make_command]
end

#make_file_exists?Boolean Also known as: make_file?

#

make_file_exists?

Determine whether a “Makefile” exists or whether it does not exist.

#

Returns:

  • (Boolean)


629
630
631
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 629

def make_file_exists?
  File.exist? 'Makefile'
end

#make_install_stage_was_a_success?Boolean

#

make_install_stage_was_a_success?

#

Returns:

  • (Boolean)


1007
1008
1009
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1007

def make_install_stage_was_a_success?
  @internal_hash[:make_install_stage_was_a_success]
end

#make_object?Boolean

#

make_object?

Query-method towards the @make object (aka RBT::Make).

#

Returns:

  • (Boolean)


793
794
795
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 793

def make_object?
  @internal_hash[:make]
end

#make_use_of_cookbook_aliases?Boolean

#

make_use_of_cookbook_aliases?

#

Returns:

  • (Boolean)


1606
1607
1608
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1606

def make_use_of_cookbook_aliases?
  @internal_hash[:make_use_of_cookbook_aliases]
end

#make_use_of_the_cookbook_aliases?Boolean

#

make_use_of_the_cookbook_aliases?

#

Returns:

  • (Boolean)


1756
1757
1758
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1756

def make_use_of_the_cookbook_aliases?
  @internal_hash[:make_use_of_the_cookbook_aliases]
end

#may_we_download?Boolean

#

may_we_download?

#

Returns:

  • (Boolean)


993
994
995
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 993

def may_we_download?
  return ihash?[:may_we_download]
end

#may_we_initialize_a_new_cookbook_dataset?Boolean

#

may_we_initialize_a_new_cookbook_dataset?

#

Returns:

  • (Boolean)


1540
1541
1542
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1540

def may_we_initialize_a_new_cookbook_dataset?
  @internal_hash[:may_we_initialize_a_new_cookbook_dataset]
end

#may_we_run_ninja?Boolean

#

may_we_run_ninja?

#

Returns:

  • (Boolean)


1554
1555
1556
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1554

def may_we_run_ninja?
  @internal_hash[:may_we_run_ninja]
end
#

menu (menu tag)

#


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
# File 'lib/rbt/actions/individual_actions/software_manager/menu.rb', line 18

def menu(
    i = real_commandline_arguments?
  )
  if i.is_a? Array
    i.each {|entry| menu(entry) }
  elsif i.is_a? Hash
    # ======================================================================= #
    # === Handle Hashes next
    #
    # Such a Hash may look like this:
    #
    #   { :prefix=>"/usr/" }
    #
    # ======================================================================= #
    if i.has_key? :prefix
      set_user_prefix(
        i.delete(:prefix)
      )
    end
  else
    case i # (case tag, cas tag)
    # ===================================================================== #
    # === Generate a big shell script
    #
    # This entry point can be used to quickly generate the big
    # shell script file that contains all programs versions as
    # UPPERCASED variable, with an appended 'V'. So for example,
    # BASHV would have a value of 5.0 or so, depending on the
    # current version of bash registered in the rbt project.
    #
    # Invocation example:
    #
    #   ry --shellscript
    #
    # ===================================================================== #
    when /^-?-?shellscript$/i
      action_generate_a_big_shell_script
      exit_program
    # ===================================================================== #
    # === Show all Installed Programs, via a ruby-gtk3 widget
    #
    # Invocation example:
    #
    #   rbt --installed-programs
    #
    # ===================================================================== #
    when /^-?-?installed(-|_| )?programs$/i,
         /^-?-?gtk(-|_| )?installed(-|_| )?programs$/i
      require 'rbt/gui/gtk3/installed_programs/installed_programs.rb'
      RBT::GUI::Gtk::InstalledPrograms.run
    # ===================================================================== #
    # === Start the main libui widget
    #
    # This entry point allows the user to start the libui-bindings for
    # the SQL-centric compilation GUI.
    #
    # Invocation example:
    #
    #   rbt --libui
    #
    # ===================================================================== #
    when /^-?-?libui$/i
      require 'rbt/gui/libui/compile_via_sql_database/compile_via_sql_database.rb'
      RBT::GUI::LibUI::CompileProgram.new
    # ===================================================================== #
    # === Use different configure options
    #
    # We must allow the user to use a different set of configure options.
    # This entry point ensures that.
    #
    # The user will be able to pass in the configure options specified
    # in a commandline-flag.
    #
    # Invocation examples:
    #
    #   ry gcc --use-these-configure-options="--enable-shared --enable-bootstrap --enable-languages=c,c++,lto,objc,fortran --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=gcc4-compatible --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --enable-lto --disable-install-libiberty --with-gnu-ld --verbose --with-arch-directory=amd64 --disable-gtktest --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux"
    #   ry poppler --use-these-configure-options="--enable-xpdf-headers"
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?these(-|_| )?configure(-|_| )?options=(.+)$/
      @internal_hash[:configure_options] = $4.to_s.dup
    # ===================================================================== #
    # == Non-Traditional compilation                            (ntrad tag)
    #
    # This entry point allows the user to compile the given program in
    # an AppDir variant - an AppDir prefix. This would be equivalent
    # to a --prefix value of, for example, /Programs/Ruby/2.6.2/.
    #
    # Invocation examples:
    #
    #   rbt awk gstyle
    #   rbt ruby --app_dir
    #   rbt php --ntrad
    #   Installer libxml2 --ntrad
    #
    # ===================================================================== #
    when *ARRAY_HELP_DO_COMPILE_IN_A_NON_TRADITIONAL_WAY_OPTIONS
      do_compile_in_a_non_traditional_way
    # ===================================================================== #
    # === Do not display the Flexbox
    #
    # Invocation example:
    #
    #   ry sed --no-flexbox --ntrad
    #   ry sed --no-infobox --ntrad
    #   ry htop --no-infobox 
    #
    # ===================================================================== #
    when /-?-?do(_|-| )?not(_|-| )?display(_|-| )?the(_|-| )?flexbox$/i,
         /-?-?no(_|-| )?flexbox$/i,
         /-?-?do(_|-| )?not(_|-| )?display(_|-| )?the(_|-| )?infobox$/i,
         /-?-?no(_|-| )?infobox$/i
      orev 'No flexbox will be shown.'
      do_not_display_the_flexbox
    # ======================================================================= #
    # === Copy the expanded cookbooks
    #
    # This entry point allows us the user to quickly copy the expanded
    # cookbooks that are distributed via the RBT project. This is not
    # terribly useful for most users, but it may be helpful in the
    # event that the user has a slow computer (so generating the
    # expanded dataset would take a lot of time) or when you just want
    # to compile from scratch.
    #
    # Invocation example:
    #
    #   rbt --copy-expanded-cookbooks
    #
    # ======================================================================= #
    when /^-?-?copy(-|_| )?expanded(-|_| )?cookbooks$/i
      copy_expanded_cookbooks
      exit_program
    # ===================================================================== #
    # === rbt --vca
    #
    # This entry point will attempt to validate all cookbook-aliases.
    # ===================================================================== #
    when /^-?-?vca$/
      action(:ValidateCookbookAliases)
      exit_program
    # ===================================================================== #
    # === Remove incorrect yaml/ entries under the /home/Programs hierarchy
    #
    # This is mosly a convenience entry point. Faulty yaml/ directories
    # under the /home/Programs/ directory will be removed.
    #
    # Do note that another target directory can be given to the class
    # doing the action.
    #
    # Invocation examples:
    #
    #   rbt --purge-incorrect-yaml-directories-in-the-programs-hierarchy
    #   rbt --purge-flawed-yaml-directories-in-the-programs-hierarchy
    #   rbt --purge-flawed-yaml
    #
    # ===================================================================== #
    when /^-?-?purge(-|_| )?incorrect(-|_| )?yaml(-|_| )?directories(-|_| )?in(-|_| )?the(-|_| )?programs(-|_| )?hierarchy$/i,
         /^-?-?purge(-|_| )?flawed(-|_| )?yaml(-|_| )?directories(-|_| )?in(-|_| )?the(-|_| )?programs(-|_| )?hierarchy$/i,
         /^-?-?purge(-|_| )?flawed(-|_| )?yaml$/i,
         /^-?-?no(-|_| )?yaml$/i
      action(:PurgeIncorrectYamlDirectoriesInTheProgramsHierarchy)
      exit_program
    # ===================================================================== #
    # === Expand the cookbooks on the local computer system
    #
    # Invocation example:
    #
    #   rbt --expand
    #
    # ===================================================================== #
    when /^-?-?expand=(.+)$/,
         /^-?-?expand-?dataset=(.+)$/
      action(:ExpandCookbooks, $1.to_s.dup)
      exit
    # ===================================================================== #
    # === rbt --show-last-updated-programs
    #
    # Show the last n updated programs, in a table-layout. This
    # presently defaults to show ALL the available programs.
    # ===================================================================== #
    when /^-?-?show(-|_| )?last(-|_| )?updated(-|_| )?programs/,
         /^-?-?last(-|_| )?updated\??/, # cookbooks --last-updated?
         'slu'
      action(:ShowLastUpdated, "-n #{n_programs_available?}")
      exit
    # ===================================================================== #
    # === Use a GoboLinux Recipe
    #
    # Invocation example:
    #
    #   ry --load_data_from_this_gobolinux_recipe=return_pwd
    #
    # ===================================================================== #
    when /^-?-?load(_|-| )?data(_|-| )?from(_|-| )?this(_|-| )?gobolinux(_|-| )?recipe=(.+)/
      load_data_from_this_gobolinux_recipe($6)
    # ===================================================================== #
    # === Generate all GoboLinux recipes
    #
    # This entry point will generate all GoboLinux recipes.
    #
    # Invocation example:
    #
    #   ry --generate-all-gobolinux-recipes
    #
    # ===================================================================== #
    when /^-?-?generate(_|-| )?all(_|-| )?gobolinux(_|-| )?recipes$/,
         /^-?-?generate(_|-| )?gobolinux(_|-| )?recipes$/,
         /^-?-?create(_|-| )?all(_|-| )?gobolinux(_|-| )?recipes$/,
         /^-?-?create(_|-| )?gobolinux(_|-| )?recipes$/
      generate_all_gobolinux_recipes
      exit_program
    # ===================================================================== #
    # === Report the registered cookbook entries/programs
    #
    # Show how many programs are registered.
    #
    # Usage examples:
    #
    #   ry --nprograms
    #   ry --reportregisteredprograms
    #
    # ===================================================================== #
    when *ARRAY_HELP_REPORT_N_PROGRAMS_OPTIONS
      report_n_programs
      exit_program
    # ===================================================================== #
    # === Check whether a specific program is registered
    #
    # This is similar to the other inclusion check, but uses a slightly
    # different syntax.
    #
    # Invocation examples:
    #
    #   rbt --registered?=awk
    #   rbt --registered?=gawk
    #
    # ===================================================================== #
    when /^-?-?registered\??=(.+)$/i
      i = $1.to_s.dup
      opnn
      case RBT.is_this_program_included?(i, :be_quiet)
      when true
        e "#{rev}Yes, the program #{sfancy(i)}#{rev} is available "\
          "and registered in the RBT project."
      when false
        e "#{rev}No, the program #{sfancy(i)}#{rev} is NOT registered in the RBT project."
      end 
      exit_program
    # ===================================================================== #
    # === Create an AppDir program
    #
    # This entry point allows you to create an AppDir program in
    # the respective $PROGRAMS hierarchy - which is usually at
    # /Programs/.
    #
    # Invocation example:
    #
    #   rbt --create-program=foobar-1.0
    #
    # ===================================================================== #
    when /^-?-?create(-|_)?program=(.+)$/i
      create_program($2.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Uninstall a specific AppDir                       (uninstall tag)
    #
    # This option allows you to uninstall a specific AppDir again.
    #
    # All clean-up steps will be run.
    #
    # Invocation example:
    #
    #   rbt evince --uninstall-appdir
    #
    # ===================================================================== #
    when /^-?-?uninstall(_|-| )?appdir$/i,
         /^-?-?uninstall$/i
      uninstall_this_appdir
      exit_program
    # ===================================================================== #
    # === Package this appdir
    #
    # This entry point allows us to package an existing AppDir.
    #
    # Invocation examples:
    #
    #   ry --package-this-app-dir=htop
    #   ry --package-this-appdir=htop
    #   ry --package-appdir=htop
    #
    # ===================================================================== #
    when /^-?-?package(_|-| )?this(_|-| )?app(_|-| )?dir=(.+)$/i, # $4
         /^-?-?package(_|-| )?this(_|-| )?appdir=(.+)$/i,       # $3
         /^-?-?package(_|-| )?appdir=(.+)$/i                  # $2
      _ = $2.to_s.dup
      _ = $3.to_s.dup if $3
      _ = $4.to_s.dup if $4
      package_this_appdir(_)
    # ===================================================================== #
    # === Check out the latest source code of the given program
    #
    # This variant is similar to the --git-download option, but
    # we will specify which program to download directly, so the
    # "=" is a mandatory component. Thus, we need one less argument
    # to pass here.
    #
    # This entry point is mostly helpful for when we want to be
    # lazy and efficient.
    #
    # Invocation examples:
    #
    #   rbt --git-clone=htop
    #   rbt --git-clone=libxmlb
    #
    # ===================================================================== #
    when /^-?-?git(-|_| )?clone=(.+)$/i, # === $2
         /^-?-?from(-|_| )?git=(.+)$/i   # === $2
      download_the_latest_source_code_of_this_program($2.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Use program URL
    #
    # Use url. Overrules the program_name of the cookbook yaml file.
    #
    #   ry ffmpeg use_url
    #   ry ffmpeg --use_url
    #
    # ===================================================================== #
    when /^-?-?us?e?(-|_| )?url$/i,
         /^-?-?u(-|_| )?url$/i
      use_url
    # ===================================================================== #
    # === Easily compile the KDE5 foundation module
    #
    # This entry point allows you to compile all of the KDE5 foundation
    # programs. The foundation starts with "extracmakemodules" and so
    # forth.
    #
    # Invocation examples:
    #
    #   rbt --compile-kde-framework
    #   rbt --compile-kde-frameworks
    #   rbt --compile-kde-foundation
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?kde(-|_| )?frameworks?$/i,
         /^-?-?compile(-|_| )?kde(-|_| )?foundation$/i,
         /^-?-?compile(-|_| )?kde(-|_| )?base$/i,
         /^-?-?kde(-|_| )?frameworks$/i,# ← This alias may change at a later time.
         /^-?-?kde(-|_| )?foundation$/i,
         /^-?-?kde(-|_| )?base$/i,
         /^-?-?kde(-|_| )?base$/i
      orev "All KDE5 foundation programs will be compiled next."
      set_compile_these_programs(
        RBT.return_kde5_foundation
      )
    # ===================================================================== #
    # === Update all KDE5 porting aids components
    #
    # This entry point allows us to update the KDE porting aids from
    # within RBT itself.
    #
    # Invocation example:
    #
    #   rbt --update_porting_aids
    #   rbt --updateportingaids
    #
    # ===================================================================== #
    when /^-?-?update(-|_| )?porting(-|_| )?aids$/i
      update_kde_porting_aids
      exit_program
    # ===================================================================== #
    # === Batch compile the given input
    #
    # If you need to batch-compile several programs, then this is
    # one way to do so. This used to be called "chain compiling"
    # but is now called batch-compiling.
    #
    # Invocation examples:
    #
    #   rbt --batch-compile=mate
    #   rbt --batch-compile=python,php,perl,ruby
    #   rbt --chained=xfce
    #   rbt --chained=mate
    #   rbt --batch-compile=kde5_porting_aids
    #   rbt --chained=kde5_porting_aids
    #   rbt --batch-compile=kde5_foundation
    #   rbt --chained-compiling=kde5_foundation
    #
    # ===================================================================== #
    when /^-?-?batch-?compile=(.+)$/i, # URL: http://rubular.com/r/uItIs454yH
         /^-?-?chained=(.+)$/i,
         /^-?-?batch=(.+)$/i,                              # === $1
         /^-?-?chained(-|_| )?compiling=(.+)$/i,           # === $2
         /^-?-?do(-|_| )?chained(-|_| )?compiling=(.+)$/i # === $3
      match = $1.to_s.dup
      match = $2.to_s.dup if $2
      match = $3.to_s.dup if $3
      if match and match.include? ','
        these_programs = match.split(',')
      else
        these_programs = try_to_batch_compile_this_stack(match)
      end
      if these_programs
        orev "We will batch-compile these "\
             "#{simp(these_programs.size.to_s)} #{rev}programs next."
        e; these_programs.each {|install_this_program|
          e sfancy("  #{install_this_program}")
        }; e
        set_compile_these_programs(these_programs)
      else
        orev "No result found for #{orange(match)}#{rev}."
        exit_program
      end
    # ===================================================================== #
    # === Permanently disable the colours
    #
    # If you wish to permanently disable the colours for the RBT project,
    # use this entry point here.
    #
    # Invocation example:
    #
    #   rbt --permanently-disable-colours
    #
    # ===================================================================== #
    when /^-?-?permanentl?y?(-|_)?disable(-|_)?colou?rs$/,
         /^-?-?permanentl?y?(-|_)?no(-|_)?colours$/
      do_permanently_disable_the_colours
      exit_program
    # ===================================================================== #
    # === Permanently enable the colours
    #
    # If you wish to permanently enable the colours for the RBT project,
    # use this entry point here. This is specifically enabled to allow
    # us to reset after having done the entry point above, e. g. at
    # rbt --permanently-disable-colours.
    #
    # Invocation example:
    #
    #   rbt --permanently-enable-colours
    #
    # ===================================================================== #
    when /^-?-?permanentl?y?(-|_)?enable(-|_)?colou?rs$/,
         /^-?-?permanentl?y?(-|_)?colours$/
      do_permanently_enable_the_colours
      exit_program
    # ===================================================================== #
    # === Permanently disable ccache
    #
    # Use this entry point if you do not want to use ccache.
    #
    # Invocation example:
    #
    #   rbt --permanently-disable-ccache
    #
    # ===================================================================== #
    when /^-?-?permanently(-|_| )?disable(-|_| )?ccache$/,
         /^-?-?do(-|_| )?permanently(-|_| )?disable(-|_| )?ccache$/
      do_permanently_disable_ccache
      exit_program
    # ===================================================================== #
    # === Permanently set programs dir
    #
    # This compiles gcc with "language rich" configure options.
    #
    # Invocation example:
    #
    #   ry gcc --ntrad --language-rich
    #
    # ===================================================================== #
    when /^-?-?language(_|-| )?rich$/i
      try_to_use_this_profile(i.to_s.delete('-_'))
    # ===================================================================== #
    # === Permanently enable ccache
    #
    # Use this entry point if you wish to make use of ccache permanently.
    #
    # Invocation example:
    #
    #   rbt --permanently-enable-ccache
    #   ry --permanently-use-ccache
    #
    # ===================================================================== #
    when /^-?-?permanently(-|_| )?enable(-|_| )?ccache$/,
         /^-?-?permanently(-|_| )?use(-|_| )?ccache$/,
         /^-?-?do(-|_| )?permanently(-|_| )?enable(-|_| )?ccache$/,
         /^-?-?enable(-|_| )?ccache$/
      do_permanently_enable_ccache
      exit_program
    # ===================================================================== #
    # === Show a specific compile chain
    #
    # This entry point allows you to e. g. display which members
    # belong to the compile-chain plasma.
    #
    # Invocation examples:
    #
    #   rbt --view=kde5_plasma
    #   rbt --show-chain=plasma
    #   rbt --compile-chain-of=kde5_plasma
    #   rbt --show-compile-chain-of=kde5_plasma
    #   rbt --show-compile-chain-of=mate
    #   rbt --show-compile-chain=mate
    #   rbt --show-compile-chain=lxqt
    #
    # ===================================================================== #
    when /^-?-?view=(.+)$/i,                                 # ← Aim for $1.
         /^-?-?show(-|_)?chain=(.+)$/i,                      # ← Aim for $2.
         /^-?-?compile(-|_)?chain(-|_)?of=(.+)$/i,           # ← Aim for $3.
         /^-?-?show(-|_)?compile(-|_)?chain(-|_)?of=(.+)$/i, # ← Aim for $4.
         /^-?-?show(-|_)?compile(-|_)?chain=(.+)$/i          # ← Aim for $3.
      if $4
        of_this_program = $4.to_s.dup
      elsif $3
        of_this_program = $3.to_s.dup
      elsif $2
        of_this_program = $2.to_s.dup
      elsif $1
        of_this_program = $1.to_s.dup
      end
      show_compile_chain(of_this_program)
      exit_program
    # ===================================================================== #
    # === Install the dependencies of the given program at hand
    #
    # This entry point allows the user to install the dependencies of
    # the given program at hand. This will NOT check for any other
    # dependencies, so it will not be a so-called
    # "transverse-installation" that includes checks for such add-ons.
    #
    # The entry point will only install the dependencies that are
    # directly noted down in the "required_deps_on" part of the
    # relevant .yml file, so in some ways it is simple for the
    # user as well.
    #
    # Note that the program itself will NOT be installed through
    # this entry point.
    #
    # Invocation examples:
    #
    #   rbt rails --install-its-dependencies
    #   rbt zee --install-its-dependencies
    #
    # ===================================================================== #
    when /^-?-?install(-|_| )?its(-|_| )?dependencies$/i
      install_the_dependencies_of_this_program
    # ===================================================================== #
    # === Show all available (registered) gems to the user
    #
    # This entry point allows the user to display, onto the commandline,
    # which gems are registered in the RBT project.
    #
    # Invocation examples:
    #
    #   rbt --registered-gems
    #   rbt --available-gems
    #   rbt --ruby?
    #
    # ===================================================================== #
    when /^-?-?registered(-|_| )?gems$/i,
         /^-?-?show(-|_| )?registered(-|_| )?gems$/i,
         /^-?-?available(-|_| )?gems$/i,
         /^-?-?rubygems$/i,
         /^-?-?ruby\?$/i
      first_commandline_argument = first_commandline_argument?
      case first_commandline_argument
      when 'ruby','rubygems'
      else
        show_the_available_gems
        exit_program
      end
    # ===================================================================== #
    # === Clear the ENV (environment) variable
    #
    # This entry point allows us to clear the environment that ruby
    # uses, aka ENV.
    #
    # Invocation example:
    #
    #   ry gtk --clear-env --ntrad
    #
    # ===================================================================== #
    when /^-?-?clear(_|-| )?env$/
      clear_env_variables_but_ensure_the_path_variable_works
    # ===================================================================== #
    # === Compile certain applications from the KDE stack, based on a range
    #
    # This entry point allows the user to compile several programs
    # that belong to the KDE stack. A number has to be specified
    # here.
    #
    # For example:
    #
    #   ry --kde1-first=10
    #
    # This command would take the programs listed under KDE5 foundation
    # ("kde1") and try to compile the first 10 of these programs.
    #
    # Usage examples:
    #
    #   ry --kde1-first=10
    #   ry --kde1-first=20
    #   ry --kde2-first=20
    #   ry --kde2-first=30
    #
    # ===================================================================== #
    when /^-?-?kde\d{1,2}(-|_| )?first=(\d+)$/i
      try_to_compile_these_kde_programs(i)
    # ===================================================================== #
    # === Disable the use of md5sum calculation
    #
    # Invocation example:
    #
    #   ry --no-md5sum
    #
    # ===================================================================== #
    when /^-?-?no(_|-| )?md5sum$/i,
         /^-?-?disable(_|-| )?md5sum(_|-| )?calculation$/i
      disable_md5sum_calculation
    # ===================================================================== #
    # === /usr/local/ prefix
    #
    # This is a convenient feature mostly, in that we can quickly
    # compile into the /usr/local/ prefix.
    #
    # Usage examples:
    #
    #   ry gcc ULOCAL
    #   ry htop ULOCAL
    #
    # ===================================================================== #
    when /^ULOCAL$/,
         /^-?-?opt(_|-| )?prefix$/
      set_user_prefix(i)
    # ===================================================================== #
    # === Feedback the prefix in use
    #
    # If you wish to determine the --prefix that will be used for
    # the given program at hand, use this entry point here.
    #
    # Invocation example:
    #
    #   rbt htop --prefix?
    #
    # ===================================================================== #
    when *ARRAY_HELP_PREFIX_IN_USE
      feedback_prefix_in_use
    # ===================================================================== #
    # === Feedback multiple versions
    #
    # Invocation example:
    #
    #   ry --multiple-versions
    #
    # ===================================================================== #
    when /^-?-?multiple-?versions$/,
         /^-?-?find-?duplicates$/,
         'mversions'
      RBT.find_multiple_versions
      exit_program
    # ===================================================================== #
    # === Run the post-installation step at once
    #
    # This entry point allows us to specifically run the various
    # postinstallation steps.
    #
    # Invocation example:
    #
    #   rbt htop --do-postinstall-step
    #
    # ===================================================================== #
    when /^-?-?do(_|-| )?postinstall(_|-| )?step$/i
      consider_performing_postinstallation_actions
      exit_program
    # ===================================================================== #
    # === Enable the -O3 optimization
    #
    # This will enable -O3 optimizations via GCC. I am unsure whether
    # it will work on clang/LLVM.
    #
    # Invocation example:
    #
    #   ry gnomedesktop --opt -O3
    #   ry gnomedesktop --opt --speedy
    #
    # ===================================================================== #
    when /^-?-O3/i,
         /^-?-?superspeed$/,
         /^-?-?speed$/,
         /^-?-?speedy$/,
        /^-?-?fast$/
      new_value = old_cflags?
      if new_value.include? '-O2'
        new_value.sub!(/-O2/,'-O3')
      else
        new_value.prepend('-O3 ')
      end
      ENV['CFLAGS'] = new_value
      orev 'Using -O3 optimization next. The new CFLAGS are: '
      e
      orev "  #{steelblue(ENV['CFLAGS'])}"
      e
    # ===================================================================== #
    # === Generate the pdf tutorial, then upload it
    #
    # Invocation example:
    #
    #   rbt --generate_pdf_tutorial_then_upload_it
    #
    # ===================================================================== #
    when /^-?-?generate(_|-| )?pdf(_|-| )?tutorial(_|-| )?then(_|-| )?upload(_|-| )?it$/i
      ::RBT.generate_pdf_tutorial_then_upload_it
      exit_program
    # ===================================================================== #
    # === Publish a list of all programs versions
    #
    # Invocation example:
    #
    #   rbt --publish-list-of-all-programs-version
    #
    # ===================================================================== #
    when /^-?-?publish(_|-| )?list(_|-| )?of(_|-| )?/i # This is copied 1:1 from the Cookbooks project.
      RBT.publish_list_of_all_programs_version
      exit_program
    # ===================================================================== #
    # === Feedback Programs Directory
    #
    # This entry point shows us where the /Programs/ directory is at.
    #
    # Invocation example:
    #
    #   ry --programs_dir?
    #
    # ===================================================================== #
    when /^-?-?programs(_|-| )?dir\??$/,'pdir?'
      feedback_programs_dir
      exit_program
    # ===================================================================== #
    # === rbt --repeat_last_configure_option
    # ===================================================================== #
    when /^-?-?repeat(_|-| )?last(_|-| )?configure(_|-| )?option$/i,
         /^-?-?repeat$/
      esystem(return_last_configure_command)
      exit_program
    # ===================================================================== #
    # === Batch-download all source archives
    #
    # This entry point allows us to batch-download all source archives
    # onto the local filesystem.
    #
    # Invocation example:
    #
    #   rbt --batch-download-all-source-archives
    #   rbt --download-all-source-archives
    #
    # ===================================================================== #
    when /^-?-?batch(_|-| )?download(_|-| )?all(_|-| )?source(_|-| )?archives$/i,
         /^-?-?download(_|-| )?all(_|-| )?source(_|-| )?archives$/i
      batch_download_all_source_archives
      exit_program
    # ===================================================================== #
    # === Extract the linux kernel tarball only
    #
    # This entry point can be used to extract the linux kernel only,
    # to the specified target specified via extract_to: in the file
    # called 'linux.yml'.
    #
    # Invocation examples:
    #
    #   ry --extract-linux
    #   ry --extract-the-linux-kernel
    #
    # ===================================================================== #
    when /^-?-?extract(-|_| )?linux$/i,
         /^-?-?extract(-|_| )?the(-|_| )?linux(-|_| )?kernel(-|_| )?archive$/i,
         /^-?-?extract(-|_| )?the(-|_| )?linux-kernel$/i
      extract_the_linux_kernel_archive
      exit_program
    # ===================================================================== #
    # === Start the sinatra-interface of RBT
    #
    # Invocation example:
    #
    #   rbt --sinatra
    #
    # ===================================================================== #
    when /^-?-?sinatra$/i
      do_start_the_sinatra_interface
      exit_program
    # ===================================================================== #
    # === Create a specific shellscript (shell recipe)
    #
    # Create a specific (single) shellscript via this entry point here.
    #
    # Invocation examples:
    #
    #   ry sed        --generate_shellscript
    #   ry python     --standalone
    #   ry gnunetgtk  --create_shellscript
    #   ry wxwidget   --shellscript
    #   ry php        cshell
    #   ry htop       generate_shellscript
    #
    # ===================================================================== #
    when *ARRAY_HELP_CREATE_SHELLSCRIPT_OPTIONS
      unless yaml_dataset?
        this_program = compile_these_programs?.first
        assign_to_the_main_dataset(
          initialize_dataset_for(this_program)
        )
      end
      create_shellscript(
        dataset?,
        :save_into_file,
        :display_result
      )
      exit_program
    # ===================================================================== #
    # === Use instructions to GNU configure from a local file
    #
    # This entry point allows us to use configure-options stored in
    # a local file. This is useful because other parts of the RBT
    # suite can generate this file, which we can then easily use.
    #
    # For example, if the xorg-server does not work then copy/pasting
    # through the mouse may be harder. That is one possible use
    # case for this option.
    #
    # Invocation example:
    #
    #   ry gcc --use-instructions-from-this-file=/Depot/foobar.md
    #   ry php --trad --use-this-file=/Depot/j/foo.md
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?instructions(-|_| )?from(-|_| )?this(-|_| )?file=(.+)$/i, # $5
         /^-?-?use(-|_| )?this(-|_| )?file=(.+)$/i # $3
      _ = $3.to_s.dup if $3
      _ = $5.to_s.dup if $5
      consider_using_this_file_for_the_configure_options_that_are_to_be_used(_)
    # ===================================================================== #
    # === Compile all LXQT-desktop components
    #
    # This entry point allows us to compile all LXQT-components.
    #
    # Invocation example:
    #
    #   ry --compile-all-lxqt-components
    #   ry --batch-compile-lxqt
    #   ry --lxqt
    #
    # ===================================================================== #
    when /^-?-?compile(_|-| )?all(_|-| )?lxqt(_|-| )?components$/i,
         /^-?-?compile(_|-| )?lxqt$/i,
         /^-?-?batch(_|-| )?compile(_|-| )?lxqt$/i,
         /^-?-?lxqt$/i
      compile_all_lxqt_components
    # ===================================================================== #
    # === Convert a Gobolinux-like Package into the traditional structure:
    #
    # This entry point allows us to take a program structure such as
    # /Programs/Ruby/2.5.1/ and "convert" it into the "/usr/"
    # hierarchy.
    #
    # Usage examples:
    #
    #   ry php convert
    #   ry htop convert
    #   ry ruby --convert-to-traditional
    #
    # ===================================================================== #
    when /^-?-?convert(_|-| )?to(_|-| )?traditional$/i,
         'convert','conv','convert_package',
         'cpackage',
         'to_usr',
         'dumpp',
         'tousr',
         'converttotrad',
         'totrad',
         'cpa',
         'ctt',
         'to_traditional',
         'ctotrad'
      convert_to_traditional
      exit_program
    # ===================================================================== #
    # === rbt LAST_DOWNLOADED
    #
    # The input is normally downcased - but I will keep the upcased
    # variant as main entry point; it seems easer to remember.
    # ===================================================================== #
    when *ARRAY_HELP_LAST_DOWNLOADED_OPTIONS
      # =================================================================== #
      # The format of the following file may be like this here:
      #   /home/x/src/redmine/redmine-3.2.0.tar.gz # 2015-12-31 23:48:48 +0100
      # =================================================================== #
      file = RBT.last_downloaded_file
      if File.exist? file
        # ================================================================= #
        # We grab the name of the program found in the above file.
        # ================================================================= #
        i = program_information_return_program_name(
          File.basename(File.readlines(file).first)
        )
        i = [i] # We expect it to be an Array lateron.
        clear_commandline_options
      else
        ewarn 'No file at `'+sfile(file)+'` exists. Exiting now.'
        exit_program
      end
    # ===================================================================== #
    # === Compile every component up until KDE konsole
    #
    # This entry point can be used to compile all components belonging
    # to the KDE stack, up to (and including) the KDE konsole.
    #
    # Invocation example:
    #
    #   ry --compile-all-up-until-konsole
    #   ry --compile-towards-konsole
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?all(-|_| )?up(-|_| )?until(-|_| )?konsole$/i,
         /^-?-?compile(-|_| )?towards(-|_| )?konsole$/i
      compile_all_up_until_konsole
      exit_program
    # ===================================================================== #
    # === Enable cmake
    #
    # We deliberately enable cmake here, via this commandline flag.
    #
    # Usage example:
    #
    #   ry htop cmake
    #
    # ===================================================================== #
    when /^-?-?cmake$/i,
         /^-?-?use(_|-| )?ccmake$/
      do_use_cmake
    # ===================================================================== #
    # === Shortcut for a specific program version
    #
    # This entry point allows us to pick a specific version more easily.
    #
    # See the following usage example.
    #
    # Usage example:
    #
    #   ry python --2
    #
    # ===================================================================== #
    when /^--(\d+)$/
      this_program = compile_these_programs?.first
      directory = source_directory?+this_program+'/'
      available_programs = Dir[directory+'*']
      this_version = $1.to_s.dup
      selection = available_programs.select {|entry|
        entry =~ /-#{this_version}/
      }
      if selection.empty?
        orev "Not found any local program version for "\
             "the input `#{sfancy(this_version)}#{rev}`."
      else
        _ = selection.first
        this_version = program_information_return_version_of(_)
        set_program_version(this_version)
      end
    # ===================================================================== #
    # === Do not use sed at all
    #
    # This entry point will disable sed.
    #
    # Usage examples:
    #
    #   rbt htop --disable-sed
    #   rbt htop --disable-sed-modifications
    #   rbt extracmakemodules --disable-sed-modifications trad
    #
    # ===================================================================== #
    when /^-?-?disable(-|_| )?sed$/,
         /^-?-?disable(-|_| )?sed(-|_| )?modifications$/,
         /^-?-?do(-|_| )?not(-|_| )?use(-|_| )?sed$/,
         /^-?-?dont(-|_| )?use(-|_| )?sed$/
      do_not_use_sed(:be_verbose)
    # ===================================================================== #
    # === Apply only the sed operation next
    #
    # Invocation examples:
    #
    #   rbt htop --only-sed
    #   rbt krb5 --only-sed
    #
    # ===================================================================== #
    when /^-?-?only(-|_| )?sed$/i
      determine_the_configure_base_directory_to_use
      extract_program
      cd_to_the_configure_base_directory_to_be_used
      check_for_sed_action
      exit_program
    # ===================================================================== #
    # === Use a white background
    #
    # Invocation example:
    #
    #   ry htop --whitebg
    #
    # ===================================================================== #
    when /^-?-?background-?white$/,'--white-background',
         /^-?-?whitebg$/,
         /^-?-?do_?use_?a_?white_?background/
      do_use_a_white_background
    # ===================================================================== #
    # === Copy the custom .yml for the file into the current working
    #     directory
    #
    # This entry point allows the user to quickly copy the current
    # .yml file into the current working directory.
    #
    # Usage examples:
    #
    #   ry php --generate-custom-yaml
    #   ry ruby --generate_yaml
    #
    # ===================================================================== #
    when /^-?-?generate(_|-| )?custom(_|-| )?yaml$/i,
         /^-?-?generate(_|-| )?yaml$/i,
         /^-?-?copy(_|-| )?yaml(_|-| )?file$/i
      copy_this_yaml_file(compile_which_program?)
      exit_program
    # ===================================================================== #
    # === Honour a specific licence and only compile if it matches that licence
    #
    # This entry point allows the user to accept only programs with a
    # certain licence. So if the licence does NOT match the one given
    # on the commandline then RBT::Action::Installer will refuse to compile
    # it.
    #
    # Usage examples:
    #
    #   rbt php --honour-this-licence=GPLv3
    #   rbt php --check-for-licence=GPLv3
    #   rbt php --check-licence=GPLv3
    #   rbt php --only-this-licence=GPLv3
    #   rbt php --only-this-licence=gplv3
    #   rbt xfce4panelprofiles --licence=gplv2
    #   rbt exo --licence=gplv2
    #   rbt exo --licence=gplv3
    #   rbt plasmapa --licence=gplv2
    #
    # ===================================================================== #
    when /^-?-?honour(_|-| )?this(_|-| )?licence=(.+)$/i, # === $3
         /^-?-?check(_|-| )?for(_|-| )?licence=(.+)$/i,   # === $3
         /^-?-?only(_|-| )?this(_|-| )?licence=(.+)$/i,   # === $3
         /^-?-?check(_|-| )?licence=(.+)$/i,              # === $2
         /^-?-?licence=(.+)$/i                            # === $1
      _ = $1
      _ = $2 if $2
      _ = $3 if $3
      @internal_hash[:check_for_this_licence] = RBT.sanitize_this_licence(_)
    # ===================================================================== #
    # === rbt --allowed_entries?
    #
    # Invocation example:
    #
    #   rbt --allowed-cookbook-entries
    #
    # ===================================================================== #
    when '--allowed_entries?','allowed_entries?',
         '--allowed_entries',
         /^-?-?allowed(_|-| )?cookbook(_|-| )?entries/i
      require 'rbt/checks_and_validations/allowed_cookbook_entries.rb'
      RBT::Cookbooks::AllowedCookbookEntries.new
      exit_program
    # ===================================================================== #
    # === Querying whether RBT will symlink .gir files
    #
    # Invocation example:
    #
    #   rbt upower --ntrad --do-not-symlink-gir-file
    #   rbt gnomedesktop --ntrad --do-not-symlink-gir-files
    #
    # ===================================================================== #
    when /^-?-?do(_|-| )?not(_|-| )?symlink(_|-| )?gir(_|-| )?files?$/i
      orev "We will not symlink #{steelblue('.gir')}#{rev} files."
      @internal_hash[:symlink_gir_files] = false
    # ===================================================================== #
    # === rbt PWD
    # ===================================================================== #
    when /^PWD$/i
      _ = File.basename(return_pwd)
      set_compile_this_program(_)
      set_compile_these_programs(_)
    # ===================================================================== #
    # === Feedback extended description about a program
    #
    # Feedback extended description to the user.
    #
    # ry htop desc2
    # ===================================================================== #
    when /^-?-?description2$/,
         'desc2'
      feedback_extra_description
      feedback_description
      exit_program
    # ===================================================================== #
    # === Update library names
    #
    # Invocation example:
    #
    #   ry --uln
    #
    # ===================================================================== #
    when /^-?-?update(_|-| )?library(_|-| )?names/i,
         /^-?-?uln/i,
         'registered_libraries'
      update_library_names
      exit_program
    # ===================================================================== #
    # === Feedback every case option of the main menu here
    #
    # Invocation example:
    #
    #   ry htop case_options?
    #
    # ===================================================================== #
    when *ARRAY_HELP_FEEDBACK_EVERY_CASE_OPTION_OPTIONS
      feedback_all_case_options_of_the_main_menu
      exit_program
    # ===================================================================== #
    # === Use a specific build directory
    #
    # Sometimes you may want to use another build directory.
    #
    # This options here ensures that you can do so.
    #
    # Usage example:
    #
    #   ry htop --use-this-build-dir=/Depot/j
    #   ry htop --build-dir=/Depot/j
    #   ry python --build-dir=/Depot/jjj/
    #
    # ===================================================================== #
    when /^-?-?use-this-build-dir=(.+)/,
         /^-?-?use-this-build-directory=(.+)/,
         /^-?-?build-dir=(.+)/
      do_use_a_build_directory :be_verbose
      this_build_directory = $1.to_s.dup
      use_this_build_directory(this_build_directory, :report_back)
    # ===================================================================== #
    # === Feedback all Libaries
    #
    # This will feedback all libraries that are installed by the given
    # program at hand. This of course requires of you to actually pass
    # in the name of the program.
    #
    # Invocation example:
    #
    #   ry htop --all-libraries?
    #
    # ===================================================================== #
    when /^-?-?all(-|_| )?libraries\??$/i,
         /^-?-?libraries\??$/i
      feedback_all_libraries
      exit_program
    # ===================================================================== #
    # === Report how many programs are registered
    #
    # Invocation example:
    #
    #   ry --report-n-programs
    #
    # ===================================================================== #
    when /^-?-?report(-|_| )?n(-|_| )?programs$/i,
         /^-?-?n(-|_| )?programs\??$/i
      report_n_programs
      exit_program
    # ===================================================================== #
    # === Show all programs that dependent on this program
    #
    # This entry point allows the user to show, for example, all
    # programs that have "cmake" as its dependency. In fact: this
    # was the primary use case for adding this functionality. I
    # needed to show all cmake-based programs that are registered
    # in the RBT project.
    #
    # Invocation examples:
    #
    #   rbt --show-programs-with-this-as-dependency=cmake
    #   rbt --dependencies-on=kio
    #
    # ===================================================================== #
    when /^-?-?show(_|-| )?programs(_|-| )?with(_|-| )?this(_|-| )?as(_|-| )?dependency=(.+)$/i, # === $6
         /^-?-?dependencies(_|-| )?on=(.+)$/i # === $2
      _ = $2.to_s.dup
      _ = $6.to_s.dup if $6
      show_programs_with_this_as_dependency(_)
      exit_program
    # ===================================================================== #
    # === Feedback program URL
    #
    # Invocation example:
    #
    #   ry libxrandr url2
    #
    # ===================================================================== #
    when 'url2'
      RBT::Cookbooks::Url.new(compile_which_program?)
      exit_program
    # ===================================================================== #
    # === Compile LLVM with support for clang
    #
    # This entry point exists so that we can compile llvm with clang
    # support. In my opinion LLVM without clang makes only little
    # sense on a full-scale linux system these days, so having clang
    # available by default is a big advantage. (I don't know why they
    # don't bundle the distribution together.)
    #
    # Invocation examples:
    #
    #   ry llvm --include-clang-for-compilation
    #   ry llvm --compile-clang
    #   ry llvm --include-clang-for-compilation --ntrad
    #
    # ===================================================================== #
    when /-?-?include(-|_| )?clang(-|_| )?for(-|_| )?compilation$/i,
         /-?-?compile(-|_| )?clang$/i
      do_include_clang_for_the_llvm_compilation
    # ===================================================================== #
    # === Set permanently extract to
    #
    # This entry point allows us to permanently redefine the extract_to
    # target.
    #
    # In other words, we will permanently determine where to we will
    # extract a given archive to.
    #
    # Usage example:
    #
    #   rbt --permanently_extract_to=pwd
    #   rbt --permanently_extract_to=/Depot
    #   rbt --permanently_extract_to=/tmp
    #   rbt --permanently-set-temp-dir=/user/bioinf4/Temp/
    #   rbt --permanently-set-temp-dir-to=/user/bioinf4/Temp/
    #   rbt --use-this-temp-dir=/Depot/
    #   rbt --use-temp=/Depot
    #
    # ===================================================================== #
    when /^-?-?permanently(-|_| )?extract(-|_| )?to=(.+)$/,                    # This is for $3
         /^-?-?permanently(-|_| )?set(-|_| )?temp(-|_| )?dir=(.+)$/,           # This is for $4
         /^-?-?permanently(-|_| )?set(-|_| )?temp(-|_| )?dir(-|_| )?to=(.+)$/, # This is for $5
         /^-?-?use(-|_| )?temp=(.+)$/                                          # This is for $2
      _ = $2.to_s.dup if $2
      _ = $3.to_s.dup if $3
      _ = $4.to_s.dup if $4
      _ = $5.to_s.dup if $5
      # =================================================================== #
      # We also silently ensure that this directory exists, if it does
      # not yet exist that is.
      # =================================================================== #
      mkdir(_) { :be_quiet } unless File.directory?(_)
      mkdir(_+'rbt/') { :be_quiet } unless File.directory?(_+'rbt/')
      set_permanently_extract_to(_)
      exit_program
    # ===================================================================== #
    # === Permanently extract into the home directory
    #
    # This entry point allows us to extract into the home directory. That
    # way we should be able to easily compile programs in a restricted
    # environment. 
    #
    # Invocation examples:
    #
    #   ry --permanently-extract-to-home
    #   ry --permanently-extract-to-home-dir
    #   ry --extract-to-home
    #
    # ===================================================================== #
    when /^-?-?permanently(-|_)?extract(-|_)?to(-|_)?home$/i,
         /^-?-?permanently(-|_)?extract(-|_)?to(-|_)?home(-|_)?dir$/i,
         /^-?-?extract(-|_)?to(-|_)?home$/i
      set_permanently_extract_to(:home_directory)
      exit_program
    # ===================================================================== #
    # === Compile all of KDE
    #
    # This entry point allows us to compile all of KDE.
    #
    # Invocation example:
    #
    #   rbt --all-of-kde
    #   rbt --compile-all-of-kde
    #
    # ===================================================================== #
    when /^-?-?all(_|-| )?of(_|-| )?kde$/i,
         /^-?-?compile(_|-| )?all(_|-| )?of(_|-| )?kde$/i
      compile_all_of_kde
      exit_program
    # ===================================================================== #
    # === Report the status of the KDE components on this computer
    #
    # This entry point will provide some more information about
    # the KDE components available on the given computer system
    # at hand.
    #
    # Invocation example:
    #
    #   rbt --kde-status
    #
    # ===================================================================== #
    when /^-?-?kde(_|-| )?status$/i,
         /^-?-?report(_|-| )?the(_|-| )?kde(_|-| )?status$/i
      report_the_kde_status
      exit_program
    # ===================================================================== #
    # === rbt --create-simple-version-file
    # ===================================================================== #
    when /^-?-?create(-|_| )?simple(-|_| )?version(-|_| )?file/
      require 'rbt/toplevel_methods/toplevel_methods.rb'
      RBT.create_simple_version_file
      exit_program
    # ===================================================================== #
    # === Show the last updated programs
    #
    # This entry point will simply show the last updated programs.
    #
    # Invocation examples:
    #
    #   ry --last-update
    #
    # ===================================================================== #
    when /^-?-?last(-|_| )?update?$/i
      require 'rbt/toplevel_methods/toplevel_methods.rb'
      e
      e steelblue(RBT.return_string_showing_the_last_updated_programs)+rev
      e
    # ===================================================================== #
    # === Query whether we are on a GoboLinux system
    #
    # This entry point can be used to determine whether the RBT scripts
    # are running on GoboLinux or whether they are not.
    #
    # Invocation examples:
    #
    #   ry --is-on-gobolinux?
    #   ry --are-we-on-gobolinux?
    #
    # ===================================================================== #
    when /^-?-?is(_|-| )?on(_|-| )?gobolinux\?$/i,
         /^-?-?are(_|-| )?we(_|-| )?on(_|-| )?gobolinux?$/i
      report_whether_we_are_on_gobolinux
      exit_program
    # ===================================================================== #
    # === Symlink all upcased programs to downcased variants
    #
    # This entry point will add a symlink for an existing, upcased
    # program directory. For example, /Programs/ZLib will receive
    # a symlink called /Programs/Zlib.
    #
    # Invocation example:
    #
    #   rbt --symlink-upcased-programs
    #
    # ===================================================================== #
    when /^-?-?symlink(_|-| )?all(_|-| )?upcased(_|-| )?programs(_|-| )?to(_|-| )?downcased(_|-| )?variants$/i,
         /^-?-?symlink(_|-| )?upcased(_|-| )?programs$/i,
         /^-?-?symlink(_|-| )?all(_|-| )?programs$/i,
         /^-?-?gobolinux(_|-| )?compatibility$/i,
         /^-?-?downcase(_|-| )?programs$/i,
         /^-?-?downcase-programs(_|-| )?directory$/i
      symlink_all_upcased_programs_to_downcased_variants
    # ===================================================================== #
    # === Upload a ruby binary
    #
    # Use this entry point to upload a ruby binary to a remote FTP site.
    #
    # Usage example:
    #
    #   rbt --upload-ruby-binary
    #
    # ===================================================================== #
    when /(-|_)?(-|_)?upload(-|_)?ruby(-|_)?binary/
      do_upload_ruby_binary
      exit_program
    # ===================================================================== #
    # === Do not use autogen
    #
    # This entry point here can be used to disable the use of autogen.
    #
    # This may sometimes be necessary if you do not want to run the
    # autogen.sh script for example, despite the yaml file associated
    # with the program defaulting to "do use autogen".
    #
    # Note that by default, RBT will not run autogen for most programs -
    # the default for "use autogen" is simply set to false. It is only
    # a few programs that may need a regeneration through autogen
    # anyway.
    #
    # Invocation examples:
    #
    #   ry gtk+ --disable-autogen
    #   ry gtk+ disable-autogen
    #   ry matesystemmonitor disable-autogen
    #
    # ===================================================================== #
    when *ARRAY_HELP_DISABLE_AUTOGEN
      disable_autogen
    # ===================================================================== #
    # === Symlink into the /usr/include/ hierarchy
    #
    # Invocation example:
    #
    #   rbt mpfr ntrad --symlink-headers
    #
    # ===================================================================== #
    when /^-?-?symlink(_|-| )?headers$/,
         /^-?-?symlink(_|-| )?h$/,
         'sheaders'
      verbose_do_symlink_headers_into_usr_include_hierarchy
    # ===================================================================== #
    # === Querying the Configuration Options
    #
    # This entry point allows the user to obtain some feedback
    # about the configuration options used by a given program.
    #
    # This may be the options passed to GNU configure, but also
    # options to cmake or meson - whatever the target program
    # uses.
    #
    # Usage example:
    #
    #   ry glibc qco
    #
    # ===================================================================== #
    when /^query(-|_| )?configuration(-|_| )?options$/,
         /^-?-?qco$/i
      query_configuration_options
    # ===================================================================== #
    # === Generate a large .html file containing all programs version
    #
    # Invocation example:
    #
    #   rbt --create-html-file
    #
    # ===================================================================== #
    when /^-?-?create(-|_| )?html(-|_| )?file$/i,
         /^-?-?create(-|_| )?programs(-|_| )?version(-|_| )?html(-|_| )?file$/i,
         /^-?-?program(-|_| )?versions$/i
      action(:create_programs_version_html_file)
      exit_programming
    # ===================================================================== #
    # === Query to which program a binary belongs to
    #
    # This entry point allows us to query to which program a given
    # locally existing binary belongs to. That way you can e. g.
    # query the /usr/bin/ hierarchy for programs, and the class here
    # will report to which program it belongs to.
    #
    # Invocation examples:
    #
    #   rbt --query-programs
    #   rbt --query-programs?
    #   rbt --attribute?
    # 
    # ===================================================================== #
    when /^-?-?query(-|_| )?programs$/i,
         /^-?-?query(-|_| )?programs\??$/i,
         /^-?-?attribute\??$/i
      require 'rbt/utility_scripts/query_binary_to_package.rb'
      RBT.query_binary_to_package('/usr/bin/')
    # ===================================================================== #
    # == Set to verbose output
    #
    # Invocation example:
    #
    #   ry htop --verbose
    #
    # ===================================================================== #
    when '--verbose','-verbose','verbose','verb','set_verbose','be_verbose',
         'beverbose','setverbose'
      set_be_verbose :report_to_the_user # Second true so we report to the user.
    # ===================================================================== #
    # === Verify the md5sum
    #
    # Examples for md5:
    #
    #   ry gcc3   md5
    #   ry python md
    #   ry ruby   --md
    #
    # ===================================================================== #
    when 'md5',/^-?-?md$/,'mdcheck'
      verbose_md5_checking
      exit_program
    # ===================================================================== #
    # === Run in simulation mode
    #
    # Use this to run a simulation.
    #
    # Invocation example:
    #
    #   ry htop simulation
    #
    # ===================================================================== #
    when *ARRAY_HELP_SIMULATION_MODE_OPTIONS
      enable_simulation('Running in simulation mode. No real '\
                        'action will be performed.')
    # ===================================================================== #
    # === Symlink all the programs
    #
    # If you ever want to symlink all entries under /Programs, this
    # is the way to go.
    #
    # Symlink all programs:
    #
    #   ry htop symlinkall
    #   ry x traverse
    #   ry symlink_every_program
    # 
    # ===================================================================== #
    when *ARRAY_SYMLINK_ALL_PROGRAMS_OPTIONS
      do_symlink_all_programs_then_exit
    # ===================================================================== #
    # === Combine --ntrad and --dontsymlink into the single option --backup
    #
    # This entry point allows the user to just use --backup, rather than
    # combine two options (--ntrad and --dontsymlink). Thus, this is
    # merely a convenience entry point, to allow the user to type
    # less. This functionality was added at 24.11.2020.
    #
    # The name "--backup" is not a great name, though, so be aware that
    # the name may one day change.
    #
    # Usage examples:
    #
    #   ry libx11 --backup
    #   ry metacity --lazyntrad
    #
    # ===================================================================== #
    when /^-?-?backup$/i,
         /^-?-?lazy(_|-| )?ntrad$/i
      do_compile_in_a_non_traditional_way
      do_not_symlink_in_general_and_also_do_not_symlink_header_files
    # ===================================================================== #
    # === rbt --total-size?
    # ===================================================================== #
    when /^-?-?total(-|_| )?size\??$/,
         /^-?-?report(-|_| )?total(-|_| )?size(-|_| )?of(-|_| )?all(-|_| )?archives$/
      require 'rbt/toplevel_methods/report_total_size_of_all_archives.rb'
      RBT.report_total_size_of_all_archives
      exit_program
    # ===================================================================== #
    # === Toggle the debug value
    #
    # This method will toggle the debug value, then query it.
    #
    # Invocation example:
    #
    #   ry htop debug
    #
    # ===================================================================== #
    when *ARRAY_HELP_TOGGLE_DEBUG_VALUE_OPTIONS
      toggle_the_debug_value_then_query_the_debug_value
      exit_program
    # ===================================================================== #
    # === Copy archives to the current working directory
    #
    # This entry point allows us to copy e. g. a directory, such as the
    # archive of ruby (at a local location like "/home/x/src/ruby/",
    # into the current working directory.
    #
    # The basic idea behind this functionality is to be able to quickly
    # copy a select subset of source archives, which we can then
    # transfer via FTP or a local USB device.
    #
    # Invocation examples:
    #
    #   rbt --copy-these-archives=ruby,php,python
    #   rbt --copy-archives=kde5_plasma
    #   rbt --copy-archives=:kde5_plasma
    #
    # ===================================================================== #
    when /^-?-?copy(-|_| )?these(-|_| )?archives=(.+)$/i,
         /^-?-?copy(-|_| )?archives=(.+)$/i
      these_programs = $2.to_s.dup
      these_programs = $3.to_s.dup if $3 # ← Valid for the first regex-entry above.
      copy_these_archives(these_programs)
      exit_program
    # ===================================================================== #
    # === Use a specific prefix
    #
    # This entry point allows us to quickly use a specific prefix.
    #
    # Invocation example:
    #
    #   ry coreutils --use-this-prefix=/Depot/Chroot/usr/
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?this(_|-| )?prefix=(.+)$/i # $3
      set_user_prefix($3.to_s.dup)
    # ===================================================================== #
    # === Installed files
    #
    # This will tell us which files are to be installed. For this
    # to work, we will load the .yml file.
    #
    # Usage example:
    #
    #   ry htop --show_which_files_will_be_installed
    #
    # ===================================================================== #
    when '--installed-files?',
         /^-?-?show(_|-| )?which(_|-| )?files(_|-| )?will(_|-| )?be(_|-| )?installed$/,
         'ifiles',
         '--installed-files',
         '--installedfiles'
      show_which_files_will_be_installed
      exit_program
    # ===================================================================== #
    # === Replace Symlinks
    #
    # Use this to replace the symlinks, using RBT::ReplaceSymlinks.
    # Then we will exit.
    #
    # Usage example:
    #
    #   ry --replace_symlinks
    #
    # ===================================================================== #
    when *ARRAY_HELP_REPLACE_SYMLINKS_OPTIONS
      replace_symlinks
      exit_program
    # ======================================================================= #
    # === Batch-install all registered python-addons
    #
    # This entry point allows us to batch-install the registered python
    # components. This functionality exists mostly due to convenience.
    #
    # Invocation examples:
    #
    #   rbt --compile-python-addons
    #   rbt --enable-python-addons
    #   rbt --python-addons
    #   rbt --all-of-python
    #   rbt --install-python-addons
    #
    # ======================================================================= #
    when /^-?-?compile(-|_| )?python(-|_| )?addons$/i,
         /^-?-?python(-|_| )?addons$/i, # ry --python-addons
         /^-?-?compile(-|_| )?all(-|_| )?of(-|_| )?python$/i,
         /^-?-?compile(-|_)?python(-|_)?addons$/,
         /^-?-?all(-|_)?of(-|_)?python$/,
         /^-?-?install(-|_)?python(-|_)addons?$/
      do_ignore_the_errors
      compile_the_python_addons
    # ===================================================================== #
    # === Enable python3
    #
    # Invocation example:
    #
    #   rbt --enable_python3
    #
    # ===================================================================== #
    when /^-?-?enable(-|_| )?python3$/
      enable_python3
    # ===================================================================== #
    # === Download the Source of a given program at hand
    #
    # Do not build, just fetch the source. This is sort of equivalent to
    # applying "wget".
    #
    # Usage example:
    #
    #   ry htop --dload
    #   ry ruby dload
    #
    # ===================================================================== #
    when *ARRAY_HELP_DOWNLOAD_THE_SOURCE_OPTIONS
      ensure_that_the_cookbook_dataset_exists(first_argument?)
      # =================================================================== #
      # First check whether we may actually download the remote archive
      # or not.
      # =================================================================== #
      if may_we_download?
        _ = cookbook_dataset_base_dir?
        mkdir _ unless File.exist? _
        default_download_then_exit
      else
        orev "We are not allowed to download "\
             "#{teal(compile_which_program?.to_s)}."
        orev "The method #{royalblue('may_we_download?')}"\
             "#{rev} determined this, via a configuration setting."
        exit_program
      end
    # ===================================================================== #
    # === Compile a base system for Linux
    #
    # This entry point taps into class RBT::CompileBaseSystem,
    # which will compile the programs for a typical Linux base
    # system, into an AppDir prefix.
    #
    # Invocation examples:
    #
    #   rbt --compile-base-system
    #   rbt --compile-basic-system
    #
    # ===================================================================== #
    when /^-?-?compile(_|-| )?base(_|-| )?system$/,
         /^-?-?compile(_|-| )?basic(_|-| )?system$/,
         /^-?-?compile(_|-| )?basic(_|-| )?subsystem$/,
         /^-?-?compile(_|-| )?basic(_|-| )?linux(_|-| )?core$/,
         /^-?-?compile(_|-| )?basic(_|-| )?linux$/
      require 'rbt/utility_scripts/compile_base_system.rb'
      RBT::CompileBaseSystem.report_which_programs_may_be_compiled
      RBT::CompileBaseSystem.new
      exit_program
    # ===================================================================== #
    # === Display the total file size of all locally available files
    #
    # Invocation example:
    #
    #   rbt --total-size-of-locally-available-files
    #
    # ===================================================================== #
    when /^-?-?total(-|_| )?size(-|_| )?of(-|_| )?locally(-|_| )?available(-|_| )?files$/
      report_total_size_of_locally_available_files
      exit_program
    # ===================================================================== #
    # === What will be installed
    #
    # Usage example:
    #
    #   ry htop --installs_what?
    #
    # ===================================================================== #
    when /^-?-?installs(_|-| )?what\??$/i,
         'iwhat?'
      feedback_all_libraries_and_all_binaries
      exit_program
    # ===================================================================== #
    # === Run a specific postinstallation action, then exit
    #
    # This entry point allows the user to run a particular
    # postinstall action only.
    #
    # Usage example:
    #
    #   rbt --postinstall-for=docbookxsl
    #   rbt --postinstall-for=littleutils
    #
    # ===================================================================== #
    when /^-?-?postinstall(_|-| )?for=(.+)$/i
      this_program = $2.to_s.dup
      orev "Initializing the dataset for the program "\
           "#{steelblue(this_program)}."
      initialize_dataset_for(this_program)
      do_postinstall_actions(true)
      # postinstall?.each {|entry|
      #   e steelblue(entry)
      #   system(entry)
      # }
      exit_program
    # ===================================================================== #
    # === Compile mouse-components
    #
    # This entry point can be used to compile all mouse-relevant parts
    # of xorg. It is mostly just a quick hackish way to get mouse
    # support in, after the xorg-server was compiled/installed.
    #
    # Invocation example:
    #
    #   rbt --mouse
    #
    # ===================================================================== #
    when /^-?-?mouse$/i
      compile_mouse_components
    # ===================================================================== #
    # === Set another prefix
    #
    # This variant will make use of a regex capture group.
    #
    # Invocation example:
    #
    #   rbt xfce4panel --prefix=:xfce
    #   rbt xfce4panel :xfce
    #   rbt htop --use-this-appdir=/Programs/Bla/1.2.3
    #
    # ===================================================================== #
    when /^-?-?prefix=(.+)/, # for $1
         /^(:.+)/,           # for $1
         /^-?-?use(-|_)?this(-|_)?appdir=(.+)$/i # for $3
      _ = $1.to_s.dup
      _ = $3.to_s.dup if $3
      set_user_prefix(_)
    # ===================================================================== #
    # === Do not make install
    #
    # This entry point will skip the "make install" step.
    #
    # Invocation examples:
    #
    #   ry gcc dontmakeinstall
    #   ry gcc --skip-make-install
    #
    # ===================================================================== #
    when /^-?-?dont(-|_| )?make(-|_| )?install$/i,
         /^-?-?skip(-|_| )?make(-|_| )?install$/i
      dont_make_install
    # ===================================================================== #
    # === Do not run a GNU configure script
    #
    # Skip running a configure script. This may be necessary for
    # entries that solely rely on "make" and "make install".
    #
    # Usage example:
    #
    #   ry htop --skip_configure
    #
    # ===================================================================== #
    when /^-?-?skip(_|-| )?configure$/i,
         'skipconfigure','sconfigure','skip','skipconf',
         'dontconfigure','skipc',
         'sc',
         'dconf',
         'dcon',
         'dconfigure',
         /^-?-?do(-|_| )?not(-|_| )?run(-|_| )?configure$/i,
         /^-?-?do(-|_| )?not(-|_| )?run(-|_| )?configure(-|_| )?script$/i,
         /^-?-?skip(-|_| )?configure$/i
      do_not_run_configure
    # ===================================================================== #
    # === Install only headers
    #
    # Use this to install only the headers of a particular program.
    #
    # Usage example:
    #
    #   ry gmp --only-headers
    #
    # ===================================================================== #
    when /^-?-?install(_|-| )?only(_|-| )?headers$/,
         /^-?-?only(_|-| )?headers$/,
         /^-?-?do(_|-| )?install(_|-| )?only(_|-| )?the(_|-| )?headers$/,
         'headers',
         'header'
      do_install_only_the_headers
    # ===================================================================== #
    # === Repackage archives
    #
    # This entry point can be used to repackage an archive file.
    #
    # Repackaging means to, e. g., change the archive format from
    # .tar.gz to .tar.xz.
    #
    # Usage example:
    #
    #   rbt --repackage=poppler-0.73.0.tar.gz
    #
    # ===================================================================== #
    when /^-?-?repackage=(.+)$/
      _ = $1.to_s.dup
      if File.exist? _
        repackage_this(_)
      else
        opnn; no_file_exists_at(_)
      end
    # ===================================================================== #
    # === Feedback program version
    #
    # Use this to feedback the specific program version, that is,
    # the version that is specified in the specific yaml file
    # belonging to a program.
    #
    # Invocation examples:
    #
    #   ry glibc version?
    #   ry gcc version?
    #
    # =>   5.3.0
    # ===================================================================== #
    when *ARRAY_HELP_FEEDBACK_PROGRAM_VERSION_OPTIONS
      feedback_program_version
      exit_program
    # ===================================================================== #
    # === Use the working directory as input for everything
    #
    # This entry point allows us to simply use information gathered by
    # the current working directory as input.
    #
    # An example for such a directory would be:
    #
    #   /Depot/j/libxkbcommon-0.10.0/
    #
    # Invocation example:
    #
    #   ry --use-current-working-directory-as-input
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?current(-|_| )?working(-|_| )?directory(-|_| )?as(-|_| )?input$/
      # =================================================================== #
      # The variable _ may look like this: "/Depot/j/libxkbcommon-0.10.0/"
      # =================================================================== #
      _ = File.basename(return_pwd)
      do_skip_extracting
      do_not_download
      set_extract_to File.dirname(return_pwd)
      set_configure_base_directory(return_pwd)
      program_information = ProgramInformation.new(_)
      @internal_hash[:program_version] = program_information.version?
      @internal_hash[:program_name]    = program_information.program_name?
      @internal_hash[:short_name]      = program_information.short_name?
      @internal_hash[:base_dir]        = rds(return_pwd)
      set_compile_this_program(@internal_hash[:short_name])
      set_compile_these_programs(@internal_hash[:short_name])
      @internal_hash[:cd_into_the_rbt_log_directory] = false
      cd @internal_hash[:configure_base_directory]
    # ===================================================================== #
    # === rbt --use-syck
    #
    # This entry point allows the user to permanently use syck rather than
    # psych, for yaml files. Almost nobody will need this these days,
    # but for legacy reason this entry point will be available.
    # ===================================================================== #
    when /^-?-?use(-|_| )?syck$/i,
         /^-?-?permanently(-|_| )?use(-|_| )?syck$/i
      do_permanently_use_syck
      exit_program
    # ===================================================================== #
    # === Querying whether porg is available on the given computer system
    #
    # Invocation example:
    #
    #   rbt --is_porg_available?
    #
    # ===================================================================== #
    when /^-?-?is(_|-| )?porg(_|-| )?available\??$/i
      report_whether_porg_is_available
      exit_program
    # ===================================================================== #
    # === Enable porg
    #
    # Use this specifically to enable porg for the specific program
    # at hand.
    # ===================================================================== #
    when /-?-?enable(-|_)?porg/,
         /-?-?use(-|_)?porg/,
         /-?-?do(-|_)?use(-|_)?porg/,
         /-?-?enable(-|_)?porg/,
         /-?-?use(-|_)?paco/,
         /--paco$/,
         /--porg$/
      verbose_enable_porg
      exit_program
    # ===================================================================== #
    # === Disable porg
    #
    # Through this entry point you can disable porg. You can also do so
    # via the configuration files, but an ad-hoc commandline way like
    # this one here also exists. 
    # ===================================================================== #
    when /^-?-?disable(-|_)?porg$/i,
         /^-?-?no(-|_)?porg$/i
      disable_porg
    # ===================================================================== #
    # === Querying whether RBT will symlink .gir files
    #
    # Invocation example:
    #
    #   rbt --symlink-gir-files?
    #
    # ===================================================================== #
    when /^-?-?symlink(-|_| )?gir(-|_| )?files\?$/i
      e symlink_gir_files?
    # ===================================================================== #
    # === Output how many processors the local computer system has
    #
    # Use this entry point if you wish to find out how many
    # processors/core the target machine has.
    #
    # Invocation examples:
    #
    #   rbt --n-processors?
    #   rbt --n-cores?
    #   Installer --n-cores?
    #
    # ===================================================================== #
    when /^-?-?n(_|-| )?processors\??$/i,
         /^-?-?n(_|-| )?cores\??$/i,
         /^-?-?n(-|_| )?CPU\??$/i
      try_to_output_how_many_processors_this_computer_has
      exit_program
    # ===================================================================== #
    # === Feedback all available licenses
    #
    # Use this to feedback all available licenses.
    #
    # Usage examples:
    #
    #   ry --all_licenses
    #   ry gcc license lgpl
    #
    # ===================================================================== #
    when *ARRAY_HELP_VIEW_AVAILABLE_LICENSES_OPTIONS
      feedback_licenses
      exit_program
    # ===================================================================== #
    # === Show missing use-this-build-system programs
    #
    # This entry point allows the user to show which registered programs
    # in the RBT suite are missing a build-system definition. 
    #
    # Invocation examples:
    #
    #   rbt --missing-use-this-build-system
    #
    # ===================================================================== #
    when /^-?-?missing(_|-| )?use(_|-| )?this(_|-| )?build(_|-| )?system$/,
         /^-?-?missing(_|-| )?build(_|-| )?system$/
      show_missing_use_this_build_system_entry
      exit_program
    # ===================================================================== #
    # === Show how to compile KDE
    #
    # This entry point will give some help as to how to compile KDE.
    #
    # Invocation examples:
    #
    #   rbt --how-to-compile-kde?
    #   rbt --show-how-to-compile-kde
    #
    # ===================================================================== #
    when /^-?-?how(_|-| )?to(_|-| )?compile(_|-| )?kde\??$/,
         /^-?-?show(_|-| )?how(_|-| )?to(_|-| )?compile(_|-| )?kde\??$/
      show_how_to_compile_kde
      exit_program
    # ===================================================================== #
    # === Show compile time statistics
    #
    # This entry point will display on the commandline some
    # compile-statistics, that is how long it took to compile
    # this or that particular program at hand.
    #
    # Usage examples:
    #
    #   rbt --show-compile-times
    #   rbt --show-compile-time-statistics
    #   rbt --compile-time?
    #
    # ===================================================================== #
    when /^-?-?show(-|_| )?compile(-|_| )?times$/,
         /^-?-?show(-|_| )?compile(-|_| )?time(-|_| )?statistics/,
         /^-?-?compile(-|_| )?times\??/,
         /^-?-?compile(-|_| )?stats$/,
         /^-?-?compile(-|_| )?time\??$/,
         /^-?-?compile(-|_| )?statistics\??$/i
      show_compile_time_statistics
      exit_program
    # ===================================================================== #
    # === rbt matplotlib --main-yaml
    #
    # This is essentially the same as using :simple for the cookbook
    # dataset.
    #
    # Invocation example:
    #
    #   newrbt python --main-yaml
    #
    # ===================================================================== #
    when /^-?-?main(-|_| )?yaml$/i
      set_simple_or_complex(:simple)
    # ===================================================================== #
    # === Do not pass any parameters to make
    #
    # This will specifically set things to false.
    #
    # Usage example:
    #
    #   ry patchelf --no-parameters-to-make --opt
    #
    # ===================================================================== #
    when /^-?-?no(_|-| )?parameters(_|-| )?to(_|-| )?make$/i
      @internal_hash[:parameters_to_make] = false
      orev 'No parameters will be passed to "'+
           steelblue('make')+rev+'".'
    # ===================================================================== #
    # === Use traditional compilation (/usr/ as the prefix)
    #
    # This entry point allows us to compile in a traditional way,
    # via /usr/ as the main prefix.
    #
    # Invocation example:
    #
    #   rbt php --trad
    #
    # ===================================================================== #
    when /^-?-?trad$/i
      ensure_that_a_cookbook_object_has_been_instantiated
      orev 'Enabling /usr/ as prefix.'
      set_prefix('/usr/')
    # ===================================================================== #
    # === rbt --expand
    # ===================================================================== #
    when /^-?-?expand$/i,
         /^-?-?expand(-|_)?dataset$/i,
         /^-?-?initialize$/
      action(:ExpandCookbooks)
      exit_program
    # ===================================================================== #
    # === Report BLFS entries
    #
    # This entry point can be used to report all entries that have a
    # BLFS tag.
    #
    # Invocation example:
    #
    #   rbt --blfs2
    #
    # ===================================================================== #
    when /^report(-|_)?all(-|_)?blfs(-|_)?entries/,
         /^-?-?blfs2$/i
      report_all_blfs_entries
      exit_program
    # ===================================================================== #
    # === Generate the shell script containing all program versions
    #
    # Usage example:
    #
    #   ry --all_available_programs?
    #
    # ===================================================================== #
    when /^-?-?generate(-|_| )?the(-|_| )?shell(-|_| )?scripts$/i
      require 'rbt/shell/create_shell_script_containing_these_program_versions.rb'
      RBT::CreateShellScriptContainingTheseProgramsVersions.new('--everything')
      exit_program
    # ===================================================================== #
    # === Show all configure options
    #
    # This will show a beautiful summary of the configure options.
    #
    # Invocation example:s
    #
    #   ry htop allconfigureoptions?
    #   ry htop --so-pretty
    #
    # ===================================================================== #
    when /-?-?all(_|-| )?configure(_|-| )?options\??/,
         '--beautify','--configure_help','do_beautify',
         'dobeautify',
         /-?-?pretty/,
         '--beauty','--so-pretty'
      all_configure_options?
    # ===================================================================== #
    # === Get compile-instructions from a locally existing file
    #
    # This entry point can be used to use the content of a file for
    # determining which programs should be compiled. That way you
    # may have a bit more flexibility, such as when another ruby
    # script generates this file, which can then be used by RBT.
    #
    # In fact, this is the original use case why this method has been
    # created in the first place.
    #
    # The file can handle .yml files too, where we will use YAML.load_file()
    # to load the content, rather than File.read() or File.readlines().
    #
    # Invocation examples:
    #
    #   rbt --upgrade-from-this-file=/Depot/jjj/these_programs_can_be_upgraded.yml
    #   rbt --upgrade-from-this-file=:default
    #   rbt --upgrade-from-this-file=:def
    #
    # ===================================================================== #
    when /^-?-?upgrade(-|_| )?from(-|_| )?this(-|_| )?file=(.+)$/i # See: http://rubular.com/r/HjEJRwWc4f
      this_file = $4.to_s.dup
      do_upgrade_from_this_file(this_file)
    # ===================================================================== #
    # === Speed up compilation via make -jNUMBER
    #
    # This will automatically use the "-j" option that equals the
    # number of processors that the current computer has.
    #
    # Invocation example:
    #
    #   ry flac ntrad --speed-up-the-compilation
    #
    # ===================================================================== #
    when /^-?-?speed(_|-| )?up(_|-| )?the(_|-| )?compilation$/i,
         /^-?-?speed(_|-| )?up(_|-| )?compilation$/
      speed_up_the_compilation
    # ===================================================================== #
    # === Show the last compiled programs
    #
    # Usage example:
    #
    #   rbt --last-5-compiled?
    #
    # ===================================================================== #
    when *ARRAY_HELP_FEEDBACK_LAST_COMPILED_OPTIONS,
         /^lastcompiled\?=$/,
         /^-?-?last-compiled\?=$/,
         /^-?-?last(-\d+-)compiled\?$/
      feedback_last_compiled(i)
      exit_program
    # ===================================================================== #
    # === Do not use maximum speed
    #
    # Entry point:
    #
    #   ry lame --do-not-use-maximum-speed
    #   ry xvidcore --ntrad --donot-use-maximum-speed
    #
    # ===================================================================== #
    when /^-?-?do(_|-| )?not(_|-| )?use(_|-| )?maximum(_|-| )?speed$/i,
         /^-?-?no(_|-| )?auto(_|-| )?speedup$/i,
         /^-?-?dont(_|-| )?use(_|-| )?maximum(_|-| )?speed$/i
      verbose_disable_maximum_speed_for_compilation
    # ===================================================================== #
    # === Use a simpler entry-point for the basic-gcc profile/decorator
    # ===================================================================== #
    when /^-?-?basic(-|_)?gcc$/i,
         /^-?-?gcc(-|_)?profile1$/i
      try_to_use_this_profile(:basic_gcc)
    # ===================================================================== #
    # === Show important status information
    #
    # Invocation examples:
    #
    #   rbt --report-status
    #   rbt --report
    #
    # ===================================================================== #
    when /^-?-?report(-|_| )?status$/i,
         /^-?-?report$/i
      report_status_information
    # ===================================================================== #
    # === Where to store log files
    #
    # Use this entry point to report where RBT will store logfiles.
    #
    # Invocation examples:
    #
    #   rbt log_dir?
    #   rbt --log_dir?
    #
    # ===================================================================== #
    when *ARRAY_HELP_LOG_DIR_OPTIONS
      report_where_we_store_then_exit
    # ===================================================================== #
    # === Inclusion check
    #
    # Invocation examples:
    #
    #   ry php  --included?
    #   ry php2 --included?
    #   ry ruby --included?
    #
    # ===================================================================== #
    when *ARRAY_HELP_INCLUDED_OPTIONS
      report_whether_this_program_is_included_or_whether_it_is_not(program?)
      exit_program
    # ===================================================================== #
    # === Check for inclusion
    #
    # Check whether our entries in $SRC are included in our cookbooks too.
    #
    # Hence, you can use a dummy name like "x" for this:
    #
    #   ry x inclusions?
    #   ry htop check_for_inclusion
    #
    # ===================================================================== #
    when /^-?-?check(_|-| )?for(_|-| )?inclusion$/i,
         'inclusions','inclusions?',
         'cinc','inc?','cure','not_included?',
         'cinc?','all_not_included?'
      check_for_inclusion
      exit_program
    # ===================================================================== #
    # === Show everything about a registered program
    #
    # This entry point will show, on the commandline, the content
    # of the queried program. This allows you to quickly show
    # the .yml file that is associated with a given program at
    # hand.
    #
    # Usage example:
    #
    #   rbt --show-all-about=ruby
    #
    # ===================================================================== #
    when /^-?-?show(-|_)?all(-|_)?about=(.+)$/
      show_all_about($3.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Enable stow
    #
    # Enable stow via this option.
    #
    # Invocation example:
    #
    #   ry --enable-stow
    #
    # ===================================================================== #
    when /-?-?enable-?stow/
      enable_stow
      exit_program
    # ===================================================================== #
    # === Use an environment variable
    #
    # This method will use a specific environment variable as the
    # new prefix to be used.
    #
    # Do note that class RBT::CompileViaEnvironmentVariableAsPrefix can
    # also be used as an alternative.
    #
    # In order to use this entry point, try:
    #
    #   ry htop --use-this-environment-variable=XFCE_PREFIX
    #   ry xfce4screensaver --use-this-environment-variable=XFCE_PREFIX
    #   ry libxfce4util --use-this-environment-variable=XFCE_PREFIX
    #   ry xfconf --use-this-environment-variable=XFCE_PREFIX
    #   ry exo --use-this-environment-variable=XFCE_PREFIX
    #   ry garcon --use-this-environment-variable=XFCE_PREFIX
    #   ry libxfce4ui --use-this-environment-variable=XFCE_PREFIX
    #   ry xfce4panel --use-this-environment-variable=XFCE_PREFIX
    #   ry thunar --use-this-environment-variable=XFCE_PREFIX
    #   ry xfce4appfinder --use-this-environment-variable=XFCE_PREFIX
    #   ry xfce4session --use-this-environment-variable=XFCE_PREFIX
    #   ry xfdesktop --use-this-environment-variable=XFCE_PREFIX
    #   ry xfceengine --use-this-environment-variable=XFCE_PREFIX
    #   ry xfwm4 --use-this-environment-variable=XFCE_PREFIX
    #   ry xfmedia --use-this-environment-variable=XFCE_PREFIX
    #   ry xfce4devtools --use-this-environment-variable=XFCE_PREFIX
    #   ry xfce4settings --use-this-environment-variable=XFCE_PREFIX
    #   ry xfce4cpufreqplugin --use-this-environment-variable=XFCE_PREFIX
    #   ry xfce4panelprofiles --use-this-environment-variable=XFCE_PREFIX
    #   ry matedesktop  --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry libmatemixer --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry libmateweather --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry matemenus --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry matepanel --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry matenetbook --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry matemedia --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry marco --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry libmatekbd --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry matesensorsapplet --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry matesettingsdaemon --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry caja --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry cajaextensions --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry engrampa --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry eom --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry mateutils --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry pluma --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry mateterminal --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #   ry matecontrolcenter --use-this-environment-variable=MATE_DESKTOP_PREFIX
    #
    # Or:
    #
    #   env_compile_via_prefix libxfce4util
    #   env_compile_via_prefix xfconf
    #   env_compile_via_prefix exo
    #   env_compile_via_prefix garcon
    #   env_compile_via_prefix libxfce4ui
    #   env_compile_via_prefix xfce4panel
    #   env_compile_via_prefix thunar
    #   env_compile_via_prefix xfce4appfinder
    #   env_compile_via_prefix xfce4session
    #   env_compile_via_prefix xfdesktop
    #   env_compile_via_prefix xfceengine
    #   env_compile_via_prefix xfwm4
    #   env_compile_via_prefix xfmedia
    #   env_compile_via_prefix xfce4devtools
    #   env_compile_via_prefix xfce4settings
    #   env_compile_via_prefix xfce4cpufreqplugin
    #   env_compile_via_prefix xfce4panelprofiles
    #   env_compile_via_prefix xfce4screensaver
    #   env_compile_via_prefix xfce4notifyd
    #   env_compile_via_prefix xfce4screenshooter
    #   env_compile_via_prefix xfce4systemloadplugin
    #   env_compile_via_prefix xfce4whiskermenuplugin
    #   env_compile_via_prefix xfce4taskmanager
    #
    # or
    #
    #   env_compile_via_prefix matedesktop MATE
    #   env_compile_via_prefix libmatemixer MATE
    #   env_compile_via_prefix libmateweather MATE
    #   env_compile_via_prefix matemenus MATE
    #   env_compile_via_prefix matepanel MATE
    #   env_compile_via_prefix matenetbook MATE
    #   env_compile_via_prefix matemedia MATE
    #   env_compile_via_prefix marco MATE
    #   env_compile_via_prefix libmatekbd MATE
    #   env_compile_via_prefix matesensorsapplet MATE
    #   env_compile_via_prefix matesettingsdaemon MATE
    #   env_compile_via_prefix matecontrolcenter MATE
    #   env_compile_via_prefix caja MATE
    #   env_compile_via_prefix cajaextensions MATE
    #   env_compile_via_prefix engrampa MATE
    #   env_compile_via_prefix eom MATE
    #   env_compile_via_prefix mateutils MATE
    #   env_compile_via_prefix pluma MATE
    #   env_compile_via_prefix mateterminal MATE
    #
    # ===================================================================== #
    when /^-?-?use(-|_)?this(-|_)?environment(-|_)?variable=/,
         /^-?-?use(-|_)?environment(-|_)?variable=/
      use_this_environment_variable(i)
    # ===================================================================== #
    # === Show the commandline-tutorial for the RBT project
    #
    # Invocation example:
    #
    #   rbt --tutorial
    #
    # ===================================================================== #
    when /^-?-?tutorial$/i
      require 'rbt/toplevel_methods/tutorial.rb'
      RBT.show_tutorial
    # ===================================================================== #
    # === Report the total size of all archives
    #
    # Invocation example:
    #
    #   rbt --report_total_size_of_all_archives
    #
    # ===================================================================== #
    when /^-?-?report(_|-| )?total(_|-| )?size(_|-| )?of(_|-| )?all(_|-| )?archives$/i
      require 'rbt/toplevel_methods/report_total_size_of_all_archives.rb'
      RBT.report_total_size_of_all_archives
    # ===================================================================== #
    # === Finding all Archives
    #
    # This entry point can be used to find all local archives.
    #
    # Finding all Archives:
    #
    #   ry --archives?
    #
    # ===================================================================== #
    when /^-?-?find_?all_?archive_?types/,
         'farchives',
         /^-?-?archives\??/
      require 'rbt/cookbooks/find_all_archive_types.rb'
      _ = RBT::Cookbooks::FindAllArchiveTypes.new(:do_not_run_yet)
      _.be_silent
      _.run_and_report
      exit_program
    # ===================================================================== #
    # === Make use of system() rather than IO.popen()
    #
    # Invocation example:
    #
    #   ry glade trad --use-simple-system
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?simple(-|_| )?system$/i,
         /^-?-?use(-|_| )?simple(-|_| )?system(-|_| )?calls$/i,
         /^-?-?use(-|_| )?plain(-|_| )?system$/i,
         /^-?-?use(-|_| )?system$/i
      orev 'Making use of system() calls rather than IO.popen() from now on.'
      @internal_hash[:use_which_system_command] = :system
    # ===================================================================== #
    # === Do not compile
    #
    # The following instruction will run configure, but not make.
    #
    # Invocation examples:
    #
    #   ry gcc dont_compile
    #   ry htop dc
    #
    # ===================================================================== #
    when *ARRAY_HELP_DO_NOT_COMPILE_OPTIONS
      do_not_compile
      do_not_run_configure
      skip_postinstall_actions
    # ===================================================================== #
    # === Generate a slack-desc file
    #
    # Usage examples:
    #
    #   ry htop --gsc
    #   ry ruby slack-desc-file
    #
    # ===================================================================== #
    when *ARRAY_HELP_GENERATE_SLACK_DESC_FILE
      generate_slack_desc_file_for_this_program(program?)
      exit_program
    # ===================================================================== #
    # === Find all archives
    #
    # Invocation example:
    #
    #   ry --archives?
    #
    # ===================================================================== #
    when *ARRAY_HELP_FIND_ALL_ARCHIVES
      find_all_archive_types
      exit_program
    # ===================================================================== #
    # === Remove all temporary directories
    #
    # This entry point will get rid of all directories found at the
    # /Depot/Temp/ hierarchy - or whever else you have defined your
    # temp hierarchy to reside.
    #
    # Why is this entry point useful? Well, sometimes this directory
    # may be a bit messy, so this entry point allows you a simple
    # way to "start over". We only remove directories because these
    # may include stray object files or cmake-cache files and so on.
    #
    # Invocation example:
    #
    #   ry --remove-all-temp-directories
    #
    # ===================================================================== #
    when /^-?-?remove(_|-| )?all(_|-| )?temp-directories$/,
         /^-?-?purge(_|-| )?old(_|-| )?directories$/,
         /^-?-?purge(_|-| )?old(_|-| )?dirs$/,
         /^-?-?purge(_|-| )?base(_|-| )?directory$/,
         /^-?-?purge(_|-| )?base(_|-| )?dir$/,
         /^-?-?clear(_|-| )?temp(_|-| )?dir$/,
         /^-?-?purge(_|-| )?directories$/,
         /^-?-?purge(_|-| )?dirs$/,
         /^-?-?purge(_|-| )?dir$/,
         /^-?-?purge(_|-| )?base(_|-| )?dirs$/,
         /^-?-?purge(_|-| )?temp(_|-| )?dir$/,
         /^-?-?purge$/
      remove_all_temp_directories
      exit_program
    # ===================================================================== #
    # === Use /usr/lib64 as libdir target
    #
    # This entry point allows the user to make use of /usr/lib64/
    # as the libdir-prefix in use.
    #
    # Usage example:
    #
    #   ry libgpgerror --libdir64
    #
    # ===================================================================== #
    when /^-?-?libdir64$/i,
         /^-?-?dir64$/i,
         /^-?-?lib64$/i,
         /^-?-?64dir$/i,
         /^-?-?lib2$/i
      do_use_libdir64
    # ===================================================================== #
    # === Compile every program
    #
    # Here we will try to compile every program that is part of our
    # database.
    #
    # Invocation example:
    #
    #   ry --compile_all
    #
    # ===================================================================== # 
    when /^-?-?compile(_|-| )?all$/,
         /^-?-?compile(_|-| )?all(_|-| )?programs$/,
         'all',
         'rall'
      compile_all_programs(:do_exit_afterwards) # Argument true for "shall we exit".
    # ===================================================================== #
    # === Do not keep the archive
    #
    # After extracting and compiling, we will get rid of the archive
    # again. We will get rid of the archive independent over whether
    # the installation process was a success or whether it was not,
    # mind you. 
    #
    # Usage examples:
    #
    #   ry htop --remove-archive
    #   ry htop dontkeeparchive
    #
    # ===================================================================== #
    when *ARRAY_HELP_DONT_KEEP_EXTRACTED_OPTIONS
      set_dont_keep_archive # Remove archive(s) after a successful build.
    # ===================================================================== #
    # === Download a remote program into a given directory at hand
    #
    # This entry point allows us to download a remote program into
    # a local directory.
    #
    # Invocation example:
    #
    #   rbt htop --download-into-this-directory=/opt/bla2/
    #
    # ===================================================================== #
    when /^-?-?download(-|_| )?into(-|_| )?this(-|_| )?directory=(.+)$/
      _ = $4.to_s.dup
      url = url1?
      download_this_remote_url_into_that_local_directory(url, _)
    # ===================================================================== #
    # === Show the .pc files installed by the program at hand
    #
    # If you want to find out which .pc files are installed by the
    # program at hand, this entry point allows you to do so.
    #
    # Issue something similar to the following usage examples:
    #
    #   ry glib --pkgconfig-files?
    #   ry samba --pkgconfig-files?
    #   ry poppler pkgconfig_files?
    #
    # ===================================================================== #
    when /^-?-?pkgconfig(_|-| )?files\??/,
         /^-?-?show(_|-| )?pkgconfig(_|-| )?files/
      show_pc_files_installed_by_this_program(compile_which_program?)
      exit_program
    # ===================================================================== #
    # === Purge FHS binaries of a specific program
    #
    # This will delete all binaries under /usr/bin/ hierarchy of the
    # given program at hand.
    #
    # It currently depends on all registered programs in the yaml file.
    # In principle we could also work on existing bin/ files in the
    # AppDir hierarchy, but for now, let's stick to the yaml file instead.
    #
    # Invocation examples:
    #
    #   ry littleutils --purge-fhs-binaries
    #   ry --purge-traditional-binaries-from=xscreensaver
    #   ry --purge-traditional-binaries-of=gnupg
    #   ry --purge-traditional-binaries-of=flac
    #
    # ===================================================================== #
    when /^-?-?purge-?fhs-?binaries$/i,
         /^-?-?purge-?traditional-?binaries-?from=(.+)/i,
         /^-?-?purge-?fhs-?binaries-?from=(.+)/i,
         /^-?-?purge-?fhs-?binaries=(.+)/i,
         /^-?-?fhs-?purge=(.+)/i,
         /^-?-?purge-?binaries-?of=(.+)/i,
         /^-?-?purge(-|_)?traditional(-|_)?binaries(-|_)?of=(.+)$/i
      _ = nil
      _ = $1 if $1
      _ = $4 if $4 # This is for the last entry.
      _ = program_name? if _.nil?
      verbose_purge_fhs_binaries_of_this_program(_.to_s.dup)
      exit_program
    # ===================================================================== #
    # === No man pages
    #
    # Use this subsection to get rid of all manpages in the /Programs/
    # hierarchy. Invoke this only when you are sure to not need these
    # man-pages.
    #
    # Usage example:
    #
    #   rbt --no-man-pages
    #
    # ===================================================================== #
    when *ARRAY_HELP_PURGE_ALL_MAN_ENTRIES
      purge_all_man_files_in_the_programs_hierarchy
      exit_program
    # ===================================================================== #
    # === Feedback everything
    #
    # Feedback EVERY available information.
    #
    # This is the most important option for feedback. It chains the
    # existing feedback options together.
    #
    # Usage example:
    #
    #   ry ruby --feedback_all
    #
    # ===================================================================== #  
    when 'ud','fall','uv','vu','info','lal','aall','al','aa','info?',
         '?',/^-?-?feedback(-|_)?all$/,'allinfo','everything',
         'feedback_everything','feedbackeverything'
      feedback_all # Wrapper.
      exit_program
    # ===================================================================== #
    # === Purge all binaries of the given program at hand
    #
    # This entry point will remove all binaries of the given input
    # program at hand under /usr/bin/.
    #
    # Invocation examples:
    #
    #   rbt poppler --purge-its-binaries
    #   rbt vim --purge-binaries
    #
    # ===================================================================== #
    when /^-?-?purge(-|_| )?its(-|_| )?binaries$/,
         /^-?-?purge(-|_| )?binaries$/
      ensure_that_the_cookbook_dataset_is_there
      purge_these_binaries(binaries?)
      exit_program
    # ===================================================================== #
    # === Pin a registered program
    #
    # This entry point allows us to pin down a certain program. A
    # pin-downed program can not be installed anymore. Users can
    # unpin this operation though.
    #
    # Invocation example:
    #
    #   rbt pin htop
    #   rbt --pin htop
    #
    # ===================================================================== #
    when /^-?-?pin (.+)$/i
      this_program = $1.to_s.dup
      pin_this_program(this_program)
      exit_program
    # ===================================================================== #
    # === Query where we will extract to
    #
    # This entry point can be used to determine where to we will extract
    # archives.
    #
    # Invocation example:
    #
    #   rbt --extract-to?
    #
    # ===================================================================== #
    when /^-?-?extract(-|_)?to\??$/i
      report_where_archives_will_be_extracted_into
      exit_program
    # ===================================================================== #
    # === Query whether we are on windows
    #
    # This entry point can be quickly used to determine whether we are
    # on windows or whether we are not. The reason this entry point
    # exists is mostly for debugging, so that we can determine whether
    # the windows-operating system is properly detected.
    #
    # Invocation example:
    #
    #   rbt --is-on-windows?
    #
    # ===================================================================== #
    when /^-?-?is(-|_| )?on(-|_| )?windows\??$/i
      e "#{rev}Are we on windows? "\
        "#{steelblue(verbose_truth(is_on_windows?))}"
      exit_program
    # ===================================================================== #
    # === Show the dependencies of a given program
    # 
    # Tell which dependencies a given program has:
    #
    #   ry sed --dependencies
    #   ry gcc --dependencies
    #   ry xsm fdep
    #
    # ===================================================================== #
    when 'abhängigkeiten',
         /^-?-?dependencies$/,
         'depe','deps','dep',
         'fdep',
         'd',
         'deps?',
         'dep?',
         'dependencies?',
         /^-?-?feedback(-|_| )?dependencies(-|_| )?of(-|_| )?this(-|_| )?program$/
      feedback_dependencies_of_this_program
      exit_program
    # ===================================================================== #
    # === Update the KDE applications
    #
    # This entry point allows us to update the KDE applications.
    #
    # Usage example:
    #
    #   rbt --update-kde-apps
    #
    # ===================================================================== #
    when /^-?-?update(-|_| )?kde(-|_| )?apps$/i
      update_kde_apps
    # ===================================================================== #
    # === Do not use any prefix option
    #
    # By default, RBT::Action::Installer tries to use a --prefix option
    # when# possible, no matter the build system at hand.
    #
    # This may not be always wanted, though, such as when a user just
    # wants to use the default value if --prefix is omitted, without
    # that user knowing what that default value is. The user should
    # not HAVE to know, either - thus this option exists.
    #
    # Invocation example:
    #
    #   ry htop --noprefix
    #
    # ===================================================================== #
    when /^-?-?no(_|-| )?prefix$/i,
         /^-?-?noprefix$/i,
         /^-?-?do(_|-| )?not(_|-| )?use(_|-| )?a(_|-| )?prefix$/i
      do_not_use_a_prefix
    # ===================================================================== #
    # === Guessing the build type
    #
    # This entry point allows us to guess the build type of a target
    # program at hand. It may be easier to try to compile the
    # program, though.
    #
    # Invocation examples:
    #
    #   rbt --guess-build-type
    #   rbt --build-type
    #   rbt m4 --build-type
    #
    # ===================================================================== #
    when /^-?-?build(-|_| )?type$/i,
         /^-?-?guess(-|_| )?build(-|_| )?type$/i
      verbose_guess_the_build_type
      exit_program
    # ===================================================================== #
    # === Use /opt as prefix
    #
    # This entry point allows us to use /opt as the prefix value.
    #
    # Invocation example:
    #
    #   ry python --prefix-opt
    #
    # ===================================================================== #
    when /^-?-?prefix(-|_| )?opt$/i
      set_user_prefix('/opt/')
    # ===================================================================== #
    # === Enable a shortcut for cmake, via --release
    #
    # This entry point allows a user to pass -DCMAKE_BUILD_TYPE=Release
    # to a cmake-based project, by just typing --release.
    #
    # Invocation example:
    #
    #   ry initng --release
    #
    # ===================================================================== #
    when /^--release$/i
      append_these_configure_options(:release)
    # ===================================================================== #
    # === Append any configure option to the GNU configure run
    #
    # This entry point can be used to append any configure option to
    # the configure script.
    #
    # Invocation example:
    #
    #   ry emacs --ntrad --without-x
    #
    # ===================================================================== #
    when /^-?-?append(-|_| )?these(-|_| )?configure(-|_| )?options=(.+)$/i # === $4
      append_these_configure_options($4.to_s)
    # ===================================================================== #
    # === Enable shared compilation
    #
    # This entry point allows a user to enable shared compilation.
    #
    # It is typically equivalent to adding "--enable-shared" on
    # the configure commandline invocation.
    #
    # Invocation example:
    #
    #   ry htop ntrad --enable-shared
    #
    # ===================================================================== #
    when /^-?-?enable(-|_| )?shared$/i
      append_enable_shared_to_the_configure_options
    # ===================================================================== #
    # === Show the allowed tags for the cookbooks-submodule
    #
    # Usage example:
    #
    #   rbt --allowed_tags?
    #
    # ===================================================================== #
    when /^-?-?allowed(-|_| )?tags\??/,
         /^-?-?registered(-|_| )?tags\??/,
         /^valid(-|_| )?tags\??/,
         /^-?-?valid(-|_| )?tags\??/
      load_and_display_the_allowed_tags
      exit_program
    # ===================================================================== #
    # === Compile all the protos next
    #
    # Invocation examples:
    #
    #   ry --compile-all-protos
    #   ry protos
    #   ry --protos
    #
    # ===================================================================== #
    when /^-?-?compile(_|-| )?all(_|-| )?protos$/i, # ry --compile-all-protos
         /^-?-?protos$/,
         /^-?-?all(_|-| )?protos$/,
         /^-?-?compile(_|-| )?protos$/,
         'proto'
      register_all_protos_for_compilation
    # ===================================================================== #
    # === Query which headers are part of this package (different variant)
    #
    # This is similar to the variant below, but the usage is different.
    #
    # Invocation example:
    #
    #   ry --headers-of=ruby
    #
    # ===================================================================== #
    when /^-?-?headers(-|_| )?of=(.+)$/i # === $2
      _ = $2.to_s.dup
      if cookbook_dataset?.nil?
        initialize_dataset_for(_)
      end
      show_available_headers_of_this_program(_)
      exit_program
    # ===================================================================== #
    # === Query which headers are part of this package
    #
    # Use this if you wish to give back all .h files of a specific
    # program at hand. For this to work, of course the program in
    # question needs to install any .h files in the first place; and
    # we will also have had these .h files registered in the first
    # place.
    #
    # Invocation example:
    #
    #   ry glibc --headers?
    #
    # ===================================================================== #
    when /^-?-?headers\??$/,
         /^-?-?show(_|-| )?available(_|-| )?headers(_|-| )?of(_|-| )?this(_|-| )?program$/
      show_available_headers_of_this_program
      exit_program
    # ===================================================================== #
    # === Automatically determining a few things
    #
    # Invocation example:
    #
    #   rbt --auto
    #
    # ===================================================================== #
    when /^-?-?auto$/i
      try_to_automatically_setup_the_rbt_project
      exit_program
    # ===================================================================== #
    # === Prioritize on the traditional /usr/bin/ $PATH
    #
    # Invocation example:
    #
    #   ry fluxbox --traditional-path
    #
    # ===================================================================== #
    when /^-?-?traditional(_|-| )?path$/
      use_traditional_env_path
    # ===================================================================== #
    # === Update libraries of a given program
    #
    # This entry point allows us to automatically update the
    # libraries of a compiled, AppDir-installed program.
    #
    # Invocation examples:
    #
    #   rbt --update-libraries-of=poppler
    #   rbt --update-libraries-for=poppler
    #   rbt --autoupdate=opencv
    #
    # ===================================================================== #
    when /^-?-?update(-|_| )?libraries(-|_| )?of=(.+)$/i,
         /^-?-?update(-|_| )?libraries(-|_| )?for=(.+)$/i
      this_program = $1.to_s.dup # Default.
      this_program = $3.to_s.dup if $3 # Only for $3.
      update_libraries_of_this_program(this_program)
    # ===================================================================== #
    # === Designate another source location that is to be used
    #
    # This entry point allows us to use another source location,
    # e. g. if we have an USB stick and data on this stick then
    # this entry point may be very helpful.
    #
    # Invocation example:
    #
    #   ry gdb ntrad --use-this-source-location=/Depot/j/gdb-8.2.1.tar.xz
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?this(-|_| )?source(-|_| )?location=(.+)$/i # $4
      _ = $4.to_s.dup
      if File.exist? _
        if cookbook_dataset?
          cookbook_dataset?.set_program_path(_)
          disallow_changing_the_cookbook_dataset
        end
        orev "Making use of the target location at `#{slateblue(_)}#{rev}`."
        set_program_path(_)
      else
        opne swarn('No target exists at ')+sfile(_)+swarn('. Exiting now.')
        exit_program
      end
    # ===================================================================== #
    # === Upload binaries
    #
    # Invocation example:
    #
    #   rbt --upload-binaries
    #
    # ===================================================================== #
    when /^-?-?upload(-|_)?binaries$/
      rev 'We will upload all files found in the respective '\
           'bin/ directory'
      orev 'of this program ('+simp(program?)+"#{rev})."
      do_upload_binaries
    # ===================================================================== #
    # === Specify to use configure as the build-system
    #
    # This entry point allows us to overrule the build-system that is to
    # be used - and specifically use configure.
    #
    # Invocation example:
    #
    #   ry htop --use-configure
    #   ry zlib -ntrad --use-gnu-configure
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?configure$/i,
         /^-?-?use(_|-| )?autoconfigure$/i,
         /^-?-?use(_|-| )?configure(_|-| )?system$/i,
         /^-?-?use(_|-| )?gnu(_|-| )?configure$/i
      orev "Using #{royalblue('configure')} #{rev}as build system."
      use_configure_as_build_system
    # ===================================================================== #
    # === Create a standalone .yml file
    #
    # Invocation example:
    #
    #   rbt ruby --create_standalone_yml
    #   rbt ruby syml
    #
    # ===================================================================== #
    when /^-?-?create(-|_| )?standalone(-|_| )?yaml(-|_| )?file$/i,
         /^-?-?create(-|_| )?standalone(-|_| )?yml$/i,
         'syml','generate_standalone',
         /^-?-?csyf/ # 'yaml' ← can not be used.
      create_standalone_yaml_file
      exit_program
    # ===================================================================== #
    # === rbt --return_n_programs_available
    #
    # This entry point will return (or rather, display) how many
    # programs are available.
    # ===================================================================== #
    when /^-?-?return(-|_| )?n(-|_| )?programs(-|_| )?available/
      e return_n_programs_available
      exit_program
    # ===================================================================== #
    # === rbt --path_to_source_directory=
    # ===================================================================== #
    when /^-?-?path(-|_| )?to(-|_| )?source(-|_| )?directory=(.+)$/, # for $4
         /^-?-?set(-|_| )?archive(-|_| )?directory=(.+)$/,         # for $3
         /^-?-?source(-|_| )?directory=(.+)$/                    # for $2
      # =================================================================== #
      # Usage examples:
      #   cookbooks --path_to_source_directory=/Depot/Files
      #   cookbooks --set-archive-directory=/opt2
      #   cookbooks --source_directory=/Depot/Files
      # =================================================================== #
      if $4
        _ = $4.to_s.dup
      elsif $3
        _ = $3.to_s.dup
      else
        _ = $2.to_s.dup
      end # ^^^ we have to work through the special $ variables.
      RBT.permanently_set_path_to_this_source_directory(_)
      exit_program
    # ===================================================================== #
    # === rbt --create-html-page-for-these-programs=ruby,python,tcl,filelight
    #
    # This entry point allows us to create HTML pages for some programs
    # quickly.
    # ===================================================================== #
    when /^-?-?create(-|_| )?html(-|_| )?page(-|_| )?for(-|_| )?these(-|_| )?programs=(.+)/
      these_programs = $6.to_s.dup
      if these_programs.include? ','
        these_programs = these_programs.split(',').flatten
      end
      require 'rbt/toplevel_methods/html.rb'
      RBT.create_html_page_for_these_programs(these_programs)
      exit_program
    # ===================================================================== #
    # === rbt --update-kde-applications
    # ===================================================================== #
    when /^-?-?update(-|_| )?kde(-|_| )?applications$/i,
         /^-?-?download(-|_| )?kde(-|_| )?applications$/,
         /^-?-?kde(-|_| )?apps$/
      update_kde_applications
      exit_program
    # ===================================================================== #
    # === rbt --correct_dependencies?
    # ===================================================================== #
    when /^-?-?correct(-|_| )?dependencies\??$/,
         'DEPS','--cdeps?'
      RBT::Cookbooks::CheckForCorrectDependencies[]
      exit_program
    # ===================================================================== #
    # === rbt --format=postinstall
    # ===================================================================== #
    when /^format=(.+)$/,
         /^f=(.+)/
      feedback_format_specification_of($1.to_s.dup)
      exit_program
    # ===================================================================== #
    # === rbt --nprograms
    # ===================================================================== #
    when /^-?-?n(-|_| )?programs\??/,
         'registered_programs?',
         'nregistered?'
      show_n_programs_available
      exit_program
    # ===================================================================== #
    # === rbt --size
    # ===================================================================== #
    when /^-?-?size$/ # cookbook --size "php,ruby,perl,python"
      if i.include? '=' # Assume input such as this one here: "--size=php,ruby,perl,python"
        report_size_of_these_programs(i)
      end
      exit_program
    # ===================================================================== #
    # === rbt --set_temp_dir=/tmp
    # ===================================================================== #
    when /-?-?set(-|_| )?temp(-|_| )?dir=(.+)/
      _ = $3.to_s.dup
      orev 'We will permanently set to a new temp '\
           'directory next ('+simp(_)+rev+')'
      RBT.permanently_set_temp_directory(_)
      exit_program
    # ===================================================================== #
    # === rbt --last_option?
    # ===================================================================== #
    when /^-?-?last(-|_| )?option\?/,'show_last_configuration_options',
         'lastoptions?',
         'lastoptions',
         'loptions'
      require 'rbt/toplevel_methods/show_last_configure_option.rb'
      RBT::Cookbooks.show_last_configure_option
      exit_program
    # ===================================================================== #
    # === rbt --tutorial
    # ===================================================================== #
    when /^-?-?tutorial/
      require 'rbt/toplevel_methods/tutorial.rb'
      RBT.show_tutorial
      exit_program
    # ===================================================================== #
    # === rbt --do-not-truncate
    # ===================================================================== #
    when /^-?-?do(-|_| )?not(-|_| )?truncate$/i
      @internal_hash[:try_to_truncate_too_long_output] = false
    # ===================================================================== #
    # === rbt --show-all-about=htop
    # ===================================================================== #
    when /^-?-?show(-|_| )?all(-|_| )?about=(.+)/i,
         /^-?-?show(-|_| )?all=(.+)/i,
         /^-?-?show(-|_| )?file=(.+)/i
      show_this_program = $2.to_s.dup # This is valid for two entry points ^^^.
      show_this_program = $3.to_s.dup if $3
      show_all_about(show_this_program)
      exit_program
    # ===================================================================== #
    # === rbt --permanently-disable-colours
    # ===================================================================== #
    when /^-?-?permanently(-|_| )?disable(-|_| )?colours/
      RBT.permanently_disable_colours
      exit_program
    # ===================================================================== #
    # === rbt --batch-validate
    # ===================================================================== #
    when /^-?-?batch(-|_| )?validate$/,
         /^-?-?validate(-|_| )?entries$/,
         /^-?-?validate$/
      batch_validate_the_cookbooks
      exit_program
    # ===================================================================== #
    # === rbt --use-psych
    # ===================================================================== #
    when /^-?-?use(-|_| )?psych$/i,
         /^-?-?permanently(-|_| )?use(-|_| )?psych$/i
      do_permanently_use_psych
      exit_program
    # ===================================================================== #
    # === rbt --publish-list-of-all-programs-version
    # ===================================================================== #
    when /^publish(-|_| )?list(-|_| )?of(-|_| )?/i,
         /^-?-?publish/
      publish_list_of_all_programs_version # in file base/misc.rb
      exit_program
    # ===================================================================== #
    # === rbt --scripts?
    # ===================================================================== #
    when /^-?-?scripts\??$/
      show_available_utility_scripts
    # ===================================================================== #
    # === rbt --feedback_all_available_formats
    # ===================================================================== #
    when /^-?-?feedback(-|_| )?all(-|_| )?available(-|_| )?formats/
      RBT::Cookbooks::SanitizeCookbook.feedback_all_available_formats
      exit_program
    # ===================================================================== #
    # === rbt --check-for-gnome-updates
    # ===================================================================== #
    when /^-?-?check(-|_| )?for(-|_| )?gnome(-|_| )?updates$/,
         /^-?-?gnome$/
      require 'rbt/utility_scripts/check_for_gnome_updates.rb'
      RBT::Cookbooks::CheckForGnomeUpdates.new
      exit_program
    # ===================================================================== #
    # === scookie htop --array
    # ===================================================================== #
    when /-?-?array$/
      output_main_dataset
      exit_program
    # ===================================================================== #
    # === rbt --debug
    # ===================================================================== #
    when /-?-?debug$/
      enable_debug
    # ===================================================================== #
    # === rbt --show-available-utility-scripts
    # ===================================================================== #
    when /-?-?show-?available-?utility-?scripts$/,
         /-?-?show-?available-?scripts$/
      RBT::Cookbooks.show_available_utility_scripts
      exit_program
    # ===================================================================== #
    # === Do not use ldconfig
    #
    # We will not use ldconfig, but we will continue regardless.
    #
    # Usage example:
    #
    #   rbt htop --do-not-use-ldconfig
    #   rbt htop noldconfig
    #   rbt htop do_not_use_ldconfig
    #
    # ===================================================================== #
    when /^-?-?no(-|_| )?ldconfig/,
         /^-?-?do(-|_| )?not(-|_| )?use(-|_| )?ldconfig$/i,
         /^-?-?dont(-|_| )?run(-|_| )?ldconfig$/,
         /^-?-?do(-|_| )?not(-|_| )?run(-|_| )?ldconfig$/,
         /^-?-?dont(-|_| )?ldconfig$/,
         /^-?-?no(-|_| )?ld$/
      do_not_use_ldconfig
    # ===================================================================== #
    # === Search for tags
    #
    # Do a search for specific tags via the entry point here.
    #
    # Invocation examples:
    #
    #   ry --tags pdf
    #   ry tags? database
    #   ry scons --tags
    #
    # ===================================================================== #
    when /^-?-?tags?\??$/
      search_for_tag(compile_which_program?)
    # ===================================================================== #
    # === Do not use any compile time flags
    #
    # Sometimes you may not wish to use any FLAG variables such as
    # CFLAGS or LDFLAGS. This option here allows you to ignore these
    # FLAGS globally. 
    #
    # Invocation example:
    #
    #   rbt htop --no-compile-time-flags
    #   rbt strace --no-compile-time-flags ntrad
    #   rbt ruby no-compile-time-flags
    #
    # ===================================================================== #
    when /^-?-?no(_|-| )?compile(_|-| )?time(_|-| )?flags$/,
         /^-?-?plain$/,
         /^-?-?buildtype=plain$/
      do_not_use_any_compile_time_flags
    # ===================================================================== #
    # === Query whether we will use autogen
    #
    # Use this entry point if you wish to find out whether we will use
    # autogen or whether we will not.
    #
    # Invocation examples:
    #
    #   ry matesystemmonitor --use-autogen?
    #   ry php --use-autogen?
    #
    # ===================================================================== #
    when /^-?-?uses?(_|-| )?autogen\??/
      verbose_report_will_we_use_autogen
      exit_program
    # ===================================================================== #
    # === Compile both traditional and non-traditional
    #
    # Use this to compile both traditional and non-traditional.
    #
    # Usage examples:
    #
    #   ry htop trad_ntrad
    #   ry php --dual-compile
    #
    # ===================================================================== #
    when /^-?-?trad(_|-| )?ntrad$/i,
         /^-?-?dual(_|-| )?compile$/i,
         /^-?-?trad(_|-| )?then(_|-| )?ntrad$/i,
         /^-?-?trad(_|-| )?and(_|-| )?ntrad$/i,
         /^-?-?trad(_|-| )?and(_|-| )?nontrad$/i
      do_compile_in_both_traditional_and_non_traditional_manner
    # ===================================================================== #
    # === Compile in a traditional way                           (trad tag)
    #
    # We use traditional compilation here by changing the compile mode
    # (traditional or non-gobolinux way) here.
    #
    # Usage example:
    #
    #   ry make trad
    #   ry php --trad
    #
    # ===================================================================== #
    when *ARRAY_HELP_DO_COMPILE_IN_A_TRADITIONAL_WAY_OPTIONS
      do_compile_in_a_traditional_way
    # ===================================================================== #
    # === Query whether libtool files will be removed
    #
    # This entry point allows us to query whether we will delete or
    # keep libtool .la files.
    #
    # Invocation example:
    #
    #   ry --delete_libtool_files?
    #
    # ===================================================================== #
    when /^-?-?delete(-|_| )?libtool(-|_| )?files\??$/i
      orev 'Will we remove libtool files: '+
            teal(
              verbose_truth(delete_libtool_files?)
            )
    # ===================================================================== #
    # === Compile all KDE5 plasma components
    #
    # This entry point is a shortcut to batch-compile all KDE5
    # plasma components.
    #
    # Invocation examples:
    #
    #   rbt --compile-plasma
    #   rbt --compile-all-kde5-plasma-components
    #   rbt --kde-plasma
    #   rbt --compile-plasma-desktop
    #   rbt --compile-all-of-plasma
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?plasma$/,
         /^-?-?compile(-|_| )?all(-|_| )?kde5(-|_| )?plasma(-|_| )?components$/,
         /^-?-?compile(-|_| )?kde(-|_| )?plasma$/,
         /^-?-?compile(-|_| )?plasma(-|_| )?desktop$/,
         /^-?-?compile(-|_| )?all(-|_| )?of(-|_| )?plasma$/,
         /^-?-?kde(-|_| )?plasma$/,
         /^-?-?all(-|_| )?of(-|_| )?plasma$/
      compile_all_kde5_plasma_components
    # ===================================================================== #
    # == Search for a specific tag
    #
    # This entry point allows us to query for a specific registered tag.
    #
    # Invocation example:
    #
    #   rbt --tags=xorg
    #   rbt --tags=xorg_app
    #
    # ===================================================================== #
    when /^-?-?tags=(.+)$/i
      search_for_tag($1.to_s.dup)
    # ===================================================================== #
    # === Compile atk-core and atk-bridge
    #
    # Invocation examples:
    #
    #   ry --atk-core-bridge
    #   ry --atk-bridge-core
    #
    # ===================================================================== #
    when /^-?-?atk(_|-| )?core(_|-| )?bridge$/i,
         /^-?-?atk(_|-| )?bridge(_|-| )?core$/i
      set_compile_these_programs_then_batch_compile_them(
        %w( atspi2atk atspi2core )
      )
    # ===================================================================== #
    # === Feedback extra description of a program
    #
    # Feedback extra description for a given program here, by making use
    # of class SanitizedCookbookDataset.
    #
    # Usage example:
    #
    #   ry php edesc
    #
    # ===================================================================== #
    when /^extra(-|_)?description\??$/i,
         'extra_description',
         'extradescription',
         'edesc'
      feedback_extra_description
      exit_program
    # ===================================================================== #
    # === Set source directory
    #
    # Set the source dir here.
    #
    # Usage example:
    #
    #   ry htop --source_dir=/Depot/j
    #
    # ===================================================================== #
    when /^-?-?source(-|_| )?dir$/,
         'source_dir',
         'set_source_dir'
      opnn; set_source_dir(first_arg)
    # ===================================================================== #
    # === Compile all locally available versions of a source archive
    #
    # This entry point allows us to compile all locally available
    # versions of a program, if we have stored it as an archive,
    # such as a .tar.xz file or something like that.
    #
    # The advantage, or "big win" here, is that we can batch-compile
    # all these programs into the corresponding /Programs/NAME/VERSION/
    # directory.
    #
    # Invocation examples:
    #
    #   ry libsigc++ --compile-all-available-local-versions
    #   ry libsigc++ --all-available-local-versions
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?all(-|_| )?available(-|_| )?local(-|_| )?versions$/i,
         /^-?-?all(-|_| )?available(-|_| )?local(-|_| )?versions$/i
      do_compile_all_available_local_version_of_this_program(compile_which_program?)
      exit_program
    # ===================================================================== #
    # === Enable bootstrap for compilation
    #
    # Invocation example:
    #
    #   ntrad binutils --enable-bootstrap
    #
    # ===================================================================== #
    when /^-?-?enable(-|_| )?bootstrap$/i
      append_this_to_the_configure_options(:enable_bootstrap)
    # ===================================================================== #
    # === Symlink the lib/ subdirectory into /usr/lib/
    #
    # This entry point allows us to symlink the compiled library-files,
    # in particular the .so files, into the /usr/lib/ hierarchy.
    #
    # This will only be honoured when the program is compiled in an
    # AppDir-like fashion, e. g. under /Programs/Foobar/1.1.0/.
    #
    # Invocation examples:
    #
    #   ry gtk+ --symlink-into-usr-lib-dir
    #   ry gtk+ --symlink-into-lib-dir
    #   ry gtk+ --symlink-lib-dir
    #   ry gtk+ --symlink-libs
    #
    # ===================================================================== #
    when /^-?-?symlink(-|_| )?into(-|_| )?usr(-|_| )?lib(-|_| )?dir$/i,
         /^-?-?symlink(-|_| )?into(-|_| )?lib(-|_| )?dir$/i,
         /^-?-?symlink(-|_| )?lib(-|_| )?dir$/i,
         /^-?-?symlink(-|_| )?libs$/i,
         /^-?-?symlink(-|_| )?into(-|_| )?usr(-|_| )?lib$/i
      do_symlink_appdir_lib_into_usr_lib
    # ===================================================================== #
    # === Install only the bin/ components
    #
    # This entry point can be used to install only the bin/ components
    # of a given program.
    #
    # The reasoning for this option is that we sometimes may only wish
    # to install all entries in the bin/ subdirectory, for one reason
    # or the other.
    #
    # Usage examples:
    #
    #   ry htop do_install_only_binaries
    #   ry xpr  --onlybinaries
    #
    # ===================================================================== #
    when /^-?-?only(_|-| )?binaries$/i,
         /^-?-?do(_|-| )?install(_|-| )?only(_|-| )?binaries$/i,
         /^-?-?only(_|-| )?bin$/i
      do_install_only_binaries
    # ===================================================================== #
    # === Upload to a remote site
    #
    # ry htop upload_to
    # ===================================================================== #
    when 'upload_to','uploadto','upload','uto'
      upload_to(i)
      exit_program
    # ===================================================================== #
    # === Do not show the classname
    #
    # If we don't want to display the classname, use this.
    #
    # Trying this:
    #
    #   ry php noclass fall
    #
    # ===================================================================== #
    when 'noclassname','noclass'
      @internal_hash[:do_show_the_classname] = :be_silent
    # ===================================================================== #
    # === set_pkgconfig_symlink
    #
    # Invocation example:
    #
    #   ry htop --pkgconfig-symlink=yes
    #
    # ===================================================================== #
    when /^-?-?pkgconfig-?symlink=(.+)$/
      set_pkgconfig_symlink($1.to_s.dup) { :be_verbose }
    # ===================================================================== #
    # === Use old configure options
    #
    # This entry point allows you to re-use configure options used by
    # an existing program. This works only for a few programs though
    # such as gcc and perhaps nano.
    #
    # Invocation examples:
    #
    #   ry gcc --reuse-old-version --ntrad
    #   ry gcc --use-this-version=7.1.0 --use-old-configure-options
    #   ry gcc --copy-old-version
    #   ry gcc --copy-old-version --ntrad
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?old(_|-| )?configure(_|-| )?options$/i,
         /^-?-?copy(_|-| )?old(_|-| )?version$/i,
         /^-?-?reuse(_|-| )?old(_|-| )?configure(_|-| )?option$/i,
         /^-?-?reuse(_|-| )?configure(_|-| )?options$/i,
         /^-?-?use(_|-| )?old(_|-| )?config(_|-| )?version$/i,
         /^-?-?use(_|-| )?old(_|-| )?configure(_|-| )?version$/i,
         /^-?-?re(_|-| )?use(_|-| )?gcc(_|-| )?configure$/i,
         /^-?-?re(_|-| )?use(_|-| )?old(_|-| )?gcc(_|-| )?version$/i,
         /^-?-?re(_|-| )?use(_|-| )?old(_|-| )?configure(_|-| )?options$/i,
         /^-?-?re(_|-| )?use(_|-| )?old$/i,
         /^-?-?reuse(_|-| )?options$/i,
         /^-?-?old$/i,
         /^-?-?reuse(_|-| )?old(_|-| )?version$/i
      reuse_old_configure_options
    # ===================================================================== #
    # === Copy the linux kernel .h header files
    #
    # This entry point allows the user to copy the linux-kernel header
    # files to the corresponding versioned AppDir location.
    #
    # Invocation examples:
    #
    #   ry --install-kernel-headers
    #   ry --install-linux-headers
    #   ry --extract-kernel
    #
    # ===================================================================== #
    when /^-?-?install(-|_| )?kernel(-|_| )?headers$/i,
         /^-?-?install(-|_| )?linux(-|_| )?headers?$/i,
         /^-?-?kernel(-|_| )?headers$/i,
         /^-?-?install(-|_| )?kernel$/i,
         /^-?-?linux(-|_| )?headers$/i,
         /^-?-?extract(-|_| )?kernel$/i,
         /^-?-?compile(-|_| )?headers$/i,
         /^-?-?install(-|_| )?headers$/i,
         /^-?-?install(-|_| )?kernel(-|_| )?sources$/i
      install_the_linux_kernel_header_files_via_appdir_prefix
      exit_program
    # ===================================================================== #
    # === Disabling colours
    #
    # Use this method if you wish to disable colours on a per-project
    # (per compile-run) basis. This means that the complete RBT suite
    # will not make use of any colours.
    #
    # Colours can be disabled like in this way:
    #
    #   ry nocolours
    #   ry --nocolours
    #   ry htop --nocolours
    #
    # ===================================================================== #
    when *OPTIONS_NO_COLOURS # This constant is defined in bl $RBT/compile/compile.rb
      disable_colours
    # ===================================================================== #
    # === Compile minimal GCC but with lots of languages enabled
    #
    # Invocation example:
    #
    #   ry --gcc_minimal_but_lots_of_languages_enabled
    #
    # ===================================================================== #
    when /^-?-?gcc(-|_)?minimal(-|_)?but(-|_)?lots(-|_)?of(-|_)?languages(-|_)?enabled$/
      try_to_use_this_profile(i)
    # ===================================================================== #
    # === Show BLFS Information
    #
    # This will show BLFS information.
    #
    # Invocation example:
    #
    #   ry binutils --lfs
    #   ry binutils lfs
    #
    # ===================================================================== #
    when /^-?-?lfs$/,
         'blfs',
         'blfs?',
         'show_information_about_blfs'
      show_information_about_blfs
      exit_program
    # ===================================================================== #
    # === Use autogen
    #
    # Use this entry point to enable autogen.
    #
    # Invocation example:
    #
    #   ry gtk+ use-autogen
    #
    # ===================================================================== #
    when *ARRAY_HELP_USE_AUTOGEN
      enable_autogen
    # ===================================================================== #
    # === Query whether the internal sed wrapper will be used
    #
    # Invocation example:
    #
    #   rbt --use-the-internal-sed-wrapper?
    #
    # ===================================================================== #
    when /^-?-?use(-|_)?the(-|_)?internal(-|_)?sed(-|_)?wrapper\??$/,
         'usetheinternalsedwrapper?'
      verbose_query_whether_we_will_use_the_internal_sed_wrapper(:and_then_exit)
    # ===================================================================== #
    # === Use random version
    #
    # The user can pick to use a random version. This means that we will
    # obtain all matches found in the specific directory, and randomly
    # select one of them.
    #
    # Usage example:
    #
    #   ry gcc --use-random-version
    #
    # ===================================================================== #
    when /-?-?use(-|_| )?random(-|_| )?version/,'--userandomversion'
      do_use_random_version
    # ===================================================================== #
    # === Package RBT Scripts
    #
    # Package all the RBT Scripts together, into one tarball/archive.
    #
    # Invocation examples:
    #
    #   ry --package_rbt_scripts
    #   ry --prs
    #   ry --make_release
    #
    # ===================================================================== # 
    when *ARRAY_HELP_PACKAGE_RBT_OPTIONS
      package_rbt_scripts :then_exit
    # ===================================================================== #
    # === Obtain available Packages
    #
    # Get all available packages as a filtered result.
    #
    #   ry htop --packages?
    #
    # ===================================================================== #
    when /^-?-?packages\??$/i,
        'package',
        'available?',
        'available',
        'pgk?',
        'pkg?'
      get_packages
      exit_program
    # ===================================================================== #
    # === Enable pkgconfig-symlinks
    #
    # This option exists in order to allow, on the commandline, to
    # enable the symlink-action of .pc files into /usr/lib/pkgconfig.
    #
    # This is only useful if you use an AppDir compilation step of
    # course.
    #
    # Note that the regex below is anchored, so to avoid conflicts
    # with instructions such as --symlink-pkgconfig-files.
    #
    # Invocation examples:
    #
    #   ry htop --pkgconfig-symlink
    #   ry libxi --symlink-pkgconfig-files
    #
    # ===================================================================== #
    when /^-?-?pkgconfig(_|-| )?symlink$/,
         /^-?-?symlink(_|-| )?pkgconfig(_|-| )?files$/
      verbose_enable_pkgconfig_symlink
    # ===================================================================== #
    # === Query who the main maintainers are for RBT right now
    #
    # Invocation example:
    #
    #   rbt --maintainer?
    #
    # ===================================================================== #
    when /^-?-?maintainers?\??$/i
      e "#{rev}You may be able to contact the current lead maintainer(s) via:"
      e
      e "  #{sfancy(RBT.configuration?.email)}"
      e
    # ===================================================================== #
    # === Show components belonging to a particular compile chain
    #
    # This entry point allows us to display the components of a
    # particular (meta)program. So for example, if we pass xfce
    # to the method below then all components of xfce will be
    # displayed, together with their index/position value, on the
    # commandline.
    #
    # Invocation example:
    #
    #   rbt --show-components=xfce
    #
    # ===================================================================== #
    when /^-?-?show(-|_| )?components=(.+)$/i # === $2
      show_components($2.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Feedback the program description
    #
    # Feedback the program description here:
    #
    #   rbt gcc --desc
    #   rbt htop desc?
    #
    # ===================================================================== #
    when /^-?-?descr?$/,
         'de',
         'des',
         /^-?-?descri?p?t?i?o?n?\??$/,
         'beschreibung',
         'desc?',
         'd?',
         'feedback_description',
         'desc1'
      feedback_program_description
      exit_program
    # ===================================================================== #
    # === Show all locally available programs
    #
    # Invocation example:
    #
    #   rbt --locally-available-programs?
    #
    # ===================================================================== #
    when /^-?-?locally(-|_)?available(-|_)?programs\??$/
      show_all_locally_available_programs
      exit_program
    # ===================================================================== #
    # === rbt --format=preinstall
    # === rbt --f=enable_shared
    # ===================================================================== #
    when /^-?-?format=(.+)/,
         /^-?-?f=(.+)/
      feedback_format_specification_of($1.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Create snapcraft file
    #
    # This entry point allows you to create a snapcraft for a particular
    # program, such as PHP.
    #
    # Invocation example:
    #
    #   cookbooks --create-snapcraft-for=php
    #
    # ===================================================================== #
    when /^-?-?create(-|_| )?snapcraft(-|_| )?for=(.+)$/
      require 'rbt/utility_scripts/create_snapcraft_file.rb'
      program_name = $3.to_s.dup
      if program_name.include? ','
        program_name = program_name.split(',')
      end
      RBT.create_snapcraft_file_for(program_name)
      exit_program
    # ===================================================================== #
    # === Show the available aliases
    #
    # Invocation example:
    #
    #   rbt --aliases?
    #
    # ===================================================================== #
    when /^-?-?aliases\??/
      show_available_aliases
      exit_program
    # ===================================================================== #
    # === Compile with the listed dependencies as well
    #
    # This entry point allows us to compile all the specified
    # dependencies in a .yml file, prior to the main program
    # at hand.
    #
    # Note that this will always compile everything listed there,
    # even if it is already installed. We may have to change this
    # behaviour in the future, which will then be mentioned here,
    # as well - but for the time being, this is the documented
    # behaviour.
    #
    # Invocation examples:
    #
    #   ry kbreakout --compile-dependencies-as-well
    #   ry python --with-deps
    #
    # ===================================================================== #
    when /^-?-?compile(_|-| )?dependencies(_|-| )?as(_|-| )?well$/,
         /^-?-?with(_|-| )?deps$/
      compile_the_main_program_including_the_dependencies
    # ===================================================================== #
    # === Fix the libtool file
    #
    # This entry point allows us to fix a faulty .la file, based
    # from reading this information from a file.
    #
    # Invocation examples:
    #
    #   rbt --fix-libtool-from-file
    #   rbt --fix-it
    #   rbt --fixit
    #   rbt --patch-it
    #
    # ===================================================================== #
    when /^-?-?fix(-|_| )?libtool(-|_| )?from(-|_| )?file$/i,
         /^-?-?fix(-|_| )?it$/i,
         /^-?-?patch(-|_| )?it$/i
      fix_libtool_la_file_from_saved_file
    # ===================================================================== #
    # === Ensure that the required directories exist
    #
    # Invocation example:
    #
    #   rbt --ensure-that-the-required-directories-exist
    #
    # ===================================================================== #
    when /^-?-?ensure(-|_| )?that(-|_| )?the(-|_| )?required(-|_| )?directories(-|_| )?exist$/i
      RBT.ensure_that_the_required_directories_exist { :be_verbose }
      exit_program
    # ===================================================================== #
    # === Set a specific source directory
    #
    # This entry point allows us to use a specific source archive
    # directory.
    #
    # Invocation example:
    #
    #   rbt --set-source-archive=/Mount/USB1/last_backup/src/
    #
    # ===================================================================== #
    when /^-?-?set(-|_| )?source(-|_| )?archive=(.+)$/i
      opnn; set_source_dir($3.to_s.dup)
    # ===================================================================== #
    # === Query the existance of a binary name
    #
    # Query whether a binary program exists or not of the given name.
    #
    # Invocation examples:
    #
    #   ry file binary?
    #   ry esetroot binary?
    #   ry xgc binary?
    #   ry xgc --binary?
    #
    # ===================================================================== #
    when *ARRAY_HELP_QUERY_THE_EXISTANCE_OF_A_BINARY_NAME
      binary?(compile_which_program?)
      exit_program
    # ===================================================================== #
    # === Show binary duplicates
    #
    # Invocation examples:
    #
    #   rbt gettext --show-binary-duplicates
    #   rbt gtk+ --show-binary-duplicates
    #
    # ===================================================================== #
    when /^-?-?show(-|_| )?binary(-|_| )?duplicates$/,
         /^-?-?duplicates$/ # ← This variant is experimental; may be changed one day.
      try_to_show_all_binary_duplicates_of_this_program(
        compile_which_program?
      )
      exit_program
    # ===================================================================== #
    # === Check for binary duplicates under /usr/bin/
    #
    # Via the following invocation you can check for binary duplicates
    # in the /usr/bin/ hierarchy.
    #
    # Invocation examples:
    #
    #   rbt --binary-duplicates?
    #   rbt --duplicates?
    #
    # ===================================================================== #
    when *ARRAY_CHECK_FOR_BINARY_DUPLICATES_OPTIONS
      do_check_for_binary_duplicates
      exit_program
    # ===================================================================== #
    # === Use default chroot prefix being /Depot/Chroot
    #
    # This is a convenience method mostly, which allows me to save
    # typing a manual prefix for a chrooted environment.
    #
    # Invocation examples:
    #
    #   ry htop --chroot
    #   ry coreutils --chroot
    #   ry glibc 2.23 --do-not-run-ldconfig --do-not-symlink --chroot
    #
    # ===================================================================== #
    when /-?-?chroot$/,
         /-?-?chroot(-|_)?prefix/,
         'CHROOT'
      use_default_chroot_as_prefix
    # ===================================================================== #
    # === Feedback all binaries
    #
    # Query for all binaries of any given program and show them when it
    # was found.
    #
    # This obviously requires of you to provide the name of a program.
    #
    # See the following use cases.
    #
    # Usage examples:
    #
    #   ry htop     --all_binaries?
    #   ry automake all_binaries?
    #   ry coreutils binaries?
    #   ry xz feedback_all_binaries
    #
    # ===================================================================== #
    when *ARRAY_HELP_FEEDBACK_ALL_BINARIES_OPTIONS
      show_all_binaries_of_this_program
      exit_program
    # ===================================================================== #
    # === Enable shared and no static compilation
    #
    # This entry point combines --enable-shared and --disable-static
    # into one option.
    #
    # Invocation example:
    #
    #   rbt libxmu --shared-no-static ntrad
    #
    # ===================================================================== #
    when /^-?-?shared(-|_| )?no(-|_| )?static$/i
      enable_shared_disable_static
    # ===================================================================== #
    # === Compile into your home directory
    #
    # This option allows you to compile into your user's home directory.
    # This does NOT use an AppDir layout.
    #
    # Invocation examples:
    #
    #   ry htop --into-home-dir
    #   ry xwd --homedir
    #   ry pango --compile-into-home-dir
    #   ry lzma --static --into-the-home-directory
    #
    # ===================================================================== #
    when 'HOME_DIR',
         /^-?-?tohomedir$/,
         /^-?-?home$/,
         /^-?-?into(-|_| )?home(-|_| )?dir$/,
         /^-?-?compile(-|_| )?into(-|_| )?the(-|_| )?home(-|_| )?dir$/,
         /^-?-?use(-|_| )?home$/i,
         /^-?-?home(-|_| )?dir$/,
         /^-?-?compile(-|_| )?into(-|_| )?home(-|_| )?dir$/,
         /^-?-?home(-|_| )?directory$/,
         /^-?-?homedir$/i,
         /^-?-?into(-|_| )?home(-|_| )?directory$/i,
         /^-?-?into(-|_| )?the(-|_| )?home(-|_| )?directory$/i
      compile_into_the_home_directory
    # ===================================================================== #
    # === Specify to use another build-system
    #
    # This entry point allows us to overrule the build-system that is
    # to be used.
    #
    # Invocation example:
    #
    #   ry htop --use-this-build-system=configure
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?this(_|-| )?build(_|-| )?system=(.+)$/i
      this = $4.to_s.dup
      orev "Using #{royalblue(this)} #{rev}as build system."
      set_use_this_build_system(this)
    # ===================================================================== #
    # === Compile all registered games
    #
    # This entry point allows us to compile all registered games.
    #
    # It is recommend to get all dependencies compiled first, e. g.
    # allegro, SDL, and so forth, as the code is very "dumb" - it
    # will not check much at all.
    #
    # Invocation example:
    #
    #   rbt --compile-all-games
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?all(-|_| )?games$/i,
         /^-?-?compile(-|_| )?all(-|_| )?the(-|_| )?games$/i,
         /^-?-?compile(-|_| )?games$/i
      compile_all_games
    # ===================================================================== #
    # === Use a profile/decorator for the configure options
    #
    # This entry point allows us to use pre-defined configure options for
    # some programs. It thus gives us some more flexibility when working
    # with different computer systems, under different environments.
    #
    # Invocation examples:
    #
    #   ry gcc --profile=gcc_lfs_pass1
    #   ry qt --use-profile=qt trad
    #   ry binutils --use-profile=binutils_lfs trad
    #
    # ===================================================================== #
    when /^-?-?profile=(.+)$/i,
         /^-?-?use(-|_| )?profile=(.+)$/i
      _ = $1.to_s.dup
      _ = $2.to_s.dup if $2
      try_to_use_this_profile(_)
    # ===================================================================== #
    # === Generate a MacHomebrew Formula
    #
    # This should allow you to generate a Mac homebrew formula.
    #
    # Usage examples:
    #
    #   ry m4 machomebrew
    #   ry php ghs
    #
    # ===================================================================== #
    when /^-?-?generate(_|-| )?machomebrew(_|-| )?formula$/i,
         /^-?-?mac(_|-| )?home(_|-| )?brew$/,
         /^-?-?generate(_|-| )?homebrew(_|-| )?script$/i,
         /^-?-?ghs$/i
      generate_machomebrew_formula
      exit_program
    # ===================================================================== #
    # === Use /tools as prefix
    #
    # This entry point allows us to use /tools as the prefix value,
    # which is the default for building a LFS/BLFS system.
    #
    # Invocation example:
    #
    #   rbt bison --tools-prefix
    #
    # ===================================================================== #
    when /^-?-?tools(-|_| )?prefix$/i
      set_user_prefix('/tools/')
    # ===================================================================== #
    # === Do not use Opn
    #
    # This means that we will not use Opn to show the names of the
    # class in use.
    #
    # Trigger it like so:
    #
    #   rbt php --no_opn
    #   rbt htop dont_show_names
    #
    # ===================================================================== #
    when /^-?-?do(_|-| )?not(_|-| )?use(_|-| )?opn$/i,
         /-?-?no(-|_)?opn/,
         /-?-?disable(-|_)?opn/,
         'noopn',
         'do_not_output_the_name',
         /no_?names/,
         /do_?not_?show_?names/,
         /dont_?show_?names/,
         'short'
      disable_opn # Defined in the file "opn.rb".
    # ===================================================================== #
    # === Show which build-system will be prioritized
    #
    # This entry point allows us to query which build-systems are
    # our priorities, e. g. whether we will invoke meson before
    # configure or vice versa, in the event that the given
    # package has more than one build-systems in use.
    #
    # Invocation examples:
    #
    #   rbt --priorities?
    #   rbt --prioritize?
    #   rbt --build-priorities?
    #
    # ===================================================================== #
    when /^-?-?priorities\??$/i,
         /^-?-?prioritize\??$/i,
         /^-?-?build-priorities\??$/i,
         /^-?-?build(_|-| )?system(_|-| )?priorities\??$/i
      show_build_systems_priorities
      exit_program
    # ===================================================================== #
    # === Expand the cookbooks
    #
    # Invocation examples:
    #
    #   rbt --expand
    #   rbt --create-expanded-directory
    #
    # ===================================================================== #
    when /^-?-?expand$/,
         /^-?-?expand(-|_)?cookbooks$/,
         /^-?-?create(-|_)?expanded(-|_)?directory$/,
         /^-?-?expand(-|_)?cookbook(-|_)?dataset$/
      do_expand_the_cookbooks
      exit_program
    # ===================================================================== #
    # === Feedback all binaries of a program, on a single line
    #
    # This will show all associated binaries to the given program at
    # hand.
    #
    # Invocation example:
    #
    #   rbt binutils --binaries-as-one-line?
    #
    # ===================================================================== #
    when /^-?-?binaries(-|_| )?as(-|_| )?one(-|_| )?line\??$/i
      show_all_binaries_of_this_program(:default, :on_a_single_line)
      exit_program
    # ===================================================================== #
    # === Show all entries that have a BLFS entry
    #
    # Use this entry point if you wish to show all cookbook entries that
    # have a BLFS entry.
    #
    # Invocation examples:
    #
    #   rbt --show-programs-with-a-blfs-entry
    #   rbt --all-blfs
    #
    # ===================================================================== #
    when /^-?-?show(_|-| )?programs(_|-| )?with(_|-| )?a(_|-| )?blfs(_|-| )?entry$/,
         /^-?-?show(_|-| )?all(_|-| )?blfs(_|-| )?entries$/,
         /^-?-?all(_|-| )?blfs$/
      show_programs_with_a_blfs_entry
      exit_program
    # ===================================================================== #
    # === Make use of /usr/libdir/ as the libdir target
    #
    # Usage example:
    #
    #   rbt nettle trad --libdir
    #
    # ===================================================================== #
    when /^-?-?libdir$/i
      do_use_libdir
    # ===================================================================== #
    # === Generate new cookbook
    #
    # Invocation examples:
    #
    #   rbt --generate_new_cookbook
    #   rbt htop --generate_new
    #
    # ===================================================================== #
    when /^-?-?generate(_|-| )?new(_|-| )?cookbook$/i,
         /^-?-?generate(_|-| )?new$/i
      generate_new_cookbook
    # ===================================================================== #
    # === Set up a LFS tools-like directory
    #
    # This entry point can be used for the initial steps of LFS, but it
    # could also be used to help bootstrap a new GCC/GLIBC combination.
    #
    # Invocation example:
    #
    #   rbt --lfs-tools
    #
    # ===================================================================== #
    when /^-?-?lfs(-|_| )?tools$/i,
         /^-?-?compile(-|_| )?the(-|_| )?initial(-|_| )?lfs(-|_| )?toolchain$/i
      compile_the_initial_lfs_toolchain
      exit_program
    # ===================================================================== #
    # === Enable everything for compilation
    #
    # This entry point is an interesting one. Given a typical GNU 
    # configure based system, this option allows us to enable ALL 
    # of the various --enable* and --with* options.
    #
    # Why was this entry point added in July 2020? I sometimes had a
    # need to just quickly compile the "most feature rich" program and
    # move on. So I did not want to lose any time for fine tuning
    # at that moment in time. Hence this option was created.
    #
    # Keep in mind that sometimes this may not work, as some
    # options can be mutually exclusive.
    #
    # Also note that when this entry point is used, it will
    # clear all old configure options as-is.
    #
    # Usage example:
    #
    #   rbt ncurses ntrad --enable-everything --dontsymlink
    #
    # ===================================================================== #
    when /^-?-?enable(-|_| )?everything$/i
      enable_everything_for_the_current_compilation_run
    # ===================================================================== #
    # === Strip the binaries of the given program at hand
    #
    # This option is similar to the "Strip the binaries as-is" variant,
    # but the difference is that we will run "strip" only on the
    # selected binaries of the passed program. Note that this also
    # requires that your working directory is where these files
    # are as well.
    #
    # Invocation example:
    #
    #   rbt --strip-binaries-of=htop
    #
    # ===================================================================== #
    when /^-?-?strip(-|_)?binaries(-|_)?of=(.+)$/i
      _ = $3.to_s.dup
      strip_the_binaries_of_this_program(_)
    # ===================================================================== #
    # === Install a flatpak application via the official flatpak-URL
    #
    # This entry point can be used to install a remote flatpak
    # application from the official flatpak store.
    #
    # Invocation examples:
    #
    #   rbt --install-the-flatpak-for=firefox
    #   rbt --flatpak-for=firefox
    #
    # ===================================================================== #
    when /^-?-?install(-|_| )?the(-|_| )?flatpak(-|_| )?for=(.+)$/i, # === $4
         /^-?-?flatpak(-|_| )?for=(.+)$/i,                           # === $2
         /^-?-?flaty=(.+)$/i                                         # === $1
      _ = $1
      _ = $2 if $2
      _ = $4 if $4
      install_this_flatpak(_.to_s.dup)
    # ===================================================================== #
    # === Deliberately use meson
    #
    # This entry point allows you to use meson.
    #
    # Invocation examples:
    #
    #   rbt htop --use-meson
    #   rbt glib --use-meson
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?meson$/
      do_use_meson_and_ninja
    # ===================================================================== #
    # === Compile only C and C++ language support for GCC
    #
    # Usage examples:
    #
    #   rbt gcc --only-c-and-c++
    #   rbt gcc --only-c-and-cpp
    #
    # ===================================================================== #
    when /^-?-?only(-|_| )?c(-|_| )?and(-|_| )?c\+\+$/i,
         /^-?-?only(-|_| )?c(-|_| )?and(-|_| )?cpp$/i
      compile_gcc_with_only_c_and_cpp
    # ===================================================================== #
    # === Show the expanded dependencies of a given program
    # 
    # This entry point will show the expanded dependencies of
    # a given program.
    #
    # Invocation example:
    #
    #   rbt sed --expanded-dependencies
    #
    # ===================================================================== #
    when /^-?-?expanded(-|_| )?dependencies$/
      feedback_expanded_dependencies_of_this_program
      exit_program
    # ===================================================================== #
    # === Set another prefix
    #
    # ry htop --prefix=$J
    # ===================================================================== #
    when /^--prefix/,
         'set_prefix'
      set_user_prefix(i)
    # ===================================================================== #
    # === Build a Linux from Scratch system
    #
    # This entry point will delegate towards the class that will do a
    # LFS build for us.
    #
    # Invocation example:
    #
    #   ry --lfs
    #
    # ===================================================================== #
    when /^-?-?lfs$/i,
         /^linux(_|-| )?from(_|-| )?scratch$/i,'tolfs'
      linux_from_scratch
      exit_program
    # ===================================================================== #
    # === Quickly compile a GCC version based on other configure options
    #
    # This entry point allows us to quickly compile another gcc version.
    #
    # Invocation example:
    #
    #   ry --compile-gcc=8.1.0
    #
    # ===================================================================== #
    when /^-?-?compile(_|-| )?gcc=(.+)$/i # === $2
      version_to_use = $2.to_s.dup
      gcc = load_yaml_dataset_for_this_program(:gcc)
      gcc.use_this_version = version_to_use
      gcc.rebuild_path
      if File.exist? gcc.path?
        orev 'Now compiling version '+sfancy(version_to_use)+
             "#{rev} of the program called #{royalblue('gcc')}."
        compile_object = RBT::Action::Installer.new(:gcc) { :do_not_run_yet }
        compile_object.use_this_as_cookbook = gcc
        compile_object.ntrad
        compile_object.do_not_initialize_a_new_cookbook_dataset
        compile_object.run
      end
      exit_program
    # ===================================================================== #
    # === Query the headers of the system
    #
    # This entry point is just a wrapper towards class
    # RBT::QueryHeaderToPackage.
    #
    # Invocation examples:
    #
    #   rbt --query-headers
    #   rbt --query-headers=/usr/local/include/
    #
    # ===================================================================== #
    when /^-?-?query(-|_| )?headers$/i,
         /^-?-?query(-|_| )?headers=(.+)$/i
      _ = $2.to_s.dup
      _.delete!('-')
      if _.empty?
        _ = :default
      end
      require 'rbt/utility_scripts/query_header_to_package.rb'
      RBT::QueryHeaderToPackage.new(_)
      exit_program
    # ===================================================================== #
    # === Create an expanded cookbook dataset for a program
    #
    # This entry point allows us to use RBT to create a .yml file
    # holding all relevant information to describe a program that
    # is to be compiled/installed.
    #
    # Invocation examples:
    #
    #   rbt --create-yaml-file-for=subversion
    #   rbt --create-yaml-file-for=ruby
    #
    # ===================================================================== #
    when /^-?-?create(_|-| )?yaml(_|-| )?file(_|-| )?for=(.+)/
      create_yaml_file_for_this_program($4.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Show the last configure options
    #
    # Note that this entry point depends on show_last_options(). Since
    # as of January 2018, another way exists, based on a .yml file
    # that keeps track of the last configure option in use.
    #
    # Usage examples:
    #
    #   ry ffmpeg last_options?
    #   ry htop last_options?
    #
    # ===================================================================== #
    when *ARRAY_HELP_LAST_CONFIGURE_OPTIONS
      show_last_configure_options_then_exit
    # ===================================================================== #
    # === Show everything about a program based on the current working
    #     directory as input
    #
    # Invocation example:
    #
    #   rbt --show-all-about-this-dir
    #
    # ===================================================================== #
    when /^-?-?show(-|_| )?all(-|_| )?about(-|_| )?this(-|_| )?dir$/i,
         /^-?-?download(-|_| )?as(-|_| )?name$/ # === rbt --download-as-name
      show_all_about_this_dir(return_pwd)
    # ===================================================================== #
    # === Show the available profiles
    #
    # This entry point allows us to show the available profiles.
    #
    # Invocation example:
    #
    #   rbt --available-profiles?
    #
    # ===================================================================== #
    when /^-?-?available(-|_| )?profiles\??$/i,
         /^-?-?show(-|_| )?available(-|_| )?profiles$/i,
         /^-?-?profiles\??$/i
      show_available_profiles
      exit_program
    # ===================================================================== #
    # === Generate a LFS-like homepage
    #
    # This will generate a LFS-like homepage, where the individual programs
    # are written down into standalone .html pages.
    #
    # In other words, this is then a web-interface.
    #
    # The Cookbooks submodule solves this problem.
    #
    # Usage examples:
    #
    #   rbt htop generate_homepage
    #   rbt --generate-homepage
    #
    # ===================================================================== #
    when *ARRAY_HELP_GENERATE_HOMEPAGE_OPTIONS
      generate_homepage
      exit_program
    # ===================================================================== #
    # === Compile all KDE5 porting aids components
    #
    # The KDE5 porting aids include components such as "kdelibs4support",
    # "khtml", "kjs", "kjsembed", "kmediaplayer" or "kross".
    #
    # Invocation examples:
    #
    #   rbt --porting-aids
    #   rbt --compile-kde-porting-aids
    #   rbt --compile-porting-aids
    #
    # ===================================================================== #
    when /^-?-?porting(-|_| )?aids$/,
         /^-?-?kde(-|_| )?porting(-|_| )?aids$/,
         /^-?-?compile(-|_| )?kde(-|_| )?porting(-|_| )?aids$/,
         /^-?-?compile(-|_| )?porting(-|_| )?aids$/
      set_compile_these_programs(return_porting_aids)
    # ===================================================================== #
    # === Check for binary duplicates in the current working directory
    #
    # Usage examples:
    #
    #   rbt --check-for-binary-duplicates
    #   rbt --check-for-duplicates
    #   rbt --duplicates-in-pwd?
    #
    # ===================================================================== #
    when /^-?-?check(-|_| )?for(-|_| )?binary(-|_| )?duplicates$/i,
         /^-?-?check(-|_| )?for(-|_| )?duplicates$/i,
         /^-?-?duplicates(-|_| )?in(-|_| )?pwd\??$/i
      check_for_binary_duplicates_in_this_directory(return_pwd)
    # ===================================================================== #
    # === Display the program dataset as json file and store it
    #
    # This entry point allows the user to display the cookbook-dataset
    # in json format, and store it into a file.
    #
    # Note that this presently depends on the expanded cookbook dataset.
    #
    # Invocation examples:
    #
    #   rbt htop --json
    #   rbt htop --use-json
    #
    # ===================================================================== #
    when /^-?-?json$/,
         /^-?-?use(-|_| )?json$/
      show_and_store_json_for
      exit_program
    # ===================================================================== #
    # === rbt --nocolours
    # ===================================================================== #
    when /^-?-?no(-|_| )?colours/,
         /^-?-?nocol/,
         /^-?-?disable(-|_| )?colours/,
         'NOCOL',
         'NOCOLOURS'
      disable_colours
    # ===================================================================== #
    # === rbt --set_source_dir=/opt
    # ===================================================================== #
    when /^-?-?set(-|_| )?source(-|_| )?dir=(.+)$/,
         /^-?-?set(-|_| )?src(-|_| )?dir=(.+)$/,
         /^-?-?permanently(-|_| )?set(-|_| )?base(-|_| )?directory(-|_| )?to=(.+)$/
      _ = $3.to_s.dup
      _ = $5.to_s.dup if $5 # This is for the variant on the third line, see: http://rubular.com/r/6E6v45rB7u
      opnn; RBT.permanently_set_source_directory(_) { :be_verbose }
      exit_program
    # ===================================================================== #
    # === Download the remote BLFS page and display it
    #
    # This entry point allows the user to grab the remote content of the
    # BLFS page at hand (about a given program) and then display its
    # content on the commandline.
    #
    # Invocation examples:
    #
    #   ry php --paste-blfs-page
    #   ry ruby --parseblfs
    #   ry ruby --pasteblfs
    #   ry kerberos --show-blfs
    #
    # ===================================================================== #
    when /^-?-?paste(-|_| )?blfs(-|_| )?page$/i,
         /^-?-?blfs(-|_| )?page$/i,
         /^-?-?paste(-|_| )?blfs$/i,
         /^-?-?parse(-|_| )?blfs$/i,
         /^-?-?show(-|_| )?blfs$/i
      try_to_show_the_BLFS_content_of_this_program
      exit_program
    # ===================================================================== #
    # === Set extract to
    #
    # Specify our target directory for extracting an archive. Special
    # shortcuts, such as pwd for "current working directry", also
    # exist.
    #
    # Usage examples:
    #
    #   ry htop --extract_to=pwd
    #   ry htop --base-dir=/tmp/
    #   ry htop --base-dir=/opt/
    #   ry htop --extract-to=/opt/test
    #   ry mesa --use-this-as-temp-dir=/opt/foo
    #   ry htop ntrad --use-this-temp-dir=/opt/foobar_create_it
    #
    # ===================================================================== #
    when /^-?-?extract(_|-| )?to=(.*)$/,                                      # === $2
         /^-?-?temp(_|-| )?dir=(.*)$/,                                        # === $2
         /^-?-?use(_|-| )?temp(_|-| )?dir=(.*)$/,                             # === $3
         /^-?-?base(_|-| )?dir=(.+)$/,                                        # === $2
         /^-?-?use(_|-| )?this(_|-| )?temp(_|-| )?directory=(.*)$/,           # === $4
         /^-?-?use(_|-| )?this(_|-| )?temp(_|-| )?dir=(.*)$/,                 # === $4
         /^-?-?use(_|-| )?this(_|-| )?as(_|-| )?temp(_|-| )?dir=(.*)$/,       # === $5
         /^-?-?use(_|-| )?this(_|-| )?as(_|-| )?temp(_|-| )?directory=(.*)$/, # === $4
         /^-?e=(.*)$/                                                         # === $1
      _ = $1.to_s.dup
      _ = $2.to_s.dup if $2
      _ = $3.to_s.dup if $3
      _ = $4.to_s.dup if $4
      _ = $5.to_s.dup if $5
      set_extract_to_this_directory_as_specified_by_the_user(
        _
      )
    # ===================================================================== #
    # === Show whether RBT uses ccache or whether it does not
    #
    # This entry point just queries whether RBT will be making use of
    # ccache or whether it will not. The trailing '?' is mandatory.
    #
    # Invocation example:
    #
    #   rbt --use-ccache?
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?ccache\?$/
      show_whether_we_are_using_ccache_or_whether_we_are_not
    # ===================================================================== #
    # === Disable ccache
    #
    # This entry point will disable ccache, for the current compilation
    # run.
    #
    # Invocation examples:
    #
    #   rbt ruby --ntrad --disable-ccache
    #   rbt --disable-ccache
    #   rbt --do-not-use-ccache
    #   rbt --no-ccache
    #   rbt --ccache-
    #
    # ===================================================================== #
    when /^-?-?disable(-|_| )?ccache$/i,
         /^-?-?do(-|_| )?not(-|_| )?use(-|_| )?ccache$/i,
         /^-?-?no(-|_| )?ccache$/i,
         /^-?-?ccache-$/i,
         /^-?-?dont(-|_| )?use(-|_| )?ccache$/i
      verbose_disable_ccache
    # ===================================================================== #
    # === Tell people where they can find the .sh files
    #
    # Invokation example:
    #
    #   rbt --shell-completion?
    #
    # ===================================================================== #
    when /^-?-?shell(-|_| )?completion\??$/i
      e 'The .sh file for bash completion can be found here:'
      e
      e sfile("  #{project_base_dir?}shell/bash_completion.sh")
      e
      exit_program
    # ===================================================================== #
    # === Use a random, extracted directory
    #
    # This entry point allows us to use a random, extracted directory.
    #
    # Invocation examples:
    #
    #   ry htop --random-extracted-dir
    #   ry php --random-extracted-dir
    #   ry php --random-extracted-dir
    #
    # ===================================================================== #
    when /^-?-?random(_|-| )?extracted(_|-| )?dir$/i,
         /^-?-?random(_|-| )?dir$/i,
         /^-?-?gibberish$/i
      use_a_random_extracted_directory
      exit_program
    # ===================================================================== #
    # === Use a profile/decorator for the configure options
    #
    # This entry point allows us to use the LFS/BLFS glibc variant.
    #
    # Invocation examples:
    #
    #   ry glibc --use-glibc1-profile
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?glibc1(-|_| )?profile$/i,
         /^-?-?glibc1(-|_| )?profile$/i
      try_to_use_this_profile(:glibc1)
    # ===================================================================== #
    # === Show the flexbox only
    #
    # This entry point can be used to only show the flexbox, and then
    # exit.
    #
    # Invocation examples:
    #
    #   rbt ruby --show-flexbox-only
    #   rbt php --show-infobox-only
    #   rbt m4 --show-infobox-only
    #
    # ===================================================================== #
    when /^-?-?show(_|-| )?flexbox(_|-| )?only$/i,
         /^-?-?show(_|-| )?infobox(_|-| )?only$/i
      show_flexbox(self)
      exit_program
    # ===================================================================== #
    # === Query whether we will use stow
    #
    # Invoke this entry point like so:
    #
    #   ry --stow?
    #
    # ===================================================================== #
    when *ARRAY_HELP_DO_USE_STOW_OPTIONS
      feedback_whether_we_will_use_stow
      exit_program
    # ===================================================================== #
    # === Show how to use batch-compile
    #
    # Invocation example:
    #
    #   ry --batch-compile?
    #
    # ===================================================================== #
    when /-?-?batch-?compile\??$/,
         /-?-?show(_|-| )?how(_|-| )?to(_|-| )?batch(_|-| )?compile/,
         /--batch-?help/
      show_how_to_batch_compile
      exit_program
    # ===================================================================== #
    # === Show the GoboLinux instructions on the commandline
    #
    # This entry point allows us to show the GoboLinux instructions,
    # as far as RBT is concerned.
    #
    # Invocation example:
    #
    #   rbt --show-gobo-instructions
    #
    # ===================================================================== #
    when /^-?-?show(_|-| )?gobo(_|-| )?instructions$/
      show_gobolinux_instructions
    # ===================================================================== #
    # === Remove all broken symlinks via class RBT::RemoveSymlinks
    #
    # Use this entry point if you simply wish to invoke class
    # RBT::RemoveSymlinks.
    #
    # Invocation example:
    #
    #   rbt --remove_symlinks
    #
    # ===================================================================== #
    when /^-?-?remove(-|_| )?symlinks$/,
         /^-?-?remove(-|_| )?broken$/i
      action(:remove_symlinks)
      exit_program
    # ===================================================================== #
    # === rbt --download-all-source-archives
    # ===================================================================== #
    when /^-?-?download(-|_| )?all(-|_| )?source(-|_| )?archives$/i,
         /^-?-?download(-|_| )?source(-|_| )?archives$/i,
         /^-?-?download(-|_| )?sources$/i,
         /^-?-?grab(-|_| )?source(-|_| )?archives$/i
      action(:download_all_source_archives)
      exit_program
    # ===================================================================== #
    # === rbt --base_directory?
    # ===================================================================== #
    when /^-?-?base(-|_| )?directory\??$/,
         /^-?-?archive(-|_| )?directory\??$/
      action(:report_where_the_source_directory_can_be_found)
      exit_program
    # ===================================================================== #
    # === rbt --scanu
    # ===================================================================== # 
    when /^-?-?scanu/
      action(:missing_last_update_entries)
      exit_program
    # ===================================================================== #
    # === rbt --n_binaries?
    # ===================================================================== #
    when /^-?-?n(-|_| )?binaries\??$/,
         /^-?-?n(-|_| )?registered(-|_| )?binaries?\??$/,
         /^-?-?report(-|_| )?how(-|_| )?many(-|_| )?binaries(-|_| )?are(-|_| )?registered$/i
      action(:report_how_many_binaries_are_registered)
      exit_program
    # ===================================================================== #
    # === Create the log-directory
    #
    # This entry point will create the log-directory, that is, the
    # directory that will be used by RBT::Action::Installer to store
    # some files.
    #
    # Invocation examples:
    #
    #   rbt --create-log-dir
    #   rbt --create-log-directory
    #
    # ===================================================================== #
    when /^-?-?create(-|_| )?log(-|_| )?dir$/i,
         /^-?-?create(-|_| )?log(-|_| )?directory$/i
      create_log_directory
    # ===================================================================== #
    # === Generate global yaml database
    #
    # To generate the global yaml database, do this:
    #
    #   ry --gdatabase
    #
    # ===================================================================== #
    when /^-?-?generate(_|-| )?global(_|-| )?database$/,
         /^-?-?database$/,
         /^-?-?create-database$/,
         /^-?-?gdatabase$/
      generate_global_yaml_database
      exit_program
    # ===================================================================== #
    # === Batch-install the registered ruby addons
    #
    # This entry point allows us to batch-install the registered ruby
    # addons. It exists mostly due to convenience.
    #
    # Invocation examples:
    #
    #   ry --enable-ruby-addons
    #   ry --ruby-addons
    #   ry --compile-ruby-addons
    #
    # ===================================================================== #
    when /^-?-?enable(-|_| )?ruby(-|_| )?addons$/i,
         /^-?-?ruby(-|_| )?addons$/i,
         /^-?-?compile(-|_| )?all(-|_| )?of(-|_| )?ruby$/i,
         /^-?-?compile(-|_| )?ruby(-|_| )?addons$/,
         /^-?-?install(-|_| )?ruby(-|_| )?addons$/i,
         /^-?-?install(-|_| )?my(-|_| )?ruby(-|_| )?addons$/i
      install_the_ruby_addons
    # ===================================================================== #
    # === Use a specific, locally existing file for compilation
    #
    # The following entry point allows us to make use of a locally
    # existing file and compile that.
    #
    # Invocation examples:
    #
    #   ry --this_file=/home/x/src/php/php-7.3.4.tar.xz
    #   ry --this-file=/home/x/src/kalarm/kalarm-21.08.0.tar.xz
    #
    # ===================================================================== #
    when /^-?-?this(_|-| )?file=(.+)$/i
      _ = $2.to_s.dup
      set_compile_these_programs(_)
    # ===================================================================== #
    # === Check if source directories exist
    #
    # This entry point, a "clean-up step", can be used to find out
    # whether all source directories exist or whether they do not.
    #
    # Invocation example:
    #
    #   ry --check-if-source-dirs-exist
    #
    # ===================================================================== #
    when /-?-?check(-|_| )?if(-|_| )?source(-|_| )?dirs(-|_| )?exist$/
      check_if_source_directories_exist
      exit_program
    # ===================================================================== #
    # === Show the required dependencies via the Flexbox
    #
    # This entry point can be used by the user to show the dependencies
    # of the given program via the flexbox as well.
    #
    # Invocation example:
    #
    #   ry rack --show-required-dependencies
    #
    # ===================================================================== #
    when /^-?-?show(_|-| )?required-dependencies$/i
      orev 'Will show the required dependencies in the Fluxbox'
      RBT.configuration?.always_show_dependencies = true
    # ===================================================================== #
    # === Use glib schemata
    #
    # This option allows us to install an AppDir program with the
    # additional glib-schemata step, thus overruling any other
    # setting from the cookbook-yaml file at hand.
    #
    # Invocation example:
    #
    #   rbt anjuta ntrad --use-glib-schemata
    #
    # ===================================================================== #
    when /^-?-?use-?glib-?scheme$/i,
         /^-?-?use-?glib-?schemata$/i,
         /^-?-?glib-?scheme$/i,
         /^-?schemata$/i
      verbose_enable_glib_schema
    # ===================================================================== #
    # === This entry point allows us to set up a new RBT configuration
    #
    # Invocation example:
    #
    #   ry --generate-rbt-config
    #   ry --generate-config
    #
    # ===================================================================== #
    when /^-?-?generate(_|-| )?rbt(_|-| )?configuration$/i,
         /^-?-?generate(_|-| )?rbt(_|-| )?config$/i,
         /^-?-?generate(_|-| )?config$/i
      require 'rbt/utility_scripts/generate_rbt_configuration.rb'
      RBT::GenerateRbtConfiguration.new
    # ===================================================================== #
    # === Skip the extracting stage
    #
    # Skip extracting the source archive, via a configuration flag.
    #
    # Invocation examples for this entry point:
    #
    #   ry php skip_extracting
    #   ry gtk2 --skipextract
    #
    # ===================================================================== #
    when *ARRAY_HELP_SKIP_EXTRACTING_OPTIONS
      do_not_extract
    # ===================================================================== #
    # === Show which compiler we will use
    #
    # This entry point will simply display, on the commandline, which
    # compiler is used.
    #
    # Invocation examples:
    #
    #   ry --use-which-compiler?
    #   ry --compiler?
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?which(_|-| )?compiler\??$/i,
         /^-?-?compiler\??$/i
      show_which_compiler_will_be_used
      exit_program
    # ===================================================================== #
    # === Permanently remove a global flag
    #
    # Invocation example:
    #
    #   rbt --remove-global-flag=--disable-static
    #
    # ===================================================================== #
    when /-?-?remove(-|_)?global(-|_)?flag=(-?-?.+)$/
      permanently_remove_this_global_flag($3.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Download a remote program into the default directory
    #
    # This entry point allows us to quickly download a remote program
    # into a local directory.
    #
    # Invocation examples:
    #
    #   rbt --download-into-proper-directory htop
    #   rbt --download=htop
    #
    # ===================================================================== #
    when /^-?-?download(-|_| )?into(-|_| )?proper(-|_| )?directory$/i,
         /^-?-?download=(.+)$/i
      if i.include? '='
        match = $1.to_s.dup
        initialize_dataset_for(match)
      end
      download_this_remote_url_into_that_local_directory(
        url1?, base_dir?
      )
    # ===================================================================== #
    # === Show which programs will be compiled for a base system on Linux
    #
    # Invocation examples:
    #
    #   rbt --compile-base-system?
    #   rbt --compile-basic-system?
    #
    # ===================================================================== #
    when /^-?-?compile(_|-| )?base(_|-| )?system\?$/,
         /^-?-?compile(_|-| )?basic(_|-| )?system\?$/,
         /^-?-?compile(_|-| )?basic(_|-| )?subsystem\?$/,
         /^-?-?compile(_|-| )?basic(_|-| )?linux(_|-| )?core\?$/,
         /^-?-?compile(_|-| )?basic(_|-| )?linux\?$/
      require 'rbt/utility_scripts/compile_base_system.rb'
      RBT::CompileBaseSystem.report_which_programs_will_be_compiled
      exit_program
    # ===================================================================== #
    # === Invoke the manual_steps value, should it exist 
    #
    # This entry point allows the user to invoke the manual_steps entry,
    # should it exist. A program that has such an entry is "bzip2",
    # for instance. This way we can allow installation of the program
    # based on the manual_steps entries.
    #
    # Invocation example:
    #
    #   ry bzip2 --manual-steps
    #
    # ===================================================================== #
    when /^-?-?manual(-|_)?steps$/i,
         /^-?-?ad(-|_)?hoc$/i
      ensure_that_the_cookbook_dataset_exists(program_name?)
      _ = cookbook_dataset_manual_steps?.to_s.lstrip
      # =================================================================== #
      # Next sanitize it a bit, such as by removing '#' comment lines.
      # =================================================================== #
      _ = _.split("\n").reject {|entry|
        entry.strip.empty? or entry.strip.start_with?('#')
      }
      new_directory = extract_this_archive(
        program_path?,
        return_pwd
      )+program_name_and_program_version?.to_s+'/'
      if File.directory? new_directory
        cd new_directory
        if _.empty?
          orev 'No manual_steps entries were found.'
        else
          orev 'Now running all '+steelblue(_.size.to_s)+
               rev+' entries (working directory '\
               'is: '+sdir(return_pwd)+
               rev+'):'
          e
          _.each {|entry|
            e tomato(entry)
            case entry
            when /^cd /
              cd(entry.split(' ').last)
            else
              system entry
            end
          }
          e
        end
      else
        opne rev+'No directory exists at `'+sdir(new_directory)+rev+'`.'
      end
      exit_program
    # ===================================================================== #
    # === Compile the xorg libraries
    #
    # This entry point allows the user to easily compile all
    # xorg-libraries.
    #
    # Invocation example:
    #
    #   rbt --compile-xorg-libraries
    #   rbt --compile-xorg-base
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?xorg(-|_| )?libraries$/i,
         /^-?-?compile(-|_| )?xorg(-|_| )?base$/i
      compile_xorg_libraries
    # ===================================================================== #
    # === Feedback the available formats
    #
    # This entry point will simply show the available (registered)
    # formats.
    #
    # Invocation examples:
    #
    #   rbt --formats?
    #   rbt --feedback_all_available_formats
    #
    # ===================================================================== #
    when /^-?-?formats?\??$/i,
         /^-?-?feedback(-|_)?all(-|_)?available(-|_)?formats$/
      feedback_all_available_formats
      exit_program
    # ===================================================================== #
    # === Show the colours in use
    #
    # Invocation example:
    #
    #   rbt --colours?
    #
    # ===================================================================== #
    when /^-?-?colours\?$/i
      show_the_colours_in_use
      exit_program
    # ===================================================================== #
    # === Show which programs have a dependency on a particular program
    #
    # This entry point enables the user to determine which programs
    # have a dependency on meson. Once that has been established
    # these programs will be shown on the commandline.
    #
    # Usage example:
    #
    #   rbt --dependency-on=meson
    #
    # ===================================================================== #
    when /^-?-?dependency(-|_)?on=(.+)$/i # === $2
      _ = $2.to_s.dup
      show_all_programs_that_have_this_as_dependency(_)
      exit_program
    # ===================================================================== #
    # === Generate the available programs versions
    #
    # This entry point will generate the big .md file that can be used
    # to display which versions are tracked by the RBT project.
    #
    # This .md file is displayed on the homepage of the RBT gem.
    #
    # Invocation example:
    #
    #   rbt --bigfile
    #
    # ===================================================================== #
    when /^-?-?bigfile$/i,
         /^-?-?save(_|-| )?the(_|-| )?available(_|-| )?programs(_|-| )?versions$/i
      action(:SaveTheAvailableProgramsVersions)
      exit_program
    # ===================================================================== #
    # === Do not append no-error
    #
    # This entry point prevents adding the no-error shell script to
    # configure.
    #
    # Invocation example:
    #
    #   ry cmake --do-not-append-no-error
    #
    # ===================================================================== #
    when /^-?-?do(_|-| )?not(_|-| )?append(_|-| )?no(_|-| )?error$/i
      orev 'Not appending no-error to the configure line.'
      @internal_hash[:append_shell_error_code] = false
    # ===================================================================== #
    # === Scan for missing last update entries in the cookbooks entries
    #
    # This entry point allows us to scan for missing "last_update"
    # entries in the various cookbooks .yml files.
    #
    # Invocation example:
    #
    #   ry --scan
    #
    # ===================================================================== #
    when /^-?-?scan$/i
      require 'rbt/checks_and_validations/scan_for_missing_last_update_entries.rb'
      RBT.scan_for_missing_last_update_entries
      exit_program
    # ===================================================================== #
    # === Do not show any output from class Extracter, when extracting
    #     an archive
    #
    # This entry point allows the user to suppress output from class
    # Extracter. This may be useful sometimes because class Extracter
    # is quite verbose/spammy.
    #
    # Usage example:
    #
    #   Installer libdrm --silent-extracter --ntrad
    #
    # ===================================================================== #
    when /^-?-?do(_|-| )?not(_|-| )?show(_|-| )?output(_|-| )?from(_|-| )?the(_|-| )?extracter(_|-| )?class$/i,
         /^-?-?silent(_|-| )?extracter(_|-| )?class$/i,
         /^-?-?silent(_|-| )?extracter$/i
      @internal_hash[:show_output_from_the_extracter_class] = false
    # ===================================================================== #
    # === Do not use a build directory
    #
    # This setting allows the user to specifically NOT use a build
    # directory. Sometimes this may be necessary to have, and
    # overrule via the commandline - hence why this entry point
    # exists.
    #
    # Invocation example:
    #
    #   installer zsync --do-not-use-a-build-directory
    #
    # ===================================================================== #
    when /^-?-?do(_|-| )?not(_|-| )?use(_|-| )?a(_|-| )?build(_|-| )?directory$/i
      do_not_use_a_build_directory { :be_verbose }
    # ===================================================================== #
    # === Copy the expanded directory to its designated (default) location
    #
    # This entry point can be used to quickly copy the existing set of
    # yaml files (.yml) to their assumed target location. Note that this
    # will overwrite existing .yml files, so do not invoke this if you
    # do not desire that behaviour.
    #
    # The reason this functionality was added in February 2022 was so
    # that we can quickly "bootstrap" compiling new programs from
    # source, on a freshly installed (linux) system.
    #
    # Invocation example:
    #
    #   rbt --copy-expanded-directory
    #
    # ===================================================================== #
    when /^-?-?copy(_|-| )?expanded(_|-| )?directory?$/i,
         /^-?-?copy(_|-| )?expanded(_|-| )?directories$/i
      copy_expanded_directory
      exit_program
    # ===================================================================== #
    # === Sleep before continuing
    #
    # Delay also works as alias to it (since Oct 2011).
    #
    # Usage example:
    #
    #   ry htop sleep5
    #   ry htop --sleep5 --ntrad
    
    # ===================================================================== #
    when /^-?-?sleep(\d+)$/,
         /^-?-?delay(\d+)$/,
         /-sl(\d+)$/
      n_seconds = $1
      orev "Sleeping for `#{teal(n_seconds.to_s)}#{rev}` "\
           "seconds before continuing."
      set_delay_before_continuing(n_seconds)
    # ===================================================================== #
    # === Copy the source tarball into the current working directory
    #
    # This entry point can be used to copy the source archive to the
    # current working directory.
    #
    # Invocation examples:
    #
    #   ry --copy-source=php
    #   ry --copy-source=ruby
    #   ry --copy-this-archive=bison
    #
    # ===================================================================== #
    when /^-?-?copy(-|_| )?source=(.+)$/i,             # === $2
         /^-?-?copy(-|_| )?this(-|_| )?archive=(.+)$/i # === $3
      _ = $2.to_s.dup
      _ = $3.to_s.dup if $3
      copy_source(_)
      exit_program
    # ===================================================================== #
    # === --add_global_flag
    # ===================================================================== #
    when /^-?-?add(-|_)?global(-|_)?flag (-?-?.+)$/
      add_this_global_flag($3)
    # ===================================================================== #
    # === --remove_global_flag
    # ===================================================================== #
    when /^-?-?remove(-|_)?global(-|_)?flag (-?-?.+)$/
      remove_this_global_flag($3)
    # ===================================================================== #
    # === --update-entry
    # ===================================================================== #
    when /^-?-?update-?entry (http.+)$/
      update_this_entry($1.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Compile a simple GCC but with lots of languages enabled
    #
    # Invocation examples:
    #
    #   ry gcc --use-profile-minimal-gcc-but-lots-of-languages
    #   ry gcc --minimal-gcc
    #   ry gcc --basic-profile
    #   ry gcc --minimal
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?profile(-|_| )?minimal(-|_| )?gcc(-|_| )?but(-|_| )?lots(-|_| )?of(-|_| )?languages$/i,
         /^-?-?use(-|_| )?profile(-|_| )?minimal(-|_| )?gcc(-|_| )?but(-|_| )?lots(-|_| )?of(-|_| )?languages(-|_| )?enabled$/i,
         /^-?-?minimal(-|_| )?gcc$/i,
         /^-?-?minimal$/i,
         /^-?-?basic(-|_| )?profile$/i,
         /^-?-?gcc1$/i
      try_to_use_this_profile(:basic_gcc_but_with_lots_of_languages_enabled)
    # ===================================================================== #
    # === Backup Program
    #
    # This can be used to backup a single (individual) program.
    #
    # Invocation example:
    #
    #   ry htop --backup-program
    #
    # ===================================================================== #
    when /^-?-?backup(_|-| )?programs?$/,
         'backup-programs',
         'programs_backup',
         'packup',
         'backup'
      backup_program
      exit_program
    # ===================================================================== #
    # === GoboLinux Dependency File
    #
    # This will create a GoboLinux dependency file.
    #
    # Invocation example:
    #
    #   ry sox  --create_dependencies_file
    #   ry htop create_dependencies_file
    #   ry php --create_dependencies_file
    #
    # ===================================================================== #
    when /-?-?create(_|-| )?dependencies(_|-| )?file$/,
         /-?-?dependency(_|-| )?file$/
      create_dependencies_file
      exit_program
    # ===================================================================== #
    # === Show some instructions for GoboLinux
    #
    # Invocation examples:
    #
    #   rbt --gobolinux-instructions
    #   rbt --show-instructions-for=gobolinux
    #
    # ===================================================================== #
    when /^-?-?gobolinux(-|_| )?instructions$/i,
         /^-?-?show(-|_| )?instructions(-|_| )?for=(.+)$/i
      show_instructions_for_gobolinux
      exit_program
    # ===================================================================== #
    # === Query whether we will use colours
    #
    # This entry point allows you to query whether colours will be
    # used in class RBT::Compile for the current compilation run.
    #
    # Invocation example:
    #
    #   ry --use-colours?
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?colours\??$/
      report_whether_colours_will_be_used
      exit_program
    # ===================================================================== #
    # === Query the debug value
    #
    # Query the debug value:
    #
    #   ry --debug?
    #
    # ===================================================================== #
    when /^-?-?query(_|-| )?debug(_|-| )?value$/,/^-?-?debug\??$/
      query_debug_value
      exit_program
    # ===================================================================== #
    # === Use a specific compile-version
    #
    # This allows us to use another version at compile-time.
    #
    # This only works if we compile in an app-dir like variant.
    # ===================================================================== #
    when /^-?-?compile-?version=(.+)/,
         /^-?-?use_?this_?compile_?version=(.+)/
      use_this_compile_version($1.to_s.dup)
    # ===================================================================== #
    # === Scan the Source Archive
    #
    # Scan source archive:
    #
    #   ry --scan_source_archive
    #
    # ===================================================================== #
    when *ARRAY_HELP_SCAN_SOURCE_ARCHIVE_OPTIONS
      scan_source_archive
      exit_program
    # ===================================================================== #
    # === Add a packager-user
    #
    # Add a packager-user this way:
    #
    #   ry php add_package_user
    #
    # ===================================================================== #
    when /^-?-?add(_|-| )?package(_|-| )?user$/i,
         'adduser','packageuser','useradd'
      add_package_user
      exit_program
    # ===================================================================== #
    # === Clear the global flags
    #
    # Invocation example:
    #
    #   rbt --clear-global-flags
    #
    # ===================================================================== #
    when /^-?-?clear(_|-| )?global(_|-| )?flags$/i
      clear_global_flags
      exit_program
    # ===================================================================== #
    # === Do not use the sed wrapper                              (sed tag)
    #
    # If you do not want to apply the internal sed-wrapper, then
    # this is the proper entry point.
    #
    # Invocation examples:
    #
    #   ry libmad --disable-sed
    #   ry cogl --use-simple-sed
    #
    # ===================================================================== #
    when /^-?-?disable(-|_)?internal(-|_)?sed$/,
         /^-?-?use(-|_)?simple(-|_)?sed$/,
         /^-?-?use(-|_)?oldschool(-|_)?sed$/,
         /^-?-?use(-|_)?traditional(-|_)?sed$/,
         /^-?-?oldschool(-|_)?sed$/,
         /^-?-?disable(-|_)?sed(-|_)?wrapper$/
      verbose_disable_sed
    # ===================================================================== #
    # === Keep .la files
    #
    # This allows us to keep .la files, even if the configuration setting
    # specifies otherwises.
    #
    # Invocation example:
    #
    #   ry pcre ntrad --keep-la-files
    #
    # ===================================================================== #
    when /^-?-?keep(-|_)?la(-|_)?files$/i,
         /^-?-?do(-|_)?keep(-|_)?la(-|_)?files$/i
      do_keep_la_files
    # ===================================================================== #
    # === Query whether to use a specific build directory
    #
    # This entry point allows us to determine whether a given program
    # will use a build directory.
    #
    # Usage examples:
    #
    #   ry htop --usebuilddir?
    #   ry libsysstat usebuilddir?
    #
    # ===================================================================== #
    when /^-?-?usebuilddir\??$/i
      report_whether_a_build_directory_will_be_used_for_this_program
      exit_program
    # ===================================================================== #
    # === Run preinstall action from the commandline
    #
    # Sometimes you may wish to run a pre-install action from the
    # commandline, rather than have to rely on the .yml file
    # (which may not even include this pre-install action).
    #
    # The entry point here allows you to do so, and supply your
    # own pre-install actions. Individual entries can be
    # separated via a ',' character.
    #
    # Invocation examples:
    #
    #   rbt libcaca --preinstall="sh bootstrap"
    #   rbt libcaca --prerun="sh bootstrap"
    #   rbt libcaca --prerun="sh bootstrap" --trad
    #
    # ===================================================================== #
    when /^-?-?preinstall="?(.+)"?$/,
         /^-?-?prerun="?(.+)"?$/
      set_preinstall_action($1.to_s.dup)
    # ===================================================================== #
    # === Do not strip the binaries
    #
    # Invocation examples:
    #
    #   ry htop ntrad donotstripbinaries
    #   ry awk ntrad donotstripbinaries
    #
    # ===================================================================== #
    when /^-?-?do(-|_)?not(-|_)?strip(-|_)?the(-|_)?binaries$/,
         /^-?-?do(-|_)?not(-|_)?strip(-|_)?binaries$/,
         /^-?-?do(-|_)?not(-|_)?strip$/,
         /^-?-?no(-|_)?strip$/
      verbose_do_not_strip_the_binaries
    # ===================================================================== #
    # === Feedback whether we will strip the produced binaries or not
    #
    # This is a simple query-method, to determine whether RBT will
    # run the "strip" command on the resulting binaries or whether
    # it will not.
    #
    # Invocation examples:
    #
    #   rbt --use-strip?
    #   rbt --will-we-strip?
    #
    # ===================================================================== #
    when /^-?-?use(-|_)?strip\??$/i,
         /^-?-?strip\??$/i,
         /^-?-?will(-|_)?we(-|_)?use(-|_)?strip\??$/i,
         /^-?-?will(-|_)?we(-|_)?strip\??$/i
      feedback_whether_we_will_strip_or_whether_we_will_not
      exit_program
    # ===================================================================== #
    # === Update registered binaries
    #
    # Update our list of Registered Binaries (the same as running regbin)
    #
    # Invocation example:
    #
    #   ry --update-registered-binaries
    #
    # ===================================================================== #
    when *ARRAY_HELP_UPDATE_BINARY_NAMES_OPTIONS
      update_binary_names :then_exit
    # ===================================================================== #
    # === Register the Cookbook tags
    #
    # This method will create all registered tags (associated with the
    # cookbook entries).
    #
    # Invocation example:
    #
    #   ry --register-tags
    #
    # ===================================================================== #
    when /register(_|-| )?tags/
      action(:create_registered_tags)
      exit_program
    # ===================================================================== #
    # === Query whether the cookbook will modify env variables
    #
    # This option exists to give users means to query, from the
    # commandline, whether the target cookbook-yaml file will make
    # use of special ENV variables.
    #
    # For example, the program called "mesa" may require the
    # manipulation of the ENV variable called "GLL_DRV" being
    # set, before compilation should start.
    #
    # Invocation example:
    #
    #   ry mesa --modify_env_variables?
    #   ry gcc --modify_env_variables?
    #
    # ===================================================================== #
    when /^-?-?modify(_|-| )?env(_|-| )?variables\??$/
      feedback_whether_the_cookbook_will_modify_env_variables
      exit_program
    # ===================================================================== #
    # === Copy header (.h) files to the current working directory
    #
    # This entry point copies .h files that are registered for
    # a given program at hand, into the current working directory.
    #
    # This entry point is a bit different from the variant that is
    # used via --copy-headers-from=, in that we will ONLY copy
    # registered .h files that are available under an AppDir-like
    # prefix. The other method can also use .h files that reside
    # under the /usr/include/ hierarchy.
    #
    # Invocation examples:
    #
    #   ry glibc --copy-headers
    #   ry glibc --copy-headers-into-pwd
    #   ry glibc --copy-headers-to-pwd
    #
    # ===================================================================== #
    when /^-?-?copy(-|_| )?headers$/i,
         /^-?-?copy(-|_| )?headers(-|_| )?into(-|_| )?pwd$/i,
         /^-?-?copy(-|_| )?headers(-|_| )?to(-|_| )?pwd$/
      copy_headers_from(appdir_prefix?+'include/')
      exit_program
    # ===================================================================== #
    # === Copy the linux kernel .h header files into the home dir
    #
    # This entry point allows the user to copy the linux-kernel header
    # files to the home directory.
    #
    # Invocation example:
    #
    #   ry --install-kernel-headers-into-the-home-dir
    #
    # ===================================================================== #
    when /^-?-?install(-|_| )?kernel(-|_| )?headers(-|_| )?into(-|_| )?the(-|_| )?home(-|_| )?dir$/i,
         /^-?-?install(-|_| )?linux(-|_| )?headers(-|_| )?into(-|_| )?the(-|_| )?home(-|_| )?dir$/i
      install_the_linux_kernel_header_files_via_this_prefix(home_dir?)
      exit_program
    # ===================================================================== #
    # === Create a gentoo Ebuild Recipe
    #
    # This entry point allows us to build a gentoo-specific ebuild
    # file. This is an experimental feature as of the year 2018.
    #
    # For the format specification you can look at this remote wiki:
    #
    #   https://wiki.gentoo.org/wiki/Ebuild
    #
    # Invoke it in such a way:
    #
    #   ry ruby --create_ebuild_recipe
    #   ry htop create_ebuild_recipe
    #   ry python ebuild
    #
    # ===================================================================== #
    when /^-?-?create(_|-| )?ebuild(_|-| )?recipe$/,
         'make_ebuild',
         'ebuild',
         'gentoo',
         'gent'
      create_ebuild_recipe
      exit_program
    # ===================================================================== #
    # === Register all programs
    #
    # Usage example:
    #
    #   ry --register_all
    #
    # ===================================================================== #
    when /-?-?register(_|-| )?all$/,
         'regall'
      register_all_programs
      exit_program
    # ===================================================================== #
    # === Specify to use cmake as build-system
    #
    # Invocation example:
    #
    #   ry htop --use-cmake
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?cmake$/i
      set_use_this_build_system(:cmake)
    # ===================================================================== #
    # === Append -march=native onto the CFLAGS
    #
    # Invocation example:
    #
    #   ry sed --march=native -O3 --static --opt
    #
    # ===================================================================== #
    when /^-?-?march=native$/,
         /^-?-?native/i
      _ = '-march=native'
      orev "Appending #{steelblue(_)} #{rev}onto the CFLAGS next."
      append_onto_the_cflags(_)
    # ===================================================================== #
    # === rbt --feedback_expanded_dependencies_of_this_program
    # ===================================================================== #
    when /^-?-?feedback(-|_| )?expanded(-|_| )?dependencies(-|_| )?of(-|_| )?this(-|_| )?program$/i
      feedback_expanded_dependencies_of_this_program
      exit_program
    # ===================================================================== #
    # === Open a specific yaml file via the editor
    #
    # This entry point allows you to open a specific yaml file.
    #
    # Invocation examples:
    #
    #   rbt --edit-file=nano
    #   rbt --edit-file=ruby
    #   rbt --edit=nano
    #
    # ===================================================================== #
    when /-?-?edit-?file=(.+)/,
         /-?-?edit=(.+)/
      edit_this_yaml_file_via_the_main_editor($1.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Compile libstdc++, from GCC
    #
    # Invocation examples:
    #
    #   rbt --compile-libstdc
    #   rbt --compile-libstdc++
    #   rbt --install-libstdc
    #   rbt --install-libstdc++
    #   rbt --c++headers
    #   rbt --libstdc++
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?libstdc$/i,
         /^-?-?compile(-|_| )?libstdc\+\+$/i,
         /^-?-?install(-|_| )?libstdc$/i,
         /^-?-?install(-|_| )?libstdc\+\+$/i,
         /^-?-?c\+?\+?headers$/i,
         /^-?-?libstdc\+\+$/i
      do_compile_libstdc_plus_plus
      exit_program
    # ===================================================================== #
    # === Show the last configure option for a given program
    #
    # Invocation example:
    #
    #   ry attica --show-last-configure-option
    #
    # ===================================================================== #
    when /^-?-?show(_|-| )?last(_|-| )?configure(_|-| )?option$/i,
         /^-?-?show(_|-| )?last(_|-| )?configure(_|-| )?option(_|-| )?for(_|-| )?this(_|-| )?program$/i,
         /^-?-?was(_|-| )?compiled(_|-| )?via\??$/
      show_the_last_configure_option_for_this_program(compile_which_program?)
      exit_program
    # ===================================================================== #
    # === Delegate to RBT::Cookbooks::Cookbook
    #
    # Invocation example:
    #
    #   rbt --scookie=php
    #
    # ===================================================================== #
    when /^-?-?scookie=(.+)$/i
      instantiate_a_new_cookbook_for($1.to_s.dup).report
      exit_program
    # ===================================================================== #
    # === Delegate to RBT::Cookbooks::Cookbook
    #
    # Invocation example:
    #
    #   ry calligra --scookie
    #
    # ===================================================================== #
    when /^-?-?scookie$/,
         /^-?-?sanitize(-|_| )?cookbook(-|_| )?dataset$/
      instantiate_a_new_cookbook_for(program?).report
      exit_program
    # ===================================================================== #
    # === Check for updates of all registered gems
    #
    # This entry point allows us to batch-update all registered gems in
    # the RBT project.
    #
    # A working internet connection is required for this functionality,
    # obviously.
    #
    # Invocation examples:
    #
    #   rbt --update-all-gems
    #   rbt --update-ruby-gems
    #
    # ===================================================================== #
    when /^-?-?update(-|_)?all(-|_)?gems$/i,
         /^-?-?update(-|_)?gems$/,
         /^-?-?update(-|_)?ruby(-|_)?gems$/,
         /^-?-?update(-|_)?all(-|_)?ruby(-|_)?gems$/i,
         /^-?-?upgrade(-|_)?gems$/i,
         /^-?-?update(-|_)?ruby$/i,
         /^-?-?update(-|_)?ruby(-|_)?addons$/i
      update_all_gems
    # ===================================================================== #
    # === Simply run "waf"
    #
    # Invocation example:
    #
    #   rbt --run-waf
    #
    # ===================================================================== #
    when /^-?-?run(-|_| )?waf$/i
      run_waf
      exit_program
    # ===================================================================== #
    # === Permanently use clang as the main compiler in use
    #
    # This entry point allows the user to permanently use clang as the
    # main compiler in use, rather than, say, GCC.
    #
    # Invocation example:
    #
    #   rbt --permanently-use-clang
    #
    # ===================================================================== #
    when /^-?-?permanently(-|_| )?use(-|_| )?clang$/i,
         /^-?-?do(-|_| )?permanently(-|_| )?use(-|_| )?clang$/i
      do_permanently_use_clang
      exit_program
    # ===================================================================== #
    # === Parse a specific remote LFS/BLFS page and display it
    #
    # This entry point allows the user to parse a remote LFS/BLFS page
    # and display the content on the commandline.
    #
    # Invocation example:
    #
    #   rbt --parse-blfs-page-for=llvm
    # 
    # ===================================================================== #
    when /^-?-?parse(-|_)?b?lfs(-|_)?page(-|_)?for=(.+)$/i, # === $4
         /^-?-?parse(-|_)?b?lfs(-|_)?page(-|_)?of=(.+)$/i   # === $4
      try_to_show_the_BLFS_content_of_this_program($4.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Remove all /home/Programs/*Settings/ directories
    #
    # This is an ad-hoc entry point, where we will simply kill all
    # /Settings/ directories under /home/Programs/. Only invoke
    # this is if you are absolutely certain that you need this
    # functionality.
    #
    # Invocation example:
    #
    #   ry --purge-all-settings-directories
    #
    # ===================================================================== #
    when /^-?-?purge(-|_| )?all(-|_| )?settings(-|_| )?directories$/i
      purge_all_settings_directories
      exit_program
    # ===================================================================== #
    # === Enable the use of the GCC compiler
    #
    # This option will enable the use of the GCC compiler.
    #
    # Invocation example:
    #
    #   ry htop --use-gcc
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?gcc$/i
      do_use_the_gcc_compiler :and_notify_the_user
    # ===================================================================== #
    # === Resymlink all programs
    #
    # This entry point will resymlink all programs under the /Programs
    # hierarchy again, or respectively, wherever you have set your
    # $PROGRAMS value at.
    #
    # Invocation examples:
    #
    #   rbt --resymlink
    #   rbt --resymlink-all-programs
    #   rbt --symlink-all-under-programs-hierarchy
    #
    # ===================================================================== #
    when /^-?-?resymlink$/i,
         /^-?-?do(_|-| )?symlink(_|-| )?all(_|-| )?programs$/i,
         /^-?-?resymlink(-|_| )?all(-|_| )?programs$/i,
         /^-?-?symlink(_|-| )?all(_|-| )?under(_|-| )?programs(_|-| )?hierarchy$/i
      do_symlink_all_programs_then_exit
    # ===================================================================== #
    # === Symlink a single program.
    #
    # Symlink a specific (single) program from within this file.
    #
    # This requires an AppDir like setup, such as within the /Programs/
    # hierarchy.
    #
    # Usage examples:
    #
    #   ry lua --symlink
    #   ry xload --symlink
    #   ry htop --symlink
    #
    # ===================================================================== #
    when /^-?-?symlink$/,
         /^-?-?advanced(_|-| )?symlink$/,
         'asymlink'
      do_invoke_symlink_program(
        compile_which_program?,
        program_version? # bl $RBT/utility_scripts/symlink_program/symlink_program.rb
      )
      exit_program
    # ===================================================================== #
    # === Remove all Symlinks in the /home/Programs/ hierarchy
    #
    # Use this entry point if you wish to eliminate all symlinks for
    # the /Programs/ hierarchy.
    #
    # Invocation examples:
    #
    #   ry --remove_symlinks
    #   ry remove_symlinks
    #   ry CLEAR_SYMLINKS
    #
    # ===================================================================== #
    when *ARRAY_HELP_REMOVE_ALL_SYMLINKS_OPTIONS
      remove_all_symlinks
      exit_program
    # ===================================================================== #
    # === Use BLFS instructions
    #
    # This entry point allows the user to use the BLFS instruction for
    # a given program directly. It will make use of system().
    #
    # The idea behind this feature is that you may be at a computer
    # without a working xorg-server, but you still wish to compile
    # some programs quickly, so it may be more convenient to use
    # these battle-tested instructions as-is, via the commandline.
    #
    # Invocation example:
    #
    #   ry kerberos --use-blfs-instructions
    #   ry binutils --lfs-instructions
    #
    # ===================================================================== #
    when /^-?-?use(-|_)?blfs(-|_)?instructions$/i,
         /^-?-?lfs(-|_)?instructions$/i,
         /^-?-?use(-|_)?lfs(-|_)?instructions$/i
      do_use_the_blfs_instructions_for_compiling_this_program
      exit_program
    # ===================================================================== #
    # === Show the content of the yaml file
    #
    # This entry point can be used to simply display the full yaml
    # file here. That is, the content of a program's recipe.
    #
    # Invocation examples:
    #
    #   ry htop show_all
    #   ry db show_all
    #   ry libmad show-content
    #   ry libmad --show-content
    #
    # ===================================================================== #
    when *ARRAY_HELP_SHOW_ALL_OPTIONS
      show_all
      exit_program
    # ===================================================================== #
    # === Enable --with-newlib
    #
    # Invocation example:
    #
    #   ry gcc --trad --newlib
    #
    # ===================================================================== #
    when /^-?-?newlib$/i
      append_these_configure_options('--with-newlib')
    # ===================================================================== #
    # === Obtain a random program and compile it
    #
    # This may be useful if you just want to check whether compiling
    # any of the registered programs works, without caring too much
    # which entry it is. RBT will randomly pick a program and
    # use that for compilation.
    #
    # Invocation examples:
    #
    #   ry --random
    #   ry --random-program
    #
    # ===================================================================== #
    when 'RANDOM',
         /^-?-?random$/,
         /^-?-?return(_|-| )?random(_|-| )?program$/,
         /^-?-?random(_|-| )?program$/i
      _ = return_random_program
      orev "Compiling the program `#{sfancy(_)}#{rev}` next."
      set_compile_these_programs(_) # ← This will also invoke set_compile_this_program(_)
    # ===================================================================== #
    # === rbt --path_to_source_directory?
    # ===================================================================== #
    when /^-?-?path(-|_| )?to(-|_| )?source(-|_| )?directory\??$/,
         /^-?-?path\??$/
      show_path_to_the_source_directory_yaml_file
      exit_program
    # ===================================================================== #
    # === Extract a local archive
    #
    # This entry point allows us to quickly extract a source archive
    # that exists locally. As argument to this invocation, specify
    # the location to the archive at hand.
    #
    # Invocation examples:
    #
    #   rbt --extract-this=bison-3.2.4.tar.xz
    #   rbt --extract-this=/home/x/src/php/php-8.0.3.tar.xz
    #
    # ===================================================================== #
    when /^-?-?extract(-|_)?this=(.+)$/i
      require 'rbt/toplevel_methods/extract.rb'
      RBT.extract($2.to_s.dup)
    # ===================================================================== #
    # === Query where the source directory is
    #
    # This entry point allows us to query where the source directory
    # on the local computer system resides at.
    #
    # Invocation examples:
    #
    #   rbt --source-dir?
    #   rbt --source-archive?
    #
    # ===================================================================== #
    when *REGEXES_TO_SHOW_THE_SOURCE_DIRECTORY
      e sdir(source_directory?)
    # ===================================================================== #
    # === Query the PATH in use
    #
    # This entry point will display the current PATH in use.
    #
    # Invocation example:
    #
    #   ry --path?
    #
    # ===================================================================== #
    when /^-?-?path\?$/i
      e "#{rev}The path in use is:"
      e
      e slateblue(ENV['PATH'])
      e
    # ===================================================================== #
    # === Update the various tags
    #
    # Invocation example:
    #
    #   rbt --update-tags
    #
    # ===================================================================== #
    when /^-?-?update(-|_| )?tags$/
      update_tags
      exit_program
    # ===================================================================== #
    # === Use a specific version based on numbers-input only
    #
    # This entry point allows us to respond to input such as "1.5.2".
    #
    # This is assumed to be a shortcut for --use-this-version=1.5.2.
    #
    # Usage examples:
    #
    #   ry caja 1.21.4
    #   ry caja 1.21.4 --trad
    #
    # ===================================================================== #
    when /^(\d{0,2}\.\d{0,2}\.?\d{0,2}?)$/
      use_a_specific_program_version($1.to_s.dup)
    # ===================================================================== #
    # === Offer simplified bzip2 installation
    #
    # This entry point allows the user to quickly compile bzip2,
    # no matter what.
    #
    # Invocation example:
    #
    #   ry --simplified-bzip
    #
    # ===================================================================== #
    when /^-?-?simplified(-|_)?bzip2?$/i,
         /^-?-?simple(-|_)?bzip2?$/i,
         /^-?-?simple(-|_)?bzip2?(-|_)?installation$/i
      do_perform_simplified_bzip_installation
      exit_program
    # ===================================================================== #
    # === Query the manual_steps value, should it exist 
    #
    # This entry point allows the user to query the manual_steps entry,
    # should it exist. A program that has such an entry is "bzip2",
    # for instance.
    #
    # Note that for this entry step the trailing "?" is mandatory, in
    # order to help distinguish it for the corresponding entry that
    # lacks a trailing "?".
    #
    # Invocation example:
    #
    #   ry bzip2 --manual-steps?
    #
    # ===================================================================== #
    when /^-?-?manual(-|_)?steps\?$/i
      ensure_that_the_cookbook_dataset_exists(program_name?)
      _ = cookbook_dataset_manual_steps?.lstrip
      if _ and !_.empty?
        orev 'The program '+steelblue(program_name?)+
             rev+' has this manual_steps entry:'
        e
        e tomato(_)
        e
      else
        orev 'The program '+steelblue(program_name?)+
             rev+' does not have any manual_steps: entry defined.'
      end
      exit_program
    # ===================================================================== #
    # === Check for available program versions
    #
    # This entry point will check for the available program versions
    # of the given program at hand.
    #
    # Usage examples:
    #
    #   ry libsigc++ --available_versions
    #   ry bluefish --available_versions
    #   ry gcc ?
    #
    # ===================================================================== #
    when *ARRAY_HELP_AVAILABLE_PROGRAM_VERSIONS
      check_for_available_versions
      exit_program
    # ===================================================================== #
    # === Show the minimal GCC configure options
    #
    # This entry point will show the minimal GCC configure options that
    # can be used for when you wish to configure a GCC from scratch.
    #
    # The rationale behind this option is so that we are able to quickly
    # compile GCC without necessarily needing the RBT scripts for this -
    # aka oldschool shell scripts and so forth.
    #
    # Invocation example:
    #
    #   ry --gcc-minimal?
    #
    # ===================================================================== #
    when /^-?-?gcc(_|-| )?minimal\??$/i
      show_minimal_gcc_configure_options
      exit_program
    # ===================================================================== #
    # === Show the last compiled program
    #
    # Use this method if you wish to show the last compiled program.
    #
    # Invocation example:
    #
    #   ry --last_compile?
    #
    # ===================================================================== #
    when *ARRAY_HELP_LAST_COMPILED_OPTIONS
      show_last_compiled_program :then_exit
    # ===================================================================== #
    # === Update binaries of a given program
    #
    # This entry point allows us to automatically update the
    # binaries of a compiled, AppDir-installed program.
    #
    # Invocation examples:
    #
    #   rbt --update-binaries-of=poppler
    #   rbt --update-binaries-for=poppler
    #   rbt --autoupdate=opencv
    #
    # ===================================================================== #
    when /^-?-?update(-|_| )?binaries(-|_| )?of=(.+)$/i,
         /^-?-?update(-|_| )?binaries(-|_| )?for=(.+)$/i
      this_program = $1.to_s.dup # Default.
      this_program = $3.to_s.dup if $3 # Only for $3.
      update_binaries_of_this_program(this_program)
    # ===================================================================== #
    # === Report where log files will be stored
    #
    # Invocation example:
    #
    #   ry --report_where_we_will_store_logs
    #
    # ===================================================================== #
    when /^-?-?report(-|_| )?where(-|_| )?we(-|_| )?will(-|_| )?store(-|_| )?logs$/i,
         /^-?-?store(-|_| )?where\??$/i,
         /^-?-?log(-|_| )?dir\??$/i
      report_where_we_will_store_logs
      exit_program
    # ===================================================================== #
    # === Show last update
    #
    # Show the last updated programs in a table format, on the commandline.
    #
    # RBT will, by default, show all available programs.
    #
    # Invocation example:
    #
    #   ry htop last_update?
    #   ry --last_update?
    #
    # ===================================================================== #
    when *ARRAY_HELP_SHOW_LAST_UPDATE_OPTIONS
      show_last_updated
    # ===================================================================== #
    # === Feedback the make options
    #
    # Use this entry point to feedback all possible make options.
    #
    # Invocation example:
    #
    #   ry gcc make_opts
    #
    # ===================================================================== #
    when *ARRAY_FEEDBACK_MAKE_OPTIONS
      feedback_make_options
      exit_program
    # ===================================================================== #
    # === Stop before the 'make' stage/step
    #
    # This entry point allows us to stop at, or rather right before, the
    # 'make' stage.
    #
    # Invocation example:
    #
    #   rbt htop --stop-at-make-stage
    #
    # ===================================================================== #
    when /^-?-?stop(-|_| )?at(-|_| )?make(-|_| )?stage$/i,
         /^-?-?stop(-|_| )?before(-|_| )?make(-|_| )?stage$/i,
         /^-?-?stop(-|_| )?before(-|_| )?make$/i,
         /^-?-?stop(-|_| )?at(-|_| )?make(-|_| )?step$/i
      stop_at_make_stage
    # ===================================================================== #
    # === Show the last configure options stored
    #
    # This entry point allows us to query the last configure options
    # stored (which will be stored in a .md file).
    #
    # Invocation example:
    #
    #   rbt --last-configure-options?
    #
    # ===================================================================== #
    when /^-?-?last(_|-| )?configure(_|-| )?options\??$/
      _ = RBT.file_last_configure_options
      if File.exist? _
        e orange(File.read(_).strip)
      else
        opnn; no_file_exists_at(_)
      end
    # ===================================================================== #
    # === rbt --update-kde-framework
    # ===================================================================== #
    when /^-?-?update(-|_| )?kde(-|_| )?framework$/i
      update_kde_framework
      exit_program
    # ===================================================================== #
    # === rbt --update-kde-plasma
    # ===================================================================== #
    when /^-?-?update(-|_| )?kde(-|_| )?plasma$/i
      update_kde_plasma
      exit_program
    # ===================================================================== #
    # === Use a random name for the temp-directory
    #
    # This entry point can be used to make use of a random name for
    # the temp-directory, that is, onto which directory to extract
    # to.
    #
    # Invocation examples:
    #
    #   ry php --random-temp-dir
    #   ry php --random-dir
    #   ry php --random-temp
    #   ry php --rdir
    #
    # ===================================================================== #
    when /^-?-?random(_|-| )?temp(_|-| )?dir$/i,
         /^-?-?random(_|-| )?dir$/i,
         /^-?-?random(_|-| )?temp$/i,
         /^-?-?random(_|-| )?base(_|-| )?dir$/i,
         /^-?-?rdir$/i
      set_extract_to_this_directory_as_specified_by_the_user(:random)
    # ===================================================================== #
    # === Ad-hoc install palemoon
    #
    # This entry point is mostly for my home system, so that I can
    # quickly install palemoon.
    #
    # Invocation example:
    #
    #   rbt --install-palemoon
    #
    # ===================================================================== #
    when /^-?-?install(-|_)?palemoon$/i
      install_palemoon
      exit_program
    # ===================================================================== #
    # === Do not remove empty directories
    #
    # This entry point exists so that we can keep empty directories
    # in the respective /Programs/PROGRAM_NAME/PROGRAM_VERSION/
    # subdirectory.
    #
    # Invocation examples:
    #
    #   rbt feh --ntrad --do-not-remove-empty-directories
    #   rbt htop --ntrad --do-not-remove-empty-directories
    #
    # ===================================================================== #
    when /^-?-?do(-|_| )?not(-|_| )?remove(-|_| )?empty(-|_| )?directories$/
      opne slateblue('class RBT::SymlinkProgram')+' will '+
           crimson('not')+' remove empty directories.'
      symlink_program?.do_keep_empty_directories
    # ===================================================================== #
    # === Perform an intelligent bootstrap-operation
    #
    # This entry point has been added in November 2020, as means to
    # more easily batch-install software on a given computer system.
    #
    # The idea is to query the external gem called environment_information,
    # and then batch-install the missing, or incomplete, programs.
    #
    # Usage examples:
    #
    #   rbt --intelligent-bootstrap
    #   rbt --smart
    #   rbt --what-is-missing
    #
    # ===================================================================== #
    when /^-?-?intelligent(_|-| )?bootstrap$/i,
         /^-?-?what(_|-| )?is(_|-| )?missing\??$/i,
         /^-?-?bootstrap$/i,
         /^-?-?lazy$/i,
         /^-?-?smart$/i,
         /^-?-?compile(_|-| )?missing\??$/i
      do_perform_an_intelligent_bootstrap
      exit_program
    # ===================================================================== #
    # === Extract a program only
    #
    # Extract a given program only, without continuing past this stage.
    #
    # Invocation examples:
    #
    #   ry php eonly
    #   ry htop --extract-only
    #   ry ruby --extract-onl
    #
    # ===================================================================== #
    when /^-?-?extract(-|_| )?only?$/i,
         /^-?-?eonly$/i,
         /^-?-?extract$/i,
         'eonly',
         'eo'
      verbose_do_extract_only
    # ===================================================================== #
    # === Determine whether clang is the main compiler in use
    #
    # This entry point allows us to determine whether clang is in use, or
    # another compiler such as GCC.
    #
    # Invocation example:
    #
    #   ry --use-clang?
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?clang\?$/i
      orev "Will RBT make use of clang right now? "\
           "#{sfancy(verbose_truth(is_clang_used_as_the_main_compiler?))}"
      exit_program
    # ===================================================================== #
    # === Compile/Install all programs that have a specific tag
    #
    # This entry point allows us to e. g. install all of python,
    # that is, every entry that has "python" listed under their
    # tags, or all of "pdf". A requirement for this to work is
    # that the particular .yml file at hand has the particular
    # tag registered.
    #
    # Invocation examples:
    #
    #   rbt --compile-tags=pdf
    #   rbt --compile-tags=python
    #   rbt --compile_all_of=science
    #   rbt --compile_these_tags=science
    #   rbt --tag_compile=science
    #
    # ===================================================================== #
    when /^-?-?compile(_|-| )?tags=(.+)$/i,            # === $2
         /^-?-?compile(_|-| )?all(_|-| )?of=(.+)/,     # === $3
         /^-?-?compile(_|-| )?these(_|-| )?tags=(.+)/, # === $3
         /^-?-?tag(_|-| )?compile=(.+)/                # === $2
      use_this_tag = $3.to_s.dup
      use_this_tag = $2.to_s.dup if use_this_tag.empty?
      compile_these_tags(use_this_tag)
    # ===================================================================== #
    # === Compile the various xcb-components
    #
    # This entry point exists primarily due to convenience, so that the 
    # user does not have to remember the specific order how the 
    # xcb-components have to be compiled.
    #
    # Invocation examples:
    #
    #   rbt --compile-xcb-components
    #   rbt --compile-the-xcb-components
    #   rbt --compile-all-the-xcb
    #   rbt --compile-xcb
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?xcb(-|_| )?components$/i,
         /^-?-?compile(-|_| )?the(-|_| )?xcb(-|_| )?components$/i,
         /^-?-?compile(-|_| )?xcb$/i,
         /^-?-?compile(-|_| )?the(-|_| )?xcb(-|_| )?components$/i,
         /^-?-?compile(-|_| )?all(-|_| )?the(-|_| )?xcb$/i,
         /^-?-?all(-|_| )?of(-|_| )?xcb$/,
         /^-?-?all(-|_| )?xcb$/
      compile_xcb_components
    # ===================================================================== #
    # === Feedback the URL of a specific program
    #
    # This entry point allows us to make use of bin/rbt in order to
    # find out where the (remote) URL of a registered program may
    # be.
    #
    # Invocation examples:
    #
    #   ry --show-url=readline
    #   ry --show-url=libsigc++
    #
    # ===================================================================== #
    when /^-?-?show(-|_)?url=(.+)$/
      feedback_url($2.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Download the source archive of a given program, then exit
    #
    # Usage example:
    #
    #   ry ruby --downloadhere
    #
    # ===================================================================== #
    when /^-?-?download(-|_| )?here$/i,
         /^-?-?dhere$/i
      ensure_cookbooks_object_is_there
      default_download_then_exit(return_pwd)
    # ===================================================================== #
    # === Ignore errors
    #
    # This entry point allows us to ignore any errors encountered, in
    # particular the check whether we can continue or not.
    #
    # Invocation examples:
    #
    #   ry htop --dont-stop-on-errors
    #   ry relion --ignore-errors --ntrad
    #   ry libxslt --no-errors --ntrad
    #
    # ===================================================================== #
    when /^-?-?dont(_|-| )?stop(_|-| )?on(_|-| )?errors$/i,
         /^-?-?ignore(_|-| )?errors$/i,
         /^-?-?no(_|-| )?errors$/i
      orev 'We will not stop upon errors encountered.'
      do_ignore_errors
    # ===================================================================== #
    # === Copy header (.h) files from a certain path
    #
    # This entry point allows us to e. g. copy the .h header files from,
    # say, glibc into the current working directory.
    #
    # Invocation example:
    #
    #   rbt glibc --copy-headers-from=/usr/include
    #
    # ===================================================================== #
    when /^-?-?copy(-|_| )?headers(-|_| )?from=(.+)$/
      this_directory = $3.to_s.dup
      copy_headers_from(this_directory)
      exit_program
    # ===================================================================== #
    # === Strip the binaries as-is
    #
    # This option here allows us to call "strip" at once. The entry point
    # in particular will invoke "strip" on the current working directory,
    # which should be a bin/ subdirectory or a bin/-like subdirectory.
    #
    # Invocation example:
    #
    #   rbt --strip-binaries
    #
    # ===================================================================== #
    when /^-?-?strip(-|_| )?binaries$/
      run_the_strip_command_on_this_input(:pwd)
    # ===================================================================== #
    # === Compile 32 bit programs
    #
    # Invocation example:
    #
    #   rbt make --opt -m32
    #
    # ===================================================================== #
    when /^-m32$/i
      append_these_configure_options('-m32')
    # ===================================================================== #
    # === Compile an existing archive
    #
    # This entry point allows the user to specifically compile a local
    # archive, e. g. such as "ffmpeg-4.2.2.tar.xz".
    #
    # RBT::Action::Installer will make some guesses, in order to infer
    # more information from that archive.
    #
    # Invocation example:
    #
    #   rbt --use-this-file-as-input=/Depot/j/ffmpeg-4.2.2.tar.xz
    #   rbt --use-this-file-as-input=/home/x/src/ruby/ruby-2.7.2.tar.xz
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?this(_|-| )?file(_|-| )?as(_|-| )?input=(.+)$/i # === $5
      _ = $5.to_s.dup
      infer_information_from_this_archive(_)
    # ===================================================================== #
    # === Use GoboLinux SymlinkProgram
    #
    # The RBT scripts provide a class called RBT::SymlinkProgram, which
    # will symlink a program that was installed under the /Programs
    # hierarchy. However had, this class is not 100% the same as the
    # GoboLinux SymlinkProgram script. If you want to invoke the
    # GoboLinux SymlinkProgram rather than the RBT::SymlinkProgram,
    # then this entry point here is allowing you to do precisely that -
    # to invoke the SymlinkProgram script from GoboLinux rather than
    # the integrated class called RBT::SymlinkProgram.
    #
    # Usage example:
    #
    #   rbt --use-gobolinux-symlink-program
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?gobolinux(-|_| )?symlink(-|_| )?program$/i,
         /^-?-?do(-|_| )?use(-|_| )?gobolinux(-|_| )?symlink(-|_| )?program$/i
      do_use_gobolinux_symlinkprogram
    # ===================================================================== #
    # === Create a Slackware Package
    #
    # You can create a slackware package from the current directory
    # through this entry point.
    #
    # Invocation examples:
    #
    #   rbt --create-slackware-package
    #   rbt php --create-slackware-package
    #   Installer ruby --create-slackware-package
    #
    # ===================================================================== #
    when /^-?-?create(_|-| )?slackware(_|-| )?package$/i
      do_create_a_slackware_package(return_pwd)
      exit_program
    # ===================================================================== #
    # === Display the oldest programs in the various cookbook yaml files
    #
    # This entry point allows the user to show which programs are the
    # oldest. That way we could remove ancient, inactive entries.
    #
    # Usage example:
    #
    #   rbt --oldest-programs
    #
    # ===================================================================== #
    when /^-?-?oldest(-|_| )?programs$/i
      display_the_oldest_programs
      exit_program
    # ===================================================================== #
    # === Download the documentation of the RBT project for local use
    #
    # This entry point allows the user to download the remotely available
    # documentation of RBT locally. Perhaps the user does not have a
    # working browser on the current setup, or is in a restricted environment
    # such as campus/university facility. Or the xorg-server no longer
    # works, which actually was the primary reason this entry point was
    # added. It's hard to google for solutions if the xorg-server is down. :)
    #
    # Invocation example:
    #
    #   ry --download-documentation
    #
    # ===================================================================== #
    when /^-?-?download(-|_| )?documentation$/i,
         /^-?-?download(-|_| )?docu$/i
       download_the_remote_documentation_of_the_RBT_project
    # ======================================================================= #
    # === Create a new SQL database from scratch
    #
    # This entry point allows the user to generate a new SQL database
    # containing all registered programs.
    #
    # Invocation example:
    #
    #   installer --sql
    #
    # ======================================================================= #
    when /^-?-?SQL$/i
      require 'rbt/sql/generate_sql_table.rb'
      RBT::GenerateSqlTable.new
    # ======================================================================= #
    # === Create a new program-versions-URL file
    #
    # Invocation example:
    #
    #   installer --create_program_version_url_file
    #
    # ======================================================================= #
    when /^-?-?create(-|_| )?program(-|_| )?version(-|_| )?url(-|_| )?file$/
      action(:create_program_version_url_file)
      exit_program
    # ===================================================================== #
    # === Compile the KDE Applications
    #
    # This entry point allows us to compile KDE applications.
    #
    # Usage example:
    #
    #   rbt --compile-kde-apps
    #   rbt --kdeapps
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?kde(-|_| )?apps$/i,
         /^-?-?compile(-|_| )?kde(-|_| )?applications$/i,
         /^-?-?kde(-|_| )?apps$/i
      compile_kde_apps
    # ===================================================================== #
    # === rbt --update-kde-porting-aids
    # ===================================================================== #
    when /^-?-?update(-|_| )?kde(-|_| )?porting(-|_| )?aids$/i
      update_kde_porting_aids
      exit_program
    # ===================================================================== #
    # === Show n last compiled programs
    #
    # This entry point allows us to show the last n compiled programs.
    #
    # Invocation example:
    #
    #   ry --last-compiled=20
    #   ry --last-compiled-programs=10
    #
    # ===================================================================== #
    when /^-?-?last(-|_| )?compiled=(\d+)$/i,                # $2
         /^-?-?last(-|_| )?compiled(-|_| )?programs=(\d+)$/i # $3
      n_programs = $2.to_s.to_i
      n_programs = $3.to_s.to_i if $3
      feedback_last_compiled(n_programs)
      exit_program
    # ===================================================================== #
    # === Show the last compiled programs
    #
    # This entry point can be used to show the last-compiled programs,
    # all of them.
    #
    # Invocation example:
    #
    #   ry --last-compilations?
    #
    # ===================================================================== #
    when /^-?-?last(-|_| )?compilations\??$/i
      feedback_last_compiled(:all_of_them)
      exit_program
    # ===================================================================== #
    # === Show individual configure-profiles
    #
    # This entry point allows the user to display individual profiles.
    #
    # Invocation examples:
    #
    #   ry --show-this-profile=gcc
    #   ry --show-these-profiles=gcc
    #   ry --profiles-of?=gcc
    #
    # ===================================================================== #
    when /^-?-?show(-|_| )?this(-|_| )?profile=(.+)$/i,   # $3
         /^-?-?show(-|_| )?these(-|_| )?profiles=(.+)$/i, # $3
         /^-?-?profiles(-|_| )?of\??=(.+)$/i              # $2
      _ = $2
      _ = $3 if $3
      show_all_profiles_fitting_to_this_program(_.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Show help options                                      (help tag)
    #
    # This entry point allows the user to get some help about how to
    # use this project properly.
    #
    # Invocation example:
    #
    #   ry --help
    #
    # ===================================================================== #
    when /^-?-?help$/i
      show_help
      exit
    # ===================================================================== #
    # === Stop before the 'make install' stage
    #
    # This entry point allows us to stop at, or rather right before,
    # the 'make install' stage.
    #
    # Invocation example:
    #
    #   rbt htop --stop-at-make-install-stage
    #
    # ===================================================================== #
    when /^-?-?stop(-|_| )?at(-|_| )?make(-|_| )?install(-|_| )?stage$/i,
         /^-?-?stop(-|_| )?before(-|_| )?make(-|_| )?install(-|_| )?stage$/i,
         /^-?-?stop(-|_| )?before(-|_| )?make(-|_| )?install$/i,
         /^-?-?stop(-|_| )?at(-|_| )?make(-|_| )?install(-|_| )?step$/i
      stop_at_make_install_stage
    # ===================================================================== #
    # === Check all tags
    #
    # This entry point will check all tags under the /Programs/
    # hierarchy.
    #
    # Invocation example:
    #
    #   ry --setup-tags
    #
    # ===================================================================== #
    when *ARRAY_HELP_CHECK_ALL_TAGS_OPTIONS
      check_all_tags_under_programs_directory
      exit_program
    # ===================================================================== #
    # === Use slackware makepkg
    #
    # The RBT.run_makepkg_command can be used to install a slackware
    # package.
    #
    # Invocation example:
    #
    #   ry --makepkg
    #
    # ===================================================================== #
    when /^-?-?makepkg$/
      RBT.run_makepkg_command(:from_the_current_working_directory) # bl $RBT/toplevel_methods/run_makepkg_command.rb
      exit_program
    # ===================================================================== #
    # === Generate a slack-desc file
    #
    # This entry point allows us to use RBT to create a slack-desc file
    # for a slackware package.
    #
    # Invocation examples:
    #
    #   rbt --create-slackdesc-file-for=php
    #   rbt --create-slackdesc-file-for=htop
    #
    # ===================================================================== #
    when /^-?-?create(_|-| )?slackdesc(_|-| )?file(_|-| )?for=(.+)$/i # $4
      this_program = $4.to_s.dup
      create_a_slackdesc_file_for_this_program(this_program)
      exit_program
    # ===================================================================== #
    # === Generate all slackware files
    #
    # This will create a bunch of .desc files into the target
    # directory at rbt_log_directory?+"slackware_desc_files/".
    #
    # Invocation examples:
    #
    #   ry --all-slack-files
    #   ry all-slack-files
    #   ry --create-all-slackdesc-files
    #
    # ===================================================================== #
    when *ARRAY_HELP_GENERATE_ALL_SLACK_DESC_FILES_OPTIONS
      generate_slack_desc_files_for_every_program
      exit_program
    # ===================================================================== #
    # == Do not rename the konsole tab.
    #
    # If you do not want to rename the KDE konsole tab, use this entry
    # point here.
    #
    # Invocation example:
    #
    #   ry pango trad dont-rename-tab
    #   ry libtool --trad --dont-rename-konsole
    #   ry php --do-not-rename-tab --mirror
    #
    # ===================================================================== #
    when /^-?-?do(-|_| )?no?t(-|_| )?rename(-|_| )?tab$/i,
         /^-?-?do(-|_| )?no?t(-|_| )?rename(-|_| )?konsole$/i,
         /^-?-?dont(-|_| )?change(-|_| )?tab(-|_| )?title$/i
      do_not_rename_the_kde_konsole_tab
    # ===================================================================== #
    # === Check out the latest source code of the given program
    #
    # This entry point allows us to check out the latest source
    # code of the given program.
    #
    # Invocation examples:
    #
    #   rbt binutils --check-source
    #   rbt binutils --git
    #   rbt mpv --git-download
    #   rbt htop --git-download
    #   rbt ardour --git-download
    #
    # ===================================================================== #
    when /^-?-?check(-|_| )?source$/i,
         /^-?-?git(-|_| )?download$/i,
         /^-?-?git(-|_| )?checkout$/i,
         /^-?-?download(-|_| )?via(-|_| )?git$/i,
         /--git$/i, # Important here to NOT use leading ^-?-?.
         /^-?-?dl$/i,
         /^-?-?use(-|_| )?git$/i,
         /^-?-?latest(-|_| )?git(-|_| )?source$/i,
         /^-?-?git(-|_| )?it$/i,
         /^-?-?latest(-|_| )?and(-|_| )?greatest$/i,
         /^-?-?the(-|_| )?latest(-|_| )?and(-|_| )?greatest$/i,
         /^-?-?get(-|_| )?the(-|_| )?latest$/i,
         /^-?-?the(-|_| )?latest$/i,
         /^-?-?gitty$/i,
         /^-?-?ditty$/i
      if missing_cookbooks_dataset?
        set_compile_this_program(first_argument?)
        initialize_dataset_for(first_argument?)
      end
      if commandline_arguments?.size > 1
        cd base_dir? # This only works if the dataset has been set up properly before.
        download_the_latest_source_code_of_this_program
        exit_program
      end
    # ===================================================================== #
    # === Use a specific version                              (version tag)
    #
    # Note that we will ignore trailing archive information such as
    # ".tar.xz" and similar.
    #
    # Usage examples:
    #
    #   ry htop --version=2.6.30.1
    #   ry gcc  --version=4.9.3.tar.xz
    #   ry gtk2 --compile-version=2.22.111
    #   ry bluefish --version=1.0.7
    #   ry bluefish --use-this-version=1.0.7
    #   ry networkmanager ntrad --use-this-version=NetworkManager-1.12.6.tar.xz
    #   ry mesa trad --use-this-version=mesa-18.2.6
    #
    # ===================================================================== #
    when /^-?-?version=$/,
         /^-?-?use(-|_| )?version=$/,
         /^-?-?version(-|_| )?number=$/,
         /^-?-?use(-|_| )?version=(.+)$/,
         /^-?-?version(-|_| )?number$/,
         /^-?-?version(-|_| )?number /,
         /^-?e=/,
         /^-?-?v=/,
         /^-?-?use(-|_| )?version=$/,
         /^-?-?use(-|_| )?this(_|-| )?version=/,
         /^-?-?cversion=(.+)/,
         /^-?-?compile(-|_| )?version=(.+)$/
      use_a_specific_program_version(i) # ← This method will handle the case.
    # ===================================================================== #
    # === Use a specific value for "make -jN" where N is a number
    #
    # This entry point allows us to quickly make use of the -j flag
    # for the program called "make".
    #
    # It is recommended to set -j to the number of cores the given
    # CPU at hand supports.
    #
    # To use this, try something like:
    #
    #   rbt lame -j5
    #   installer libtool -j8
    #
    # ===================================================================== #
    when /^-j\d{1,2}$/
      set_parameters_to_make(i)
    # ===================================================================== #
    # === Feedback all programs that do use a build directory
    #
    # This entry point simply reports only those programs that make
    # use of a build directory.
    #
    # Invocation examples:
    #
    #   ry --show-all-programs-that-make-use-of-a-build-directory
    #   ry --all-build-directory
    #   ry --all-build-directories
    #   ry --build-directories?
    #   ry --build-directories
    #
    # ===================================================================== #
    when /^-?-?show(_|-| )?all(_|-| )?programs(_|-| )?that(_|-| )?make(_|-| )?use(_|-| )?of(_|-| )?a(_|-| )?build(_|-| )?directory$/i,
         /^-?-?all(_|-| )?build(_|-| )?directory$/i,
         /^-?-?all(_|-| )?build(_|-| )?directories$/i,
         /^-?-?build(_|-| )?directories\??$/i
      report_all_programs_that_make_use_of_a_build_directory
      exit_program
    # ===================================================================== #
    # === Feedback the default values of the internal hash
    #
    # If you ever need a way to query the values of the internal
    # hash, you can do so through this entry point here.
    #
    # Invocation example:
    #
    #   ry --feedback-the-default-values-of-the-internal-hash
    #
    # ===================================================================== #
    when /^-?-?feedback(-|_)?default(-|_)?values(-|_)?of(-|_)?the(-|_)?internal(-|_)?hash$/i,
         /^-?-?feedback(-|_)?the(-|_)?default(-|_)?values(-|_)?of(-|_)?the(-|_)?internal(-|_)?hash$/i
      feedback_default_values_of_the_internal_hash
      exit_program
    # ===================================================================== #
    # === Purge FHS libraries of a specific program
    #
    # This entry point will get rid of all registered libraries of a
    # target program. Use with care!
    #
    # It will remove all the libraries belonging to a particular
    # program at the /usr/lib/ hierarchy.
    #
    # Invocation example:
    #
    #   ry --fhs-purge-libraries=libgc
    #
    # ===================================================================== #
    when /^-?-?purge-?fhs-?libraries$/i,
         /^-?-?purge-?traditional-?libraries-?from=(.+)/,
         /^-?-?purge-?fhs-?libraries-?from=(.+)/,
         /^-?-?purge-?fhs-?libraries=(.+)/,
         /^-?-?fhs-?library-?purge=(.+)/,
         /^-?-?fhs-?purge-libraries=(.+)/,
         /^-?-?purge(-|_)?traditional(-|_)?libraries(-|_)?of=(.+)$/
      _ = nil
      _ = $1 if $1
      _ = $4 if $4
      _ = program_name? if _.nil?
      verbose_purge_fhs_libraries_of_this_program(_.to_s.dup)
      exit
    # ===================================================================== #
    # === Whether we use porg or whether we dont
    #
    # This entry point can be used to determine whether porg will be
    # used by the RBT suite.
    #
    # Invocation example:
    #
    #   rbt --use-porg?
    #
    # ===================================================================== #
    when /^-?-?use(-|_)?porg\??$/
      report_whether_we_will_use_porg
      exit_program
    # ===================================================================== #
    # === Query all KDE versions
    #
    # This entry point allows the user to show which KDE versions are
    # in use.
    #
    # Invocation example:
    #
    #   ry --kde-version
    #
    # ===================================================================== #
    when /^-?-?kde(_|-| )?version\??$/i
      try_to_require_the_environment_information_gem
      if Object.const_defined? :EnvironmentInformation
        EnvironmentInformation.new('--kdeversions?')
      end
    # ===================================================================== #
    # === Batch-update all rubygems registered in a .yml file
    #
    # This entry point allows you to batch-download all rubygems
    # that have been updated, compared to your local dataset.
    #
    # If you also need to batch-install these gems then you have
    # to use the RBT project for this.
    #
    # Invocation example:
    #
    #   rbt --update_all_ruby_gems
    #
    # ===================================================================== #
    when /^-?-?update(-|_| )?all(-|_| )?ruby(-|_| )?gems$/,
         /^-?-?update(-|_| )?ruby(-|_| )?gems$/
      action(:update_all_ruby_gems)
      exit
    # ===================================================================== #
    # === Install all registered rubygems
    #
    # If you wish to install all registered rubygems, then this
    # entry point may be useful to you.
    #
    # In order for this to work, the RBT project has to tap into the
    # cookbooks project, so make sure that the latter is also installed.
    #
    # Invocation examples:
    #
    #   rbt --install-all-rubygems
    #   rbt --install-all-gems
    #
    # ===================================================================== #
    when /^-?-?install(-|_)?all(-|_)?rubygems$/i,
         /^-?-?install(-|_)?all(-|_)?gems$/i,             
         /^-?-?batch(-|_)?install(-|_)?all(-|_)?gems$/i,
         /^-?-?install(-|_)?all(-|_)?registered(-|_)?gems$/i,
         /^-?-?install(-|_)?rubygems$/i
      update_these_rubygems
    # ===================================================================== #
    # === Compile all of gstreamer
    #
    # As I was tired of compiling gstreamer manually, this entry point
    # was added to allow for all of the gstreamer components to be
    # compiled one after the other.
    #
    # Invocation examples:
    #
    #   rbt --compile-gstreamer
    #   rbt --compile-all-of-gstreamer
    #   rbt --do-gstreamer
    #   rbt --all-of-gstreamer
    #   rbt --gstreamer1
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?gstreamer$/i,
         /^-?-?compile(-|_| )?all(-|_| )?of(-|_| )?gstreamer$/i,
         /^-?-?do(-|_| )?gstreamer$/i,
         /^-?-?all(-|_| )?of(-|_| )?gstreamer$/i, # rbt --all-of-gstreamer
         /^-?-?gstreamer1$/i
      compile_all_of_gstreamer
    # ===================================================================== #
    # === Generate all shell scripts
    #
    # This will create a file which bash can use, containing all
    # available shellscripts.
    #
    # Invoke the following as in:
    #
    #   ry --bash
    #
    # ===================================================================== #
    when 'to_bash',
         '2bash',
         'tobash',
         'generate_all',
         'generateall',
         'gall',
         'generate_bash',
         'shell_stuff',
         'allshell',
         'generate_shellscripts',
         'cbs',
         'generate_shell_script',
         'allshellscripts',
         'allsh',
         'toshellscripts',
         /create_?shell_?scripts/,
         'generateshellscripts',
         'shellscripts',
         'def',
         /^-?-?bash$/ # def is special; 'bash' can not be used.
      unless first_argument? == 'bash'
        create_shell_scripts
        exit_program
      end
    # ===================================================================== #
    # === Start the gtk-notebook
    #
    # This entry point shall load the ruby-gtk3 widget that ties together
    # all other, smaller ruby-gtk3 widgets.
    #
    # Invocation examples:
    #
    #   rbt --gtk-notebook
    #   rbt --gtk
    #
    # ===================================================================== #
    when /^-?-?notebook$/i,
         /^-?-?gtk(-|_| )?notebook$/i,
         /^-?-?gtk$/i
      unless first_argument? == 'gtk'
        require 'rbt/gui/gtk3/notebook/notebook.rb'
        RBT::GUI::Gtk::Notebook.run
      end
    # ===================================================================== #
    # === Start the ruby-gtk3 compile widget 
    #
    # This entry-point can be used to start the ruby-gtk3 compile widget.
    #
    # Invocation examples:
    #
    #   rbt --GUI
    #   rbt --gtk-compile-program
    #
    # ===================================================================== #
    when /^-?-?GUI$/i,
         /^-?-?gtk(-|_| )?compile(-|_| )?program/
      require 'rbt/gui/gtk3/compile_program/compile_program.rb'
      ::RBT::GUI::Gtk::CompileProgram.run
    # ===================================================================== #
    # === Query the valid /System/Tags in use
    #
    # Here you can query as to which /System/Tags are valid. And
    # which ones are not.
    #
    # Invocation examples:
    #
    #   ry --valid-sys-tags?
    #   ry --available-tags?
    #
    # ===================================================================== #
    when /^-?-?valid-?sys-?tags\??$/,
         /^-?-?allowed(-|_)?tags$/,
         /^-?-?available(-|_)?tags\??$/,
         /^-?-?allowed(-|_)?tags\??$/
      show_valid_system_tags
      exit
    # ======================================================================= #
    # === Compile/Install all registered perl-addons
    #
    # This entry point allows the user to batch-install the registered
    # perl components.
    #
    # Invocation example:
    #
    #   installer --compile-perl-addons
    #
    # ======================================================================= #
    when /^-?-?compile(-|_)?perl(-|_)?addons$/,
         /^-?-?perl(-|_)?addons$/,
         /^-?-?enable(-|_| )?perl(-|_| )?addons$/i,
         /^-?-?compile(-|_| )?all(-|_| )?of(-|_| )?perl$/i,
         /^-?-?do(-|_| )?compile(-|_| )?the(-|_| )?perl(-|_| )?addons$/i,
         /^-?-?perl(-|_| )?inst$/i,
         /^-?-?all(-|_| )?of(-|_| )?perl$/i
      do_compile_the_perl_addons
    # ===================================================================== #
    # === Use /root as prefix
    #
    # This entry point allows us to use /root/ as the prefix value.
    # Note that this is distinct to --rootprefix which uses /.
    #
    # Invocation examples:
    #
    #   ry bison --root
    #   ry libtool --root
    #
    # ===================================================================== #
    when /^-?-?root$/i,
         /^-?-?root(_|-| )?prefix$/i
      set_user_prefix('/root/')
    # ===================================================================== #
    # === Use the / root prefix as target for --prefix=
    #
    # This entry point allows the user to target / as the main prefix
    # to use for the current compilation run.
    #
    # Usage example:
    #
    #   ry coreutils --static --realrootprefix
    #
    # ===================================================================== #
    when /^-?-?real(_|-| )?root(_|-| )?prefix$/i
      set_user_prefix('/')
    # ===================================================================== #
    # === Show the intro for RBT.
    #
    # This entry point will provide a very few useful hints to a new
    # user of the rbt suite.
    #
    # We have to be careful with the input, as "gobject-introspection"
    # includes the word "intro" as well.
    #
    # Invocation example:
    #
    #   rbt --intro
    # 
    # ===================================================================== #
    when /^-?-?intro$/,
         /^-?-?show(_|-| )?intro$/,
         /^-?-?show(_|-| )?rbt(_|-| )?intro$/
      show_rbt_intro
      exit_program
    # ===================================================================== #
    # === Compile the first file found in the current working directory
    #
    # This entry point allows the user to simply compile the first
    # file found in the current directory.
    #
    # Invocation example:
    #
    #   rbt --compile-the-first-entry-in-the-current-working-directory
    #
    # ===================================================================== #
    when /^-?-?compile(_|-| )?the(_|-| )?first(_|-| )?entry(_|-| )?in(_|-| )?the(_|-| )?current(_|-| )?working(_|-| )?directory$/i
      _ = Dir[original_start_directory?.to_s+'*'].select {|entry| File.file?(entry) }
      first = _.first
      orev 'Trying to compile '+steelblue(first)+"#{rev} next."
      first = program_version_of?(first)
      require 'rbt/utility_scripts/compile_versioned_program/compile_versioned_program.rb'
      RBT::CompileVersionedProgram.new(first) {{ use_this_directory: original_start_directory? }}
      exit_program
    # ===================================================================== #
    # === Show the base directory
    #
    # Show the base directory of a given program.
    #
    # Invocation example:
    #
    #   ry htop base_dir?
    #
    # ===================================================================== #
    when /^-?-?base(_|-| )?dir\??$/,
         /^basedir\??/
      show_where_the_base_directory_can_be_found
      exit_program
    # ===================================================================== #
    # === Show the CFLAGS in use
    #
    # Invocation examples:
    #
    #   rbt --show-cflags
    #   rbt --cflags?
    #
    # ===================================================================== #
    when /^-?-?show(-|_| )?cflags$/i,
         /^-?-?cflags\?$/i
      consider_reporting_the_cflags_we_will_use
      exit_program
    # ===================================================================== #
    # === Feedback all registered binaries
    #
    # This entry point allows us to feedback all registered binaries.
    #
    # Invocation examples:
    #
    #   rbt --all-binaries?
    #   rbt --show-binaries
    #
    # ===================================================================== #
    when /^-?-?all(-|_| )?binaries\??$/,
         /^-?-?registered(-|_| )?binaries\??$/,
         /^-?-?show(-|_| )?binaries\??$/
      feedback_all_registered_binaries_of_all_programs
      exit_program
    # ===================================================================== #
    # === Start the ruby-gtk3 statistics widget 
    #
    # This entry-point can be used to start the ruby-gtk3 statistics widget.
    #
    # Invocation example:
    #
    #   ry --gtk-statistics
    #
    # ===================================================================== #
    when /^-?-?gtk(-|_| )?statistics/
      require 'rbt/gui/universal_widgets/statistics/statistics.rb'
      RBT::GUI::UniversalWidgets::Statistics.new('--gtk3')
    # ===================================================================== #
    # === rbt --update-mate-desktop
    #
    # This entry point can be used to compile all of the mate-desktop.
    # ===================================================================== #
    when /^-?-?update(-|_| )?mate(-|_| )?desktop$/i,
         /^-?-?update(-|_| )?mate$/i,
         /^-?-?check(-|_| )?for(-|_| )?mate(-|_| )?updates$/i,
         /^-?-?check(-|_| )?for(-|_| )?mate(-|_| )?desktop(-|_| )?updates$/i,
         /^-?-?check(-|_| )?for(-|_| )?mate(-|_| )?desktop$/i,
         /^--mate(-|_| )?desktop$/i # This variant conflicts with "mate-desktop", hence now the leading --.
      update_mate_desktop_components
      exit
    # ===================================================================== #
    # === Create all program versions 
    #
    # Invocation example:
    #
    #   rbt --create-program-versions
    #
    # ===================================================================== #
    when /^-?-?create(-|_| )?program(-|_| )?versions/
      action(:CreateProgramVersionUrlFile)
      exit_program
    # ===================================================================== #
    # === Show statistics about the whole RBT project
    #
    # This will show some statistics about the RBT project and the
    # dataset it contains.
    #
    # Invocation examples:
    #
    #   rbt --stats?
    #   rbt --stats
    #
    # ===================================================================== #
    when /^-?-?stats\??$/i
      show_statistics_about_the_rbt_project
      exit_program
    # ===================================================================== #
    # === Skip the postinstall action
    #
    # This allows you to ignore the postinstall instructions.
    #
    # Usage example:
    #
    #   ry htop --no-postinstall
    #
    # ===================================================================== #
    when /^-?-?skip(_|-| )?postinstall(_|-| )?actions$/i,
         '-P',
         /^-?-?no(_|-| )?postinstall$/i
      orev 'We will skip any potential postinstallation actions.'
      skip_postinstall_actions
    # ===================================================================== #
    # === Show postinstall
    #
    # This entry point allows you to simply show the postinstall
    # dataset for the given program at hand.
    #
    # Usage examples:
    #
    #   ry docbookxml postinstall?
    #   ry perl postinstall?
    #   ry libraw1394 postinstall?
    #   ry littleutils --postinstall?
    #
    # ===================================================================== #
    when /^-?-?postinstall?/,
         /^-?-?show(_|-| )?postinstall/i,
         'pinstall?',
         'p?',
         /^-?-?display(_|-| )?postinstall$/,
         /^-?-?postinstallation(_|-| )?steps\??$/i
      display_postinstall_dataset
      exit_program
    # ===================================================================== #
    # === Show all available programs
    #
    # This entry point allows the user to display all available programs,
    # that is, all programs that are registered within the RBT project.
    #
    # Usage examples:
    #
    #   rbt --available_programs?
    #   installer --available_programs?
    #
    # ===================================================================== #
    when /^-?-?available(-|_| )?programs\??/i
      show_all_available_programs
      exit
    # ===================================================================== #
    # === Enable the use of the clang compiler
    #
    # This option will enable the (LLVM) clang compiler, in a verbose
    # manner, for the current compilation run.
    #
    # Invocation example:
    #
    #   ry htop --use-clang
    #
    # ===================================================================== #
    when /-?-?use(-|_| )?clang$/i,
         /-?-?do(-|_| )?use(-|_| )?clang$/i,
         /-?-?clang$/i
      do_use_the_clang_compiler :and_notify_the_user
    # ===================================================================== #
    # === Permanently set a specific source directory
    #
    # This entry point allows us to permanently specify any source
    # directory on the local filesystem.
    #
    # Invocation examples:
    #
    #   rbt --permanently-set-source-archive=/Mount/USB1/last_backup/src/
    #   rbt --permanently-set-this-source-directory=/opt/rbt/source_archives
    #   rbt --set-source-dir=/opt/rbt/source_archives
    #
    # ===================================================================== #
    when /^-?-?permanently(-|_| )?set(-|_| )?base(-|_| )?directory(-|_| )?to=(.+)$/i,     # for $5
         /^-?-?permanently(-|_| )?set(-|_| )?source(-|_| )?archive=(.+)$/i,               # for $4
         /^-?-?permanently(-|_| )?set(-|_| )?source(-|_| )?dir(-|_| )?to=(.+)$/i,         # for $5
         /^-?-?permanently(-|_| )?set(-|_| )?source(-|_| )?dir=(.+)$/i,                   # for $4
         /^-?-?permanently(-|_| )?source(-|_| )?directory=(.+)$/i,                        # for $3
         /^-?-?permanently(-|_| )?set(-|_| )?this(-|_| )?source(-|_| )?directory=(.+)$/i, # for $5
         /^-?-?set(-|_| )?source(-|_| )?dir=(.+)$/i,                                      # for $3
         /^-?-?set(-|_| )?src(-|_| )?dir=(.+)$/i,                                         # for $3
         /^-?-?source(-|_| )?dir=(.+)$/i                                                  # for $2
      _ = $2.to_s.dup
      _ = $3.to_s.dup if $3
      _ = $4.to_s.dup if $4
      _ = $5.to_s.dup if $5 # This is for the variant on the first line, see: http://rubular.com/r/6E6v45rB7u
      opnn; RBT.permanently_set_source_directory(_) { :be_verbose }
    # ===================================================================== #
    # === Permanently set programs dir
    #
    # This entry point can be used to permanently set a new PROGRAMS
    # directory.
    #
    # Invocation example:
    #
    #   rbt --permanently_set_programs_dir=/pkg
    #   rbt --use-this-as-programs-dir=/pkg
    #   
    # ===================================================================== #
    when /^-?-?permanently(-|_| )?set(-|_| )?programs(-|_| )?dir=(.+)$/i, # $4
         /^-?-?use(-|_| )?this(-|_| )?as(-|_| )?programs(-|_| )?dir=(.+)$/i # $5
      _ = $4.to_s.dup
      _ = $5.to_s.dup if $5
      permanently_set_programs_dir(_)
    # ===================================================================== #
    # === Permanently enable GoboLinux layout and behaviour from the
    #     commandline
    #
    # Use this method if you wish to let RBT assume that we are
    # running on gobolinux, without changing any ENV variable.
    #
    # Invocation example:
    #
    #   rbt --permanently-enable-is-on-gobolinux
    #
    # ===================================================================== #
    when /^-?-?permanently(-|_| )?enable(-|_| )?is(-|_| )?on(-|_| )?gobolinux$/i
      permanently_enable_is_on_gobolinux(:be_verbose)
      exit_program
    # ===================================================================== #
    # == Permanently do not rename the konsole tab.
    #
    # If you never want to rename the KDE konsole tab, use this entry
    # point here.
    #
    # Invocation example:
    #
    #   ry pango --permanently-do-not-rename-tab
    #
    # ===================================================================== #
    when /^-?-?permanently(-|_| )?do(-|_| )?not(-|_| )?rename(-|_| )?tab$/i
      permanently_do_not_rename_the_kde_konsole_tab
      exit_program # After it is done, we can exit.
    # ===================================================================== #
    # === Permanently disable porg
    #
    # This is as disable_porg(), but we will permanently disable porg.
    #
    # Invocation example:
    #
    #   rbt --permanently-disable-porg
    #
    # ===================================================================== #
    when /-?-?permanently(-|_)?disable(-|_)?porg$/i
      permanently_disable_porg
      exit_program
    # ===================================================================== #
    # === Enable the GoboLinux layout and behaviour from the commandline
    #
    # Note that this entry point enables the GoboLinux layout only
    # for the CURRENT invocation, that is, for the program that you
    # desire to install/compile.
    #
    # If you want to enable it permanently, then either change an
    # environment variable, or use the entry point called
    # --permanently-enable-is-on-gobolinux.
    #
    # Invocation examples:
    #
    #   rbt --enable-is-on-gobolinux
    #   rbt htop ntrad --enable-is-on-gobolinux
    #   ry atk --ntrad --is-on-gobolinux
    #
    # ===================================================================== #
    when /^-?-?is(_|-| )?on(_|-| )?gobolinux$/,
         /^-?-?enable(_|-| )?is(_|-| )?on(_|-| )?gobolinux$/,
         /^-?-?do(_|-| )?we(_|-| )?create(_|-| )?the(_|-| )?architecture(_|-| )?file$/
      enable_is_on_gobolinux
    # ===================================================================== #
    # === Generate shell completion
    #
    # Generate the general tab completions here. Right now this
    # will only work for bash-completions.
    #
    # Invocation example:
    #
    #   rbt --generate-shell-completion
    #   rbt --gsc
    #   rbt --shell
    #
    # ===================================================================== #
    when *ARRAY_HELP_GENERATE_SHELL_COMPLETION_OPTIONS
      generate_shell_completion(:all)
      exit_program
    # ===================================================================== #
    # === Mirror-copy
    #
    # Combine --ntrad with --dont-symlink.
    #
    # This may at a later time become a new standard, or part of a
    # new compile chain.
    #
    # Invocation example:
    #
    #   ry glib --mirror
    #   ry atk --mirror
    #
    # ===================================================================== #
    when /^-?-?mirror$/i
      do_not_symlink_in_general_and_also_do_not_symlink_header_files
      do_compile_in_a_non_traditional_way
    # ===================================================================== #
    # === Do not symlink
    #
    # Use this option if you do not wish to automatically symlink
    # the compiled/installed program. This will also disable the
    # instruction "symlink_header".
    #
    # Invocation example:
    #
    #   ry htop dontsymlink
    #
    # ===================================================================== #
    when *ARRAY_HELP_DO_NOT_SYMLINK_OPTIONS
      do_not_symlink_in_general_and_also_do_not_symlink_header_files
    # ===================================================================== #
    # === Create the programs URL file
    #
    # This entry point allows us to create the local programs-url file.
    #
    # Invocation examples:
    #
    #   rbt --create-programs-url-file
    #   rbt --create-cookbooks-url-file
    #   rbt --generate-url
    #   rbt --create-programs-version-file
    #   rbt --programs-version-file
    #
    # ===================================================================== #
    when /^-?-?create(-|_| )?programs(-|_| )?url(-|_| )?file$/,
         /^-?-?create(-|_| )?programs(-|_| )?url$/,
         /^-?-?create(-|_| )?programs(-|_| )?file$/,
         /^-?-?programs(-|_| )?url(-|_| )?file$/,
         /^-?-?programs(-|_| )?url$/,
         /^-?-?generate(-|_| )?programs(-|_| )?url$/,
         /^-?-?create(-|_| )?cookbooks(-|_| )?url(-|_| )?file$/,
         /^-?-?generate(-|_| )?url$/,
         /^-?-?create(-|_| )?programs?(-|_| )?url(-|_| )?file$/,
         /^-?-?create(-|_| )?programs(-|_| )?version(-|_| )?file$/i,
         /^-?-?programs(-|_| )?version$/i,
         /^-?-?programs(-|_| )?version(-|_| )?file$/,
         /^-?-?create(-|_| )?program(-|_| )?version$/,
         /^-?-?create(-|_| )?programs(-|_| )?version(-|_| )?html(-|_| )?file$/,
         /^-?-?create(-|_| )?programs(-|_| )?version$/i
      create_programs_url_file
      exit_program
    # ===================================================================== #
    # === Mouse and keyboard and similar input devices for Xorg
    #
    # This entry point is quite similar to --post-xorg-server
    # but simpler. We'll mostly just compile some input-devices,
    # through a hardcoded Array as entry.
    #
    # Invocation examples:
    #
    #   rbt --compile-mouse-and-keyboard
    #   installer --xorg-input
    #
    # ===================================================================== #
    when /^-?-?mouse(-|_| )?and(-|_| )?keyboard$/i,
         /^-?-?mouse(-|_| )?keyboard$/i,
         /^-?-?meyboard$/i,
         /^-?-?compile(-|_| )?mouse(-|_| )?and(-|_| )?keyboard$/i,
         /^-?-?compile(-|_| )?mouse(-|_| )?and(-|_| )?keyboard(-|_| )?xorg(-|_| )?server(-|_| )?components$/i,
         /^-?-?input(-|_| )?drivers$/i,
         /^-?-?input(-|_| )?devices$/i,
         /^-?-?xorg(-|_| )?input(-|_| )?devices$/i,
         /^-?-?xorg(-|_| )?input$/i,
         /^-?-?keyboard(-|_| )?mouse$/i,
         /^-?-?compile(-|_| )?mouse(-|_| )?keyboard$/i,
         /^-?-?keyboard$/i,
         /^-?-?compile(-|_| )?keyboard$/i,
         /^-?-?compile(-|_| )?mouse$/i,
         /^-?-?keyboard(-|_| )?and(-|_| )?mouse$/i
      compile_mouse_and_keyboard_xorg_server_components
    # ===================================================================== #
    # === Show the verbose CFLAGS in use
    #
    # Usage example:
    #
    #   installer --verbose_cflags_in_use?
    #
    # ===================================================================== #
    when /^-?-?verbose(_|-| )?cflags(_|-| )?in(_|-| )?use\??$/i
      e
      e "  #{gold(verbose_cflags_in_use?)}"
      e
    # ===================================================================== #
    # === Show which build-system will be prioritized
    #
    # Invocation example:
    #
    #  ry --configure_has_a_higher_priority_than_meson?
    #
    # ===================================================================== #
    when /^-?-?configure(_|-| )?has(_|-| )?a(_|-| )?higher(_|-| )?priority(_|-| )?than(_|-| )?meson\??$/i
      e configure_has_a_higher_priority_than_meson?
      exit_program
    # ===================================================================== #
    # === Fix all Shebangs
    #
    # Try to fix the shebangs of the RBT project:
    #
    #   ry x shebangfixer
    #
    # ===================================================================== #
    when 'shebang',
         'shebangfixer',
         /^-?-?try_?to_?fix_?all_?shebangs/
      try_to_fix_all_shebangs
      exit_program
    # ===================================================================== #
    # === Compile all programs that belong to a certain tag
    #
    # This entry point allows us to compile all programs that belong
    # to a certain tag, such as "gnome" or "kde5".
    #
    # Invocation examples:
    #
    #   rbt --compile-this-tag=gnome
    #   rbt --compile-this-tag=kde
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?this(-|_| )?tag=(.+)$/
      _ = $3.to_s.dup
      compile_all_programs_that_belong_to_this_tag(_)
    # ===================================================================== #
    # === Show the highest programs
    #
    # Show the highest programs, that is, the biggest in size, available
    # locally.
    #
    # Invocation example:
    #
    #   rbt --show_highest
    #
    # ===================================================================== #
    when *ARRAY_HELP_SHOW_HIGHEST_PROGRAMS_OPTIONS
      show_n_largest_local_programs(150)
    # ===================================================================== #
    # === Show the highest n programs
    #
    # Invocation example:
    #
    #   rbt --highest=50
    #
    # ===================================================================== #
    when /^-?-?highest=(.+)/i
      show_n_largest_local_programs($1.to_s.dup)
    # ===================================================================== #
    # === Query the host system
    #
    # This entry point allows us to query the host-system of the computer.
    #
    # Invocation example:
    #
    #   rbt --host-system
    #
    # ===================================================================== #
    when /^-?-?host(-|_| )?system$/i,
         /^-?-?host(-|_| )?cpu$/i,
         /^-?-?report(-|_| )?host(-|_| )?cpu$/i
      action(:report_host_cpu)
    # ======================================================================= #
    # === Do not use autoconf
    #
    # This entry point allows the user to skip using autoconf. This is
    # only ever useful for the few programs that depend on autoconf,
    # so users will only very rarely need this entry point.
    #
    # Usage example:
    #
    #   rbt bridgeutils --dont-autoconf
    #
    # ======================================================================= #
    when /^-?-?dont(-|_| )?autoconf$/,
         /do(-|_| )?not(-|_| )?use(-|_| )?autoconf$/
      do_not_use_autoconf
    # ======================================================================= #
    # === Post xorg-server components
    #
    # This entry point can be used to install components of the
    # xorg-server after the xorg-server has been compiled/installed.
    #
    # Invocation example:
    #
    #   installer --post-xorg-server
    #
    # ======================================================================= #
    when /^-?-?post(-|_| )?xorg(-|_| )?server$/i,
         /^-?-?post(-|_| )?xorg$/i,
         /^-?-?compile(-|_| )?post(-|_| )?xorg(-|_| )?server$/i
      compile_post_xorg_server_components
    # ======================================================================= #
    # === Edit/Open the yaml file in your editor
    #
    # This entry point allows the user to open the .yml file at hand
    # in his/her editor.
    #
    # Invocation example:
    #
    #   inst --edit
    #
    # ======================================================================= #
    when /^-?-?edit$/i,
         /-?-?open$/i,
         /-?-?modify$/i
      edit_the_yaml_file_via_the_main_editor
      exit_program
    # ===================================================================== #
    # === Compile into the user's home directory, via an AppDir variant
    #
    # This option allows you to compile into your user's home directory,
    # in an AppDir variant.
    #
    # Invocation example:
    #
    #   ry htop --appdir-into-home-dir
    #
    # ===================================================================== #
    when /^-?-?appdir(_|-| )?into(_|-| )?home(_|-| )?dir$/,
         /^-?-?appdir(_|-| )?at(_|-| )?home$/
      compile_into_the_home_directory_as_appdir
    # ===================================================================== #
    # === Combining base? and url? query.
    #
    # Invocation example:
    #
    #   ry ruby --baseurl?
    #   ry pygtk baseurl?
    #
    # ===================================================================== #
    when /urlbase\??/,
         'base?url?',
         'url?base?',
         /baseurl\??/,
         'basurl?',
         /burl/
      feedback_url
      feedback_local_location
      exit_program
    # ===================================================================== #
    # === rbt --show_config
    # ===================================================================== #
    when /^-?-?show_?config/,
         'sconfig'
      show_configuration_options
    # ===================================================================== #
    # === Show the Basename
    #
    # This entry point will show where a particular program can be
    # found locally.
    #
    # Invocation example:
    #
    #   ry gcc basename?
    #
    # ===================================================================== #
    when 'basedir2?','basedirr','bdir','base?','base','localbase?',
         'bdir?',
         'b?','whereis?','whereis',
         /^-?-?basename\??$/i
      feedback_local_base
      exit_program
    # ===================================================================== #
    # === Generate PDF tutorial
    #
    # Invocation example:
    #
    #   ry --pdf-generation
    #
    # ===================================================================== #
    when *ARRAY_HELP_GENERATE_PDF_TUTORIAL_OPTIONS
      verbose_generate_the_pdf_tutorial
      exit_program
    # ===================================================================== #
    # === Show the last 20 compiled programs
    #
    # Invocation example:
    #
    #   rbt --last-compiled
    #
    # ===================================================================== #
    when /^-?-?last(-|_| )?compiled$/,
         /^-?-?last(-|_| )?programs$/
      feedback_last_compiled(20)
      exit_program # ^^^ This variant uses hardcoded 20 programs.
    # ===================================================================== #
    # === Show which colours we will use
    #
    # Invocation examples:
    #
    #   ry --show-which-colours-will-be-used
    #   ry htop colours?
    #
    # ===================================================================== #
    when *ARRAY_HELP_SHOW_WHICH_COLOURS_WILL_BE_USED
      show_which_colours_will_be_used
      exit_program
    # ===================================================================== #
    # === Designate which programs to compile
    #
    # This entry point can be used to assign which programs are to be
    # compiled. This is most useful if you wish to compile more than
    # one program.
    #
    # Commandline invocation example:
    #
    #   rbt --compile-these-programs=make,sed,awk,coreutils,utillinux,gawk,
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?these(-|_| )?programs=(.+)/
      compile_these_programs = $3.to_s.dup
      compile_these_programs.chop! if compile_these_programs.end_with? ','
      if compile_these_programs.include? ','
        compile_these_programs = compile_these_programs.split(',')
      end
      set_compile_these_programs(compile_these_programs)
    # ===================================================================== #
    # === Use a random build directory
    #
    # This entry point allows us to use a build directory that has
    # a random name. The idea is that this random name will not
    # interfere with any existing directory.
    #
    # Invocation examples:
    #
    #   ry htop --use-random-build-directory
    #   ry conky --use-random-build-directory
    #   ry conky --use-random-build-directory --ntrad
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?random(_|-| )?build(_|-| )?directory$/
      do_use_random_build_directory
    # ===================================================================== #
    # === rbt --overview-utility-scripts
    # ===================================================================== #
    when /^-?-?overview(_|-| )?utility(_|-| )?scripts/i
      require 'rbt/toplevel_methods/show_available_utility_scripts.rb'
      show_overview_over_available_utility_scripts
      exit_program
    # ===================================================================== #
    # === Feedback the Program URL of several programs at the same time
    #
    # Note that this will apply .uniq, as I think this makes sense
    # to assume.
    #
    # Usage example:
    #
    #   ry --url-for-these-programs=php,ruby,python,m4,php
    #
    # ===================================================================== #
    when /-?-?url(-|_| )?for(-|_| )?these(-|_| )?programs=(.+)$/i # === $4
      _ = $4.dup
      _ = _.split(',') if _.include?(',')
      _.uniq! if _.is_a? Array
      show_the_URL_for_these_programs(_, :initialize_the_dataset_anew)
      exit_program
    # ===================================================================== #
    # === Allowed cookbook entries
    #
    # Inform the user which cookbook entries are allowed.
    #
    # Invocation example:
    #
    #   rbt --allowed-cookbook-entries
    #
    # ===================================================================== #
    when /^-?-?allowed(-|_| )?cookbook(-|_| )?entries$/,
         'ace',
         'allowed?'
      action(:AllowedCookbookEntries)
      exit_program
    # ===================================================================== #
    # === Check for gnome updates
    # ===================================================================== #
    when /^-?-?gnome$/,
         /^-?-?check(_|-| )?for(_|-| )?gnome(_|-| )?updates$/
      action(:CheckForGnomeUpdates)
      exit_program
    # ===================================================================== #
    # === Feedback compile strategies used
    #
    # Compile-strategies refers to essential build-related strategies
    # such as GNU configure, cmake and meson, and how many projects
    # make use of these respectively.
    #
    # Invocation examples:
    #
    #   ry --compile_strategies?
    #   ry --build-statistics
    #   ry --build-stats
    #   ry --statistics2
    #
    # ===================================================================== #
    when /^-?-?compile(_|-| )?strategies\??$/i,
         /^-?-?build(_|-| )?statistics\??$/i,
         /^-?-?build(_|-| )?stats?\??$/i,
         /^-?-?mega(_|-| )?stats?\??$/i,
         /^-?-?statistics\??$/i,
         /^-?-?overview\??$/i,
         /^-?-?feedback(_|-| )?statistics?\??$/i,
         /^-?-?statistics2$/i
      do_extensively_report_the_build_statistics
    # ===================================================================== #
    # === Compile all of XFCE
    #
    # This entry point allows us to compile all XFCE components in
    # one go.
    #
    # Invocation examples:
    #
    #   rbt --compile-xfce
    #   rbt --superxfce
    #   installer --superxfce
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?xfce$/i,
         /^-?-?super(-|_| )?xfce$/i,
         /^-?-?all(-|_| )?of(-|_| )?xfce$/i
      compile_all_of_xfce
    # ===================================================================== #
    # === Compile all of XFCE into a standalone directory
    #
    # This entry point allows us to compile all of XFCE into a
    # standalone directory, such as /Programs/Xfce/4.12.0.
    #
    # I considered this sufficiently useful to add this functionality.
    # That way we could easily and quickly relocate XFCE between
    # different computers.
    #
    # Invocation examples:
    #
    #   rbt --compile-xfce-components-into-one-standalone-directory
    #   rbt --compile-xfce-components-into-a-standalone-directory
    #   rbt --compile-xfce-components-into-standalone-directory
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?xfce(-|_| )?components(-|_| )?into(-|_| )?one(-|_| )?standalone(-|_| )?directory$/i,
         /^-?-?compile(-|_| )?xfce(-|_| )?components(-|_| )?into(-|_| )?a-standalone(-|_| )?directory$/i,
         /^-?-?compile(-|_| )?xfce(-|_| )?components(-|_| )?into(-|_| )?standalone(-|_| )?directory$/i,
         /^-?-?xfce(-|_| )?components(-|_| )?into(-|_| )?standalone(-|_| )?directory$/i,
         /^-?-?xfce(-|_| )?components(-|_| )?standalone(-|_| )?directory$/i,
         /^-?-?xfce(-|_| )?into(-|_| )?standalone(-|_| )?dir$/i,
         /^-?-?xfce(-|_| )?standalone$/i
      compile_xfce_components_into_one_standalone_directory
      exit_program
    # ===================================================================== #
    # === Show the full XFCE compilechain
    #
    # This entry point can be used to show the full compilechain for
    # XFCE.
    #
    # Invocation examples:
    #
    #   rbt --show-xfce-compilechain
    #   rbt --xfcecomponents?
    #
    # ===================================================================== #
    when /^-?-?show(-|_)?xfce(-|_)?compilechain$/i,
         /^-?-?xfce(-|_)?components\??$/i,
         /^-?-?xfce\??$/i
      show_compile_chain(:xfce)
      exit_program
    # ===================================================================== #
    # === Enable --without-headers
    #
    # Invocation example:
    #
    #   rbt gcc --trad --newlib --without-headers
    #
    # ===================================================================== #
    when /^-?-?no(-|_| )?headers$/i
      append_these_configure_options('--without-headers')
    # ===================================================================== #
    # === Ensure that all directories for RBT exist
    #
    # Invocation example:
    #
    #   rbt --ensure-all-directories-exist
    #
    # ===================================================================== #
    when /^-?-?ensure(-|_| )?all(-|_| )?directories(-|_| )?exist$/i,
         /^-?-?ensure(-|_| )?that(-|_| )?all(-|_| )?directories(-|_| )?exist$/i
      orev "Next trying to ensure that all relevant directories exist,"
      orev "as far as the RBT project is concerned."
      if File.directory? log_dir?
        orev 'The directory at '+sdir(log_dir?)+rev+' already exists.'
      else
        ensure_that_all_directories_for_rbt_exist
      end
      exit_program
    # ===================================================================== #
    # === Use default chroot prefix + /usr/, at /Depot/Chroot/usr/
    #
    # This entry point is a modification of --chroot.
    #
    # Invocation examples:
    #
    #   rbt bison --uchroot
    #   rbt flex --uchroot
    #   rbt nasm --uchroot
    #   rbt sed --uchroot
    #
    # ===================================================================== #
    when /^-?-?uchroot$/i
      set_user_prefix('/Depot/Chroot/usr/')
    # ===================================================================== #
    # === Compile all of mate
    #
    # This entry point allows us to compile all components of the
    # mate-desktop.
    #
    # Invocation examples:
    #
    #   rbt --compile-all-of-mate
    #   rbt --compile-mate-desktop
    #   rbt --all-of-mate
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?all(-|_| )?of(-|_| )?mate$/i,
         /^-?-?compile(-|_| )?mate(-|_| )?desktop$/i,
         /^-?-?compile(-|_| )?mate$/i,
         /^-?-?all(-|_| )?of(-|_| )?mate$/i
      do_compile_all_of_mate
    # ===================================================================== #
    # === Compile all of Mate-Desktop into a standalone directory
    #
    # This entry point allows us to compile all of MATE into a
    # standalone directory, such as /Programs/Mate/1.20.
    #
    # Invocation examples:
    #
    #   rbt --compile-mate-desktop-components-into-one-standalone-directory
    #   rbt --compile-mate-desktop-components-into-a-standalone-directory
    #   rbt --compile-mate-desktop-components-into-standalone-directory
    #
    # ===================================================================== #
    when /^-?-?compile(-|_| )?mate(-|_| )?desktop(-|_| )?components(-|_| )?into(-|_| )?one(-|_| )?standalone(-|_| )?directory$/,
         /^-?-?compile(-|_| )?mate(-|_| )?desktop(-|_| )?components(-|_| )?into(-|_| )?a-standalone(-|_| )?directory$/,
         /^-?-?compile(-|_| )?mate(-|_| )?desktop(-|_| )?components(-|_| )?into(-|_| )?standalone(-|_| )?directory$/,
         /^-?-?mate(-|_| )?desktop(-|_| )?components(-|_| )?into(-|_| )?standalone(-|_| )?directory$/,
         /^-?-?mate(-|_| )?desktop(-|_| )?components(-|_| )?standalone(-|_| )?directory$/,
         /^-?-?mate(-|_| )?desktop(-|_| )?into(-|_| )?standalone(-|_| )?dir$/,
         /^-?-?mate(-|_| )?prefix$/,
         /^-?-?mate(-|_| )?standalone$/
      compile_mate_desktop_components_into_one_standalone_directory
      exit_program
    # ===================================================================== #
    # === Show the configuration options for a given program
    #
    # Invocation example:
    #
    #   rbt gcc --show-configuration-options
    #
    # ===================================================================== #
    when /^-?-?show(-|_| )?configuration(-|_| )?options$/i
      action(:ShowConfigurationOptions, compile_which_program?)
      exit_program
    # ===================================================================== #
    # === Show the last updated programs
    #
    # Show when some programs were last updated.
    #
    # Invocation example:
    #
    #   rbt --slu
    #
    # ===================================================================== #
    when *ARRAY_SHOW_LAST_UPDATED_OPTIONS
      show_the_n_last_updated_programs(875)
      exit_program
    # ===================================================================== #
    # === Feedback how many cookbook aliases exist
    #
    # This entry point allows the user to quickly determine how many
    # cookbook-related aliases exist.
    #
    # Invocation example:
    #
    #   ry --n-aliases?
    #
    # ===================================================================== #
    when /^-?-?n(-|_| )?aliases\??$/
      _ = RBT.file_cookbook_aliases?
      if File.exist? _
        report_how_many_registered_cookbook_aliases_are_available
      else
        no_file_exists_at(_)
      end
      exit_program
    # ===================================================================== #
    # === Validate the cookbook entries
    #
    # Invocation example:
    #
    #   rbt --validate-entries
    #
    # ===================================================================== #
    when /^-?-?validate(_|-| )?entries$/
      action(:validate_cookbook_aliases)
      exit_program
    # ===================================================================== #
    # === Query to which program a particular binary belongs to
    #
    # This entry point allows us to find out to which particular
    # program a specific binary belongs to.
    #
    # Invocation examples:
    #
    #   rbt --this-binary?=shar
    #   rbt --binary=env
    #
    # ===================================================================== #
    when /^-?-?this(-|_| )?binary\?=(.+)$/i, # For $2
         /^-?-?binary=(.+)$/i                # For $1
      _ = $1.to_s.dup # Default.
      _ = $2.to_s.dup if $2
      action(:BinaryNameBelongsToWhichProgram, _)
      exit_program
    # ===================================================================== #
    # === Show all about a specific program
    #
    # This entry point will show all about a particular program.
    #
    # Invocation example:
    #
    #   rbt --show-all-about=htop
    #
    # ===================================================================== #
    when /^-?-?show(_|-| )?all(_|-| )?about=(.+)/i,
         /^-?-?show(_|-| )?all=(.+)/i,
         /^-?-?show(_|-| )?file=(.+)/i
      show_this_program = $2.to_s.dup # This is valid for two entry points ^^^.
      show_this_program = $3.to_s.dup if $3
      action(:ShowAllAbout, show_this_program)
    # ===================================================================== #
    # === ry --generate-homepage
    # ===================================================================== #
    when /^-?-?generate(-|_| )?homepage$/,
         /^-?-?gen(-|_| )?homepage$/,
         /^-?-?homepage$/
      action(:GenerateHomepage)
      exit
    # =================================================================== #
    # === ry htop --ntrad
    # =================================================================== #
    when /^-?-?ntrad/,
         /^-?-?appdir$/i # === ry htop --appdir
      do_change_the_prefix_towards_an_appdir_prefix
    # ===================================================================== #
    # === Use another directory as the new /Programs/ dir
    # ===================================================================== #
    when /^-?-?use-?this-?programs-?dir=(.+)/
      use_this_as_programs_dir($1.to_s.dup) # See: http://rubular.com/r/HR72sazzMi
    # ===================================================================== #
    # === Convert to non-traditional
    #
    # Convert a FHS-conforming program back into a non-traditional
    # hierarchy:
    #
    #   ry htop to_programs
    #
    # ===================================================================== #
    when 'to_programs','toprograms',
         'convert_to_non_traditional',
         'tobin',
         'to_fhs',
         'toubin'
      convert_to_non_traditional
      exit_program
    # ===================================================================== #
    # === Make use of CreateProgram with the current directory as input
    #
    # This entry point allows us to make use of the current working
    # directory as the input-argument.
    #
    # Invocation examples:
    #
    #   rbt --create-program
    #   rbt --rcp
    #
    # ===================================================================== #
    when /^-?-?create(-|_)?program$/i,
         /^-?-?rcp$/i
      _ = File.basename(return_pwd)
      RBT.create_program(_)
      exit_program
    # ===================================================================== #
    # === Query the path to the windows cookbook file
    #
    # Invocation example:
    #
    #   rbt --windows-cookbook?
    #
    # ===================================================================== #
    when /^-?-?windows(-|_| )?cookbook\??$/i
      e 'The windows_cookbook.yml file resides at:'
      e
      e "  #{sfile(RBT::FILE_WINDOWS_COOKBOOK)}"
      e
    # ===================================================================== #
    # === Show the project's base directory here
    #
    # Invocation example:
    #
    #   ry --project-base-directory?
    #
    # ===================================================================== #
    when /^-?-?project(-|_| )?base(-|_| )?directory\??$/
      e "#{steelblue(project_base_directory?)}#{rev}"
      exit_program
    # ===================================================================== #
    # === Do not use any special environment flag at all
    #
    # Sometimes you really do not want to use ENV, that is, the
    # environment. The entry point here allows you to not only
    # empty ENV, but to also not set any new ENV flags.
    #
    # Invocation examples:
    #
    #   ry htop --do-not-use-special-flags
    #   ry nspr --clear-envs ntrad
    #   ry nss  --clear-envs ntrad
    #
    # ===================================================================== #
    when /^-?-?do(_|-| )?not(_|-| )?use(_|-| )?special(_|-| )?flags$/,
         /^-?-?clear(_|-| )?envs$/
      verbose_do_not_use_special_flags
    # ===================================================================== #
    # === Validate Cookbook Aliases
    #
    # This entry point can be used to validate the cookbook aliases.
    #
    # Invocation examples:
    #
    #   rbt vca
    #   rbt --vca
    #
    # ===================================================================== #
    when /^validate_?cookbook_?aliases$/,
         /^-?-?vca/,
         /^-?-?cookbook(-|_| )?aliases$/,
         'calias'
      validate_the_cookbook_aliases
      exit_program
    # ===================================================================== #
    # === Report the XFCE version at hand
    #
    # This entry point allows the user to report the current XFCE
    # version in use.
    #
    # Invocation example:
    #
    #   ry --report-xfce-version
    #   ry --xfce-version
    #
    # ===================================================================== #
    when /^-?-?report(-|_)?xfce(-|_)?version$/i,
         /^-?-?xfce(-|_)?version\??$/i
      action(:report_xfce_version)
      exit_program
    # ===================================================================== #
    # === ry --display_barplot_statistics
    # ===================================================================== #
    when /-?-?display(-|_| )?barplot(-|_| )?statistics$/i
      display_barplot_statistics
      exit
    # ===================================================================== #
    # === rbt --return_compile_time_statistics
    # ===================================================================== #
    when /^-?-?return(-|_| )?compile(-|_| )?time(-|_| )?statistics$/
      e lightblue('Compile time statistics:')
      e steelblue(return_compile_time_statistics.body?)
    # ===================================================================== #
    # === Do not make use of cookbook aliases
    #
    # This entry point here exists to prevent the use of cookbook
    # aliases. Normally, the aliases are useful, since they allow
    # us to use abbreviations, and easier-to-type names for commonly
    # used programs. However had, sometimes we distinctly do NOT want
    # to use a specific alias, such as when we wish to compile "sdlttf"
    # and the cookbook alias automatically picks "sdlttff" for us
    # instead.
    #
    # Invocation examples:
    #
    #   ry sdlttf --do-not-use-cookbook-aliases
    #   ry sdlttf --do-not-use-cookbook-alias
    #
    # ===================================================================== #
    when /^-?-?do(_|-| )?not(_|-| )?use(_|-| )?cookbook(_|-| )?aliases$/i,
         /^-?-?do(_|-| )?not(_|-| )?use(_|-| )?cookbook(_|-| )?alias$/i,
         /^-?-?do(_|-| )?not(_|-| )?make(_|-| )?use(_|-| )?of(_|-| )?cookbook(_|-| )?aliases$/i,
         /^-?-?no(_|-| )?alias$/
      do_not_use_cookbook_aliases(:be_verbose)
    # ===================================================================== #
    # === Feedback the Program URL
    #
    # Feedback the url of a given program
    #
    # Usage examples:
    #
    #   ry libxrandr url
    #   ry ruby url?
    #   ry python --url?
    #   ry libsigc++ --show-url
    #   ry ruby --show-url
    #
    # ===================================================================== #
    when /^-?-?url\??$/i,
         'ulr',
         'ur',
         'u',
         /urla$/i,
         /feedback(-|_| )?url/,
         /^-?-?show(-|_| )?url$/i
      feedback_url
      exit_program
    # ===================================================================== #
    # === Feedback how many binaries are registered
    #
    # This entry point tells us how many binaries are registered in
    # total. Binaries in this context refers to programs that reside
    # under the corresponding bin/ hierarchy.
    #
    # However had, if a program has been assigned to the main dataset
    # already then the behaviour of the method will be different -
    # in this case the method will report how many binaries are
    # part of that program at hand.
    #
    # Invocation examples:
    #
    #   rbt --n-binaries?
    #   rbt glib --n-binaries?
    #
    # ===================================================================== #
    when /^-?-?n(_|-| )?binaries\??$/
      either_report_the_total_amount_of_binaries_or_how_many_binaries_this_program_will_install
      exit_program
    # ===================================================================== #
    # === Update binaries and libraries of a given program automatically
    #
    # Invocation example:
    #
    #   rbt --autoupdate=htop
    #   rbt --autoupdate=geany
    #
    # ===================================================================== #
    when /^-?-?autoupdate=(.+)$/i
      this_program = $1.to_s.dup # Default.
      update_binaries_of_this_program(this_program)
      update_libraries_of_this_program(this_program)
      exit_program
    # ===================================================================== #
    # === Output All URLs
    #
    # This entry point will output all URLs.
    #
    # Invocation examples:
    #
    #   rbt --all_urls
    #   rbt all_urls
    #   rbt all_urls?
    #   Installer --all-urls
    #  
    # ===================================================================== #
    when *ARRAY_HELP_OUTPUT_ALL_URLS_OPTIONS
      output_all_urls_then_exit
    # ===================================================================== #
    # === Report the RBT version in use
    #
    # This part will tell us which specific version of RBT we
    # are currently using.
    #
    # Invocation examples:
    #
    #   ry --version
    #   ry VERSION
    #   ry --version
    #
    # ===================================================================== #
    when *ARRAY_HELP_VERSION_OPTIONS,
         /^VERSION/
      first = first?
      if first and !first.start_with?('--')
        initialize_for(first.to_sym)
        e steelblue(first+': ')+
          royalblue(cookbook_program_version?)
      else
        report_rbt_version #:then_exit
      end
      exit_program
    # ===================================================================== #
    # === Show the chained programs
    #
    # This entry point exists mostly to quickly test this functionality.
    #
    # Invocation example:
    #
    #   ry --return-chained-programs
    #
    # ===================================================================== #
    when /^-?-?return(_|-| )?chained(_|-| )?programs\??$/i
      return_chained_programs
      exit_program
    # ===================================================================== #
    # === Show which programs can be compiled statically
    #
    # This entry point allows the user to show which programs can be
    # compiled statically, in principle.
    #
    # Invocation examples:
    #
    #   ry --which-programs-can-be-compiled-statically?
    #   ry --programs-that-can-be-compiled-statically?
    #
    # ===================================================================== #
    when /^-?-?which(_|-| )?programs(_|-| )?can(_|-| )?be(_|-| )?compiled(_|-| )?statically\??$/i,
         /^-?-?statically(_|-| )?compilable(_|-| )?programs\??$/i,
         /^-?-?programs(_|-| )?that(_|-| )?can(_|-| )?be(_|-| )?compiled(_|-| )?statically\??$/i,
         /^-?-?statically\??$/i,
         /^-?-?all(_|-| )?static\??$/i
      orev 'Trying to determine which programs can be compiled statically.'
      orev 'Please be patient ...'
      report_which_programs_can_be_compiled_statically
      exit_program
    # ===================================================================== #
    # === Static compilation
    #
    # If you wish to compile something statically, use this entry point
    # here.
    #
    # Invocation examples:
    #
    #   ry m4 static
    #   ry make static
    #   ry make static ntrad
    #
    # ===================================================================== #
    when *ARRAY_HELP_ENABLE_STATIC
      verbose_enable_static
    # ===================================================================== #
    # === Permanently add a global flag
    #
    # Invocation example:
    #
    #   rbt --add-global-flag=--disable-static
    #
    # ===================================================================== #
    when /^-?-?add(-|_)?global(-|_)?flag=(-?-?.+)/
      permanently_add_this_global_flag($3.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Disable static compilation
    #
    # This entry point exists so that users can disable static
    # compilation, e. g. when the corresponding .yml file has
    # a "build_static: t" entry by default.
    #
    # Invocation example:
    #
    #   rbt wget --disable-static-compilation
    #
    # ===================================================================== #
    when /^-?-?disable(-|_| )?static(-|_| )?compilation$/i,
         /^-?-?dont(-|_| )?compile(-|_| )?statically$/i,
         /^-?-?not(-|_| )?static$/i,
         /^-?-?no(-|_| )?static$/i
      disable_static_compilation(:be_verbose)
    # ===================================================================== #
    # === Show how many statically compiled binaries exist on this
    #     computer system
    #
    # Invocation example:
    #
    #   ry --static-overview?
    #
    # ===================================================================== #
    when /^-?-?static(_|-| )?overview\??$/i
      action(:StaticOverviewOfTheAvailableBinariesOnThisComputerSystem)
      exit_program
    # ===================================================================== #
    # === Show all available tags that are registered in the RBT suite
    #
    # Invocation example:
    #
    #   rbt --available-tags
    #
    # ===================================================================== #
    when /^-?-?available(-|_| )?tags$/i
      opnn; action(:show_available_tags)
      exit_program
    # ===================================================================== #
    # === Remove .la files
    #
    # This entry point allows you to get rid of the .la files associated
    # with the given program. Currently it will only be done for programs
    # that are installed in an AppDir-like manner, but this behaviour
    # may change at a later time.
    #
    # Invocation example:
    #
    #   ry pcre2 ntrad --remove-la-files
    #
    # ===================================================================== #
    when /^-?-?remove(_|-| )?la(_|-| )?files$/
      if is_installed_in_an_appdir_like_fashion?
        orev "Any .la files found to be part of the program "\
             "#{sfancy(program_name?)} will be deleted."
        do_remove_la_files_after_compilation
      end
    # ===================================================================== #
    # === Prepare gmp, mpc and mpfr for GCC compilation
    #
    # This will simply copy the three tarballs, extract them and
    # re-name the extracted directories, to make fit for compilation
    # of GCC.
    #
    # Invocation examples:
    #
    #   ry --prepare-for-gcc
    #   ry --prepare-gcc
    #   ry --copy-gcc-base
    #
    # ===================================================================== #
    when /^-?-?prepare(-|_| )?for(-|_| )?gcc$/i,
         /^-?-?prepare(-|_| )?gcc$/i,
         /^-?-?copy(-|_| )?gcc(-|_| )?base$/i
      prepare_for_gcc
      exit_program
    # ===================================================================== #
    # === Feedback whether we are currently compiling anything
    #
    # Invocation example:
    #
    #   rbt --currently_compiling?
    #
    # ===================================================================== #
    when /-?-?currently(_|-| )?compiling\??/,
         /-?-?what(_|-| )?are(_|-| )?we(_|-| )?currently(_|-| )?compiling\??/,
         /-?-?currently(_|-| )?compiled\??/
      feedback_what_we_are_currently_compiling?
      exit_program
    # ===================================================================== #
    # === Use a specific, local version
    #
    # Note that this variant does not yet work.
    #
    # Invocation example:
    #
    #   ry --use-this-program=gtkmm-3.24.7
    #
    # ===================================================================== #
    when /^-?-?use(-|_| )?this(-|_| )?program=(.+)$/ # === $3
      _ = $3.to_s.dup
      program_name    = action(:program_name, _)
      program_version = action(:program_version, _)
      orev "Using this program name: #{program_name} and "\
           "this program version: #{program_version}"
      if cookbook_dataset.nil?
        initialize_cookbook_for(program_name)
      end
      # set_use_this_version(program_version)
      set_program_name_and_program_version(_)
      set_compile_this_program(program_name)
    # ===================================================================== #
    # === Show downloadable programs
    #
    # This entry point will display all programs that are "downloadable",
    # in a condensed manner. This simply refers to the registered
    # programs really.
    #
    # Invocation examples:
    #
    #   rbt --show-downloadable-programs
    #   installer --show-downloadable-programs
    #
    # ===================================================================== #
    when /^-?-?show(-|_| )?downloadable(-|_| )?programs$/i,
         /^-?-?downloadable(-|_| )?programs\??$/i
      show_downloadable_programs
      exit_program
    # ===================================================================== #
    # === Download via svn
    #
    # If you wish to download via svn, then you can use this entry point
    # here.
    #
    # Invocation examples:
    #
    #   ry dosbox --svn
    #   ry dosbox svn
    #
    # ===================================================================== #
    when /^-?-?svn$/,
         'use_svn',
         'svn_download',
         'svndownload',
         'svndown',
         'download_via_svn'
      if first?.to_s == 'svn'
        set_compile_this_program(first?.to_s)
      else
        download_using_svn
        exit_program
      end
    # ===================================================================== #
    # === Show the Recipes directory
    #
    # Invocation example:
    #
    #   ry --recipes_dir?
    #
    # ===================================================================== #
    when /^-?-?recipes(_|-| )?dir\??/i
      show_the_recipes_directory
      exit_program
    # ===================================================================== #
    # === Reset the status.yml file next
    #
    # Invocation example:
    #
    #   ry --reset-the-status-file
    #
    # ===================================================================== #
    when /^-?-?reset(_|-| )?the(_|-| )?status(_|-| )?file$/
      orev 'Reseting the file '+sfile(RBT.file_status)+"#{rev} next."
      reset_the_status_file
      exit_program
    # ===================================================================== #
    # === Be completely quiet
    #
    # This directive will tell us to be completely silent.
    #
    # Invocation example:
    #
    #   ry htop --be_so_quiet
    #
    # ===================================================================== #
    when /^-?-?be(_|-| )?completely(_|-| )?quiet$/,
         /^-?-?be(_|-| )?very(_|-| )?quiet$/,
         /^-?-?be(_|-| )?so(_|-| )?quiet$/
      be_completely_quiet
    # ===================================================================== #
    # === Store all abbreviations in a file
    #
    # Invocation example:
    #
    #   rbt --store-abbreviations
    #
    # ===================================================================== #
    when /^-?-?store(-|_| )?abbreviations$/,
         /^-?-?store$/i,
         /^-?-?generate(-|_| )?abbreviations$/i,
         /^-?-?generate(-|_| )?aliases$/i,
         /^-?-?abbreviations(-|_| )?to(-|_| )?the(-|_| )?programs$/i,
         /^-?-?create(-|_| )?abbreviations$/i,
         /^-?-?abbrevs$/i,
         /^-?-?abb(-|_| )?reviations$/i,
         /^-?-?store(-|_| )?abreviations$/i
      action(:store_abbreviations)
      exit_program
    # ===================================================================== #
    # === Do not use any configure options
    #
    # This entry point allows you to completely ignore all configure
    # options specified in the particular .yml file.
    #
    # In September 2020 --pristine was added as a shortcut. Do note
    # that --pristine may mean more than merely "do not use the
    # configure options", so in the future, this may change. But
    # for now, --pristine is simply a shorter alias. 
    #
    # Invocation examples:
    #
    #   rbt htop --ntad --dont-use-configure-options
    #   rbt glib --user-home-prefix --use-meson --no-configure-options
    #   rbt ruby --do-not-use-any-configure-options
    #
    # ===================================================================== #
    when /^-?-?dont(_|-| )?use(_|-| )?configure(_|-| )?options?$/i,
         /^-?-?do(_|-| )?not(_|-| )?use(_|-| )?configure(_|-| )?options$/i,
         /^-?-?dont(_|-| )?use(_|-| )?configure(_|-| )?options$/i,
         /^-?-?no(_|-| )?configure(_|-| )?options$/i,
         /^-?-?no(_|-| )?config$/i,
         /^-?-?do(_|-| )?not(_|-| )?use(_|-| )?any(_|-| )?configure(_|-| )?options$/i,
         /^-?-?dont(_|-| )?use(_|-| )?any(_|-| )?configure(_|-| )?options$/i,
       /^-?-?clear(_|-| )?configure(_|-| )?options$/i,
       /^-?-?ignore(_|-| )?configure(_|-| )?options$/i,
       /^-?-?barebones$/i,
       /^-?-?pristine$/i,
       /^-?-?virgin$/i, # (virgin tag)
       /^-?-?dont(_|-| )?use(_|-| )?configure/i
      do_not_use_any_configure_option { :be_verbose }
      # =================================================================== #
      # The next line was added on 24.11.2019. Don't use meson
      # configure options either.
      # =================================================================== #
      @internal_hash[:use_meson_configure_options] = false
    # ===================================================================== #
    # === Use /opt/ as prefix
    #
    # This entry point allows us to use /opt/ as the prefix. It is mostly
    # a convenience entry point.
    #
    # Invocation examples:
    #
    #   ry llvm --use-opt-as-prefix
    #   ry zlib --opt
    #
    # ===================================================================== #
    when /^-?-?use(_|-| )?opt(_|-| )?as(_|-| )?prefix$/,
         /^-?-?opt(_|-| )?prefix$/,
         /^-?-?opt$/
      use_opt_as_prefix
    # ===================================================================== #
    # === Last compiled program
    #
    # Invocation example:
    #
    #   ry LAST
    #
    # ===================================================================== #
    when *ARRAY_HELP_LAST_COMPILED_PROGRAM_OPTIONS
      set_compile_these_programs(last_compiled_program?)
    # ===================================================================== #
    # === Show help options
    #
    # Show the help options here, then exit.
    #
    #   ry --help
    #
    # ===================================================================== #
    when *ARRAY_HELP_OPTIONS
      display_standard_help_options
      exit_program
    # ===================================================================== #
    # === Show the temp directory
    #
    # This entry point allows us to show the temp-directory on the
    # commandline.
    #
    # The resulting output is equivalent to:
    #
    #   RBT.config_directory?+'temp_dir.yml'
    #
    # Invocation example:
    #
    #   ry --temp_dir?
    #
    # ===================================================================== #
    when *ARRAY_HELP_TEMP_DIR
      show_temp_directory
      exit_program
    # ===================================================================== #
    # === Feedback configure options
    #
    # This part will show the configure options for a given program.
    #
    # Feedback the configure option for a specific program at hand:
    #
    #   ry htop configure?
    #   ry gcc  configure?
    #
    # ===================================================================== #
    when *ARRAY_FEEDBACK_CONFIGURE_OPTIONS,
         /configure_?option\?$/i,
         'showconfig?'
      feedback_configure_options
      exit_program
    # ===================================================================== #
    # === Use /opt/toolchain/ as prefix
    #
    # This entry point allows the user to use the /opt/toolchain/
    # as prefix.
    #
    # Invocation examples:
    #
    #   rbt binutils --toolchain
    #
    # ===================================================================== #
    when /^-?-?toolchain$/i
      prefix_to_be_used = '/opt/toolchain/'
      orev "Using the prefix #{steelblue(prefix_to_be_used)}#{rev}"
      set_user_prefix(prefix_to_be_used)
      do_not_use_any_configure_options
    # ===================================================================== #
    # === Feedback local location
    #
    # This entry point will show the local location of the target
    # program (archive) at hand.
    #
    # Usage examples:
    #
    #   ry gcc    --local_url
    #   ry aalib  local_url
    #   ry libx11 lurl
    #
    # ===================================================================== #
    when /^-?-?local(-|_| )?url$/i,
         'local','lurl','localurl?','lurl?',
         'location?','location','fulllocation?','fulllocation',
         'where?',
         'feedback_local_location'
      feedback_local_location
      exit_program
    # ===================================================================== #
    # === Suggest the content to a .yml file
    #
    # This entry point allows us to show the content of an assumed
    # .yml file via the commandline. That way we should be more
    # rapidly able to create new .yml files or update existing
    # ones with new content. 
    #
    # Invocation example:
    #
    #   rbt --suggest-cookbook-for=glib
    #
    # ===================================================================== #
    when /^-?-?suggest(_|-| )?cookbook(_|-| )?for=(.+)$/i
      action(:suggest_cookbook_for, $3.to_s.dup)
    # ===================================================================== #
    # === Remove all empty directories from the current working directory
    #
    # Invocation example:
    #
    #   ry --remove_empty_directories
    #
    # ===================================================================== #
    when /^-?-?remove(_|-| )?empty(_|-| )?directories$/
      remove_empty_directories
    # ===================================================================== #
    # === Query whether this program can be compiled statically
    #
    # This entry point allows us to query whether the given program at
    # hand can be compiled statically or whether it can not.
    #
    # Invocation example:
    #
    #   ryt tar --can-be-compiled-statically?
    #
    # ===================================================================== #
    when /^-?-?can(-|_| )?be(-|_| )?compiled(-|_| )?statically\??$/i
      verbose_query_whether_this_program_can_be_compiled_statically
      exit_program
    # ===================================================================== #
    # === Show the installation_procedure.yml file
    #
    # Invocation example:
    #
    #   ry --installation-procedure
    #
    # ===================================================================== #
    when /-?-?installation(-|_| )?procedure$/
      show_installation_procedure_file
      exit_program
    # ======================================================================= #
    # === Do use autoconf
    #
    # This entry point allows the user to use/invoke autoconf.
    #
    # Usage examples:
    #
    #   rbt htop --run-autoconf
    #   rbt tiff --ntrad --use-autoconf
    #   installer bridgeutils --ntrad --use-autoconf
    #
    # ======================================================================= #
    when /^-?-?run(-|_| )?autoconf$/,
         /^-?-?do(-|_| )?use(-|_| )?autoconf$/,
         /^-?-?use(-|_| )?autoconf$/,
         'autoconf+'
      do_use_autoconf
    # ===================================================================== #
    # === Show every available programs
    #
    # Feedback all available programs:
    #
    #   ry all_programs
    #   ry --all_available_programs?
    #
    # ===================================================================== #
    when *ARRAY_HELP_ALL_AVAILABLE_PROGRAMS
      all_available_programs?
      exit_program
    # ===================================================================== #
    # === Generate a gobolinux recipe
    #
    # Use this entry point to generate a GoboLinux recipe.
    #
    # You can find all the GoboLinux recipes here:
    #
    #   https://recipes.gobolinux.org/r/
    #
    # Invocation examples:
    #
    #   ry zenity  --gobolinux-recipe
    #   ry LibDRM  --gobolinux-recipe
    #   ry zziplib --gobolinux-recipe
    #   ry ruby    --gobolinux-recipe
    #   ry php     --gobolinux-recipe
    #   ry khtml   --generate-gobolinux-description-file
    #
    # ===================================================================== #
    when /^-?-?gobolinux(_|-| )?recipe$/,
         /^-?-?create(_|-| )?gobo(_|-| )?recipe$/, # See: http://rubular.com/r/8vWvfd2izB
         /^-?-?grecipe$/i,
         /^-?-?gobolinux(_|-| )?package$/i,
         /^-?-?generate(_|-| )?gobolinux(_|-| )?description(_|-| )?file$/i,
         /^-?-?generate(_|-| )?gobolinux(_|-| )?description$/i,
         /^-?-?to(_|-| )?gobo$/i,
         /^-?-?tog$/i,
         /^-?-?gobo(_|-| )?recipe$/i,
         /^-?-?gobo(_|-| )?scripts$/i,
         /^-?-?to(_|-| )?gobo?$/i, # ry ruby --to_gobo
         /^-?-?generate(_|-| )?gobolinux(_|-| )?recipe$/i,
         /^-?-?ggr$/i
      if program_name?.nil? and cookbook_dataset?.nil?
        set_compile_this_program(first_argument?)
        initialize_cookbook_dataset_for(program_name?)
      end
      generate_gobolinux_recipe(program_name?)
      exit_program
    # ===================================================================== #
    # === Create a program_version_url file for a specific program
    #
    # Invocation examples:
    #
    #   rbt --create-file-for=manpages
    #   rbt --create-file-for=ruby
    #
    # ===================================================================== #
    when /^-?-?create(-|_| )?file(-|_| )?for=(.+)$/i
      action(:CreateProgramVersionUrlFile, $3.to_s.dup)
      exit_program
    # ===================================================================== #
    # === Use build directory
    #
    # Instruct RBT to use a build directory.
    #
    # Usage examples:
    #
    #   ry htop build
    #   ry automake usebuilddir
    #   ry automake use_build_dir ntrad
    #   ry modules  use_build_dir
    #   ry yakuake --use-build-dir
    #   ry yakuake --trad --use-build-dir
    #
    # ===================================================================== #
    when *ARRAY_HELP_USE_BUILD_DIRECTORY_OPTIONS
      do_use_a_build_directory
    # ===================================================================== #
    # === Feedback various versions
    #
    # This entry point will tell us which version is in use for the
    # RBT project.
    #
    # Invocation examples:
    #
    #   ry feedback_version
    #   ry --feedback-version
    #   ry --versions-in-use?
    #
    # ===================================================================== #
    when *ARRAY_HELP_FEEDBACK_VERSIONS_OPTIONS
      feedback_various_versions :do_not_use_opn
      exit_program
    # ===================================================================== #
    # === Show libraries that are not available on this system
    #
    # This entry point allows us to display all library files that
    # may be missing on this host.
    #
    # Invocation example:
    #
    #   ry --not-found
    #
    # ===================================================================== #
    when /^-?-?not(-|_| )?found$/i
      report_which_libraries_are_missing
      exit_program
    # ===================================================================== #
    # === Extract the source archive here
    #
    # Extract a source archive into the current working directory.
    #
    # Invocation example:
    #
    #   ry gimp --extract-here
    #
    # ===================================================================== #
    when /^-?-?extract(-|_| )?here$/i
      unless cookbook_dataset_has_been_initialized?
        initialize_cookbook_dataset_for(first_argument?)
      end
      _ = program_path?
      if File.exist? _
        orev 'Extracting from '+sfile(_)+"#{rev} next."
        extract_what_to(_, return_pwd)
      else
        opnn; no_file_exists_at(_)
      end
      exit_program
    # ===================================================================== #
    # === Ad-hoc silence "LC_ALL: cannot change locale" warnings
    #
    # Invocation example:
    #
    #   ry libunistring ntrad --lcall
    #
    # ===================================================================== #
    when /^-?-?LC_?ALL$/i
      ENV['LC_ALL'] = 'C'
    # ===================================================================== #
    # === Keep the archive extracted
    #
    # The user can use this entry point if he/she dodoes not want
    # to delete the extracted archive again.
    #
    # Keep our source archive extracted:
    #
    #   ry htop ke
    #
    # ===================================================================== #
    when *ARRAY_HELP_KEEP_EXTRACTED_OPTIONS
      do_set_keep_extracted
    # ===================================================================== #
    # === Check for the latest program
    #
    # Check for the latest program:
    #
    #   SM --latest?
    #   SM --latest
    #   SM --check-for-latest
    #
    # ===================================================================== #
    when /^-?-?latest\??$/,
         'not_latest?',
         'not_latest','sanitize',
         'clean',
         /^-?-?check(_|-| )?for(_|-| )?latest$/
      check_for_latest
      exit_program
    # ===================================================================== #
    # === Feedback the main configuration
    #
    # This entry point can be used to show the main configuration of
    # the RBT project.
    #
    # Invocation example:
    #
    #   SM --main-config?
    #
    # ===================================================================== #
    when *ARRAY_HELP_CONFIG_OPTIONS
      feedback_main_config
      exit_program
    # ===================================================================== #
    # === Create the programs-version yaml file
    #
    # Invocation example:
    #
    #   SM --create-programs-version-yaml-file
    #
    # ===================================================================== #
    when /^-?-?create(-|_| )?programs(-|_| )?version(-|_| )?yaml(-|_| )?file$/i,
         /^-?-?generate(-|_| )?file$/i,
         /^-?-?generate(-|_| )?programs(-|_| )?version$/i
      orev "Next generating the #{sfile('programs_version.yml')} #{rev}file."
      action(:generate_version_file)
      exit_program
    # ===================================================================== #
    # === SM --generate-version-file
    #
    # This variant is a bit less verbose then the one ^^^ above.
    # ===================================================================== #
    when /^-?-?generate(-|_| )?version(-|_| )?file/,
         /^-?-?create(-|_| )?version(-|_| )?file/,
         /^-?-?gversionfile/
      action(:generate_version_file)
      exit_program
    # ===================================================================== #
    # === Show all registered keys
    #
    # Show which keys are registered.
    #
    # Invocation examples:
    # 
    #   SM --allregistered?
    #   SM --show_registered_keys
    #   SM allregistered?
    #   SM  show_registered_keys
    #
    # ===================================================================== #
    when *ARRAY_HELP_SHOW_REGISTERED_KEYS
      show_registered_keys
      exit_program
    else # else tag
      # =================================================================== #
      # else no given argument was found, so we will handle this event
      # next.
      # =================================================================== #
      if i # check that we still have some kind of input here
        # ================================================================= #
        # Get the variant without any numbers or '-' hyphens next. We
        # will apply .to_s here, just to not have to worry about Symbols.
        # ================================================================= #
        entry_without_numbers_and_hyphen = i.to_s.delete('-').gsub(/[0-9]/,'')
        # ================================================================= #
        # We may still have input such as "--plasma1". The next code
        # block will account for that situation.
        #
        # Invocation examples for this:
        #
        #   ry --plasma1
        #   ry --plasma2
        #   ry --plasma3
        #
        # ================================================================= #
        if ARRAY_SPECIAL_COMPONENT_CONTAINING_MANY_SUBCOMPONENTS.include?(entry_without_numbers_and_hyphen) and
           (i =~ /\d+$/) # ← This line was added April 2021 to distinguish between "-lxqt" and "-lxqt1".
          # ================================================================= #
          # The next code should return a single entry.
          # ================================================================= #
          entry = try_to_return_a_special_compile_component(i.delete('-'))
          determine_which_programs_to_compile(entry)
        elsif i.start_with?('--')
          warning_argument_was_not_found(i)
        end
      end
    end
  end
end

#missing_cookbooks_dataset?Boolean

#

missing_cookbooks_dataset?

#

Returns:

  • (Boolean)


1763
1764
1765
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1763

def missing_cookbooks_dataset?
  !a_program_has_been_initialized?
end

#mode?Boolean

#

mode?

#

Returns:

  • (Boolean)


1836
1837
1838
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1836

def mode?
  cookbook_dataset?.mode?
end

#modify_the_makefile?Boolean

#

modify_the_makefile?

If this is used then it should be used before invoking the “make” step.

#

Returns:

  • (Boolean)


1316
1317
1318
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1316

def modify_the_makefile?
  cookbook_dataset?.modify_the_makefile?
end

#name_for_the_build_directory?Boolean Also known as: name_of_the_build_directory?, return_the_name_of_the_build_directory

#

name_for_the_build_directory?

#

Returns:

  • (Boolean)


274
275
276
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 274

def name_for_the_build_directory?
  @internal_hash[:name_for_the_build_directory]
end

#no_cookbook_dataset?Boolean

#

no_cookbook_dataset?

#

Returns:

  • (Boolean)


1037
1038
1039
1040
1041
1042
1043
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1037

def no_cookbook_dataset?
  !(
    @internal_hash and 
    @internal_hash[:yaml_dataset] and 
   !@internal_hash[:yaml_dataset].nil?
  )
end

#no_dependency_was_found_for(i) ⇒ Object

#

no_dependency_was_found_for

#


7806
7807
7808
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7806

def no_dependency_was_found_for(i)
  orev "No dependency was found for `#{sfancy(i)}#{rev}`."
end

#notify_the_user_as_to_which_program_will_be_compiled_or_installed_next(i = compile_which_program?, , local_path = program_path? ) ⇒ Object

#

notify_the_user_as_to_which_program_will_be_compiled_or_installed_next

Notify the user which program will be compiled/installed next through this method.

#


1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1706

def notify_the_user_as_to_which_program_will_be_compiled_or_installed_next(
    i          = compile_which_program?,
    local_path = program_path?
  )
  orev "The program `#{steelblue(i)}#{rev}` "\
       "will be #{compile_or_install_string?} #{rev}next, in "\
       "#{lightgreen(mode?.to_s)} #{rev}mode."
  orev "The #{steelblue('assumed local path')} #{rev}is:"
  e
  e "  #{sfile(local_path)}"
  e
  if File.exist? local_path
    orev "The program called #{steelblue(i)}#{rev} will be extracted next."
  else
    orev "The program called #{steelblue(i)}#{rev} will be downloaded first."
    orev 'If the download is successful then the archive will '\
         'be extracted next.'
    orev 'If this fails then it may be easier to download the source'
    orev 'archive manually.'
  end
end

#notify_the_user_that_ccache_is_not_availableObject

#

notify_the_user_that_ccache_is_not_available

Provide some information to the user about the use of ccache.

#


9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9696

def notify_the_user_that_ccache_is_not_available
  orev swarn('You are trying to use ')+
       steelblue('ccache')+
       swarn(', as specified by the configuration')
  opnwarn 'file, but ccache could not be found. '+
          tomato('Please install ccache if')
  opnwarn tomato('you wish to use it.')+
          rev+' The URL to the latest source would be:'
  e
  efancy "  #{RBT.return_url1_of_this_program(:ccache)}"
  e
  opnwarn 'If you do not want to use ccache, you can '\
          'disable ccache, via'
  opnwarn 'either of the following two options:'
  e
  efancy '  rbt --permanently-disable-ccache'
  e
  efancy '  rbt --disable-ccache # this variant will avoid '\
         'ccache just for this run'
  e
  opnwarn 'RBT will now continue without ccache.'
end

#notify_the_user_that_cmake_could_not_be_foundObject

#

notify_the_user_that_cmake_could_not_be_found

Do note that this method is solely here for notifying/reporting - it may presently not do anything else but to report to the user.

#


12462
12463
12464
12465
12466
12467
12468
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12462

def notify_the_user_that_cmake_could_not_be_found
  orev "#{swarn('The program ')}#{sfancy('cmake')} #{swarn('could not')} "\
       "#{swarn('be found - thus, ')}#{tomato(compile_which_program?)}"
  opnewarn 'can not be compiled.'
  opnewarn 'Consider installing cmake if you wish to compile programs'
  opnewarn 'that require cmake for their compilation.'
end

#notify_the_user_that_no_binary_python_could_be_foundObject

#

notify_the_user_that_no_binary_python_could_be_found

#


4583
4584
4585
4586
4587
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4583

def notify_the_user_that_no_binary_python_could_be_found
  orev 'No binary called "'+gold('python')+
       rev+'" could be found. This may'
  orev 'be resolved by a symlink to e. g. python3.'
end

#notify_the_user_that_porg_is_not_availableObject

#

notify_the_user_that_porg_is_not_available

#


1028
1029
1030
1031
1032
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1028

def notify_the_user_that_porg_is_not_available
  orev 'You are trying to use porg, but porg is not installed.'
  orev 'Please either install porg - or disable the configuration '
  orev "option use_porg in the #{slateblue('configuration setting')}#{rev}."
end

#notify_the_user_that_something_failed_at_configure_stageObject

#

notify_the_user_that_something_failed_at_configure_stage

#


9867
9868
9869
9870
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9867

def notify_the_user_that_something_failed_at_configure_stage
  orev swarn('Something appears to have failed at the configure stage.')
  report_status
end

#notify_the_user_that_this_old_directory_will_be_removed_next(i) ⇒ Object

#

notify_the_user_that_this_old_directory_will_be_removed_next

#


6636
6637
6638
6639
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6636

def notify_the_user_that_this_old_directory_will_be_removed_next(i)
  orev tomato('Removing')+rev+' the '+seagreen('old directory')+rev+
       ' at `'+sdir(i)+rev+'`.'
end

#notify_the_user_that_this_program_is_missing(i = :jam) ⇒ Object

#

notify_the_user_that_this_program_is_missing

The first argument to this method should be the program that is missing, such as ‘ruby’ or ‘htop’ or ‘glib’.

The method will also notify the user how to install the program via the RBT scripts, if this is applicable - aka, if this program is registered.

#


1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1793

def notify_the_user_that_this_program_is_missing(
    i = :jam
  )
  i = i.to_s unless i.is_a? String
  e; cliner(use_colour: :konsole_slateblue) {
    e "#{rev}#{sfancy(i)} was not found on your system."
    e
    e 'As you are running via the RBT scripts, you can possibly '\
      'install '+simp(i)
    e 'by issuing the following command:'
    e
    e '  '+sfancy("rbt #{i}")
    e
    # ===================================================================== #
    # Extra options can be passed into the block to this method.
    # ===================================================================== #
    if block_given?
      yield
    end
  }; e
end

#notify_the_user_that_this_program_is_NOT_registered_as_part_of_the_RBT_project(i) ⇒ Object

#

notify_the_user_that_this_program_is_NOT_registered_as_part_of_the_RBT_project

#


759
760
761
762
763
764
765
766
767
768
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 759

def notify_the_user_that_this_program_is_NOT_registered_as_part_of_the_RBT_project(
    i
  )
  orev tomato('Unfortunately the program called ')+
       steelblue(i)+
       tomato(' is not')
  orev tomato('registered as part of the RBT project.')
  orev tomato('Thus, it could not be found and, subsequently, it can')
  orev tomato('not be installed or compiled.')
end

#notify_the_user_that_we_will_use_sed_from_the_pwdObject

#

notify_the_user_that_we_will_use_sed_from_the_pwd

#


2514
2515
2516
2517
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2514

def notify_the_user_that_we_will_use_sed_from_the_pwd
  orev "Next applying #{teal('sed')} #{rev}in "\
       "the directory #{sdir_return_pwd}#{rev}:"
end

#old_cflags?Boolean

#

old_cflags?

#

Returns:

  • (Boolean)


9190
9191
9192
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9190

def old_cflags?
  ENV['CFLAGS'].to_s.dup
end

#operating_system_in_use?(i = RUBY_PLATFORM) ⇒ Boolean

#

operating_system_in_use?

#

Returns:

  • (Boolean)


10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10245

def operating_system_in_use?(
    i = RUBY_PLATFORM
  )
  case i
  # ======================================================================= #
  # === linux
  # ======================================================================= #
  when /linux$/ # e. g. "x86_64-linux"
    'Linux'
  # ======================================================================= #
  # === win
  # ======================================================================= #
  when /win/,
       /mingw/
    'Windows'
  else
    'Undetermined (as of yet - please report it upstream)'
  end
end

#opnObject

#

opnn (opnn tag)

#

opn



13031
13032
13033
13034
13035
13036
13037
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13031

def opnn(
    optional_i = { namespace: namespace? }
  )
  if use_opn?
    installer_constant?.opnn(optional_i)
  end
end

#opnn(optional_i = { namespace: namespace? }) ⇒ Object

#

opnn (opnn tag)

#


13025
13026
13027
13028
13029
13030
13031
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13025

def opnn(
    optional_i = { namespace: namespace? }
  )
  if use_opn?
    installer_constant?.opnn(optional_i)
  end
end

#original_start_directory?Boolean Also known as: original_base_directory?

#

original_start_directory?

#

Returns:

  • (Boolean)


1154
1155
1156
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1154

def original_start_directory?
  @internal_hash[:original_start_directory]
end

#output_all_urlsObject

#

output_all_urls

This method will output all URLs of every registered program.

Invocation example:

ry --output_all_urls
#


8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8393

def output_all_urls
  require 'rbt/cookbooks/all_urls/all_urls.rb'
  dataset = RBT.all_urls(:no_opn).result? # Tap into this method here, without outputting the namespace.
  dataset = dataset.map {|entry|
    entry[0] = '  '+(entry[0]+' ').ljust(30)
    entry.join
  }.join("\n")
  store_where = rbt_log_dir?+'all_program_urls.md'
  File.delete(store_where) if File.exist? store_where # Let's get rid of the old file first.
  orev "Storing into #{sfile(store_where)}"
  save_file(dataset, store_where)
end

#output_all_urls_then_exitObject

#

output_all_urls_then_exit

#


8420
8421
8422
8423
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8420

def output_all_urls_then_exit
  output_all_urls
  exit_program
end

#output_namespace?Object

#

opnn (opnn tag)

#

output_namespace?



13032
13033
13034
13035
13036
13037
13038
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13032

def opnn(
    optional_i = { namespace: namespace? }
  )
  if use_opn?
    installer_constant?.opnn(optional_i)
  end
end

#package_rbt_scripts(also_exit = false) ⇒ Object

#

package_rbt_scripts (package tag, release tag)

You can use this method to package the RBT scripts.

A specialized class will do this for us, class PackageRbtScripts.

Invocation examples:

ry --package_rbt_scripts
ry --release
#


7713
7714
7715
7716
7717
7718
7719
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7713

def package_rbt_scripts(
    also_exit = false
  )
  action(:package_rbt_scripts)
  also_exit = true if also_exit == :then_exit
  exit_program if also_exit
end

#package_this_appdir(i) ⇒ Object

#

package_this_appdir

Invocation example:

ry --package-appdir=htop
#


3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3682

def package_this_appdir(i)
  target = programs_dir?+i.capitalize+'/Current'
  if File.exist?(target) and File.symlink?(target)
    old_pwd = return_pwd
    initialize_dataset_for(i)
    cd target
    use_this_as_the_archive_name = i.downcase+'-'+program_version?
    to_tar_xz("#{target}*") {{
      use_this_archive_name: use_this_as_the_archive_name
    }}
    full_target = target+use_this_as_the_archive_name
    if File.exist? full_target
      mv(full_target, old_pwd)
    end
  end
end

#parameters_to_make?Boolean

#

parameters_to_make?

The aliased method to this method, called make_options?, is mildly discouraged after 12.04.2019. The primary reason for this is that the name parameters_to_make? is more explicit, and thus better in the long run (less confusing).

In September 2022 the alias .make_options?() was commented out.

#

Returns:

  • (Boolean)


10066
10067
10068
10069
10070
10071
10072
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10066

def parameters_to_make?
  _ = @internal_hash[:parameters_to_make]
  if _.nil?
    _ = cookbook_dataset_parameters_to_make?
  end
  return _ # Do not use .to_s here.
end

#parameters_to_make_as_string?Boolean

#

parameters_to_make_as_string?

#

Returns:

  • (Boolean)


697
698
699
700
701
702
703
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 697

def parameters_to_make_as_string?
  if @internal_hash[:parameters_to_make]
    @internal_hash[:parameters_to_make].join(' ').strip.squeeze(' ')
  else
    ''
  end
end

#permanently_add_this_global_flag(i) ⇒ Object Also known as: add_this_global_flag

#

permanently_add_this_global_flag

Use this method in order to permanently add a new global flag, into the file called “global_flags.yml”.

To test this method, try:

ry --add-global-flag=--disable-static
#


4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4874

def permanently_add_this_global_flag(i)
  i = i.to_s.dup
  into = RBT.file_global_flags
  orev "Now appending the flag `#{sfancy(i)}` into the "\
       "file `#{sfile(into)}`."
  old_file_content = ''.dup
  if File.exist? into
    old_file_content << File.read(into).strip
  end
  old_file_content << " #{i}"
  what = old_file_content
  write_what_into(what, into)
  if is_on_roebe?
    into = ROEBE_FILE_GLOBAL_FLAGS
    orev 'Now appending the flag `'+sfancy(i)+rev+
         '` into the file `'+sfile(into)+'`.'
    write_what_into(what, into)
  end
end

#permanently_disable_porgObject

#

permanently_disable_porg

Permanently disable porg via this method.

#


4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4401

def permanently_disable_porg
  if use_porg?
    orev 'Disabling porg.'
    if configuration?.respond_to? :use_porg=
      configuration?.use_porg = false
      if configuration?.respond_to? :save_config
        configuration?.save_config
      else
        what = false
        into = FILE_USE_PORG
        orev "Storing into `#{sfile(into)}#{rev}`."
        write_what_into(what, into)
      end
    else
      orev 'The configuration-object is not functional - it does not'
      orev 'respond to the method called .use_porg='
    end
  else
    orev 'Porg is already disabled.'
  end
end

#permanently_do_not_rename_the_kde_konsole_tabObject

#

permanently_do_not_rename_the_kde_konsole_tab

Invocation example:

ry pango --permanently-do-not-rename-tab
#


4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4313

def permanently_do_not_rename_the_kde_konsole_tab
  orev 'Now permanently disabling the rename-the-kde-konsole-tab feature.'
  configuration?.rename_tab_title = false
  into = RBT.file_rename_tab_title
  write_what_into(false, into)
  if is_on_roebe?
    into = RUBY_SRC_DIR_RBT_YAML_AT_HOME+'configuration/'+
           File.basename(into)
    orev "Also storing in `#{sfile(into)}#{rev}`."
    write_what_into(false, into)
  end
end

#permanently_enable_is_on_gobolinux(be_verbose = :be_verbose) ⇒ Object

#

permanently_enable_is_on_gobolinux

Use this method to “enable” the GoboLinux file layout.

To call this method from the commandline, do:

ry --permanently-enable-is-on-gobolinux
#


2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2310

def permanently_enable_is_on_gobolinux(
    be_verbose = :be_verbose
  )
  case be_verbose
  when :be_verbose
    be_verbose = true
  end
  _ = RBT.file_is_on_gobolinux
  if File.exist? _
    orev "The file at `#{sfile(_)}#{rev}` already exists."
  else
    if be_verbose
      orev "Enabling GoboLinux layout now via the file `#{sfile(_)}#{rev}`."
    end
    orev "Now creating the file #{sfile(_)}#{rev}."
    create_file(_)
    enable_is_on_gobolinux # And also enable the GoboLinux behaviour.
  end
end

#permanently_remove_this_global_flag(i) ⇒ Object Also known as: remove_this_global_flag

#

permanently_remove_this_global_flag

Use this method in order to permanently remove a new global flag, into the file called “global_flags.yml”.

To test this method, try:

rbt --remove-global-flag=--disable-static
#


11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11555

def permanently_remove_this_global_flag(i)
  i = i.to_s.dup
  into = RBT.file_global_flags
  old_file_content = ''.dup
  if File.exist? into
    old_file_content << File.read(into).strip
  end
  if old_file_content.include? i
    orev 'Now removing the flag `'+sfancy(i)+rev+'` from the '\
         'file `'+sfile(into)+rev+'`.'
    old_file_content.gsub!(/#{i}/,'')
  else
    orev "The flag `#{sfancy(i)}#{rev}` can not be removed from "\
         "the file `#{sfile(into)}#{rev}`."
    orev 'because this file does not have that flag.'
  end
  what = old_file_content
  write_what_into(what, into)
  if is_on_roebe?
    into = ROEBE_FILE_GLOBAL_FLAGS
    orev 'Now removing the flag `'+sfancy(i)+rev+'` from the '\
         'file `'+sfile(into)+rev+'`.'
    write_what_into(what, into)
  end
end

#permanently_set_programs_dir(what, into = FILE_PROGRAMS_DIRECTORY) ⇒ Object Also known as: permanently_set_programs_directory

#

permanently_set_programs_dir

#


1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1900

def permanently_set_programs_dir(
    what,
    into = FILE_PROGRAMS_DIRECTORY
  )
  orev 'Storing '+sfancy(what)+rev+' into the file `'+sfile(into)+rev+'`.'
  write_what_into(what, into)
  if is_on_roebe?
    into = RUBY_SRC_DIR_RBT_YAML+'configuration/programs_directory.yml'
    orev 'Storing '+sfancy(what)+rev+' into the file `'+sfile(into)+rev+
         '`.'
    write_what_into(what, into)
  end
end

#pid?Boolean

#

pid?

#

Returns:

  • (Boolean)


1857
1858
1859
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1857

def pid?
  $?.pid
end

#pin_this_program(i) ⇒ Object

#

pin_this_program

#


9918
9919
9920
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9918

def pin_this_program(i)
  ::RBT.pin_this_program(i)
end

#pkgconfig_files?Boolean Also known as: pc_files?

#

pkgconfig_files?

Query method over the registered .pc files of a particular program.

#

Returns:

  • (Boolean)


1469
1470
1471
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1469

def pkgconfig_files?
  cookbook_dataset?.pkgconfig_files?
end

#populate_the_internal_hash_with_values_specific_to_this_classObject

#

populate_the_internal_hash_with_values_specific_to_this_class

#


38
39
40
41
# File 'lib/rbt/actions/individual_actions/software_manager/reset.rb', line 38

def populate_the_internal_hash_with_values_specific_to_this_class
  reset_user_definable_variables
  reset_the_invariant_dataset_to_the_internal_hash
end

#postinstallation?Boolean Also known as: postinstall?

#

postinstallation?

#

Returns:

  • (Boolean)


11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11954

def postinstallation?
  _ = cookbook_dataset_postinstall?
  # ======================================================================= #
  # The following part is, as of January 2019, only added when we have
  # modified this variable through the method set_user_prefix(). The
  # user can (currently) not modify this variable on his/her own.
  # ======================================================================= #
  unless @internal_hash[:postinstallation].nil?
    _ = @internal_hash[:postinstallation]
  end
  return _ # Return the result here.
end

#pre_configure_steps?Boolean

#

pre_configure_steps?

#

Returns:

  • (Boolean)


1460
1461
1462
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1460

def pre_configure_steps?
  cookbook_dataset?.pre_configure_steps?
end

#pre_make_install_sed?Boolean Also known as: pre_make_install_sed

#

pre_make_install_sed?

#

Returns:

  • (Boolean)


963
964
965
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 963

def pre_make_install_sed?
  cookbook_dataset?.pre_make_install_sed?
end

#prefix=Object

#

set_user_prefix (set_prefix tag, set prefix tag)

This method can be used by the user, to designate another prefix in use for the given program. This will be the target directory into which the program will be installed into.

A specialized class, called RBT::Prefix, will handle the prefix.

#

prefix=



291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 291

def set_user_prefix(
    i = :appdir_prefix
  )
  # ======================================================================= #
  # We must rewrite the program version in the following case.
  #
  # The input may look like this:
  #
  #  "/Programs/Gobjectintrospection/1.53.4/"
  #
  # ======================================================================= #
  if i and use_this_specific_program_version?
    if i.is_a?(String) and i.include?(programs_directory?)
      use_this_regex = /(\d{1,2}\.?\d{1,2}\.?\d{1,2}\/)$/ # See: http://rubular.com/r/PPb2Y96XfF
      i.sub!(use_this_regex, use_this_specific_program_version?)
      i << '/' unless i.end_with? '/'
    elsif i.is_a?(Symbol)
      i = use_this_specific_program_version?
    end
  end
  if i.is_a? Symbol
    # ===================================================================== #
    # Next, perform some sanitize operations.
    #
    # This clause will handle Symbols such as :app_dir_like or
    # :use_ntrad_prefix_at_a_later_time.
    # ===================================================================== #
    case i.to_s # case tag
    # ===================================================================== #
    # === ULOCAL
    #
    # This refers to the commonly used /usr/local/ directory.
    # ===================================================================== #
    when 'ULOCAL'
      i = '/usr/local/'
    # ===================================================================== #
    # === trad
    # ===================================================================== #
    when /^trad$/
      i = '/usr/'
    # ===================================================================== #
    # === --opt_prefix
    # ===================================================================== #
    when /^-?-?opt(_|-)?prefix$/,
         :opt
      i = '/opt/'
    # ===================================================================== #
    # === non_traditional
    #
    # This entry point has various aliases such as :ntrad.
    # ===================================================================== #
    when /^app(_|-)?dir$/,
         /^app(_|-)?dir(_|-)?like$/,
         /^use(_|-)?appdir(_|-)?prefix$/i,
         /^use(_|-)?ntrad(_|-)?prefix(_|-)?at(_|-)?a(_|-)?later(_|-)?time$/i,
         'non_traditional',
         'gobolinux',
         'ntrad',
         'default',
         'app_dir_like',
         'appdir',
         'return_appdir_path',
         'false',
         'f',
         'appdir_prefix',
         ''
      prefix?.clear_program # Clear it initially.
      prefix?.do_use_appdir_prefix
      if handle_which_program?
        i = return_non_traditional_prefix(handle_which_program?)
      end
      # =================================================================== #
      # Since as of May 2014 we get rid of all '-'
      # =================================================================== #
      i.delete!('-') if i.respond_to?(:include?) and i.include? '-'
    end
    # ===================================================================== #
    # === Convert environment variables, if given, and unfreeze frozen
    #     Strings
    # ===================================================================== #
    if i.is_a?(String)
      # =================================================================== #
      # Unfreeze frozen Strings.
      # =================================================================== #
      if i.is_a? String and i.frozen?
        i = i.dup # "unfreeze" it.
      end
      # =================================================================== #
      # === Handle Strings that start with the ':' character
      #
      # Handle the situation when we input a String that starts with
      # the character ':'. This will be assumed to be a shortcut to
      # an environment variable.
      # =================================================================== #
      if i.start_with?(':')
        # ================================================================== #
        # Next, we must add the proper program_version. This is either the
        # program_version at hand - or it is an ENV variable if it exists.
        # We check for the ENV variable first.
        # ================================================================== #
        this_key = (i.delete(':').upcase+'_PREFIX').dup
        if ENV.has_key? this_key
          # =============================================================== #
          # The environment variables must be UPCASED and have appended
          # the string '_PREFIX'.
          # =============================================================== #
          i = ENV[this_key].dup.to_s
        else
          # =============================================================== #
          # Assume a special prefix variant targetting the /Programs/
          # hierarchy.
          # =============================================================== #
          i = programs_directory?+i.to_s.delete(':').capitalize+'/'
          i << program_version?.dup.to_s
        end
      end
      if i.include?('$')
        i = convert_env_variable(i) # Replace ENV variables here.
        i << '/' unless i.end_with? '/'
      end
      if i.include? '--'
        if i.include? '--prefix=' # Input is assumed to be like '--prefix=/Depot/j'
          i = i.split('=').last # ← Obtain just the last part in this case.
        end
      end
    end
    # ===================================================================== #
    # === Ensure a trailing '/' for directories.
    # ===================================================================== #
    unless i.to_s.end_with? '/' # .to_s to protect against Symbols given.
      i << '/' if File.directory?(i.to_s)
    end
  end
  # ======================================================================= #
  # Next, we must check for post-install actions and modify these,
  # if they exist. We only do so if we have an AppDir-prefix.
  # ======================================================================= #
  if is_an_appdir_prefix?(i.to_s)
    consider_modifying_postinstall
  end
  prefix_object?.use_this_as_the_new_prefix = i
end

#prefix_as_string?Boolean

#

prefix_as_string?

#

Returns:

  • (Boolean)


1000
1001
1002
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1000

def prefix_as_string?
  prefix?.to_s
end

#prefix_object?Boolean

#

prefix_object?

#

Returns:

  • (Boolean)


62
63
64
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 62

def prefix_object?
  @internal_hash[:prefix_object]
end

#prepare_for_gccObject

#

prepare_for_gcc

This method can be used to aid in the preparation of compiling a new GCC from source.

#


3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3923

def prepare_for_gcc
  # ======================================================================= #
  # === gmp
  # ======================================================================= #
  initialize_cookbook_dataset_for(:gmp)
  cp(cookbook_dataset_program_path?, return_pwd) { :be_verbose }
  extract_what_to(
    File.basename(cookbook_dataset_program_path?), return_pwd, :keep_the_old_directory_if_it_exists
  )
  rename(
    remove_archive_at_the_end(
      File.basename(cookbook_dataset_program_path?)
    ), 'gmp'
  )
  # ======================================================================= #
  # === mpc
  # ======================================================================= #
  initialize_cookbook_dataset_for(:mpc)
  cp(cookbook_dataset_program_path?, return_pwd) { :be_verbose }
  extract_what_to(File.basename(cookbook_dataset_program_path?), return_pwd, :keep_the_old_directory_if_it_exists)
  rename(
    remove_archive_at_the_end(
      File.basename(cookbook_dataset_program_path?)
    ), 'mpc'
  )
  # ======================================================================= #
  # === mpfr
  # ======================================================================= #
  initialize_cookbook_dataset_for(:mpfr)
  cp(cookbook_dataset_program_path?, return_pwd) { :be_verbose }
  extract_what_to(File.basename(cookbook_dataset_program_path?), return_pwd, :keep_the_old_directory_if_it_exists)
  rename(
    remove_archive_at_the_end(
      File.basename(cookbook_dataset_program_path?)
    ), 'mpfr'
  )
end
#
#


1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1256

def prepare_symlink_program_instance(
    symlink_program = symlink_program?
  )
  # ======================================================================= #
  # Assign the prefix to SymlinkProgram next:
  # ======================================================================= #
  symlink_program?.set_use_this_program(
    prefix?
  )
  symlink_program.disable_colours unless use_colours?
  symlink_program.do_not_symlink = do_not_symlink? # Honour configure option here.
  symlink_program.use_opn = RBT::Action::SoftwareManager.show_the_classname?
  # ======================================================================= #
  # Next, prevent auto-registering into the local yaml database.
  # This part is already handled via register_program() in
  # the file postinstall.rb
  # ======================================================================= #
  symlink_program.do_not_register_into_the_local_yaml_database
end

#prepend_dot_to_configure_stringObject

#

prepend_dot_to_configure_string

#


8379
8380
8381
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8379

def prepend_dot_to_configure_string
  full_configure_command?.prepend('.')
end

#prepend_env_path_with(i = '/usr/bin/') ⇒ Object

#

prepend_env_path_with

This method will effectively prepend to the PATH variable.

#


12512
12513
12514
12515
12516
12517
12518
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12512

def prepend_env_path_with(i = '/usr/bin/')
  unless i.end_with? ':'
    i = i.dup if i.frozen?
    i << ':'
  end
  set_path("#{i}#{query_path?}")
end

#program_compile_name?Boolean

#

program_compile_name?

#

Returns:

  • (Boolean)


1483
1484
1485
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1483

def program_compile_name?
  cookbook_dataset?.program_compile_name?.to_s
end

#program_full_name?Boolean

#

program_full_name?

This will always query the dataset object.

#

Returns:

  • (Boolean)


1572
1573
1574
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1572

def program_full_name?
  cookbook_dataset?.program_full_name? # This returns e. g. 'gnome-mahjonng-5.08.tar.xz'
end

#program_has_to_be_compiled?Boolean Also known as: is_compiled?, has_to_be_compiled?, had_to_be_compiled?, the_program_has_to_be_compiled?

#

program_has_to_be_compiled?

The query-method program_has_to_be_compiled? determines whether our program has to be compiled or whether it does not have to be compiled.

For example, ruby .gem files typically do not have to be compiled, whereas C/C++ projects have to be compiled.

Note that this requires a setting in the .yml file. While it could probably be automatically determined whether a program has to be compiled, for the time being (November 2019) we will simply define this manually.

#

Returns:

  • (Boolean)


11208
11209
11210
11211
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11208

def program_has_to_be_compiled?
  cookbook_dataset? and
  cookbook_dataset_program_has_to_be_compiled?
end

#program_information_return_name(i) ⇒ Object

#

program_information_return_name

This method can be used to specifically return the short name of a given input-String. That input-String usually is a remote URL to some program.

#


1972
1973
1974
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1972

def program_information_return_name(i)
  program_information_return_short_name(File.basename(i))
end

#program_information_return_program_name(i) ⇒ Object

#

program_information_return_program_name

#


1961
1962
1963
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1961

def program_information_return_program_name(i)
  ProgramInformation.return_program_name(i)
end

#program_information_return_program_real_name(i) ⇒ Object

#

program_information_return_program_real_name

#


1979
1980
1981
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1979

def program_information_return_program_real_name(i)
  ProgramInformation.return_program_real_name(i)
end

#program_information_return_short_name(i) ⇒ Object

#

program_information_return_short_name

In the past ProgramInformation was called directly, but because ProgramInformation may fail, it was tedious to trace back what happened where, and why it failed. So the method here was created, on 11.11.2019.

#


1941
1942
1943
1944
1945
1946
1947
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1941

def program_information_return_short_name(i)
  if i.include? '-'
    ProgramInformation.return_short_name(i)
  else
    i
  end
end

#program_information_return_version(i) ⇒ Object Also known as: program_information_return_program_version

#

program_information_return_version

This “substitutes” calls to ProgramInformation.return_version().

#


1954
1955
1956
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1954

def program_information_return_version(i)
  ProgramInformation.return_version(File.basename(i))
end

#program_version?Boolean Also known as: program_version, version?

#

program_version?

This method will return the program version in use. The default will be to simply use the version stored in the cookbook dataset, but we also allow for the user to supply commandline-flags to use any other program version that he/she desires to use.

#

Returns:

  • (Boolean)


202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 202

def program_version?
  _ = cookbook_dataset_program_version? # ← Default value.
  # ======================================================================= #
  # The user can override it.
  # ======================================================================= #
  if @internal_hash[:use_this_specific_program_version]
    _ = @internal_hash[:use_this_specific_program_version]
  end
  #_.delete('/') if _ # A bit hackish, since it is a workaround, but necessary for now (Jan 2019).
  # ^^^ the above was disabled as of September 2022. Not sure if it will be
  #     reinstated. We hopefully no longer need it now after the rewrite.
  return _
end

#properly_prepare_the_build_directory(build_directory_object = build_directory_object? ) ⇒ Object

#

properly_prepare_the_build_directory

The build directory has to be prepared anew for every program that has to be compiled from source.

#


405
406
407
408
409
410
411
412
413
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 405

def properly_prepare_the_build_directory(
    build_directory_object = build_directory_object?
  )
  if do_we_use_a_build_directory?
    build_directory_object.this_is_the_build_directory = 
      log_dir?+program_name_and_program_version?+'/'+
      use_this_as_build_directory?
  end
end

#purge_all_man_files_in_the_programs_hierarchyObject

#

purge_all_man_files_in_the_programs_hierarchy

Invoke this method by issuing something like this:

ry --nomanpage
#


4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4945

def purge_all_man_files_in_the_programs_hierarchy
  target = programs_directory?
  orev "Now purging all man-pages in `#{sdir(target)}#{rev}`."
  orev '(Note that we will only work on entries pointed at '\
       'with a Current symlink.)'
  Dir[target+'*'].each {|entry|
    entry << '/' unless entry.end_with? '/'
    current = entry + 'Current'
    if File.symlink? current
      # =================================================================== #
      # Ok, the Current → symlink exists, thus we can continue.
      # =================================================================== #
      manpage = "#{File.readlink(current)}/share/man/"
      manpage = rds(manpage)
      if File.exist? manpage and File.directory? manpage
         orev "Now #{tomato('removing')} #{rev}the "\
              "directory `#{sdir(manpage)}#{rev}`."
         remove_directory(manpage) unless manpage.squeeze('/') == '/' # Trivial "safeguard".
      end
    end
  }
end

#purge_all_settings_directoriesObject

#

purge_all_settings_directories

#


3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3074

def purge_all_settings_directories
  # ======================================================================= #
  # We need to avoid entries such as:
  #
  #   /home/Programs/Qt/5.14.0/qml/QtQuick/VirtualKeyboard/Settings
  #
  # This explains the .count('/') action in the code below.
  # ======================================================================= #
  all_settings_directories = Dir[programs_dir?+'**/Settings'].select {|entry|
    File.directory?(entry) and
    entry.end_with?('Settings') and
    (entry.count('/') == 4)
  }.sort
  orev 'Next removing '+sfancy(all_settings_directories.size)+' directories.'
  remove_these_directories(all_settings_directories) { :be_verbose }
end

#purge_fhs_binaries_of_this_program(i = compile_which_program? ) ⇒ Object

#

purge_fhs_binaries_of_this_program

This method will purge binaries that may reside at the /usr/bin/ hierarchy. Be careful when using this - only use it when you are sure that you want this functionality.

Invocation examples:

ry littleutils --purge-fhs-binaries
ry --purge-traditional-binaries-from=xscreensaver
#


5203
5204
5205
5206
5207
5208
5209
5210
5211
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5203

def purge_fhs_binaries_of_this_program(
    i = compile_which_program?
  )
  if i.nil?
    orev 'Please provide a valid program name to this method.'
    return
  end
  PurgeBinariesOfThisProgram.new(i.downcase)
end

#purge_fhs_libraries_of_this_program(i = compile_which_program? ) ⇒ Object

#

purge_fhs_libraries_of_this_program

Get rid of all /usr/lib/ libraries of the respective program at hand.

Invocation example:

ry --fhs-purge-libraries=libgc
#


4019
4020
4021
4022
4023
4024
4025
4026
4027
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4019

def purge_fhs_libraries_of_this_program(
    i = compile_which_program?
  )
  if i.nil?
    orev 'Please provide a valid program name to this method.'
    return
  end
  PurgeLibrariesOfThisProgram.new(i)
end

#purge_these_binaries(i = binaries? ) ⇒ Object

#

purge_these_binaries

This method can be used to purge binaries.

#


7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7118

def purge_these_binaries(
    i = binaries?
  )
  removed_n_binaries = 0
  orev "Now attempting to remove #{sfancy(i.size.to_s)} #{rev}binaries:"
  e
  i.each {|this_binary|
    target = "/usr/bin/#{this_binary}"
    ftype = nil
    begin
      ftype = File.ftype(target)
    rescue Errno::ENOENT; end
    if File.exist? target
      orev "Deleting the file `#{sfile(target)}#{rev}` next."
      remove_file(target)
      removed_n_binaries += 1
    else
      if ftype == 'link'
        orev "Deleting the stray symlink at `#{sfile(target)}#{rev}` next."
        remove_symlink(target)
      end
    end
  }
  e
  if removed_n_binaries == 0
    orev "None of these binaries could be "\
         "found at #{sdir('/usr/bin/')}#{rev}."
  end
end

#query_configuration_options(i = compile_this_program? ) ⇒ Object

#

query_configuration_options

This method will query the configuration option of a given program.

Invocation example:

ry glibc qco
#


8762
8763
8764
8765
8766
8767
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8762

def query_configuration_options(
    i = compile_this_program?
  )
  action(:show_configuration_options, i)
  exit_program
end

#query_debug_value(i = RBT.debug?) ⇒ Object

#

query_debug_value

#


9197
9198
9199
9200
9201
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9197

def query_debug_value(
    i = RBT.debug?
  )
  orev "Will we debug? #{sfancy(yes_no(i))}"
end

#query_for(i) ⇒ Object

#

query_for

This method is especially important for the external class called Flexbox.

#


10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10350

def query_for(i)
  case i.to_s
  # ======================================================================= #
  # === "Will be extracted towards"
  # ======================================================================= #
  when /^Will(-|_| )?be(-|_| )?extracted(-|_| )?towards:?$/i,
       /^extract(-|_| )?to(-|_| )?this(-|_| )?directory\??$/i,
       /^extract(-|_| )?to\??$/i
    will_be_extracted_towards?
  # ======================================================================= #
  # === "Assumed Operating System:"
  # ======================================================================= #
  when /^Assumed Operating System:?$/i
    operating_system_in_use?
  # ======================================================================= #
  # === "Prefix:"
  # ======================================================================= #
  when /^Prefix:?$/i
    prefix?
  # ======================================================================= #
  # === "Required dependencies on:"
  # ======================================================================= #
  when /^Required(-|_| )?dependencies(-|_| )?on:?$/i
    required_dependencies_on?
  # ======================================================================= #
  # === "Host architecture in use:"
  # ======================================================================= #
  when /^Host(-|_| )?architecture(-|_| )?in(-|_| )?use:?$/i
    host_achiteture_in_use?
  # ======================================================================= #
  # === "CFLAGS in use:"
  # ======================================================================= #
  when /^CFLAGS(-|_| )?in(-|_| )?use:?$/i
    verbose_cflags_in_use? # Use a more verbose variant for the CFLAGs in use.
  # ======================================================================= #
  # === "Build system to be used"
  # ======================================================================= #
  when /^Build(-|_| )?system(-|_| )?to(-|_| )?be(-|_| )?used:?$/i
    build_system_to_be_used?
  # ======================================================================= #
  # === "Use a build directory:"
  # ======================================================================= #
  when /^Use(-|_| )?a(-|_| )?build(-|_| )?directory:?$/i
    use_a_build_directory?
  # ======================================================================= #
  # === "Compiler to be used:"
  # ======================================================================= #
  when /^Compiler(-|_| )?to(-|_| )?be(-|_| )?used:?$/i
    compiler_to_be_used?
  # ======================================================================= #
  # === "Will ccache be used:"
  # ======================================================================= #
  when /^Will(-|_| )?ccache(-|_| )?be(-|_| )?used:?$/i
    will_ccache_be_used?
  else
    # ===================================================================== #
    # Otherwise we will query the cookbook-dataset. This may sometimes
    # lead to problems, so it is better to define every query-related
    # method in the case-when menu above.
    # ===================================================================== #
    cookbook_dataset?.query_for(i)
  end
end

#query_for_configure_options_or_meson_options_or_cmake_options(i = 'configure-options:') ⇒ Object Also known as: configure_options_or_meson_options?, query_for_configure_options_or_meson_options

#

query_for_configure_options_or_meson_options_or_cmake_options

Return either cmake or meson or configure options accordingly.

#


10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10270

def query_for_configure_options_or_meson_options_or_cmake_options(
    i = 'configure-options:'
  )
  case i
  # ======================================================================= #
  # === configure options:
  # ======================================================================= #
  when /^configure(-|_| )?options:?$/i
    case build_system?
    when 'cmake'
      return_cmake_configure_options_while_considering_GNU_configure_options
    when 'meson'        
      meson_configure_options?.to_s
    else
      configure_options?
    end
  end
end

#real_commandline_arguments?Boolean

#

real_commandline_arguments?

#

Returns:

  • (Boolean)


10683
10684
10685
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10683

def real_commandline_arguments?
  @internal_hash[:real_commandline_arguments]
end

#rebuild_pathObject

#

rebuild_path

#


9839
9840
9841
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9839

def rebuild_path
  cookbook_dataset?.reassemble_program_path
end

#register_all_programsObject

#

register_all_programs

#


10480
10481
10482
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10480

def register_all_programs
  get_all_programs.each {|entry| register_program(entry) }
end

#register_all_protos_for_compilationObject

#

register_all_protos_for_compilation

Invoke this method like so:

ry --protos
#


5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5328

def register_all_protos_for_compilation
  proto_programs = available_programs?.select {|entry|
    entry.include?('proto')
  }
  proto_programs.reject! {|line|
    line.include? 'protobuf'
  }
  # ======================================================================= #
  # Reject those that are .gem files next - but this will only work if
  # the directory with expanded cookbooks is available:
  # ======================================================================= #
  if directory_expanded_cookbooks_exists?
    proto_programs.reject! {|name_of_the_program|
      this_file = directory_expanded_cookbooks+name_of_the_program+'.yml'
      if File.exist? this_file
        dataset = load_yaml(this_file)
        dataset['program_path'].end_with? '.gem'
      else
        orev 'No file called '+sfile(this_file)+rev+' was found.'
        nil
      end
    }
  end
  orev "We will next compile all "\
       "#{sfancy(proto_programs.size.to_s)} "\
       "#{rev}proto-programs."
  set_compile_these_programs(proto_programs)
end

#register_configure_line_into_configure_database(compile_this_program = compile_which_program?, , store_this = full_configure_command?.dup) ⇒ Object

#

register_configure_line_into_configure_database

This method will register the complete configure-line used by the program at hand, into a yaml “database”. This is just a single .yml file that keeps track of all configure options used when compiling a program.

#


4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4168

def register_configure_line_into_configure_database(
    compile_this_program = compile_which_program?,
    store_this           = full_configure_command?.dup
  )
  unless store_this.empty?
    # ===================================================================== #
    # First load up the old "database" if it exists.
    #
    # This is a "global" database, in the sense that it may typically
    # reside at a location like this:
    #
    #   /home/Temp/rbt/configure_command_database.yml
    #
    # Do note that the RBT project will also store this on a per-application
    # basis in the corresponding AppDir directory (under Resources/).
    # Since not every program is compiled via an AppDir, we need both
    # the global database, and a per-app specific entry.
    # ===================================================================== #
    into = RBT.file_configure_database?
    hash = {}
    # ===================================================================== #
    # Load the dataset from the file if it already exists.
    # ===================================================================== #
    if File.exist? into
      hash.update(YAML.load_file(into))
    end
    # ===================================================================== #
    # We do not need to delete any old entry, because the following line
    # will overwrite the old content anyway, if it exists.
    # ===================================================================== #
    hash[compile_this_program] = store_this
    what = YAML.dump(hash)
    orev 'Storing the configure command'
    orev "  #{sfancy(store_this)}"
    orev "into the file `#{sfile(into)}#{rev}`."
    write_what_into(what, into)
  end
end

#register_last_compiled_program(i = compile_which_program? ) ⇒ Object

#

register_last_compiled_program

This method will try to store the last compiled program into the file determined via the method call RBT.file_compiled_program().

We will only store if the entry is DIFFERENT to the last one though.

This file is:

$RBT/yaml/last_compiled_program.yml
#


6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6703

def register_last_compiled_program(
    i = compile_which_program?
  )
  # unless has_a_problem_occurred?
    unless do_not_compile? and !register_the_last_compiled_program? # Continue only if we do want to compile.
      file = RBT.file_compiled_programs
      base_dir = File.dirname(file)
      mkdir(base_dir) unless Dir.exist? base_dir
      if File.exist?(file) and !File.empty?(file) # Must check whether the file exists first.
        array_dataset = YAML.load_file(file)
      else
        array_dataset = []
      end
      if array_dataset.respond_to? :uniq!
        array_dataset.uniq!
      # else
      #   opne swarn('Some minor problem occurred:')
      end
      unless (array_dataset.last == i) and !array_dataset.empty? # Storing only if it is different.
        orev 'Trying to register the last compiled program '\
             '(`'+springgreen(i)+
             rev+'`) into the file:'
        opne "  #{sfile(file)}"
        # ================================================================== #
        # Remove any old entries, if they exist.
        # ================================================================== #
        if array_dataset.include? i 
          array_dataset.reject! {|entry| entry == i }
        end
        # ================================================================== #
        # And next, add that entry:
        # ================================================================== #
        array_dataset << i
        what = YAML.dump(array_dataset)
        # ================================================================== #
        # Simply append to the dataset (aka file) at hand.
        # ================================================================== #
        write_what_into(what, file)
      end if array_dataset.respond_to? :last
    end
  # end
end

#register_required_dependency(name_of_the_program, program_version) ⇒ Object

#

register_required_dependency

#


10487
10488
10489
10490
10491
10492
10493
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10487

def register_required_dependency(
    name_of_the_program, program_version
  )
  @internal_hash[:array_required_dependencies] << [
    name_of_the_program, program_version
  ]
end

#register_sigintObject

#

register_sigint

We have to register the siginterrupts, so as to gracefully handle user-interrupts via Ctrl-C.

#


6404
6405
6406
6407
6408
6409
6410
6411
6412
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6404

def register_sigint
  Signal.trap('SIGINT') {
    do_set_keep_extracted(:be_silent)
    do_not_run_ldconfig
    remove_compiling_is_in_progress
    orev 'Exiting now at once.'
    exit_program
  }
end

#register_that_this_program_is_currently_being_compiled(into = RBT.file_status) ⇒ Object

#

register_that_this_program_is_currently_being_compiled

This method will register that a given program is currently being compiled.

#


8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8277

def register_that_this_program_is_currently_being_compiled(
    into = RBT.file_status # ← This may be e. g. "/Depot/Temp/rbt/status.yml".
  )
  dataset = {}
  if File.exist? into
    dataset.merge!(YAML.load_file(into))
  end
  unless dataset.has_key? 'currently_compiling_these_programs'
    dataset['currently_compiling_these_programs'] = []
  end
  dataset['currently_compiling_these_programs'] << compile_this_program?
  what = YAML.dump(dataset)
  # ======================================================================= #
  # We must sure that the base directory exists.
  # ======================================================================= #
  unless File.directory?(File.dirname(into))
    mkdir(File.dirname(into))
  end
  write_what_into(what, into)
end

#register_the_last_compiled_program?Boolean

#

register_the_last_compiled_program?

#

Returns:

  • (Boolean)


9860
9861
9862
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9860

def register_the_last_compiled_program?
  @internal_hash[:register_the_last_compiled_program]
end
#

Delegate to RBT::RemoveAllSymlinks for this action.

#


4034
4035
4036
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4034

def remove_all_symlinks
  action(:RemoveAllSymlinks)
end

#remove_all_temp_directoriesObject

#

remove_all_temp_directories

This method will remove all directories in the /Depot/Temp hierarchy. It was added since it is sometimes easier to just remove all extracted archives via batch-process.

#


9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9896

def remove_all_temp_directories
  _ = rbt_log_dir?
  # ======================================================================= #
  # Select all directories in that directory next:
  # ======================================================================= #
  all_directories_there = Dir["#{_}*"].select {|entry| File.directory? entry }
  orev "All #{sfancy(all_directories_there.size.to_s)} "\
       "#{rev}directories in the #{sdir(_)} #{rev}hierarchy will be removed."
  remove_these_directories(all_directories_there)
end

#remove_empty_directories(i = return_pwd) ⇒ Object

#

remove_empty_directories

#


2363
2364
2365
2366
2367
2368
2369
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2363

def remove_empty_directories(
    i = return_pwd
  )
  orev "Now trying to remove all empty directories from the directory "\
       "#{sdir(i)}#{rev}."
  action(:remove_empty_directories, i)
end

#remove_extracted_archive(where = :build_anew) ⇒ Object Also known as: consider_removing_the_extracted_archive, consider_removing_the_extracted_directory, consider_removing_extracted_archive, remove_the_extracted_archive

#

remove_extracted_archive

This method simply removes the extracted archive. If @keep_extracted was set to true we will not run it, but this is decided in another method called consider_removing_extracted_archive().

Note that the invocation of this method must happen last, as otherwise we may run into problems such as:

in `pwd': No such file or directory - getcwd (Errno::ENOENT)

We can not use the string returned by the method extract_to_this_directory? because this will refer to the rbt/ base directory.

#


957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 957

def remove_extracted_archive(
    where = :build_anew
  )
  case where
  # ======================================================================== #
  # === :default
  # ======================================================================== #
  when :default,
       :build_anew
    where = rds(will_be_extracted_towards?)
  end
  # === First check for run-in-simulation mode
  if run_simulation? # Run in simulation mode here.
    orev sfancy('We run in simulation mode right now. Normally '\
         'the directory ')
    orev sdir(where)+sfancy('would next be removed.')
  elsif is_a_gem_file?
    # ====================================================================== #
    # Ruby .gem files are no longer considered "removable" since as of
    # 17.06.2020.
    # ====================================================================== #
  elsif where == log_dir? # Tiny safeguard here.
    orev "Can not remove #{sdir(log_dir?)}#{rev}."
  else # ================================================================== #
       # We must honour the keep_extracted setting. We also will not
       # remove the log directory.
       # ==================================================================== #
    if keep_the_extracted_archive? or (where == RBT.log_directory?)
      # ==================================================================== #
      # In this case we do not have to do anything.
      # ==================================================================== #
    else
      orev "Removing the extracted archive at `#{sdir(where)}#{rev}`."
      unless File.directory? where
        _ = 'However had, no such directory exists. Perhaps it was'
        orev _
        orev 'already removed, or it has never existed.'
      end
      # ==================================================================== #
      # We must check whether the directory exists, before trying to
      # remove it.
      # ==================================================================== #
      if File.directory? where
        remove_directory(where)
      else
        # No directory exists there.
      end
    end
  end
end

#remove_the_extracted_archive?Boolean

#

remove_the_extracted_archive?

#

Returns:

  • (Boolean)


1850
1851
1852
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1850

def remove_the_extracted_archive?
  !keep_the_extracted_archive?
end

#rename_tab_title?Boolean Also known as: rename_the_terminal?, shall_we_rename_the_tab_title?

#

rename_tab_title?

#

Returns:

  • (Boolean)


434
435
436
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 434

def rename_tab_title?
  @internal_hash[:rename_tab_title]
end
#

Delegate towards RBT::ReplaceSymlinks here. We will work on the current working directory.

#


2475
2476
2477
2478
2479
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2475

def replace_symlinks(
    from_where = return_pwd
  )
  RBT::ReplaceSymlinks.new(from_where) # bl $RBT/replace_symlinks.rb
end

#report_all_blfs_entriesObject

#

report_all_blfs_entries

#


9965
9966
9967
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9965

def report_all_blfs_entries
  action(:Blfs, :run_everything)
end

#report_all_programs_that_make_use_of_a_build_directoryObject

#

report_all_programs_that_make_use_of_a_build_directory

This method can report all programs that make use of a build directory. Note that this presently depends on the existance of the directory expanded_cookbooks.

Usage example:

installer --show-all-programs-that-make-use-of-a-build-directory
#


2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2683

def report_all_programs_that_make_use_of_a_build_directory
  orev 'Trying to determine all programs that use '\
       'a build-directory ...'
  orev 'This may take a moment ...'
  use_this_key = :use_build_directory # It is stored as a Symbol.
  if expanded_directory_exists?
    # ===================================================================== #
    # Find all cookbooks in the expanded-cookbook-directory next:
    # ===================================================================== #
    target = directory_expanded_cookbooks?
    all_files = Dir["#{target}*.yml"]
    all_files.select! {|entry|
      dataset = YAML.load_file(entry)
      dataset[use_this_key] and (dataset[use_this_key] == true)  # Obtain all entries with this key here.
    }
    all_files.map! {|entry|
      File.basename(entry).sub(/\.yml$/,'')
    }
    if all_files.empty?
      orev 'No cookbook recipe makes use of a build directory.'
    else
      orev "The following #{slateblue(all_files.size.to_s)} #{rev}programs "\
           "make use of a build directory:"
      all_files.each_with_index {|this_program, index| index += 1
        padded_index = index.to_s.rjust(4).ljust(6)
        colourized_and_padded_index = royalblue(padded_index)
        e colourized_and_padded_index+
          lightblue(this_program)
      }
    end
  else
    # ===================================================================== #
    # else notify the user how to create the relevant directory.
    # ===================================================================== #
    orev 'The expanded directory does not exist. You can (re)create it'
    orev 'by issuing:'
    e
    e '  rbt --create-expanded-directory'
    e
  end
end

#report_finished_installing_this_program(i = compile_this_program? ) ⇒ Object

#

report_finished_installing_this_program

Report that we have finished compiling the program.

#


10594
10595
10596
10597
10598
10599
10600
10601
10602
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10594

def report_finished_installing_this_program(
    i = compile_this_program?
  )
  unless do_not_compile?
    unless problem? || an_error_has_occurred?
      orev "Finished installing the program `#{sfancy(i)}#{rev}`."
    end
  end
end

#report_how_many_registered_cookbook_aliases_are_available(use_this_file = RBT.file_cookbook_aliases?) ⇒ Object

#

report_how_many_registered_cookbook_aliases_are_available

#


7692
7693
7694
7695
7696
7697
7698
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7692

def report_how_many_registered_cookbook_aliases_are_available(
    use_this_file = RBT.file_cookbook_aliases?
  )
  orev "There are a total of "\
       "#{steelblue(YAML.load_file(use_this_file).keys.size)} "\
       "#{rev}cookbook-aliases registered."
end

#report_n_programsObject

#

report_n_programs

Report how many programs (cookbook files) are currently registered in the RBT project.

Commandline-invocation example:

rbt --report-n-programs
#


8110
8111
8112
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8110

def report_n_programs
  action(:report_the_registered_programs)
end

#report_rbt_version(optional_shall_we_exit = false) ⇒ Object

#

report_rbt_version

This method will report the version in use by the RBT project.

Invocation examples:

ry --version
ry version?
#


369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 369

def report_rbt_version(
    optional_shall_we_exit = false
  )
  case optional_shall_we_exit
  when :also_exit,
       :then_exit
    optional_shall_we_exit = true
  end
  # ======================================================================= #
  # We will show the version of the RBT scripts, and we will also
  # display when the project was last updated.
  # ======================================================================= #
  action(:report_rbt_version, :also_show_when_the_project_was_last_updated)
  exit if optional_shall_we_exit
end

#report_size_of_these_programs(i, size_of_the_programs = 0) ⇒ Object

#

report_size_of_these_programs

This method will report the size of the issued programs.

The programs are to be given as the first argument to this method, ideally as an Array.

#


6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6757

def report_size_of_these_programs(
    i, size_of_the_programs = 0
  )
  if i.is_a? String and i.include?('=')
    i = i.to_s.dup if i.frozen?
    i.gsub!(/--size=/,'')
    i = i.split(',') if i.include? ','
  end
  i = [i] unless i.is_a? Array
  i.each {|entry|
    dataset = self.new(entry)
    unless use_colours?
      dataset.disable_colours
    end
    size = dataset.size?.to_i
    orev "Now working on #{sfancy(entry.rjust(8))}"\
         "#{rev} (Size: #{size.to_s.rjust(8)} bytes)"
    size_of_the_programs += size
  }
  e
  orev 'The size of the programs '+sfancy(i.join(','))+"#{rev} is:"
  e
  if Object.const_defined?(:Roebe) and
     Roebe.const_defined?(:HumanReadable)
    size_of_the_programs = Roebe::HumanReadable[size_of_the_programs]
  end
  result = "  #{simp(size_of_the_programs.to_s)}".dup
  result << rev+' bytes' unless size_of_the_programs.to_s.strip.end_with? 'B'
  orev result
  e
end

#report_status_informationObject

#

report_status_information

Invocation example:

ry --report-status
#


8669
8670
8671
8672
8673
8674
8675
8676
8677
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8669

def report_status_information
  e
  e 'The source directory is at:                      '+
     sdir(RBT.source_dir?)
  e rev+'The temp directory is at:                        '+
    sdir(RBT.temp_dir?)
  report_where_archives_will_be_extracted_into
  e
end

#report_the_amount_of_binaries(i = compile_which_program? ) ⇒ Object

#

report_the_amount_of_binaries

Invocation examples:

ry glib --n-binaries?
Installer glib --n-binaries?
#


8238
8239
8240
8241
8242
8243
8244
8245
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8238

def report_the_amount_of_binaries(
    i = compile_which_program?
  )
  ensure_proper_dataset_for(i) if cookbook_dataset?.nil?
  _ = binaries?
  orev "The program #{sfancy(i)}#{rev}' will "\
       "install #{sfancy(_.size.to_s)}#{rev} binaries."
end

#report_the_compile_strategiesObject

#

report_the_compile_strategies

#


9910
9911
9912
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9910

def report_the_compile_strategies
  action(:report_the_compile_strategies)
end

#report_the_current_working_directoryObject

#

report_the_current_working_directory

#


234
235
236
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 234

def report_the_current_working_directory
  orev "The current working directory is `#{sdir(return_pwd)}`#{rev}."
end

#report_the_kde_statusObject

#

report_the_kde_status

This method will report the “status” of the KDE project, as far as the cookbooks project is concerned.

What is meant here is that this method will simply report the main constants that handle the remote URL to kde projects.

To invoke this method, do this on the commandline:

rbt --report-the-kde-status
#


5570
5571
5572
5573
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5570

def report_the_kde_status
  require 'rbt/utility_scripts/report_the_kde_status.rb'
  RBT.report_the_kde_status
end

#report_where_archives_will_be_extracted_intoObject

#

report_where_archives_will_be_extracted_into

#


3739
3740
3741
3742
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3739

def report_where_archives_will_be_extracted_into
  orev "Archives will be extracted into this directory: "\
    "#{sdir(extract_to?)}"
end

#report_where_we_store_then_exitObject

#

report_where_we_store_then_exit

#


1994
1995
1996
1997
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1994

def report_where_we_store_then_exit
  report_where_we_will_store_logs
  exit_program
end

#report_where_we_will_store_logsObject Also known as: store_where?

#

report_where_we_will_store_logs

This will ask where we store our BT-Related files. The Config object defines that.

To trigger this, do:

ry --store_where?
#


3516
3517
3518
3519
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3516

def report_where_we_will_store_logs
  orev "Log-files will be stored into the directory `"\
       "#{sdir(log_dir?)}#{rev}`."
end

#report_whether_a_build_directory_will_be_used_for_this_programObject

#

report_whether_a_build_directory_will_be_used_for_this_program

#


773
774
775
776
777
778
779
780
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 773

def report_whether_a_build_directory_will_be_used_for_this_program
  orev 'Will a '+teal('build directory')+rev+
       ' be used for the program '+
        sfancy(compile_which_program?)+'? '+
        simp(
          verbose_truth(use_build_directory?).delete('.')
        )+'.'
end

#report_whether_colours_will_be_usedObject

#

report_whether_colours_will_be_used

#


6193
6194
6195
6196
6197
6198
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6193

def report_whether_colours_will_be_used
  orev 'Will we use colours: '+
    royalblue(
      verbose_truth?(use_colours?)
    )
end

#report_whether_porg_is_availableObject

#

report_whether_porg_is_available

#


8657
8658
8659
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8657

def report_whether_porg_is_available
  e "#{rev}Is porg available? #{sfancy(verbose_truth(is_porg_available?))}"
end

#report_whether_this_program_is_included_or_whether_it_is_not(i = program? ) ⇒ Object Also known as: verbose_include?

#

report_whether_this_program_is_included_or_whether_it_is_not

This method will notify the user as to whether the given program passed into this method is registered, as part of the RBT project, or whether it is not.

#


2905
2906
2907
2908
2909
2910
2911
2912
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2905

def report_whether_this_program_is_included_or_whether_it_is_not(
    i = program?
  )
  e teal("Is #{program} included in the RBT project?: ")+
    verbose_truth(
      is_this_program_included?(i, :be_quiet)
    )
end

#report_whether_we_are_on_gobolinuxObject Also known as: verbose_query_whether_we_are_on_a_gobolinux_like_system

#

report_whether_we_are_on_gobolinux

To invoke this method, do:

rbt --is-on-gobolinux?
#


2293
2294
2295
2296
2297
2298
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2293

def report_whether_we_are_on_gobolinux
  orev 'Are we on GoboLinux: '+
        royalblue(
          verbose_truth(is_on_gobolinux?.to_s)
        )
end

#report_whether_we_will_use_porgObject

#

report_whether_we_will_use_porg

To invoke this method, issue:

ry --use-porg?
#


285
286
287
288
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 285

def report_whether_we_will_use_porg
  orev "Will RBT make use of #{teal('porg')}#{rev}: "\
       "#{royalblue(verbose_truth(use_porg?.to_s))}"
end

#report_which_libraries_are_missingObject

#

report_which_libraries_are_missing

Report which libraries are missing.

Invocation example:

ry --not-found
#


11151
11152
11153
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11151

def report_which_libraries_are_missing
  action(:NotFoundLibraries)
end

#report_which_programs_can_be_compiled_staticallyObject

#

report_which_programs_can_be_compiled_statically

#


9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9359

def report_which_programs_can_be_compiled_statically
  use_this_key = :can_be_compiled_statically
  selection = available_programs?.select {|this_program|
    if does_this_expanded_cookbook_file_exist_for_this_program?(this_program)
      dataset = load_dataset_from_this_expanded_cookbook(this_program)
      _ = dataset[use_this_key]
      (_ == 'yes') or (_.to_s == 'true')
    else
      false
    end
  }
  if selection.empty?
    orev 'No program that can be compiled statically was found.'
    orev 'This is an incorrect result, though. Have you expanded'
    orev 'your local dataset already?'
    orev 'If not, run:'
    e
    e '  rbt --expand-dataset'
    e
  else
    orev 'The following programs can be compiled statically:'
    e
    selection.each_with_index {|this_program, index| index += 1
      e royalblue("  #{index.to_s.rjust(3)}) ")+
        steelblue("#{this_program}")
    }
    e
  end
end

#required_deps_on?Boolean Also known as: required_deps?, required_deps, required_dependencies?, required_dependencies_on?, dependencies?

#

required_deps_on?

#

Returns:

  • (Boolean)


495
496
497
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 495

def required_deps_on?
  cookbook_dataset?.required_deps_on?
end

#resetObject

#

reset (reset tag)

#


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/rbt/actions/individual_actions/software_manager/reset.rb', line 18

def reset
  # ======================================================================= #
  # Note that the super() call will also define the variable
  # @internal_hash properly. Hence why it must come first,
  # as other definitions depend on it.
  # ======================================================================= #
  super()
  populate_the_internal_hash_with_default_values # ← Defined in lean_prototype.rb
  populate_the_internal_hash_with_values_specific_to_this_class
  infer_the_namespace # Must come after the populate-calls above.
  reset_the_invariant_dataset_to_the_internal_hash
  reset_user_definable_variables
  extract_to_default_directory
  disable_colours unless RBT.use_colours?
  set_program_path(nil) # This should come last within reset().
end

#reset_compiled_n_times_counterObject

#

reset_compiled_n_times_counter

#


789
790
791
# File 'lib/rbt/actions/individual_actions/software_manager/reset.rb', line 789

def reset_compiled_n_times_counter
  @internal_hash[:we_tried_to_compile_this_program_n_times] = 0
end

#reset_prefix_variables(i = '') ⇒ Object

#

reset_prefix_variables

#


11913
11914
11915
11916
11917
11918
11919
11920
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11913

def reset_prefix_variables(i = '')
  case i
  when :unless_already_set_through_the_menu
    # In this case we will not modify the prefix variable.
  else
    set_user_prefix_to_nil
  end
end

#reset_the_cookbook_datasetObject

#

reset_the_cookbook_dataset

#


796
797
798
# File 'lib/rbt/actions/individual_actions/software_manager/reset.rb', line 796

def reset_the_cookbook_dataset
  @internal_hash[:cookbook_dataset] = nil
end

#reset_the_invariant_dataset_to_the_internal_hashObject Also known as: initialize_default_values, add_the_invariant_dataset_to_the_internal_hash

#

reset_the_invariant_dataset_to_the_internal_hash (invariant tag)

The variants in this method are, by default, not amenable any user input at all. They are thus only used internally by the class.

This is thus the main difference to the other method used to fill up @internal_hash.

The values defined in the method here are mostly done to use default values.

Note that this may not be entirely true, so this method is a bit arbitrary. Still, it is true for other internal entries, such as :have_we_successfully_installed_the_program.

#


59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'lib/rbt/actions/individual_actions/software_manager/reset.rb', line 59

def reset_the_invariant_dataset_to_the_internal_hash
  # ======================================================================= #
  # === :make
  #
  # Instantiate a new RBT::Make object next, as our wrapper to 'make'.
  # ======================================================================= #
  @internal_hash[:make] = RBT::Make.new
  # ======================================================================= #
  # === :prefix_object
  #
  # The :default_prefix Symbol equals to /usr/.
  # ======================================================================= #
  @internal_hash[:prefix_object] = action(:prefix, :default_prefix)
  # ======================================================================= #
  # === :make_install_stage_was_a_success
  #
  # Whether the "make install" stage was a success. This is true by
  # default and will only become false if an error is encountered.
  # ======================================================================= #
  @internal_hash[:make_install_stage_was_a_success] = true
  # ======================================================================= #
  # === :has_the_program_been_installed_successfully
  #
  # By default, all programs will have been installed successfully. The
  # next variable keeps track of this.
  # ======================================================================= #
  @internal_hash[:has_the_program_been_installed_successfully] = true
  # ======================================================================= #
  # === :may_we_run_ninja
  #
  # By default we can always run ninja again.
  # ======================================================================= #
  @internal_hash[:may_we_run_ninja] = true
  # ======================================================================= #
  # === :may_we_initialize_a_new_cookbook_dataset
  #
  # The next variable must be true by default.
  # ======================================================================= #
  @internal_hash[:may_we_initialize_a_new_cookbook_dataset] = true
  # ======================================================================= #
  # === :pid
  # ======================================================================= #
  @internal_hash[:pid] = nil
  # ======================================================================= #
  # === use_gobolinux_symlinkprogram
  #
  # Next, determine whether we will make use of GoboLinux's SymlinkProgram.
  # This will be automatically changed if we are on GoboLinux. For other
  # systems we will prefer to use SymlinkProgram from RBT itself.
  # ======================================================================= #
  @internal_hash[:use_gobolinux_symlinkprogram] = false
  # ======================================================================= #
  # === :append_shell_error_code
  #
  # If this variable is set to true then we will append the shell
  # error code aka ' 2>&1'. This is true by default, so we will
  # append it.
  # ======================================================================= #
  @internal_hash[:append_shell_error_code] = true
  # ======================================================================= #
  # === :run_make_install
  #
  # By default, we will run "make install". This covers most programs
  # that are to be compiled from source.
  # ======================================================================= #
  @internal_hash[:run_make_install] = true
  # ======================================================================= #
  # === :try_to_recompile_upon_error
  # ======================================================================= #
  @internal_hash[:try_to_recompile_upon_error] = true
  # ======================================================================= #
  # === :dataset_from_the_file_cookbook_chained_programs
  #
  # This will contain a dataset that looks like this:
  #
  #   "lxqt"=> ["lxqtbuildtools",
  #             "libsysstat",
  #             "qtermwidget",
  #             "liblxqt",
  # ======================================================================= #
  @internal_hash[:dataset_from_the_file_cookbook_chained_programs] =
    YAML.load_file(FILE_COOKBOOK_CHAINED_PROGRAMS)
  # ======================================================================= #
  # === :have_we_successfully_installed_the_program
  #
  # The next variable keeps track over as to whether we have
  # successfully installed the program or whether we have not.
  #
  # By default we will assume this is not the case so, hence why the
  # value is false here.
  # ======================================================================= #
  @internal_hash[:have_we_successfully_installed_the_program] = false
  # ======================================================================= #
  # === :try_to_autofix
  # ======================================================================= #
  @internal_hash[:try_to_autofix] = true
  # ======================================================================= #
  # === :do_not_use_special_environment_flags
  #
  # Whether we are allowed to use special ENV flags. By default we are
  # allowed to use special flags, hence why the variable is set to false.
  # ======================================================================= #
  @internal_hash[:do_not_use_special_environment_flags] = false
  # ======================================================================= #
  # === :last_compiled_program
  # ======================================================================= #
  @internal_hash[:last_compiled_program] = nil  # Define it once at least.
  # ======================================================================= #
  # === :exit_after_a_rubygem_has_been_installed
  # ======================================================================= #
  @internal_hash[:exit_after_a_rubygem_has_been_installed] = false
  # ======================================================================= #
  # === :time_compilation
  #
  # Determine whether we shall time the compilation or whether we shall
  # not.
  # ======================================================================= #
  file_time_compilation = FILE_TIME_COMPILATION
  if File.exist? file_time_compilation
    @internal_hash[:time_compilation] = YAML.load_file(file_time_compilation)
    if @internal_hash[:time_compilation]
      @internal_hash[:array_time_compilation] = []
    end
  else
    opnn; no_file_exists_at(file_time_compilation)
  end
  # ======================================================================= #
  # The next method call can only happen after the prefix-object
  # was already initialized - see the line of code above this comment
  # section.
  # ======================================================================= #
  #set_user_prefix(nil)
  # ======================================================================= #
  # === :continue_after_make_step
  # ======================================================================= #
  @internal_hash[:continue_after_make_step] = true
  # ======================================================================= #
  # === :array_sys_command_string
  #
  # The next variable can keep track of sys-commands that were run.
  # ======================================================================= #
  @internal_hash[:array_sys_command_string] = []
  # ======================================================================= #
  # === :counter_called_traditional_or_non_traditional_compilation
  #
  # Next, how often we invoked traditional or non-traditional compilation.
  # ======================================================================= #
  @internal_hash[:counter_called_traditional_or_non_traditional_compilation] = 0
  # ======================================================================= #
  # === :full_configure_command
  #
  # We have to store the full configure command as well. It is not just
  # for configure but also for cmake, meson and so forth.
  # ======================================================================= #
  @internal_hash[:full_configure_command] = ''.dup
  # ======================================================================= #
  # === :original_start_directory
  # ======================================================================= #
  @internal_hash[:original_start_directory] = return_pwd
  # ======================================================================= #
  # === :is_an_abbreviation
  #
  # Whether the given input is an abbreviation or not. By default we
  # assume that the user has NOT used an abbreviated term for a real
  # program.
  # ======================================================================= #
  @internal_hash[:is_an_abbreviation] = false
  # ======================================================================= #
  # === :array_required_dependencies
  #
  # Register any reported dependencies of the target program at hand.
  # ======================================================================= #
  @internal_hash[:array_required_dependencies] = []
  # ======================================================================= #
  # === :run_make_command
  #
  # The next variable will be nil by default, so that we can grab the
  # value that the cookbook-dataset is using here.
  # ======================================================================= #
  @internal_hash[:run_make_command] = nil
  # ======================================================================= #
  # === :compile_these_programs
  # ======================================================================= #
  @internal_hash[:compile_these_programs] = []
  # ======================================================================= #
  # === :cookbook_aliases
  #
  # This entry is invariant and not amenable to the user modifying its
  # value.
  # ======================================================================= #
  @internal_hash[:cookbook_aliases] = action(:cookbook_aliases)
  # ======================================================================= #
  # === :simple_or_complex
  #
  # Determine the dataset to use from the cookbook dataset. This can
  # be :simple or :complex, although at a later time the alias name
  # :use_expanded_dataset is now in use, instead of :complex, as this
  # name is more explicit.
  # ======================================================================= #
  @internal_hash[:simple_or_complex] = :use_expanded_dataset # :simple
end

#reset_the_status_file(this_file = FILE_STATUS) ⇒ Object

#

reset_the_status_file

This method will clear the status.yml file, aka re-set it to zero.

To invoke this method, do:

rbt --reset-the-status-file
#


9683
9684
9685
9686
9687
9688
9689
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9683

def reset_the_status_file(
    this_file = FILE_STATUS
  )
  dataset = {}
  dataset['currently_compiling_these_programs'] = []
  write_what_into(YAML.dump(dataset), this_file)
end

#reset_user_definable_variablesObject Also known as: add_the_default_dataset_to_the_internal_hash

#

reset_user_definable_variables

The variables in this method can be changed by the user lateron. They are thus modifiable by the user via the commandline.

In other words, the user can change these variables and thus toggle the behaviour of RBT::Action::SoftwareManager. Thus, the user can overrule any setting defined in this method here - this is important to retain for this method, hence why it is documented so extensively.

Many variables in this method will be set to nil initially; that way allows us to easily find out which values have been modified via the commandline, and which ones have not.

#


277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
# File 'lib/rbt/actions/individual_actions/software_manager/reset.rb', line 277

def reset_user_definable_variables
  # ======================================================================= #
  # === :cookbook_dataset
  # ======================================================================= #
  @internal_hash[:cookbook_dataset] = nil
  # ======================================================================= #
  # === :user_prefix
  #
  # This prefix can be determined by the user.
  # ======================================================================= #
  @internal_hash[:user_prefix] = nil
  # ======================================================================= #
  # === :build_directory
  # ======================================================================= #
  @internal_hash[:build_directory] = action(:BuildDirectory) { :do_not_run_yet }
  # ======================================================================= #
  # === :install_only_binaries
  # ======================================================================= #
  @internal_hash[:install_only_binaries] = false
  # ======================================================================= #
  # === :skip_extracting
  #
  # Default value is nil for the next variable. If true then we will
  # NOT extract.
  # ======================================================================= #
  @internal_hash[:skip_extracting] = nil
  # ======================================================================= #
  # === :time_compilation
  #
  # Whether to time the compilation procedure or not:
  # ======================================================================= #
  @internal_hash[:time_compilation] = true
  # ======================================================================= #
  # === :honour_check_to_ensure_that_the_program_exists
  #
  # The next variable has to be kept for if we actually do want to
  # check whether a program is included or not. Normally we should
  # check, but there may be situations where you may build up your
  # own functionality - so we need to provide an option that can be
  # toggled by the user. This is why the next variable exists, and
  # is kept at true.
  # ======================================================================= #
  @internal_hash[:honour_check_to_ensure_that_the_program_exists] = true
  # ======================================================================= #
  # === :check_whether_the_given_input_is_a_file_and_does_exist
  #
  # The next variable, if true, instructs the class to check whether the
  # given input argument(s) do exist as a regular local file. If false
  # this check is skipped.
  # ======================================================================= #
  @internal_hash[:check_whether_the_given_input_is_a_file_and_does_exist] = true
  # ======================================================================= #
  # === :run_simulation
  #
  # Whether we will run in simulation-mode or not. Simulation-mode means
  # that we will not make any real lasting changes. This thus allows a
  # user to predict (and show a summary) what would happen if a
  # program would be installed/compiled.
  # ======================================================================= #
  @internal_hash[:run_simulation] = false
  # ======================================================================= #
  # === :exit_before_make_install
  #
  # Whether we will exit when we reach the "make install" stage.
  # ======================================================================= #
  @internal_hash[:exit_before_make_install] = false
  # ======================================================================= #
  # === :exit_before_make
  #
  # Whether we will exit when we reach the "make" stage.
  # ======================================================================= #
  @internal_hash[:exit_before_make] = false
  # ======================================================================= #
  # Only install the .h header files, if this variable is set to true.
  # ======================================================================= #
  @internal_hash[:install_only_the_headers] = false
  # ======================================================================= #
  # === :we_tried_to_compile_this_program_n_times
  # ======================================================================= #
  @internal_hash[:we_tried_to_compile_this_program_n_times] = 0
  # ======================================================================= #
  # === :run_configure_script
  #
  # Determine whether we will run the configure script or whether we
  # will not. This is nil initially, so that the user can overrule
  # this in any way he/she sees fit.
  # ======================================================================= #
  @internal_hash[:run_configure_script] = nil
  # ======================================================================= #
  # === :configure_base_directory
  # ======================================================================= #
  @internal_hash[:configure_base_directory] = nil
  # ======================================================================= #
  # === :use_this_build_system
  #
  # Determine which build system is to be used. By default it will be nil.
  # ======================================================================= #
  @internal_hash[:use_this_build_system] = nil
  # ======================================================================= #
  # === :extract_where_to
  # ======================================================================= #
  @internal_hash[:extract_where_to] = RBT.log_dir?+'rbt/' # TEMP_DIR_FOR_RBT
  # ======================================================================= #
  # === :symlink_into_usr_lib_dir
  #
  # Determine whether we will symlink the content of lib/ into 
  # /usr/lib/. This setting is only honoured if we compile in an
  # appdir-like fashion.
  # ======================================================================= #
  @internal_hash[:symlink_into_usr_lib_dir] = false
  # ======================================================================= #
  # === :use_a_prefix
  #
  # This entry point allows us to use a prefix variable, e. g for
  # "./configure --prefix=/opt". By default this is enabled (set
  # to true), but a user may wish to disable this too.
  #
  # If you wish to query this value, use the method
  # .do_we_use_any_prefix?.
  # ======================================================================= #
  @internal_hash[:use_a_prefix] = true
  # ======================================================================= #
  # === :use_autoconf
  #
  # Use autoconf or not - by default we will not.
  # ======================================================================= #
  @internal_hash[:use_autoconf] = nil
  # ======================================================================= #
  # === :symlink_glib_schema
  # ======================================================================= #
  @internal_hash[:symlink_glib_schema] = nil
  # ======================================================================= #
  # === :parameters_to_make
  #
  # The next entry point allows us to pass options/parameters to the
  # "make" binary. The user can overrule this on the commandline.
  #
  # A value of nil is the initialize default state for this variable.
  # ======================================================================= #
  @internal_hash[:parameters_to_make] = nil
  # ======================================================================= #
  # === :rename_tab_title
  #
  # Whether to rename the tab title or whether we will not. This refers
  # to the KDE konsole typically.
  # ======================================================================= #
  if RBT.respond_to? :configuration?
    @internal_hash[:rename_tab_title] = RBT.configuration?.rename_tab_title
  else
    @internal_hash[:rename_tab_title] = true
  end
  # ======================================================================= #
  # === :cd_into_the_rbt_log_directory
  #
  # Whether this class will try to cd into the rbt-log directory.
  # ======================================================================= #
  @internal_hash[:cd_into_the_rbt_log_directory] = true
  # ======================================================================= #
  # === :make_use_of_cookbook_aliases
  # ======================================================================= #
  @internal_hash[:make_use_of_cookbook_aliases] = true
  # ======================================================================= #
  # === :run_postinstall_actions
  #
  # Determine whether we will run postinstallation steps.
  # ======================================================================= #
  @internal_hash[:run_postinstall_actions] = true
  # ======================================================================= #
  # === :create_appdir_skeleton
  #
  # Whether to create an AppDir skeleton by default.
  # ======================================================================= #
  @internal_hash[:create_appdir_skeleton] = true
  # ======================================================================= #
  # === :shall_we_use_an_appdir_prefix
  #
  # This variable must be set to true if we make use of an AppDir
  # prefix.
  # ======================================================================= #
  @internal_hash[:shall_we_use_an_appdir_prefix] = false
  # ======================================================================= #
  # === :shall_we_compile_the_program
  #
  # The next variable can be used to determine whether we will compile
  # a particular program or whether we will not.
  # ======================================================================= #
  @internal_hash[:shall_we_compile_the_program] = true
  # ======================================================================= #
  # === :use_which_system_command
  #
  # There are only two valid settings for this variable:
  #
  #    :ioparser or 
  #    :system
  #
  # ======================================================================= #
  @internal_hash[:use_which_system_command] = :ioparser
  # ======================================================================= #
  # === :colourize_parser
  #
  # Add an instance of class RBT::ColourizeParser.
  # ======================================================================= #
  @internal_hash[:colourize_parser] = RBT::ColourizeParser.new
  # ======================================================================= #
  # === :strip_binaries
  #
  # By default we will not strip the binaries. The configuration
  # setting can change this value though.
  # ======================================================================= #
  @internal_hash[:strip_binaries] = false
  # ======================================================================= #
  # === :is_on_gobolinux
  #
  # Determine whether we are on GoboLinux or whether we are not.
  # ======================================================================= #
  @internal_hash[:is_on_gobolinux] = RBT.are_we_on_gobolinux?
  # ======================================================================= #
  # === :show_output_from_the_extracter_class
  #
  # If the following variable is set to true then we will show output
  # from class Extracter. This is the class that will handle
  # extracting of an archive. The reason why we have this binary
  # flag (toggle) is because sometimes we do not want to output
  # a LOT of information on the commandline. The user can toggle
  # this behaviour on the commandline.
  # ======================================================================= #
  @internal_hash[:show_output_from_the_extracter_class] = false
  # ======================================================================= #
  # === :use_porg
  #
  # Determine whether we will make use of porg.
  # ======================================================================= #
  @internal_hash[:use_porg] = configuration?.use_porg
  # ======================================================================= #
  # === :symlink_headers
  # ======================================================================= #
  @internal_hash[:symlink_headers] = nil
  # ======================================================================= #
  # === :check_for_this_licence
  #
  # If the following variable is not nil, and not false, then this
  # class will check for the given licence matching, before it will
  # compile the program at hand. So, for instance, the user passes the
  # commandline flag for GPLv3 licences. If the software at hand is
  # NOT GPLv3 licenced then it can not be compiled. This is an optional
  # setting - most users won't need this, but purists may want to have
  # such an option, so it has been enabled in September 2022.
  # ======================================================================= #
  @internal_hash[:check_for_this_licence] = nil
  # ======================================================================= #
  # === :can_we_continue
  #
  # The variable at :can_we_continue is reset during every iteration.
  # It will be true by default.
  # ======================================================================= #
  @internal_hash[:can_we_continue] = true
  # ======================================================================= #
  # === :original_stdout
  #
  # The next variable is a bit unclear - it used to exist to allow for
  # easy redirection, but may no longer be that important. We may have to
  # re-evaluate this at a later time (written at 12.04.2019).
  # ======================================================================= #
  @internal_hash[:original_stdout] = nil
  # ======================================================================= #
  # === :postinstallation
  # ======================================================================= #
  @internal_hash[:postinstallation] = nil
  # ======================================================================= #
  # === @internal_hash[:make_use_of_the_cookbook_aliases]
  #
  # If the following variable is set to true then the RBT project
  # will try to honour the cookbook aliases.
  # ======================================================================= #
  @internal_hash[:make_use_of_the_cookbook_aliases] = true
  # ======================================================================= #
  # === :sed
  #
  # Whether to apply a sed-operation. Will be nil by default. If the
  # user passes in some special option here, then we know that we
  # have to use this value to overrule any other value for sed.
  # ======================================================================= #
  @internal_hash[:sed] = nil
  # ======================================================================= #
  # === :keep_la_files
  #
  # The next flag determines whether we will delete .la files or whether
  # we will keep them.
  # ======================================================================= #
  @internal_hash[:keep_la_files] = nil
  # ======================================================================= #
  # === :keep_the_archive_extracted
  #
  # The keep-extracted setting will lateron be sanitized. The default
  # value will be nil.
  # ======================================================================= #
  @internal_hash[:keep_the_archive_extracted] = nil
  # ======================================================================= #
  # === :may_we_download
  # ======================================================================= #
  @internal_hash[:may_we_download] = RBT::TRY_TO_DOWNLOAD_IF_NOT_FOUND
  # ======================================================================= #
  # === :ignore_errors
  #
  # By default we will NOT ignore errors, thus stop when we have noticed
  # an error. This can be overruled by the user on the commandline,
  # through the following value.
  #
  # Since as of November 2022, a new option has been added - this
  # variable will now default to :infer. That way the user can
  # override it on the commandline, and we can call the method
  # cookbook_dataset_ignore_errors? anyway.
  # ======================================================================= #
  @internal_hash[:ignore_errors] = :infer # false
  # ======================================================================= #
  # === :extract_to_this_directory_as_specified_by_the_user
  #
  # The next variable can be used to allow the user to determine another
  # directory for where we will extract archives into. Initially set
  # to nil in order to allow distinction to the default extractable
  # directory that is to be used.
  # ======================================================================= #
  @internal_hash[:extract_to_this_directory_as_specified_by_the_user] = nil
  # ======================================================================= #
  # === :use_autoconf
  # ======================================================================= #
  @internal_hash[:use_autoconf] = false
  # ======================================================================= #
  # === :extract_the_archive
  #
  # By default we will extract the archive, hence the value must be
  # set to true.
  # ======================================================================= #
  @internal_hash[:extract_the_archive] = true
  # ======================================================================= #
  # === :do_not_use_special_flags
  #
  # The next variable, false on startup, tells RBT::Action::SoftwareManager
  # to retain all environment variables. Sometimes we may want to NOT
  # use the environment variables, which is why this flag exists.
  # ======================================================================= #
  @internal_hash[:do_not_use_special_flags] = false
  # ======================================================================= #
  # === :use_autogen
  #
  # Default value for use_autogen will be nil. The user is able to
  # override this from the commandline, which is why this variable
  # will be nil initially.
  # ======================================================================= #
  @internal_hash[:use_autogen] = nil
  # ======================================================================= #
  # === :compiler_to_use
  #
  # Specify which compiler is to be used. By default we will use GCC,
  # but clang may also be an option. It will be stored as a lowercased
  # Symbol, though, so :gcc would refer to GCC.
  # ======================================================================= #
  @internal_hash[:compiler_to_use] = :gcc
  # ======================================================================= #
  # === :use_build_directory
  #
  # Must initialize the build directory to a nil value next. It may
  # be set to a non-nil value lateron.
  # ======================================================================= #
  @internal_hash[:use_build_directory] = nil
  # ======================================================================= #
  # === :name_for_the_build_directory
  #
  # Use a default build directory. There is another entry that determines
  # whether we will use any build directory at all or not, so it is safe
  # to assign to the variable here - the entry called
  # @internal_hash[:use_build_directory].
  #
  # Since as of April 2021, we will only use the setter-method for this.
  # See the next line, right below the commented line.
  # ======================================================================= #
  set_name_for_the_build_directory(:use_the_default_name) # Set a default name for the build directory.
  # ======================================================================= #
  # === :build_static
  #
  # The next variable must be defined here. A value of nil specifies
  # that this has not been set via the commandline yet. A value of
  # nil here essentially means a default to false - aka we will not
  # try to compile a program in a static manner. 
  # ======================================================================= #
  @internal_hash[:build_static] = nil
  # ======================================================================= #
  # === :use_ccache
  #
  # The use_ccache entry has to be persistent.
  # ======================================================================= #
  @internal_hash[:use_ccache] = RBT.configuration?.use_ccache
  # ======================================================================= #
  # === :try_to_use_configure_options
  #
  # Determine whether we will try to use any declared configure options
  # from the cookbook-yaml file.
  #
  # The reason why this variable is set to nil initially is so that we
  # can distinguish the situation from when the user did specifically
  # want to disable this functionality, via the commandline. So the
  # nil value does not necessarily mean "false" in this context - it
  # just means that the user did not specify anything specifically.
  # ======================================================================= #
  @internal_hash[:try_to_use_configure_options] = nil
  # ======================================================================= #
  # === :extract_only
  #
  # If the next variable is set to true, we will exit after we have
  # extracted the archive. We will first initialize it to nil, though,
  # in order to distinguish between the default value and user-supplied
  # values.
  # ======================================================================= #
  @internal_hash[:extract_only] = nil
  # ======================================================================= #
  # === Show the flexbox
  #
  # Next determine whether we will show the flexbox or whether we will
  # not. This has to be set in the method here so that we do not
  # re-set it for each program that is to be compiled/installed.
  # ======================================================================= #
  @internal_hash[:show_the_flexbox] = true
  # ======================================================================= #
  # === :use_this_as_build_directory
  # ======================================================================= #
  @internal_hash[:use_this_as_build_directory] = 'BUILD_DIRECTORY'
  # ======================================================================= #
  # === :force_symlinks_when_appdir_prefix_is_used
  # ======================================================================= #
  if is_on_roebe?
    @internal_hash[:force_symlinks_when_appdir_prefix_is_used] = true
  else
    @internal_hash[:force_symlinks_when_appdir_prefix_is_used] = false
  end
  # ======================================================================= #
  # === :use_meson_configure_options
  #
  # Whether to use meson-configure options or not.
  # ======================================================================= #
  @internal_hash[:use_meson_configure_options] = true
  # ======================================================================= #
  # === :symlink_gir_files
  #
  # This entry point controls whether we will symlink .gir files,
  # in principle.
  # ======================================================================= #
  @internal_hash[:symlink_gir_files] = configuration_setting_for_symlink_gir_files?
  # ======================================================================= #
  # === :register_the_last_compiled_program
  #
  # Whether to register the last compiled program or not.
  # ======================================================================= #
  @internal_hash[:register_the_last_compiled_program] = true
  # ======================================================================= #
  # === :use_this_specific_program_version
  #
  # Use another program version than the default one via this
  # variable.
  # ======================================================================= #
  @internal_hash[:use_this_specific_program_version] = nil
  # ======================================================================= #
  # === :append_this_to_the_configure_options
  #
  # This variant has been specifically added to allow for the --release
  # flag to work with cmake-based projects.
  # ======================================================================= #
  @internal_hash[:append_this_to_the_configure_options] = nil
  # ======================================================================= #
  # === :use_opn
  #
  # This entry point determines whether RBT::Action::SoftwareManager will make
  # use of opn or whether it will not. By default it will be true; if it
  # is false then we will not show opn in any other class that is called
  # by RBT::Action::SoftwareManagerRBT::Action::SoftwareManagerRBT::Action::SoftwareManager.
  # ======================================================================= #
  @internal_hash[:use_opn] = true
  # ======================================================================= #
  # === :extract_only
  # ======================================================================= #
  @internal_hash[:extract_only] = false
  # ======================================================================= #
  # === :configure_options
  #
  # Whether we will use special configure options or not. By default
  # we will not, hence why we initialize the next setting to nil.
  # ======================================================================= #
  @internal_hash[:configure_options] = nil
  # ======================================================================= #
  # === :use_the_internal_sed_wrapper
  #
  # Next, determine whether to use the internal sed-wrapper. No
  # longer true by default since as of February 2018, but perhaps
  # we may re-enable it at some later moment in time.
  # ======================================================================= #
  @internal_hash[:use_the_internal_sed_wrapper] = false
  # ======================================================================= #
  # The configuration setting can change the above default false-value.
  # ======================================================================= #
  if config?
    @internal_hash[:strip_binaries] = config?.use_strip
  end
  # ======================================================================= #
  # The next variable will keep track of class SymlinkProgram. We
  # need to be able to modify its behaviour at "runtime".
  # ======================================================================= #
  set_symlink_program(nil)
  set_use_this_make_command(nil)
end

#return_absolute_path_if_in_build_directoryObject

#

return_absolute_path_if_in_build_directory

#


2559
2560
2561
2562
2563
2564
2565
2566
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2559

def return_absolute_path_if_in_build_directory
  if use_build_directory? and 
     return_pwd.include?(File.basename(use_this_build_directory?))
    " #{absolute_path(return_pwd)}"
  else
    ''
  end
end

#return_alias_name_for(i) ⇒ Object

#

return_alias_name_for

#


10155
10156
10157
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10155

def return_alias_name_for(i)
  action(:cookbooks_aliases, i).result?
end

#return_appdir_prefix(use_this_as_the_program_name = program_name? ) ⇒ Object

#

return_appdir_prefix

This variant will always use three methods to build the appdir-prefix.

It does not take any input by design.

#


3336
3337
3338
3339
3340
3341
3342
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3336

def return_appdir_prefix(
    use_this_as_the_program_name = program_name?
  )
  programs_dir?+
  use_this_as_the_program_name.to_s.capitalize.to_s+'/'+
  program_version?.to_s+'/'
end

#return_append_this_to_the_configure_options(append_this_to_the_configure_options = append_this_to_the_configure_options? ) ⇒ Object

#

return_append_this_to_the_configure_options

This method will always at the least return an empty String.

#


931
932
933
934
935
936
937
938
939
940
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 931

def return_append_this_to_the_configure_options(
    append_this_to_the_configure_options = append_this_to_the_configure_options?
  )
  _ = ''
  if append_this_to_the_configure_options
    _ = _.dup if _.frozen?
    _ << append_this_to_the_configure_options
  end
  return _
end

#return_blfs_page_of_this_program(i) ⇒ Object

#

return_blfs_page_of_this_program

#


10207
10208
10209
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10207

def return_blfs_page_of_this_program(i)
  action(:return_blfs_page_of_this_program, i)
end

#return_build_systems_priorities(i = RBT.file_build_system_priorities) ⇒ Object

#

return_build_systems_priorities

#


11280
11281
11282
11283
11284
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11280

def return_build_systems_priorities(
    i = RBT.file_build_system_priorities
  )
  load_yaml(i)
end

#return_chained_programsObject

#

return_chained_programs

#


9042
9043
9044
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9042

def return_chained_programs
  return action(:return_chained_programs)
end

#return_cmake_configure_options_while_considering_GNU_configure_optionsObject

#

return_cmake_configure_options_while_considering_GNU_configure_options

This method will return the cmake_configure_options, or configure options. One day this should be changed to ONLY return the cmake_configure_options, but for the time being we need to retain compatibility to GNU configure options.

#


164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 164

def return_cmake_configure_options_while_considering_GNU_configure_options
  _ = cmake_configure_options?
  unless _
    # ===================================================================== #
    # We default to the configure options for legacy reasons. At
    # some later point we may have to change all cookbook files,
    # but for now we won't.
    # ===================================================================== #
    _ = configure_options?
  end
  _ << return_append_this_to_the_configure_options
  return _.strip.squeeze(' ')
end

#return_compile_time_statisticsObject

#

return_compile_time_statistics

#


10498
10499
10500
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10498

def return_compile_time_statistics
  action(__method__.to_sym)
end

#return_dataset_for_this_program(i = compile_which_program? ) ⇒ Object

#

return_dataset_for_this_program

This method will be used to return the dataset, that is a new cookbook instance, from the given program at hand.

#


3974
3975
3976
3977
3978
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3974

def return_dataset_for_this_program(
    i = compile_which_program?
  )
  load_yaml_dataset_for_this_program(i)
end

#return_dataset_from_this_remote_blfs_page(i) ⇒ Object

#

return_dataset_from_this_remote_blfs_page

#


8835
8836
8837
8838
8839
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8835

def return_dataset_from_this_remote_blfs_page(i)
  remote_url = action(:return_blfs_page_of_this_program, i)
  remote_dataset = URI.open(remote_url).read
  return remote_dataset
end

#return_default_configure_commandObject

#

return_default_configure_command

#


11699
11700
11701
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11699

def return_default_configure_command
  "configure --prefix=#{prefix?}"
end

#return_default_hash_to_be_passed_into_colour_make(optional_input = nil) ⇒ Object

#

return_default_hash_to_be_passed_into_colour_make

This method will return a static hash. This can be overruled, though, by providing an argument (another hash) to this method.

#


1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1031

def return_default_hash_to_be_passed_into_colour_make(
    optional_input = nil
  )
  hash = {
    use_this_make_command:            use_which_make_command?,
    append_these_options:             parameters_to_make?,
    run_make:                         run_make?,
    run_make_install:                 run_make_install?,
    use_porg:                         use_porg?,
    program_name_and_program_version: program_name_and_program_version?
  }
  if optional_input
    hash.update(optional_input)
  end
  return hash 
end

#return_games_componentsObject Also known as: return_games

#

return_games_components

This method will conveniently return the Array holding all programs that belong to the KDE5 Application pool.

#


539
540
541
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 539

def return_games_components
  RBT.return_games_components
end

#return_gem_install_optionsObject

#

return_gem_install_options

#


12309
12310
12311
12312
12313
12314
12315
12316
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12309

def return_gem_install_options
  _ = "#{yaml_directory?}ruby_gem_install_options.yml"
  if File.exist? _
    YAML.load_file(_).strip
  else
    ''
  end
end

#return_hash_for_the_postinstallation_step(optional_rbt_compile_object = nil) ⇒ Object

#

return_hash_for_the_postinstallation_step

This method will return a Hash that can be used as the main initializer for class RBT::PostinstallationStep.

The method accepts an argument (optional). That argument should be an instance of RBT::Action::SoftwareManager, if it is provided. If provided we will fetch our information from that instance, rather than from the default internal one.

#


11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11439

def return_hash_for_the_postinstallation_step(
    optional_rbt_compile_object = nil
  )
  # ======================================================================= #
  # First we will setup some local variables that will be returned
  # via the Hash.
  # ======================================================================= #
  register_the_program_or_do_not_register_the_program = false
  shall_we_run_fetch_all_m4_macros = true
  shall_we_invoke_symlink_program = false
  shall_we_symlink_the_header_files_into_the_usr_include_hierarchy = false
  if optional_rbt_compile_object
    if optional_rbt_compile_object.continue_after_make_step? and
       optional_rbt_compile_object.make_install_stage_was_a_success? and
       optional_rbt_compile_object.no_error_has_occurred?
      register_the_program_or_do_not_register_the_program = true
    end
    if optional_rbt_compile_object.do_not_symlink?
      shall_we_run_fetch_all_m4_macros = false
    elsif !optional_rbt_compile_object.continue_after_make_step?
      shall_we_run_fetch_all_m4_macros = false
    end
    if optional_rbt_compile_object.continue_after_make_step? and
       optional_rbt_compile_object.make_install_stage_was_a_success?
      # ===================================================================== #
      # if i.include? '-' # Added this as of Jul 2014.
      #   i = i.to_s.delete('-')
      # end # ^^^ Disabled as of Sep 2017. We would have to go about
      # this via some central configuration option in RBT, rather
      # than an ad-hoc hack such as the above.
      # ===================================================================== #
      shall_we_invoke_symlink_program = true
    end unless optional_rbt_compile_object.do_not_symlink?
    if optional_rbt_compile_object.symlink_headers_into_usr_include_hierarchy? and
       optional_rbt_compile_object.uses_an_appdir_prefix? and
       File.directory?(optional_rbt_compile_object.real_prefix?.to_s+'include/') and
       !Dir["#{optional_rbt_compile_object.real_prefix?}include/**.h"].empty?
      shall_we_symlink_the_header_files_into_the_usr_include_hierarchy = true
    end
  else
    if continue_after_make_step? and
       make_install_stage_was_a_success? and
       no_error_has_occurred?
      register_the_program_or_do_not_register_the_program = true
    end
    if do_not_symlink?
      shall_we_run_fetch_all_m4_macros = false
    elsif !continue_after_make_step?
      shall_we_run_fetch_all_m4_macros = false
    end
    if continue_after_make_step? and
       make_install_stage_was_a_success?
      # ===================================================================== #
      # if i.include? '-' # Added this as of Jul 2014.
      #   i = i.to_s.delete('-')
      # end # ^^^ Disabled as of Sep 2017. We would have to go about
      # this via some central configuration option in RBT, rather
      # than an ad-hoc hack such as the above.
      # ===================================================================== #
      shall_we_invoke_symlink_program = true
    end unless do_not_symlink?
    if symlink_headers_into_usr_include_hierarchy? and
       uses_an_appdir_prefix? and
       File.directory?(real_prefix?.to_s+'include/') and
       !Dir["#{real_prefix?}include/**.h"].empty?
      shall_we_symlink_the_header_files_into_the_usr_include_hierarchy = true
    end
  end
  hash = {
    compile_which_program:            compile_which_program?,
    use_this_prefix:                  real_prefix?.to_s,
    dataset_to_use:                   cookbook_dataset?,
    use_tags:                         use_tags?,
    full_configure_command:           full_configure_command?,
    do_register_the_program:          register_the_program_or_do_not_register_the_program,
    do_run_fetch_all_m4_macros:       shall_we_run_fetch_all_m4_macros,
    shall_we_invoke_symlink_program:  shall_we_invoke_symlink_program,
    install_only_binaries:            install_only_binaries?,
    use_gobolinux_symlinkprogram:     use_gobolinux_symlinkprogram?,
    delete_libtool_files:             delete_libtool_files?,
    symlink_into_usr_lib_dir:         symlink_into_usr_lib_dir?,
    postinstall:                      postinstall?,
    shall_we_symlink_the_header_files_into_the_usr_include_hierarchy: shall_we_symlink_the_header_files_into_the_usr_include_hierarchy
  }
  return hash
end

#return_kde5_applicationsObject

#

return_kde5_applications

#


432
433
434
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 432

def return_kde5_applications
  RBT.return_kde5_applications
end

#return_kde5_plasmaObject

#

return_kde5_plasma

#


3754
3755
3756
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3754

def return_kde5_plasma
  RBT.return_kde5_plasma
end

#return_kde5_porting_aidsObject Also known as: return_porting_aids

#

return_kde5_porting_aids

#


5601
5602
5603
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5601

def return_kde5_porting_aids
  RBT.return_kde5_porting_aids
end

#return_last_configure_command(hash = compiled_programs? # The full dataset is assigned here. ) ⇒ Object

#

return_last_configure_command

#


667
668
669
670
671
672
673
674
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 667

def return_last_configure_command(
    hash = compiled_programs? # The full dataset is assigned here.
  )
  last_key = hash.keys.last # Grab the last key.
  dataset = hash[last_key]  # Now we have obtained the dataset.
  full_configure_command = dataset['full_configure_command']
  return full_configure_command
end

#return_lxqt_componentsObject Also known as: return_lxqt_desktop_components

#

return_lxqt_components

This method will conveniently return the Array holding all programs that belong to the LX-QT pool.

#


1741
1742
1743
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1741

def return_lxqt_components
  RBT.return_lxqt_components
end

#return_mate_desktop_componentsObject Also known as: return_mate_applications

#

return_mate_desktop_components

This method will conveniently return the Array holding all programs that belong to the KDE5 Application pool.

#


529
530
531
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 529

def return_mate_desktop_components
  RBT.return_mate_desktop_components
end

#return_md5(this_file) ⇒ Object

#

return_md5

md5sum support via this method. It will make use of the class Md5sum.

#


8252
8253
8254
8255
8256
8257
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8252

def return_md5(
    this_file
  )
  _ = Md5sum.new(this_file, :dont_run_yet) # bl $RUBY_SRC/md5sum/lib/md5sum/md5sum.rb
  return _.return_md5sum(this_file)
end

#return_meson_configure_optionsObject

#

return_meson_configure_options

#


10214
10215
10216
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10214

def return_meson_configure_options
  return_the_appropriate_configure_options(:meson)
end

#return_n_processors_of_this_computer(file_cpuinfo = FILE_CPUINFO) ⇒ Object Also known as: return_n_processors, this_computer_has_how_many_processors?

#

return_n_processors_of_this_computer

This method will return how many processors this computer has. This can then be used to automatically determine the maximum option given to the “make” binary.

#


7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7924

def return_n_processors_of_this_computer(
    file_cpuinfo = FILE_CPUINFO
  )
  if file_cpuinfo.is_a?(String) and File.exist?(file_cpuinfo)
    selected_dataset = File.readlines(file_cpuinfo).select {|line|
      line.start_with? 'processor'
    }
    selected_dataset.size
  else
    1 # 1 is the minimum number.
  end
end

#return_n_programs_availableObject

#

return_n_programs_available

#


9582
9583
9584
9585
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9582

def return_n_programs_available
  "#{rev}#{sfancy(n_programs_available?.to_s)} "\
  "programs registered as of #{simp(today?)}."
end

#return_non_traditional_prefix(i = compile_which_program?, , use_this_program_version = :default) ⇒ Object Also known as: static_appdir_prefix?

#

return_non_traditional_prefix (appdir prefix)

This method will return the (assumed) AppDir prefix for a given program at hand.

The program version must be set before calling this method. If the program_version? has not been defined properly then the method here may return an incorrect result.

This method MUST be guaranteed to return a trailing ‘/’ character.

#


99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 99

def return_non_traditional_prefix(
    i                        = compile_which_program?,
    use_this_program_version = :default
  )
  if cookbook_dataset?.nil?
    # ===================================================================== #
    # We do the next method primarily so that we can find
    # a proper program version.
    # ===================================================================== #
    initialize_cookbook_dataset_for(i)
  end
  case use_this_program_version
  when :default
    use_this_program_version = program_version?
  when nil
    initialize_cookbook_dataset_for(i)
  end
  # ======================================================================= #
  # We need a safeguard next, as the program version may be nil.
  # ======================================================================= #
  if use_this_program_version.nil?
    use_this_program_version = cookbook_dataset_program_version?
  end
  result = rds(
    programs_directory?.to_s+
    i.to_s.capitalize.to_s+
    '/'+
    use_this_program_version.to_s+'/'
  )
  # ======================================================================= #
  # === Handle GoboLinux next
  # ======================================================================= #
  if is_on_gobolinux?
    # ===================================================================== #
    # If we are on GoboLinux, then we have to honour the other variant 
    # called program_compile_name? instead.
    # ===================================================================== #
    result = rds(
      programs_directory?.to_s+
      program_compile_name?.to_s+'/'+ # This line is specific to GoboLinux.
      use_this_program_version.to_s+'/'
    )
  end
  return result
end

#return_path_to_the_archive_of_this_program(i) ⇒ Object

#

return_path_to_the_archive_of_this_program

This functionality depends on the expanded cookbooks dataset.

#


6101
6102
6103
6104
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6101

def return_path_to_the_archive_of_this_program(i)
  dataset_from_expanded_cookbook = return_dataset_from_expanded_cookbook(i)
  dataset_from_expanded_cookbook[:program_path]
end

#return_possible_abbreviation_to_this_input(i) ⇒ Object

#

return_possible_abbreviation_to_this_input

This method will return an abbreviation to a given input.

#


1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1212

def return_possible_abbreviation_to_this_input(i)
  if will_we_make_use_of_abbreviations?
    # ===================================================================== #
    # If the cookbooks-project already includes the given input at hand
    # then we do not have to do anything else.
    # ===================================================================== #
    is_the_program_included = cookbooks_include_this_program? i
    unless is_the_program_included
      # =================================================================== #
      # We have to do another check, this time including the abbreviations.
      # =================================================================== #
      is_the_program_included = cookbooks_include_this_program?(
        i, :with_abbreviations
      )
      if is_the_program_included
        abbreviation_points_to = abbreviations?[i]
        unless abbreviation_points_to == i
          # =============================================================== #
          # Notify the user that we will "re-write" the original input
          # in this case.
          # =============================================================== #
          orev "The given input #{sfancy(i)} #{rev}could not be "\
               "found, but an abbreviation"
          orev "was found, which is now used as the new name: "\
               "#{mediumspringgreen(abbreviation_points_to)}"
          i = abbreviation_points_to.to_s.delete('_').dup
          set_is_an_abbreviation
          # =============================================================== #
          # We must also set the Hash to sync-back our findings, so that
          # we change input like "ry macro" to "ry marco". We avoid
          # using the setter method because the setter method does a
          # few additional checks as-is.
          # =============================================================== #
          set_handle_this_program(i)
        end
      end
    end
  end
  return i
end

#return_program_based_on_this_binary(i) ⇒ Object

#

return_program_based_on_this_binary

#


3466
3467
3468
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3466

def return_program_based_on_this_binary(i)
  RBT::Cookbooks::RegisteredBinaries.search_for_this_program(i) { :be_quiet }
end

#return_program_name_then_hyphen_then_the_program_versionObject

#

return_program_name_then_hyphen_then_the_program_version

#


11631
11632
11633
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11631

def return_program_name_then_hyphen_then_the_program_version
  "#{compile_which_program?.to_s}-#{program_version?}"
end

#return_random_programObject

#

return_random_program

#


4514
4515
4516
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4514

def return_random_program
  return_available_programs.sample
end

#return_relative_path_if_in_build_directoryObject

#

return_relative_path_if_in_build_directory

#


8409
8410
8411
8412
8413
8414
8415
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8409

def return_relative_path_if_in_build_directory
  if use_build_directory? and return_pwd.include?(File.basename(use_this_build_directory?))
    ' ..'
  else
    ''
  end
end

#return_the_appropriate_configure_options(build_type = return_build_type.to_s) ⇒ Object

#

return_the_appropriate_configure_options

This will return the configure options or meson option or cmake options. The guarantee is that we will return whatever is appropriate.

For now, the method will only consider configure options.

#


12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12793

def return_the_appropriate_configure_options(
    build_type = return_build_type.to_s
  )
  _ = nil # Tiny safeguard.
  build_type = build_type.to_sym unless build_type.is_a? Symbol
  case build_type
  # ======================================================================= #
  # === :meson
  #
  # This is for the meson-configure-options.
  # ======================================================================= #
  when :meson
    _ = meson_configure_options?.to_s
  # ======================================================================= #
  # === :configure
  # ======================================================================= #
  when :configure
    _ = configure_options?.to_s.dup
  # ======================================================================= #
  # === :unknown
  #
  # We currently don't handle this.
  # ======================================================================= #
  when :unknown, :infer, :infer_automatically
    return
  else
    return nil
    #   opne 'Not yet handled: :'+build_type.to_s+'.'
  end
  if _ and !_.empty?
    splitted = _.split("\n").reject {|entry| entry.strip.empty? }
    first = splitted.first
    unless first.start_with?('--')
      splitted.map! {|entry|
        unless entry.start_with? '-'
          entry = "--#{entry}"
        end
        entry
      }
    end
    _ = splitted.join(' ')
  end
  _ = " #{_}" if _
  return _
end

#return_this_plasma_componentObject

#

return_this_plasma_component

#


339
340
341
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 339

def return_this_plasma_component
  RBT.return_this_plasma_component
end

#return_xfce_componentsObject

#

return_xfce_components

#


25
26
27
# File 'lib/rbt/actions/individual_actions/software_manager/actions.rb', line 25

def return_xfce_components
  action(:return_xfce_components)
end

#returned_the_assumed_program_path(i = first_argument? ) ⇒ Object

#

returned_the_assumed_program_path

#


12450
12451
12452
12453
12454
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12450

def returned_the_assumed_program_path(
    i = first_argument?
  )
  return action(:SanitizeCookbook, i) { @internal_hash[:simple_or_complex] }.program_path?
end

#reuse_old_configure_options(use_this_program = compile_which_program? ) ⇒ Object Also known as: use_old_configure_options

#

reuse_old_configure_options

This method currently works only with the target program being GCC.

Perhaps it may be extended for other programs one day.

Invocation examples:

ry gcc --copy-old-version
ry gcc --use-this-version=7.1.0 --use-old-configure-options
#


5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5146

def reuse_old_configure_options(
    use_this_program = compile_which_program?
  )
  _ = `#{use_this_program} -v #{SHELL_ERROR_CODE}`
  options = _.scan(/^Configured .+/).first.
              sub(/^Configured with:/,'').
              sub(/\.\.\/configure /,''). 
              strip
  orev "Re-using the old configure option, which "\
       "was `#{sfancy(options)}#{rev}`."
  if options.include? programs_directory?
    # ===================================================================== #
    # Next, replace the oldprefix.
    # ===================================================================== #
    programs_dir = Regexp.quote(programs_directory?)
    if dataset?.nil?
      ensure_that_the_default_dataset_exists_for_this_program(use_this_program)
    end
    if @internal_hash[:use_this_specific_program_version]
      dataset?.set_program_version(@internal_hash[:use_this_specific_program_version])
      dataset?.reassemble_program_path
    end
    regex_to_use = /(--prefix=#{programs_dir}Gcc\/\d{1,2}\.\d{1,2}\.\d{1,2})/
    options.sub!(regex_to_use, '--prefix='+return_appdir_prefix)
    options.squeeze!('/')
    # ===================================================================== #
    # Now, simply use that as configure version.
    # ===================================================================== #
    extract_to_default_directory
    set_configure_base_directory
    cd_to_the_configure_base_directory
    run_preinstall_sed_and_currently_being_compiled
    consider_creating_the_build_directory
    orev "These are the #{orange('options')} that will be used:"
    e
    e "  #{simp(options)}"
    e
    set_configure_options(options)
    run_configure_make_and_make_install_with_this_configure_line(options)
    run_all_actions_after_the_make_install_step
    exit_program
  end
end

#rnsymc(i = return_pwd) ⇒ Object

#

rnsymc

#


4233
4234
4235
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4233

def rnsymc(i = return_pwd)
  RBT::SymlinkFromToCurrent.new(i)
end

#ruby_setup_configObject

#

ruby_setup_config

#


7844
7845
7846
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7844

def ruby_setup_config
  system 'ruby setup.rb --quiet config'
end

#ruby_setup_installObject

#

ruby_setup_install

#


11753
11754
11755
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11753

def ruby_setup_install
  system 'ruby setup.rb --quiet install'
end

#ruby_setup_setupObject

#

ruby_setup_setup

#


3747
3748
3749
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3747

def ruby_setup_setup
  system 'ruby setup.rb --quiet setup'
end

#runObject

#

run (run tag)

#


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/rbt/actions/individual_actions/software_manager/run.rb', line 18

def run
  _ = first_non_hyphened_argument?
  if _
    # ====================================================================== #
    # Whenever the user uses input that includes '@', we will assume
    # that the user knows exactly he/she is doing in this case.
    #
    # Invocation example:
    #
    #   ry glib@2.70.5
    #
    # ====================================================================== #
    if _.include?('@') # Support a format such as "glib@2.70.5".
      splitted = _.split('@')
      _ = splitted.first
      set_use_this_version(splitted.last)
    end
    set_compile_this_program(_)
    # ====================================================================== #
    # Also remove it from the commandline arguments.
    # ====================================================================== #
    remove_the_first_commandline_argument
    set_cflags { :be_silent } # ← Initialize the CFLAGS here.
  else
    # else the user supplied no argument at all, or the user supplied
    # an argument with a leading '--'.
  end
  # ======================================================================== #
  # Next we will determine the "real" commandline arguments. We assume
  # these to be the one's starting with '--'.
  # ======================================================================== #
  selection = commandline_arguments? # [1 .. -1]
  all_but_the_first_element = selection.compact.map {|entry|
    if entry and entry.is_a?(String)
      entry = entry.dup
      unless entry.start_with?('--')
        entry.prepend('--')
      end
    end
    entry
  }
  determine_the_real_commandline_arguments(all_but_the_first_element)
  menu(real_commandline_arguments?)
  # ======================================================================== #
  # === The log directory must exist
  #
  # We must always ensure that the log_directory exists.
  # ======================================================================== #
  ensure_that_the_log_directory_exists
  if _ and !_.empty?
    set_compile_these_programs(compile_which_program?)
    # ====================================================================== #
    # === Install all specified programs next
    #
    # After the menu() interface has been called, we can proceed
    # to batch-install every program.
    # ====================================================================== #
    do_install_these_programs(compile_which_program?)
  else
    orev 'Please supply an argument to this action.'
  end
  # ======================================================================= #
  # $stdout = original_stdout? if original_stdout?
  # ^^^ Have to re-think the above.
end

#run_cmake_configure_step(use_this_as_build_directory = use_this_as_build_directory? ) ⇒ Object Also known as: run_cmake_command, run_cmake_via_action, run_the_cmake_command, run_cmake_then_premake_then_make_then_make_install, do_install_via_cmake

#

run_cmake_configure_step (cmake tag)

This method essentially does something like:

cmake -DCMAKE_INSTALL_PREFIX=/usr ..

Then it will perform:

- premake
- make
- make install
#


222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 222

def run_cmake_configure_step(
    use_this_as_build_directory = use_this_as_build_directory?
  )
  # ======================================================================== #
  # We should check whether cmake exists on the host system or whether
  # it does not.
  # ======================================================================== #
  if cmake_exists?
    _ = 'cmake'.dup
    # ====================================================================== #
    # Add the prefix next, if the user wants to use a prefix at all:
    # ====================================================================== #
    if do_we_use_any_prefix? # Check whether the user wants to use a prefix at all.
      _ << " -DCMAKE_INSTALL_PREFIX=#{prefix?}"
    end
    # ====================================================================== #
    # Obtain the cmake-configure options next and append them:
    # ====================================================================== #
    configure_options = cmake_configure_options?
    if configure_options and !configure_options.empty?
      _ << " #{configure_options}"
    end
    _ << ' .'
    if use_this_as_build_directory and do_we_use_a_build_directory? # Most cmake-based projects require a build-directory.
      # create_the_build_directory_then_cd_into_it(use_this_as_build_directory) { :be_verbose }
      _ << '.'
    end
    _.squeeze!(' ')
    _.strip!
    # ====================================================================== #
    # === Check for more than one -DCMAKE_INSTALL_PREFIX entry next
    #
    # This should never be the case, so we will do some quality-control
    # and exit if this is the case so.
    # ====================================================================== #
    scanned_result = _.scan(/-DCMAKE_INSTALL_PREFIX=/)
    if scanned_result.size > 1 # More than one.
      # ==================================================================== #
      # In this case, something must be wrong. Notify the user about it.
      # That way this can be corrected eventually.
      # ==================================================================== #
      opnewarn "There are at the least two definitions of "\
               "#{royalblue('-DCMAKE_INSTALL_PREFIX=')}"
      opnewarn "in the .yml file at hand."
      opnewarn 'At the least one of these entries must be incorrect '\
               'and/or superfluous. Consider '
      opnewarn 'correcting this logic-problem before RBT can '\
               'continue.'
      e
      e 'See:'
      e
      e "  #{sfancy(_)}"
      e
      exit_program
    end
    # ====================================================================== #
    # Finally the cmake-command has been built up. We can now push it
    # towards the general method that handles output.
    # ====================================================================== #
    # reset_error_map_line_to_a_specific_error
    set_full_configure_command(_)
    cmake_object = action(:run_cmake, :do_not_run_yet) { :colourized_and_padded }
    cmake_object.set_full_configure_line(_)
    cmake_object.verbose_run_the_actual_system_command
  else
    # ====================================================================== #
    # The user should be informed that "cmake" could not be found here.
    # ====================================================================== #
    notify_the_user_that_cmake_could_not_be_found
    we_can_not_continue
  end
end

#run_cmake_then_make_then_make_installObject Also known as: run_the_cmake_steps

#

run_cmake_then_make_then_make_install

Just a convenience method to run “cmake”, then “make” and then “make install”.

#


305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 305

def run_cmake_then_make_then_make_install
  run_cmake_configure_step
  run_premake_then_make_then_make_install
  # run_make
  # run_make_install
  # opne "#{rev}Next running"
  # run_this_system_command_in_a_coloured_and_padded_manner(cmd) # Using this since as of 28.08.2022.
  # ======================================================================== #
  # Now that the cmake, premake, make, make install was run we scan
  # through the registered problems/errors and act on it, before
  # resetting the error-line again.
  # ======================================================================== #
  # run_through_the_registered_problems_registered_errors_and_behaviour_changes
  # reset_error_map_line_to_a_specific_error
end

#run_configure_make_and_make_install_with_this_configure_line(i) ⇒ Object

#

run_configure_make_and_make_install_with_this_configure_line

#


10583
10584
10585
10586
10587
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10583

def run_configure_make_and_make_install_with_this_configure_line(i)
  run_configure_via_system(i)
  run_make
  run_make_install
end

#run_configure_script?Boolean Also known as: run_configure?

#

run_configure_script?

Determine whether we will invoke “./configure” or whether we will not.

#

Returns:

  • (Boolean)


11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11723

def run_configure_script?
  _ = @internal_hash[:run_configure_script]
  # ======================================================================= #
  # Next, fetch the entry that exists in the cookbook-dataset, and use
  # it in this case.
  # ======================================================================= #
  if _.nil?
    if cookbook_dataset_run_configure_script?.nil?
      _ = true # Safe-guard.
    else
      _ = cookbook_dataset_run_configure_script?
    end
  end
  _
end

#run_configure_via_actionObject

#

run_configure_via_action (configure tag)

#


6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6653

def run_configure_via_action
  options = ''.dup
  known_options = RBT.return_configure_options_of_this_program(which_program?)
  if known_options and !known_options.empty?
    options << known_options
  end
  use_these_options = "--prefix=#{prefix?} #{options}".rstrip
  action(:run_configure, use_these_options) { :colourized_and_padded }
  e
end

#run_ldconfig?Boolean

#

run_ldconfig?

#

Returns:

  • (Boolean)


1161
1162
1163
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1161

def run_ldconfig?
  RBT.configuration?.run_ldconfig
end

#run_make(parameters_to_make = parameters_to_make? ) ⇒ Object Also known as: run_make_command

#

run_make (make tag)

#


1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1014

def run_make(
    parameters_to_make = parameters_to_make?
  )
  if run_make? and can_we_continue?
    _ = 'make -j$(nproc)'.dup # This variant uses the n CPU core variant.
    _ << " #{parameters_to_make}" unless parameters_to_make.empty?
    colourized_and_padded_esystem(_)
  end
end

#run_make?Boolean

#

run_make?

#

Returns:

  • (Boolean)


10112
10113
10114
10115
10116
10117
10118
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10112

def run_make?
  _ = cookbook_dataset_run_make?
  unless @internal_hash[:run_make_command].nil?
    _ = @internal_hash[:run_make_command]
  end
  return _
end

#run_make_installObject Also known as: run_make_install_command, considering_running_make_install_command_via_system

#

run_make_install (make install tag)

This method will ultimately default to run:

make install

Note that some programs do not use “make install” and instead use something such as “ninja install”.

The method here thus has to remain somewhat flexible, in order to install such programs as well.

#


1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1060

def run_make_install
  # ======================================================================== #
  # Do not try to compile via make, if it does not have to be compiled.
  # ======================================================================== #
  return unless has_to_be_compiled?
  return unless can_we_continue?
  # ======================================================================== #
  # Next check for pre-make-install sed instructions:
  # ======================================================================== #
  unless pre_make_install_sed.empty?
    pre_make_install_sed.each {|sed_instruction|
      run_this_sed_instruction(sed_instruction)
    }
  end
  if exit_before_make_install?
    orev 'Exiting now as instructed before reaching '\
         'the "'+orange('make install')+rev+'" stage.'
    exit_program
  end
  # ======================================================================== #
  # === Check whether we may run make install or whether we may not.
  # ======================================================================== #
  if run_make_install?
    # ====================================================================== #
    # Clear the old buffer keeping track of our errors first:
    # ====================================================================== #
    # reset_error_map_line_to_a_specific_error
    use_this_make_command = use_this_make_command?
    if use_this_make_install_command?
      # ==================================================================== #
      # In this case we will use that make-install command instead.
      # ==================================================================== #
      use_this_make_command = use_this_make_install_command?
    end
    use_this_make_command = use_this_make_command.dup
    # ====================================================================== #
    # Check for porg next:
    # ====================================================================== #
    use_porg = false
    if use_porg? # The user is trying to make use of porg here.
      if porg_is_available?
        use_porg = true
      else
        # ==================================================================== #
        # Notify the user that porg is NOT available. We will continue
        # anyway, though.
        # ==================================================================== #
        notify_the_user_that_porg_is_not_available
      end
    end
    _ = "#{use_this_make_command} install"
    # ====================================================================== #
    # If the user uses stow then the following clause is entered.
    # ====================================================================== #
    opnn
    if use_stow?
      RBT.colour_make_install {
        return_default_hash_to_be_passed_into_colour_make(
          append: " DESTDIR=/stow/#{compile_which_program?} install",
          porg:                  use_porg,
          use_this_make_command: use_this_make_command,
          pad_the_output:        true,
          run_make:              false
        )
      }
    else # This is the default variant.
      RBT.colour_make_install {
        return_default_hash_to_be_passed_into_colour_make(
          porg:                  use_porg,
          use_this_make_command: use_this_make_command,
          pad_the_output:        true,
          run_make:              false
        )
      }
    end
    # run_through_the_registered_problems_registered_errors_and_behaviour_changes
    # reset_error_map_line_to_a_specific_error
    # if an_error_has_occurred?
    #   # =================================================================== #
    #   # Register that this step led to an error in this case.
    #   # =================================================================== #
    #   @internal_hash[:make_install_stage_was_a_success] = false
    #  end
    # colourized_and_padded_esystem(_)
    # ^^^ this should be used in a padded variant.
  end
end

#run_make_install?Boolean Also known as: may_we_run_make_install_command?

#

run_make_install?

Query whether we will do the “make install” step or whether we will not. Will return a boolean value (true/false).

#

Returns:

  • (Boolean)


1126
1127
1128
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1126

def run_make_install?
  @internal_hash[:run_make_install]
end

#run_make_then_make_installObject Also known as: run_make_and_make_install_command, run_make_then_make_install_command

#

run_make_then_make_install

Run “make” and then the “make install” command here.

This method is deliberately very simple.

#


13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13000

def run_make_then_make_install
  # _ = an_error_has_occurred?
  # _ = false unless check_for_errors?
  # if _
  # else
  # run_make_then_make_install_via_action
  run_make_command
  run_make_install_command
  # end
end

#run_make_then_make_install_via_actionObject

#

run_make_then_make_install_via_action

#


13015
13016
13017
13018
13019
13020
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13015

def run_make_then_make_install_via_action
  action(:run_make_then_make_install)
  # Or:
  # run_make
  # run_make_install
end

#run_meson_configure_step(use_this_as_build_directory = build_directory_object?.use_this_as_build_directory?) ⇒ Object Also known as: run_meson_configure, run_meson_via_action

#

run_meson_configure_step (meson tag)

This method essentially does something like:

meson --prefix=/usr --libdir=/usr/lib BUILD_DIRECTORY

In order for this to work, we must enter the directory below the build-directory.

#


344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 344

def run_meson_configure_step(
    use_this_as_build_directory = build_directory_object?.use_this_as_build_directory?
  )
  # ======================================================================== #
  # Obtain the configure options for meson next:
  # ======================================================================== #
  if is_meson_installed?
    set_configure_command(:meson) # Keep a back-reference here.
    # ====================================================================== #
    # Obtain the meson-configure options next, but only if the user
    # has allowed us to do so.
    # ====================================================================== #
    if use_meson_configure_options?
      configure_options = meson_configure_options?.to_s.strip
      if configure_options and !configure_options.empty?
        # ==================================================================== #
        # Append the meson-configure options in this case.
        # ==================================================================== #
        orev "Making use of the #{royalblue('meson_configure_options')}#{rev}, "\
             "#{rev}as specified by the corresponding "\
             "#{slateblue('.yml')} #{rev}file."
      end
    else
      configure_options = nil
    end
    # ====================================================================== #
    # Delegate via the corresponding rbt-action:
    # ====================================================================== #
    use_this_prefix = prefix?
    unless do_we_use_any_prefix?
      use_this_prefix = nil
    end
    configure_options.squeeze!(' ') if configure_options
    # ====================================================================== #
    # We must cd one level downwards.
    # ====================================================================== #
    if use_build_directory?
      build_directory_object?.cd_one_level_downwards
    end
    result = action(:run_meson_configure_step,
    {
      prefix_to_use:               use_this_prefix,
      configure_options:           configure_options,
      use_this_as_build_directory: use_this_as_build_directory
    }) { :colourized_and_padded }
    set_full_configure_command(result)
    if use_build_directory?
      build_directory_object?.cd_to_the_build_directory
    end
  else
    orev "#{steelblue('Meson')}#{rev} is unavailable. Consider installing it."
  end
end

#run_ninja_installObject Also known as: do_run_ninja_install

#

run_ninja_install (ninja install tag)

#


824
825
826
827
828
829
830
831
832
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 824

def run_ninja_install
  # reset_error_map_line_to_a_specific_error
  # run_this_system_command_in_a_coloured_and_padded_manner 'ninja install'
  # run_through_the_registered_problems_registered_errors_and_behaviour_changes
  # reset_error_map_line_to_a_specific_error
  cd use_this_as_build_directory?
  _ = 'ninja install'
  colourized_and_padded_esystem(_)
end

#run_postinstall_actions?Boolean Also known as: run_postinstall_steps?

#

run_postinstall_actions?

We will default to the cookbook dataset - but this will be overruled if there is a corresponding entry in the @internal_hash variable.

#

Returns:

  • (Boolean)


9419
9420
9421
9422
9423
9424
9425
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9419

def run_postinstall_actions?
  _ = cookbook_dataset_postinstall?
  unless @internal_hash[:run_postinstall_actions].nil?
    _ = @internal_hash[:run_postinstall_actions]
  end
  return _
end

#run_pre_configure_steps_if_requested_to_do_soObject

#

run_pre_configure_steps_if_requested_to_do_so

#


2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2169

def run_pre_configure_steps_if_requested_to_do_so
  _ = pre_configure_steps?
  if _ and !_.empty? and _.is_a?(Array)
    orev "Doing a #{steelblue('pre-configure')} #{rev}step next."
    _.each {|entry|
      # esystem entry
      run_this_system_command_in_a_coloured_and_padded_manner(entry)
    }
  end
end

#run_preinstall_actionsObject

#

run_preinstall_actions

These actions will be run before anything else, including “./configure”.

An example for such a preinstall action may be the following:

if is_on_32_bit_system?
  sed -r "/ifeq.*CompilerTargetArch/s#i386#i686#g" -i projects/compiler-rt/make/platform/clang_linux.mk
#


2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2382

def run_preinstall_actions
  _ = cookbook_dataset_preinstall?
  unless _.empty?
    # ===================================================================== #
    # Next we have to handle the preinstall-actions. This should
    # typically be an Array (and is guaranteed by class
    # RBT::SanitizeCookbook).
    #
    # We will output what we are doing pre-installation things, but
    # only do so IF we really want to so.
    # ===================================================================== #
    first = _.first
    unless first.start_with?('if ') and (first == 'if is_on_32_bit_system?')
      cliner {
        orev "Doing preinstallation actions next, from the directory"
        orev "`#{sdir(return_pwd)}#{rev}`:"
      }
    end
    # ===================================================================== #
    # === Handle conditional cases in the preinstall clause next
    # ===================================================================== #
    if first.start_with? 'if ' # Ok, we assume this to be an if-conditional clause.
      case first # case tag
      when 'if is_on_32_bit_system?'
        if is_on_32_bit_system? # Ok, we are on a 32 bit system.
          _.shift
          unless _.empty?
            _ = _.first
            orev 'A pre-installation instruction was found, '\
                 'which will be run next (from the '\
                 'directory '+sdir(sdir_return_pwd)+"#{rev})."
            opnesystem _
          end
        end
      end
    else
      opnn
      if _.is_a? Array
        _.each {|entry|
          case entry
          # =============================================================== #
          # Note that most of the next steps may be handled by class
          # PostInstall already, such as create_directory().
          # =============================================================== #
          # =============================================================== #
          # === copy_file STATIC_BUSYBOX_CONFIG
          #
          # Handle busybox's static configuration. This is stored
          # in the file called "static_busybox_config.md".
          #
          # On my home system this file is then found here:
          #
          #   $RBT/misc/profiles/static_busybox_config.md
          #
          # =============================================================== #
          when /copy_file STATIC_BUSYBOX_CONFIG$/i
            source_location = "#{DIRECTORY_TO_THE_PROFILES}static_busybox_config.md"
            target_location = "#{cookbooks_dataset_extracted_towards?}.config"
            orev "Copying from #{sfile(source_location)}"
            orev "to #{sfile(target_location)}"
            copy_file(source_location, target_location)
          else
            if entry.end_with?('.new')
              case entry
              # =========================================================== #
              # === Handle ChangeLib64ToLib.new
              # =========================================================== #
              when /ChangeLib64ToLib.new$/
                e "#{rev}Delegating towards "\
                  "#{steelblue('RBT::ClassesForIndividualPrograms::Gcc::ChangeLib64ToLib')} "\
                  "next:"
                RBT::ClassesForIndividualPrograms::Gcc::ChangeLib64ToLib.new
                next
              end
            end
          end
          e sfancy(entry)
          system(entry)
        }
      else
        e sfancy(_)
        system(_)
      end
    end
  end
end

#run_preinstall_sed_and_currently_being_compiledObject

#

run_preinstall_sed_and_currently_being_compiled

#


5829
5830
5831
5832
5833
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5829

def run_preinstall_sed_and_currently_being_compiled
  run_preinstall_actions
  check_for_sed_action
  register_that_this_program_is_currently_being_compiled
end

#run_premake_commands(array = cookbook_dataset_pre_make_commands? ) ⇒ Object Also known as: consider_running_premake_instructions, run_pre_make_commands

#

run_premake_commands

Here we try to run the premake commands, in case they exist.

If there are no pre_make_commands, then we will not do anything, as our array will be empty.

This method is normally run from do_compile_this_program(), via a call to its alias name consider_running_premake_instruction().

#


13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 13045

def run_premake_commands(
    array = cookbook_dataset_pre_make_commands?
  )
  unless array.empty?
    orev "#{sfancy('Doing pre_make_commands next from ')}"\
         "#{sdir_return_pwd}#{sfancy('.')}"
    array.each { |cmd|
      opnn
      e "#{rev}In the directory #{sdir_return_pwd}#{rev}, doing "\
        "the following command next:"
      e
      e "  #{slateblue(cmd)}"
      e
      e "#{rev}next."
      # run_this_system_command_in_a_coloured_and_padded_manner(cmd)
      colourized_and_padded_esystem(cmd)
    }
  end
end

#run_python_install1(this_file = RBT.file_predefined_installation_instructions) ⇒ Object

#

run_python_install1

#


1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1194

def run_python_install1(
    this_file = RBT.file_predefined_installation_instructions
  )
  dataset = YAML.load_file(this_file)['PINSTALL1']
  if dataset.is_a?(String) and dataset.include?(';')
    dataset.split(';').each {|this_command|
      _ = this_command.strip
      e _
      run_this_sys_command(_)
    }
  end
end

#run_python_install2(this_file = RBT.file_predefined_installation_instructions) ⇒ Object

#

run_python_install2

#


1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1037

def run_python_install2(
    this_file = RBT.file_predefined_installation_instructions
  )
  dataset = YAML.load_file(this_file)['PINSTALL2']
  if dataset.is_a?(String) and dataset.include?(';')
    dataset.split(';').each {|this_command|
      _ = this_command.strip
      e _
      run_this_sys_command(_)
    }
  end
end

#run_python_installation(i = 'setup.py') ⇒ Object Also known as: run_python_install, run_the_python_steps

#

run_python_installation

You should check whether setup.py exists prior to invoking this method here.

You can also pass in another file, such as configure.py. By default, the method will make use of a file called “setup.py”, though.

#


858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 858

def run_python_installation(
    i = 'setup.py'
  )
  if parameters_to_make?.nil?
    _ = cookbook_dataset_make_options?
    if _ and !_.empty?
      i = _
    end
  end
  i = [i].flatten.compact
  # ======================================================================== #
  # We work on an Array here since some make_options entries also
  # specify an Array.
  # ======================================================================== #
  i.each {|do_this_action|
    case do_this_action
    when FILE_SETUP_PY # ← This is equivalent to "setup.py".
      # We could also use RBT::FILE_SETUP_PY.
      if does_a_python_binary_exist?
        colourized_and_padded_esystem "python #{do_this_action} configure"
        colourized_and_padded_esystem "python #{do_this_action} build"
        colourized_and_padded_esystem "python #{do_this_action} install"
      else
        notify_the_user_that_no_binary_python_could_be_found
      end
    else
      run_this_command = "#{do_this_action}".dup
      if run_this_command.start_with?('python') and !run_this_command.include?('/')
        # ==================================================================== #
        # This is valid for a command line such as:
        #   "python setup.py config"
        # ==================================================================== #
        splitted = run_this_command.split(' ')
        splitted[1].prepend(configure_base_dir?.dup)
        run_this_command = splitted.join(' ')
      end
      unless run_this_command.start_with? 'python'
        run_this_command.prepend('python ')
      end
      if does_a_python_binary_exist?
        colourized_and_padded_esystem run_this_command
      else
        notify_the_user_that_no_binary_python_could_be_found
      end
    end
  }
  consider_changing_the_tab_title(
    :clear, :do_rename
  )
end

#run_sconsObject Also known as: run_scons_based_installation

#

run_scons

Invoke this method here only when we wish to use scons in order to install a program.

Scons is python-related, which is why it sits here in this file.

#


918
919
920
921
922
923
924
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 918

def run_scons
  _ = 'scons'.dup
  if use_build_directory?
    _.prepend('../')
  end
  coloured_and_padded_esystem _
end

#run_the_equivalent_configure_like_stage_for_this_program(i = compile_which_program? ) ⇒ Object Also known as: run_configure_like_stage, find_the_corresponding_install_method_and_proceed_from_there

#

run_the_equivalent_configure_like_stage_for_this_program

#


418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 418

def run_the_equivalent_configure_like_stage_for_this_program(
    i = compile_which_program?
  )
  orev "The #{lightgreen('configure-like stage')}"\
       "#{rev} for #{steelblue(i)}#{rev} will be invoked."
  # ======================================================================== #
  # Next register that we are compiling a program. This should come
  # before we consider building the program statically.
  # ======================================================================== #
  register_that_this_program_is_currently_being_compiled
  # ======================================================================== #
  # We must next determine which configure command is to be used:
  # ======================================================================== #
  configure_command_to_use = configure_command_to_use?
  # ======================================================================== #
  # Here we have to do a decision: either we make use of the
  # use_this_build_system specified value, or we have to infer the
  # build system. Either way we begin this by quering the
  # use_this_build_system value.
  # ======================================================================== #
  use_this_build_system = use_which_build_system? # This will always be a Symbol.
  case use_this_build_system
  # ======================================================================== #
  # === :configure
  # ======================================================================== #
  when :configure
    do_run_GNU_configure_then_make_then_make_install
  # ======================================================================== #
  # === :configure_requiring_autoconf_step
  # ======================================================================== #
  when :configure_requiring_autoconf_step
    do_invoke_autoconf
    run_the_gnu_configure_steps
  # ======================================================================== #
  # === waf
  # ======================================================================== #
  when :waf
    run_waf_based_installation
  # ======================================================================== #
  # === :cmake
  # ======================================================================== #
  when :cmake
    run_the_cmake_steps
  # ======================================================================== #
  # === :ruby
  # ======================================================================== #
  when :ruby
    colourized_and_padded_esystem 'ruby setup.rb'
  # ======================================================================== #
  # === :perl
  #
  # Invocation example:
  #
  #   ry archivezip
  #
  # ======================================================================== #
  when :perl
    run_the_perl_steps
  # ======================================================================== #
  # === :meson
  # ======================================================================== #
  when :meson
    # ====================================================================== #
    # Since as of 02.10.2018, we try to use ninja here automatically,
    # if the cookbook_dataset has a dependency on ninja.
    # ====================================================================== #
    if dependencies?.include? 'ninja'
      set_use_this_make_command('ninja')
    end
    run_the_meson_steps
  # ======================================================================== #
  # === :Python
  # ======================================================================== #
  when :Python, :python # Can be capitalized or not.
    run_python_installation
  # ======================================================================== #
  # === :Makefile
  # ======================================================================== #
  when :Makefile
    run_make
    run_make_install
  # ======================================================================== #
  # === :scons
  # ======================================================================== #
  when :scons
    run_scons
  # ======================================================================== #
  # === :infer_automatically
  # ======================================================================== #
  when :infer_automatically
    configure_command_to_use = configure_command_to_use?
    # ====================================================================== #
    # === This entry tries to handle programs such as "duktape", which
    #     come with plenty of different "Makefile.*" files, but no
    #     configure script. This functionality was added on February 2023.
    # ====================================================================== #
    if (result = Dir['Makefile.*'].size) > 1
      orev 'Assuming a Makefile-based program, thus invoking the'
      orev "command stored in #{steelblue('use_this_make_command:')}"\
           "#{rev} next"
      e
      colourized_and_padded_esystem(use_this_make_command?)
      e
    # ====================================================================== #
    # === Handle GNU configure here
    # ====================================================================== #
    elsif File.exist?('configure')
      do_run_GNU_configure_then_make_then_make_install
    # ====================================================================== #
    # === Direct support for a configure command
    # ====================================================================== #
    elsif configure_command_to_use and !configure_command_to_use.empty?
      padded_esystem(configure_command_to_use)
    # ====================================================================== #
    # === else handle any other case, as ... well, unhandled.
    # ====================================================================== #
    else
      orev tomato('Unsure what to do with :infer_automatically.')
      orev tomato('Exiting now, as this case must be handled via code.')
      exit_program
    end
  else
    orev tomato('Not registered build-system type: ')+
         steelblue(use_this_build_system.to_sym)
    orev 'No way to proceed, thus stopping now.'
    return
  end
  # ======================================================================== #
  # Next, consider performing postinstallation steps:
  # ======================================================================== #
  # if ignore_errors_anyway? or successfully_compiled?
  do_handle_the_post_installation_steps # ← Postinstallation step
  # end
  # ======================================================================== #
  # Next, compare the installed libraries versus the assumed
  # libraries. This can then be used to updated the dataset.
  # ======================================================================== #
end

#run_the_meson_stepsObject Also known as: do_install_via_meson

#

run_the_meson_steps

#


837
838
839
840
841
842
843
844
845
846
847
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 837

def run_the_meson_steps
  run_meson_configure_step
  # ======================================================================== #
  # Before we can run "ninja" we must cd into the build directory,
  # if one is to be used.
  # ======================================================================== #
  # if use_build_directory?
  #   cd_to_the_build_directory { :be_verbose }
  # end
  do_run_ninja_and_then_ninja_install
end

#run_the_perl_stepsObject

#

run_the_perl_steps (perl tag)

#


8540
8541
8542
8543
8544
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8540

def run_the_perl_steps
  coloured_and_padded_esystem 'perl Makefile.PL'
  run_make
  run_make_install
end

#run_the_strip_command_on_this_input(i = :pwd) ⇒ Object

#

run_the_strip_command_on_this_input

#


218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 218

def run_the_strip_command_on_this_input(
    i = :pwd
  )
  case i
  when :pwd
    i = Dir['*']
  end
  [i].flatten.compact.each {|this_file|
    strip_command = 'strip '+this_file.lstrip
    esystem strip_command
  }
end

#run_this_system_command_in_a_coloured_and_padded_manner(i) ⇒ Object Also known as: padded_esystem

#

run_this_system_command_in_a_coloured_and_padded_manner

#


2415
2416
2417
2418
2419
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 2415

def run_this_system_command_in_a_coloured_and_padded_manner(i)
e tomato('TODO FIX ME: in run_this_system_command_in_a_coloured_and_padded_manner()')
e tomato('We should replace this via run_system_or_ioparser_command()') # === run_this_system_command_in_a_coloured_and_padded_manner
  esystem i
end

#run_through_the_erroneous_libtool_entries(i = erroneous_libtool_entries? ) ⇒ Object

#

run_through_the_erroneous_libtool_entries

The first argument should be an Array; or an object that is able to respond to :each.

#


1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1751

def run_through_the_erroneous_libtool_entries(
    i = erroneous_libtool_entries?
  ) 
  i.each {|do_this_action|
    if is_on_roebe? and autofix?
      # =================================================================== #
      # Register this erroneous line for now - the fixing part will
      # happen at a later time. Only on roebe-systems for now, though.
      # =================================================================== #
      try_to_autocorrect_this_erroneous_libtool_entry_later(do_this_action)
    end
  }
end

#run_traditional_GNU_configure(use_this_configure_command = use_this_configure_command? ) ⇒ Object Also known as: run_configure, run_configure_via_system

#

run_traditional_GNU_configure

This method will ultimately run the “./configure” command, with an appropriate prefix to be used.

#


53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 53

def run_traditional_GNU_configure(
    use_this_configure_command = use_this_configure_command?
  )
  _ = ''.dup
  # ======================================================================== #
  # First check whether we really want to run the configure script:
  # ======================================================================== #
  return unless run_configure_script?
  if use_this_configure_command.nil?
    # ====================================================================== #
    # Add the configure-command that is to be used next, if this is
    # specified in the cookbook .yml file at hand. For example,
    # 'bc' requires the command './configure.sh' rather than
    # 'configure'. 
    # ====================================================================== #
    use_this_configure_command = cookbook_dataset_configure_command_to_use?
  end
  case use_this_configure_command
  when /^configure/
    # ====================================================================== #
    # The next line exists due to programs such as discount.yml needing
    # a configure-command like: ./configure.sh
    # It may no longer be necessary as of March 2024.
    # ====================================================================== #
    # _ << '.'
    _.prepend('./')
  end
  # ======================================================================== #
  # Append the configure-base-directory value next. However had, I am
  # not sure whether this is correct in April 2021. We'll comment it
  # out for now; once we know more, we may re-add this again.
  # ======================================================================== #
  # _ << configure_base_directory?.dup
  _ << "#{use_this_configure_command}"
  # ======================================================================== #
  # The following _.include? check is valid for e. g. applications
  # such as "lsof".
  # ======================================================================== #
  if do_we_use_any_prefix?
    use_this_prefix = prefix?.to_s
    RBT.set_last_prefix_used(use_this_prefix)
    _ << " --prefix=#{use_this_prefix}".dup unless _.include? './Configure -n linux'
  end
  # ======================================================================== #
  # === Obtain the configure-options next
  #
  # The following two checks, wrapped in one if-clause, are necessary,
  # due to the following two reasons:
  #
  #   - The user may not want to append any configure-options in
  #     the first place. Hence, we must check for this via
  #     the method use_configure_options?.
  #
  #   - Second, the user may also input a command such as "ry sed-4.5",
  #     and in this case we have to work on an existing file, rather
  #     than on the dataset in the cookbook-yaml file.
  #
  # ======================================================================== #
  if use_configure_options? and cookbook_dataset?
    configure_options = configure_options?
    if configure_options and !configure_options.empty?
      # ==================================================================== #
      # Finally, append these additional commands to the
      # configure-string:
      # ==================================================================== #
      _ << " #{configure_options}"
    end
  end
  if use_build_directory?
    # create_the_build_directory_then_cd_into_it { :be_verbose }
    _.prepend('.')
  end
  # ======================================================================== #
  # === Honour ccache
  #
  # Honour the CCACHE setting, if it has been provided. This must come
  # after we did the _.prepend('.') call.
  # ======================================================================== #
  if use_ccache?
    # ====================================================================== #
    # Find out whether ccache is available or whether it is not. If it
    # is we will use it, while also specifying which compiler to use.
    # ====================================================================== #
    if ccache_is_available?
      if will_gcc_be_used_for_compilation?
        _.prepend 'CC="ccache gcc" ' # In this case prepend it.
      end
    else # It must be available.
      notify_the_user_that_ccache_is_not_available
    end
  end
  # ======================================================================== #
  # === Handle the ERROR_LINE next
  #
  # Next, we will append the ERROR_LINE, but only if the user has
  # not overruled this on the commandline.
  # ======================================================================== #
  if append_shell_error_code? and !_.include?(ERROR_LINE)
    _ << " #{ERROR_LINE}"
  end
  # ======================================================================== #
  # The next line is used to turn something like:
  #
  #   "/Depot/Temp/rbt/discount-2.2.3a/./configure.sh"
  #
  # into:
  #
  #   "/Depot/Temp/rbt/discount-2.2.3a/configure.sh"
  #
  # ======================================================================== #
  if _.include?('/./')
    _.sub!(/\/\.\//, '/')
  end
  _ << " #{return_append_this_to_the_configure_options}"
  _.strip! # Just ensure that there are no trailing ' ' characters.
  # ======================================================================== #
  # === Handle strange configuration options involving sysconfdir next
  #
  # This must come after we have appended the configure options in use.
  # ======================================================================== #
  if use_appdir_prefix? and _.include?('--sysconfdir=/etc')
    regexp_quoted_old_sysconfdir_prefix = Regexp.quote('--sysconfdir=/etc')
    rewritten_sysconfdir = '--sysconfdir='+rds(use_which_prefix?.to_s+'/etc')
    orev 'An '+salmon('AppDir prefix')+rev+' is used, but also "'+
         royalblue('--sysconfdir=/etc')+rev+'". This is not logical.'
    orev 'It is now assumed that the --sysconfdir=/etc is meant to target'
    orev "that #{salmon('AppDir prefix')}#{rev}, so it will be rewritten to"
    orev "`#{royalblue(rewritten_sysconfdir)}#{rev}`."
    _.sub!(/#{regexp_quoted_old_sysconfdir_prefix}/, rewritten_sysconfdir)
  end
  set_full_configure_command(_.dup.squeeze(' ')) # ← Keep a reference-copy too.
  colourized_and_padded_esystem(_)
  # reset_error_map_line_to_a_specific_error # ← Must come before the sys-command.
  # run_this_system_command_in_a_coloured_and_padded_manner(full_configure_command?) { :also_pad_via_cliner }
  # run_through_the_registered_problems_registered_errors_and_behaviour_changes
  # reset_error_map_line_to_a_specific_error
end

#run_wafObject Also known as: run_waf_based_installation

#

run_waf (waf tag)

This method can be used to install a project that uses “waf” as its build system.

#


8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8077

def run_waf
  run_pre_make_commands
  _ = './waf'.dup
  if use_build_directory?
    _.prepend(configure_base_directory?)
  end
  opnn; report_working_directory
  # ======================================================================= #
  # Specify which subcommands to use, e. g. 'waf configure' followed by
  # 'waf build' and so forth.
  # ======================================================================= #
  run_these_subcommands = %w(
    configure
    build
    install
  )
  run_these_subcommands.each {|this_subcommand|
    _ = "#{_} #{this_subcommand}"
    run_this_system_command_in_a_coloured_and_padded_manner(_)
  }
end

#save_into_compiled_programs(store_into = FILE_COMPILED_PROGRAMS) ⇒ Object

#

save_into_compiled_programs

This method will try to save a lot of useful data into a file called “compiled_programs.yml”.

That way we can try to figure out what happened at any moment in time (hopefully).

The variable full_configure_command will store the full configure command, whereas configure_options only shows the part afterwards, such as which parts to enable or disable and so forth.

This should also store ARCH info and such.

#


9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9495

def save_into_compiled_programs(
    store_into = FILE_COMPILED_PROGRAMS
  )
  what  = ''.dup # Need a non-frozen String.
  what << '# --- '+program_name?+N
  what << program_name?+':'+N
  what << ' CFLAGS: '+cflags?.to_s+N
  what << ' compiled_at: '+today?.to_s+', '+current_hour?+N
  what << ' prefix: '+real_prefix?.to_s+N
  what << ' full_configure_command: '+
          full_configure_command?.to_s+N
  what << ' configure_options: '+configure_options?.to_s+N
  what << ' successfully_compiled: true/false'+N # This line here is obviously a stub.
  what << N # Extra newline - makes reading this file easier.
  append_what_into(what, store_into)
end

#scan_source_archive(shall_we_exit = true) ⇒ Object

#

scan_source_archive

Scan the complete source archive.

Invocation example:

ry --scan_source_archive
#


5638
5639
5640
5641
5642
5643
5644
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5638

def scan_source_archive(
    shall_we_exit = true
  )
  opne 'Scanning for source Archives now.'
  action(:ScanSourceArchive)
  exit_program if shall_we_exit
end

#scons_file_exists?Boolean Also known as: scons_file?

#

scons_file_exists?

#

Returns:

  • (Boolean)


676
677
678
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 676

def scons_file_exists?
  File.exist? 'SConstruct'
end

#search_for_tag(this_tag, shall_we_exit = true) ⇒ Object

#

search_for_tag (search tag)

Use this to search for a tag.

Usage examples:

ry htop --tags pdf
ry htop --tags term
#


198
199
200
201
202
203
204
205
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 198

def search_for_tag(
    this_tag,
    shall_we_exit = true
  )
  results = action(:SearchForTags, this_tag)
  exit_program if shall_we_exit
  return results
end

#sed?Boolean

#

sed?

Query as to whether we will use sed or not.

#

Returns:

  • (Boolean)


802
803
804
805
806
807
808
809
810
811
812
813
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 802

def sed?
  _ = cookbook_dataset?.sed?
  if @internal_hash[:sed].nil?
    # ===================================================================== #
    # In this case we will use the sed-variant given by the cookbooks
    # dataset.
    # ===================================================================== #
  else
    _ = @internal_hash[:sed]
  end
  return _
end

#sed_binary_is_available?Boolean

#

sed_binary_is_available?

Determine whether the host-system has the “sed” binary available or whether it has not.

#

Returns:

  • (Boolean)


619
620
621
622
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 619

def sed_binary_is_available?
  result = `sed #{SHELL_ERROR_CODE}`
  result.include? 'Usage:'
end

#set_archive_type(i) ⇒ Object

#

set_archive_type

#


8844
8845
8846
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8844

def set_archive_type(i)
  cookbook_dataset?.set_archive_type(i)
end

#set_base_dir(i) ⇒ Object

#

set_base_dir

#


547
548
549
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 547

def set_base_dir(i)
  cookbook_dataset?.set_base_dir = i
end

#set_can_we_continue(i = false) ⇒ Object

#

set_can_we_continue

#


1211
1212
1213
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1211

def set_can_we_continue(i = false)
  @internal_hash[:can_we_continue] = i
end

#set_cflags(i = default_cflags?, , &block) ⇒ Object

#

set_cflags (cflags tag)

This method will enable you to set i.e. new cflags. This then also allows you to compile some programs in a different manner, such as if you wish to compile that particular program statically.

The default argument to this method will be a copy of ENV.

You can overrule this via a shortcut, if you want to, by passing true as argument, or even better, a Symol such as :static. This will then allow you to perform the static build, if the program at hand allows for this.

-static-libgcc may also be an option here.

The variable LDFLAGS may be important as well.

For instance:

make LDFLAGS=-all-static
#


318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 318

def set_cflags(
    i = default_cflags?,
    &block
  )
  case i # case tag
  # ======================================================================= #
  # === :clear
  # ======================================================================= #
  when :clear
    i = ''
  # ======================================================================= #
  # Enable static builds for the CFLAGS at hand
  # ======================================================================= #
  when :overrule_static_build,
       :static,
       :build_static,
       true
    i = "#{old_cflags?} -static -g"
  end
  # ======================================================================= #
  # Do the actual assignment next.
  # ======================================================================= #
  set_this_env_variable(
    "CFLAGS: #{i}",
    :do_set_these_variables,
    &block
  )
end

#set_compile_these_programs(i) ⇒ Object

#

set_compile_these_programs

This variant will always be an Array.

#


1644
1645
1646
1647
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1644

def set_compile_these_programs(i)
  @internal_hash[:compile_these_programs] << [i].flatten.compact
  @internal_hash[:compile_these_programs].flatten!
end

#set_compile_these_programs_then_batch_compile_them(i, consider_replacing_the_input = :default) ⇒ Object

#

set_compile_these_programs_then_batch_compile_them

This method can be used to start batch-compiling several programs in one go.

#


1632
1633
1634
1635
1636
1637
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1632

def set_compile_these_programs_then_batch_compile_them(
    i, consider_replacing_the_input = :default
  )
  set_compile_these_programs(i, consider_replacing_the_input) 
  batch_compile_these_programs(i)
end

#set_compile_this_program(i = nil) ⇒ Object Also known as: set_install_this_program

#

set_compile_this_program

#


671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 671

def set_compile_this_program(
    i = nil
  )
  if i
    # ====================================================================== #
    # === Handle *
    #
    # First we will handle the '*' substring, in any given argument.
    #
    # We will show to the user what programs exist that start with
    # this name.
    #
    # To trigger this method, do:
    #
    #   ry a*
    #   ry e*
    #
    # ====================================================================== #
    if i.respond_to?(:include?) and
       i.include?('*')
      verbose_find_all_keys_starting_with(i)
      exit_program
    end
    # ====================================================================== #
    # We need to sanitize the given input a little bit next:
    # ====================================================================== #
    i = i.to_s.delete_suffix(
          File.extname(i)
        ).delete('-').
        downcase
    if i.end_with?(':')
      i = i.dup if i.frozen?
      i.chop!
    end
    i = i.to_sym
    # ====================================================================== #
    # === Check whether the given input is a registered program
    # ====================================================================== #
    if is_this_program_part_of_the_RBT_project?(i.to_s)
    # ====================================================================== #
    # === else we may have found an alias name
    # ====================================================================== #
    elsif make_use_of_the_cookbook_aliases? and
          cookbook_aliases?.include?(i.to_s)
      new_name = RBT.find_cookbook_alias_for(i)
      orev "An alias was found for the given input "+
           "#{steelblue(i)}#{rev}."
      orev "This alias will next be used, via the derived "\
           "name being #{steelblue(new_name)}#{rev}."
      i = new_name
    # ====================================================================== #
    # === else if we can map an input to a registered program
    # ====================================================================== #
    elsif (new_name = action(:map_this_input_to_that_registered_program, i)) and
          (i != new_name) and
           !new_name.nil?
      orev "#{steelblue(i)}#{rev} was not found, but another match was found"
      orev "called #{steelblue(new_name)}#{rev}, which is now used."
      i = new_name
    # ====================================================================== #
    # === else we have found nothing, so report to the user
    # ====================================================================== #
    else
      possible_new_name = action(:filter_for_valid_program_names, i).to_sym
      unless (possible_new_name == i)
        orev 'A new, filter-aliased name was found for '+steelblue(i)+rev+','
        orev 'which will be used. The new name is: '+
        steelblue(possible_new_name)
        i = possible_new_name
      end
      # ==================================================================== #
      # Note that the next clause will return and thus break from this
      # method. Subsequent method calls will not be triggered.
      # ==================================================================== #
      if do_we_check_whether_the_program_exists? and
        !is_this_program_included?(i, :be_quiet)
        notify_the_user_that_this_program_is_NOT_registered_as_part_of_the_RBT_project(i)
        i = nil
        return :the_program_is_not_registered_in_the_rbt_project
      end unless i.to_s.include?('@')
    end
    @internal_hash[:compile_this_program] = i
  end
end

#set_configure_base_directory(i = :default) ⇒ Object Also known as: set_configure_base_dir

#

set_configure_base_directory

This setter-method sets the @internal_hash, which is, for example, a directory such as:

/Depot/Temp/htop-1.0.0/

Some projects, such as “xvid” / “xvidcore”, may require a specific subdirectory, though.

Another example may be the program called “nspr”, which requires the following configure base directory:

/Depot/Temp/nspr-4.10.8/nspr/

class RBT::Action::SoftwareManager will store this in a separate variable so that it can be queried lateron.

Do note that the cookbook-dataset will also retain the original configure_base_directory.

#


612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 612

def set_configure_base_directory(
    i = :default
  )
  case i
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default
    i = rds(
          "#{extract_to?.to_s}"\
          "#{program_name_and_version?.to_s}/"\
          "#{cookbook_dataset_configure_base_directory?.to_s}"
        )
  end
  i = i.to_s.dup
  i = rds(i) # rds() is used here since as of Feb 2012.
  i << '/' unless i.end_with? '/' # It must always have a trailing '/'.
  i = i.to_s.dup
  @internal_hash[:configure_base_directory] = i # ← Finally, assign it.
end

#set_configure_options(i = '') ⇒ Object

#

set_configure_options

This will directly modify the cookbook-dataset.

#


638
639
640
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 638

def set_configure_options(i = '')
  cookbook_dataset?.configure_options = i
end

#set_configure_options_on_internal_hash(i) ⇒ Object

#

set_configure_options_on_internal_hash

#


828
829
830
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 828

def set_configure_options_on_internal_hash(i)
  @internal_hash[:configure_options] = i
end

#set_cookbook_dataset_program(i) ⇒ Object

#

set_cookbook_dataset_program

#


662
663
664
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 662

def set_cookbook_dataset_program(i)
  cookbook_dataset?.set_program(i)
end

#set_cookbook_dataset_program_path(i) ⇒ Object

#

set_cookbook_dataset_program_path

#


821
822
823
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 821

def set_cookbook_dataset_program_path(i)
  cookbook_dataset?.set_program_path(i)
end

#set_cookbook_dataset_program_version(i) ⇒ Object Also known as: set_cookbook_program_version

#

set_cookbook_dataset_program_version

For this method to work, cookbook_dataset? must have been instantiated before.

#


505
506
507
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 505

def set_cookbook_dataset_program_version(i)
  cookbook_dataset?.set_program_version(i)
end

#set_cookbook_program_name(i) ⇒ Object

#

set_cookbook_program_name

#


359
360
361
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 359

def set_cookbook_program_name(i)
  cookbook_dataset?.set_program_name(i)
end

#set_delay_before_continuing(n_seconds) ⇒ Object

#

set_delay_before_continuing (sleep tag)

Ensure that the argument passed to us is correct.

#


732
733
734
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 732

def set_delay_before_continuing(n_seconds)
  sleep(n_seconds.to_i)
end

#set_description(i) ⇒ Object Also known as: set_desc

#

set_description

#


9336
9337
9338
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9336

def set_description(i)
  cookbook_dataset?.set_description(i)
end
#

Do not symlink after “make install” stage. This prevents the symlinking-step from e. g. /Programs/Htop/1.2.0/ into the /Systemd/Index/ hierarchy.

#


865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 865

def set_do_not_symlink(
    be_verbose = true
  )
  if block_given?
    yielded = yield
    case yielded
    when :be_verbose
      be_verbose = true
    end
  end
  case be_verbose
  # ======================================================================= #
  # === :be_verbose
  # ======================================================================= #
  when :be_verbose
    be_verbose = true
  # ======================================================================= #
  # === :be_quiet
  # ======================================================================= #
  when :be_quiet
    be_verbose = false
  end
  if be_verbose
    orev 'We will not symlink after compilation has finished.'
  end
  @internal_hash[:do_not_symlink] = true
end

#set_dont_keep_archive(be_verbose = true) ⇒ Object

#

set_dont_keep_archive

Use this method when you don’t want to keep the extracted archive.

#


898
899
900
901
902
903
904
905
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 898

def set_dont_keep_archive(
    be_verbose = true
  )
  if be_verbose
    orev 'We will not keep our extracted archive.'
  end
  @internal_hash[:keep_the_extracted_archive] = false
end

#set_env_variables?Boolean Also known as: set_env?

#

set_env_variables?

Determine whether we have to set any environment variable or not.

#

Returns:

  • (Boolean)


374
375
376
377
378
379
380
381
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 374

def set_env_variables?
  _ = cookbook_dataset?
  if _ and _.respond_to?(:set_env_variables?)
    _.set_env_variables?
  else
    false
  end
end

#set_extract_to_this_directory(i = RBT.log_directory?, be_verbose = false) ⇒ Object Also known as: set_extract_to, extract_to, set_homedir

#

set_extract_to_this_directory

This method can be used to keep track onto which directory archives will be extracted.

Within RBT, the target is also known as the “homedir” variable.

#


378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 378

def set_extract_to_this_directory(
    i          = RBT.log_directory?,
    be_verbose = false
  )
  case be_verbose
  when :be_verbose
    be_verbose = true
  end
  i = i.to_s
  case i
  # ======================================================================= #
  # === pwd
  # ======================================================================= #
  when 'pwd','homedir'
    i = rds(return_pwd+'/')
  end unless File.exist? i
  unless i.end_with? '/'
    i = i.dup if i.frozen?
    i << '/'
  end
  # ======================================================================= #
  # Display some information to the user, if we operate in a verbose manner.
  # ======================================================================= #
  if be_verbose
    orev 'We will use '+sdir(i)+' as our directory into which '\
         'we will extract the source archive into.'
  end
  @internal_hash[:extract_to_this_directory] = i.dup
end

#set_extract_to_this_directory_as_specified_by_the_user(i = :random) ⇒ Object

#

set_extract_to_this_directory_as_specified_by_the_user

This method can be used by the user to specify a certain directory.

#


422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 422

def set_extract_to_this_directory_as_specified_by_the_user(
    i = :random
  )
  case i
  when :random
    # ===================================================================== #
    # In this case we will use a random subdirectory, but within the
    # temp directory still.
    # ===================================================================== #
    i = rbt_temp_dir?+return_n_random_characters(10)
  end
  unless i.end_with? '/'
    i = i.dup if i.frozen?
    i << '/'
  end
  @internal_hash[:extract_to_this_directory_as_specified_by_the_user] = i
end

#set_extracted_base_directory(i) ⇒ Object

#

set_extracted_base_directory

#


127
128
129
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 127

def set_extracted_base_directory(i)
  @internal_hash[:extracted_base_directory] = i
end

#set_full_configure_command(i) ⇒ Object

#

set_full_configure_command

#


746
747
748
749
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 746

def set_full_configure_command(i)
  i.strip! # ← This is mandatory; may be reconsidered in the future though.
  @internal_hash[:full_configure_command] = i
end

#set_internal_hash_configure_options(i) ⇒ Object

#

set_internal_hash_configure_options

#


919
920
921
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 919

def set_internal_hash_configure_options(i)
  @internal_hash[:configure_options] = i
end

#set_internal_pid(i = nil) ⇒ Object Also known as: set_pid

#

set_internal_pid

#


8471
8472
8473
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8471

def set_internal_pid(i = nil)
  @internal_hash[:pid] = i
end

#set_is_an_abbreviation(i = true) ⇒ Object

##

set_is_an_abbreviation

#


9738
9739
9740
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9738

def set_is_an_abbreviation(i = true)
  @internal_hash[:is_an_abbreviation] = i
end

#set_keep_the_extracted_archive(i = true) ⇒ Object Also known as: set_keep_extracted_archive, set_keep_extracted, do_not_remove_the_extracted_archive, do_not_remove_extracted_archive

#

set_keep_the_extracted_archive

This method will keep the source-archive extracted. Note that this is not the default - by default we will remove the extracted archive.

#


447
448
449
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 447

def set_keep_the_extracted_archive(i = true)
  @internal_hash[:keep_the_extracted_archive] = i
end

#set_license(i) ⇒ Object

#

set_license

#


533
534
535
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 533

def set_license(i)
  cookbook_dataset?.set_license(i)
end

#set_make_command(i = 'make') ⇒ Object

#

set_make_command

This method can be used to set which make command is to be used.

#


928
929
930
931
932
933
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 928

def set_make_command(
    i = 'make'
  )
  i = 'make' if i.nil? # Set to the default in this case.
  @internal_hash[:make_command] = i
end

#set_name_for_the_build_directory(i = :use_the_default_name, be_verbose = false) ⇒ Object Also known as: use_this_build_directory=, use_this_build_directory, set_use_this_build_directory

#

set_name_for_the_build_directory

#


693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 693

def set_name_for_the_build_directory(
    i          = :use_the_default_name,
    be_verbose = false
  )
  case i
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default,
       :use_the_default_name
    i = DEFAULT_NAME_FOR_THE_BUILD_DIRECTORY
  end
  case be_verbose
  # ======================================================================= #
  # === :report_back
  # ======================================================================= #
  when :report_back
    be_verbose = true
  end
  if be_verbose
   orev "The name of the build directory will be `#{royalblue(i)}#{rev}`."
  end
  @internal_hash[:name_for_the_build_directory] = i
end

#set_on_ihash(which_key_to_use = :cookbook_dataset, which_dataset_value_to_use) ⇒ Object Also known as: set_cookbook, set_cookbook_dataset

#

set_on_ihash

The second argument is the dataset that you wish to use.

#


1220
1221
1222
1223
1224
1225
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1220

def set_on_ihash(
    which_key_to_use = :cookbook_dataset,
    which_dataset_value_to_use
  )
  @internal_hash[which_key_to_use] = which_dataset_value_to_use
end

#set_parameters_to_make(i) ⇒ Object Also known as: set_make_options

#

set_parameters_to_make

If we have to pass specials options to the program called “make”, then we can do so via this setter-method.

These are additional options that can be given to the program called “make”.

#


651
652
653
654
655
656
657
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 651

def set_parameters_to_make(i)
  # ======================================================================= #
  # The parameters must always be kept as an Array.
  # ======================================================================= #
  i = [i].flatten.compact
  @internal_hash[:parameters_to_make] = i # Do not change them to a String via .to_s
end

#set_path(i) ⇒ Object

#

set_path

Set the $PATH variable here through this setter-method. This will directly modify ENV[] as is.

#


515
516
517
518
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 515

def set_path(i)
  i = i.dup # Better to always .dup it when we set it.
  ENV['PATH'] = i # Must re-enable PATH environment as it was.
end

#set_permanently_extract_to(i = nil) ⇒ Object

#

set_permanently_extract_to

This method will permanently set a new directory to which we will extract to.

To invoke this method, do something such as:

ry --permanently_extract_to=/Depot
ry --permanently_extract_to=/opt
ry --permanently_extract_to=$TEMP_DIR
#


8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8615

def set_permanently_extract_to(
    i = nil
  )
  if i
    target = RBT.permanently_set_temp_directory(i)
    orev "The RBT scripts will henceforthwith be extracted "\
         "towards `#{sdir(target)}#{rev}`."
  else
    orev 'Please provide an argument.'
  end
end
#
#


767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 767

def set_pkgconfig_symlink(
    i = true
  )
  case i # Sanitize yes/no values.
  when 'yes','y'
    i = true
  when 'no','n'
    i = false
  end
  if block_given?
    case yielded
    # === :be_verbose
    when :be_verbose
      if i == true
        show_enable_pkgconfig_symlinking_message
      else
        orev "Disabling pkgconfig-symlinking of .pc files "\
             "into `#{sdir('/usr/lib/pkgconfig/')}#{rev}`."
      end
    end
  end
  if cookbook_dataset?
    cookbook_dataset?.symlink_pkgconfig_files = i
  else
    orev 'No cookbook-dataset object could be found.'
  end
end

#set_postinstallation(i) ⇒ Object Also known as: set_postinstall

#

set_postinstallation

Note that the postinstallation steps will always be stored as an Array.

#


526
527
528
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 526

def set_postinstallation(i)
  @internal_hash[:postinstallation] = [i].flatten.compact
end

#set_prefix_to_useObject

#

set_user_prefix (set_prefix tag, set prefix tag)

This method can be used by the user, to designate another prefix in use for the given program. This will be the target directory into which the program will be installed into.

A specialized class, called RBT::Prefix, will handle the prefix.

#

set_prefix_to_use



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 293

def set_user_prefix(
    i = :appdir_prefix
  )
  # ======================================================================= #
  # We must rewrite the program version in the following case.
  #
  # The input may look like this:
  #
  #  "/Programs/Gobjectintrospection/1.53.4/"
  #
  # ======================================================================= #
  if i and use_this_specific_program_version?
    if i.is_a?(String) and i.include?(programs_directory?)
      use_this_regex = /(\d{1,2}\.?\d{1,2}\.?\d{1,2}\/)$/ # See: http://rubular.com/r/PPb2Y96XfF
      i.sub!(use_this_regex, use_this_specific_program_version?)
      i << '/' unless i.end_with? '/'
    elsif i.is_a?(Symbol)
      i = use_this_specific_program_version?
    end
  end
  if i.is_a? Symbol
    # ===================================================================== #
    # Next, perform some sanitize operations.
    #
    # This clause will handle Symbols such as :app_dir_like or
    # :use_ntrad_prefix_at_a_later_time.
    # ===================================================================== #
    case i.to_s # case tag
    # ===================================================================== #
    # === ULOCAL
    #
    # This refers to the commonly used /usr/local/ directory.
    # ===================================================================== #
    when 'ULOCAL'
      i = '/usr/local/'
    # ===================================================================== #
    # === trad
    # ===================================================================== #
    when /^trad$/
      i = '/usr/'
    # ===================================================================== #
    # === --opt_prefix
    # ===================================================================== #
    when /^-?-?opt(_|-)?prefix$/,
         :opt
      i = '/opt/'
    # ===================================================================== #
    # === non_traditional
    #
    # This entry point has various aliases such as :ntrad.
    # ===================================================================== #
    when /^app(_|-)?dir$/,
         /^app(_|-)?dir(_|-)?like$/,
         /^use(_|-)?appdir(_|-)?prefix$/i,
         /^use(_|-)?ntrad(_|-)?prefix(_|-)?at(_|-)?a(_|-)?later(_|-)?time$/i,
         'non_traditional',
         'gobolinux',
         'ntrad',
         'default',
         'app_dir_like',
         'appdir',
         'return_appdir_path',
         'false',
         'f',
         'appdir_prefix',
         ''
      prefix?.clear_program # Clear it initially.
      prefix?.do_use_appdir_prefix
      if handle_which_program?
        i = return_non_traditional_prefix(handle_which_program?)
      end
      # =================================================================== #
      # Since as of May 2014 we get rid of all '-'
      # =================================================================== #
      i.delete!('-') if i.respond_to?(:include?) and i.include? '-'
    end
    # ===================================================================== #
    # === Convert environment variables, if given, and unfreeze frozen
    #     Strings
    # ===================================================================== #
    if i.is_a?(String)
      # =================================================================== #
      # Unfreeze frozen Strings.
      # =================================================================== #
      if i.is_a? String and i.frozen?
        i = i.dup # "unfreeze" it.
      end
      # =================================================================== #
      # === Handle Strings that start with the ':' character
      #
      # Handle the situation when we input a String that starts with
      # the character ':'. This will be assumed to be a shortcut to
      # an environment variable.
      # =================================================================== #
      if i.start_with?(':')
        # ================================================================== #
        # Next, we must add the proper program_version. This is either the
        # program_version at hand - or it is an ENV variable if it exists.
        # We check for the ENV variable first.
        # ================================================================== #
        this_key = (i.delete(':').upcase+'_PREFIX').dup
        if ENV.has_key? this_key
          # =============================================================== #
          # The environment variables must be UPCASED and have appended
          # the string '_PREFIX'.
          # =============================================================== #
          i = ENV[this_key].dup.to_s
        else
          # =============================================================== #
          # Assume a special prefix variant targetting the /Programs/
          # hierarchy.
          # =============================================================== #
          i = programs_directory?+i.to_s.delete(':').capitalize+'/'
          i << program_version?.dup.to_s
        end
      end
      if i.include?('$')
        i = convert_env_variable(i) # Replace ENV variables here.
        i << '/' unless i.end_with? '/'
      end
      if i.include? '--'
        if i.include? '--prefix=' # Input is assumed to be like '--prefix=/Depot/j'
          i = i.split('=').last # ← Obtain just the last part in this case.
        end
      end
    end
    # ===================================================================== #
    # === Ensure a trailing '/' for directories.
    # ===================================================================== #
    unless i.to_s.end_with? '/' # .to_s to protect against Symbols given.
      i << '/' if File.directory?(i.to_s)
    end
  end
  # ======================================================================= #
  # Next, we must check for post-install actions and modify these,
  # if they exist. We only do so if we have an AppDir-prefix.
  # ======================================================================= #
  if is_an_appdir_prefix?(i.to_s)
    consider_modifying_postinstall
  end
  prefix_object?.use_this_as_the_new_prefix = i
end

#set_preinstall_action(i) ⇒ Object

#

set_preinstall_action

This method can be used to set different pre-install actions.

#


807
808
809
810
811
812
813
814
815
816
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 807

def set_preinstall_action(i)
  if i.is_a? String # Strings will become an Array here.
    if    i.include? ','
      i = i.split(',').map(&:strip)
    elsif i.include? ';'
      i = i.split(';').map(&:strip)
    end
  end
  cookbook_dataset?.preinstall = i
end

#set_program_full_name(i = :default) ⇒ Object

#

set_program_full_name

#


739
740
741
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 739

def set_program_full_name(i = :default)
  cookbook_dataset?.set_program_full_name(i)
end

#set_program_name_and_program_version(i) ⇒ Object

#

set_program_name_and_program_version

This is simply a wrapper over the corresponding method in the cookbook-object.

#


460
461
462
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 460

def set_program_name_and_program_version(i)
  cookbook_dataset?.send(__method__, i)
end

#set_program_path(i) ⇒ Object

#

set_program_path

This will only modify a value on the @internal_hash.

#


671
672
673
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 671

def set_program_path(i)
  @internal_hash[:program_path] = i
end

#set_program_short_name(i) ⇒ Object

#

set_program_short_name

#


798
799
800
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 798

def set_program_short_name(i)
  cookbook_dataset?.set_program_short_name(i)
end

#set_program_version(i) ⇒ Object Also known as: set_use_this_version

#

set_program_version

Use this method to assign to a new program version at hand.

#


556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 556

def set_program_version(i)
  # ======================================================================= #
  # The program version is presently (December 2018) not allowed
  # to include a '/' character - possibly never allowed to have
  # this character. Thus, if we encounter such a character we
  # will apply File.basename() on this input.
  # ======================================================================= #
  if i.include? '/'
    i = File.basename(i).delete('/')
  end
  i.delete!('/') if i.include? '/'
  # ======================================================================= #
  # Keep track which specific program version we will use.
  # ======================================================================= #
  @internal_hash[:use_this_specific_program_version] = i
  # ======================================================================= #
  # The following code is semi-experimental - we will also sync onto
  # the cookbook dataset object if it exists. We do this primarily
  # so that class Flexbox can show the proper prefix in use.
  # ======================================================================= #
  if cookbook_dataset?
    cookbook_dataset?.set_program_version(i)
    if is_this_an_appdir_prefix? cookbook_dataset?.prefix?
      cookbook_dataset?.update_appdir_prefix
    end
    if use_appdir_prefix?
      # =================================================================== #
      # We know that we wish to use a special appdir prefix, so use it.
      # =================================================================== #
      set_user_prefix(return_appdir_prefix)
    end
  end
end

#set_really_compile_this_program(i = :qt) ⇒ Object

#

set_really_compile_this_program

#


134
135
136
137
138
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 134

def set_really_compile_this_program(i = :qt)
  set_compile_this_program(i)
  set_compile_these_programs(i) if compile_these_programs?.empty?
  initialize_cookbook_dataset
end

#set_short_desc(i) ⇒ Object

#

set_short_desc

#


540
541
542
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 540

def set_short_desc(i)
  cookbook_dataset?.set_short_desc(i)
end

#set_short_name(i) ⇒ Object Also known as: set_real_short_name

#

set_short_name

#


8928
8929
8930
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8928

def set_short_name(i)
  cookbook_dataset?.set_short_name(i)
end

#set_skip_extracting(be_verbose = true) ⇒ Object Also known as: do_not_extract

#

set_skip_extracting

Use this method when we shall skip the extracting phase.

#


680
681
682
683
684
685
686
687
688
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 680

def set_skip_extracting(
    be_verbose = true
  )
  if be_verbose
    orev 'We will not extract our source, thus we will skip '\
         'extracting the archive.'
  end
  @internal_hash[:skip_extracting] = true
end
#
#


468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 468

def set_symlink_program(
    compile_this_program     = compile_which_program?,
    use_this_program_version = program_version?
  )
  # ======================================================================= #
  # We will delegate towards class RBT::SymlinkFromToCurrent next.
  # ======================================================================= #
  _ = RBT::SymlinkFromToCurrent.new(
    [ # Pass an Array here.
      compile_this_program,
      use_this_program_version
    ],
    :do_not_run_yet
  ) {{ use_opn: use_opn? }}
  @internal_hash[:symlink_program] = _
end

#set_these_env_variables(hash_or_string, do_which_action = :report_only, be_verbose = true, &block) ⇒ Object Also known as: set_this_env_variable

#

set_these_env_variables

This method can be used to modify ENV variables.

The first input argument to this method should be the Hash, consisting of the key-value pairs in the form of key being the NAME of the shell variable that is to be modified; and the corresponding value being the new VALUE that you wish to set this variable to.

The third argument to this method determines whether we will output what we do to the user. By default this is true, but sometimes we may want to be able to quietly set these environment variables, such as when we attempt to use clang.

Legitimate usage examples for this method, in ruby, would be:

set_this_env_variable 'CFLAGS = -gcc'
set_this_env_variable 'LIBS: -lpthread'
#


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 36

def set_these_env_variables(
    hash_or_string, # We allow Hash and String as input. But String must be in a special format.
    do_which_action = :report_only,
    be_verbose      = true,
    &block
  )
  if block_given?
    yielded = yield
    if yielded.is_a? Symbol
      do_which_action = yielded
    end
  end
  unless @internal_hash[:do_not_use_special_flags]
    case do_which_action
    # ===================================================================== #
    # === :be_quiet
    # ===================================================================== #
    when :be_quiet,
         :be_silent
      be_verbose = false
      # =================================================================== #
      # Also change the do_which_action variable.
      # =================================================================== #
      do_which_action = :do_set_these_variables
    end
    case be_verbose
    # ===================================================================== #
    # === :be_verbose
    # ===================================================================== #
    when :be_verbose
      be_verbose = true
    # ===================================================================== #
    # === :be_quiet
    # ===================================================================== #
    when :be_quiet,
         :be_silent
      be_verbose = false
    end
    # ===================================================================== #
    # === Next, handle Strings
    # ===================================================================== #
    if hash_or_string.is_a? String
      if hash_or_string.include?('=') or
         hash_or_string.include?(':')
        if hash_or_string.include?('=')
          use_this_as_split_token = '='
        elsif hash_or_string.include?(':')
          use_this_as_split_token = ':'
        end
        splitted = hash_or_string.sub(/^export /,'').split(use_this_as_split_token)
        this_key   = splitted.first
        this_value = splitted.last
        hash_or_string = { this_key => this_value } 
      end
    end
    # ===================================================================== #
    # === Next, handle Hashes
    # ===================================================================== #
    hash_or_string.each_pair {|key, value|
      value.strip! if value.is_a? String
      # =================================================================== #
      # Make some exceptions, e. g. for gems.
      # =================================================================== #
      return if cookbook_dataset_has_been_initialized? and is_a_gem?
      if be_verbose and is_compiled? and !extract_only? and not value.to_s.empty?
        # ================================================================== #
        # Notify the user as to the env-value modification. Since as of
        # November 2018 we will no longer use opnn() here.
        # ================================================================== #
        e "  #{sfancy(key)} #{rev}will be set to the "\
          "value(s): #{lightblue(value.to_s)}#{rev}"
      end
      if value.is_a? FalseClass or
         value.is_a? TrueClass or
         value.is_a? Integer
        value = value.to_s
      end
      case do_which_action
      when :do_set_these_variables
        # ================================================================== #
        # Next set the value to the environment variable.
        # ================================================================== #
        ENV[key] = value
      end 
    }
  end
end

#set_url1(i) ⇒ Object Also known as: set_url

#

set_url1

#


488
489
490
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 488

def set_url1(i)
  cookbook_dataset?.set_url1(i)
end

#set_url2(i) ⇒ Object

#

set_url2

#


495
496
497
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 495

def set_url2(i)
  cookbook_dataset?.set_url2(i)
end

#set_use_these_configure_options(i) ⇒ Object Also known as: set_configure_options=

#

set_use_these_configure_options

#


910
911
912
913
914
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 910

def set_use_these_configure_options(i)
  i.tr!(N,' ') if i.include? N
  i.squeeze!(' ')
  @internal_hash[:configure_options] = i
end

#set_use_this_build_system(i) ⇒ Object

#

set_use_this_build_system

Consistently use this method when you modify the value at @internal_hash.

We need to ensure that it is a Symbol.

#


759
760
761
762
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 759

def set_use_this_build_system(i)
  i = i.to_sym unless i.is_a? Symbol
  @internal_hash[:use_this_build_system] = i
end

#set_use_this_configure_command(i) ⇒ Object

#

set_use_this_configure_command

#


835
836
837
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 835

def set_use_this_configure_command(i)
  @internal_hash[:configure_command_to_use] = i.to_s
end

#set_use_this_make_command(i = :default) ⇒ Object

#

set_use_this_make_command

This can be used to use another make command, such as “ninja”.

#


844
845
846
847
848
849
850
851
852
853
854
855
856
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 844

def set_use_this_make_command(
    i = :default
  )
  case i
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default
    i = :make
  end
  i = i.to_s # It must be a string.
  @internal_hash[:use_this_make_command] = i
end

#set_use_this_prefix(i) ⇒ Object Also known as: set_prefix

#

set_use_this_prefix

This variant will only modify the prefix stored by @prefix.

#


352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 352

def set_user_prefix(
    i = :appdir_prefix
  )
  # ======================================================================= #
  # We must rewrite the program version in the following case.
  #
  # The input may look like this:
  #
  #  "/Programs/Gobjectintrospection/1.53.4/"
  #
  # ======================================================================= #
  if i and use_this_specific_program_version?
    if i.is_a?(String) and i.include?(programs_directory?)
      use_this_regex = /(\d{1,2}\.?\d{1,2}\.?\d{1,2}\/)$/ # See: http://rubular.com/r/PPb2Y96XfF
      i.sub!(use_this_regex, use_this_specific_program_version?)
      i << '/' unless i.end_with? '/'
    elsif i.is_a?(Symbol)
      i = use_this_specific_program_version?
    end
  end
  if i.is_a? Symbol
    # ===================================================================== #
    # Next, perform some sanitize operations.
    #
    # This clause will handle Symbols such as :app_dir_like or
    # :use_ntrad_prefix_at_a_later_time.
    # ===================================================================== #
    case i.to_s # case tag
    # ===================================================================== #
    # === ULOCAL
    #
    # This refers to the commonly used /usr/local/ directory.
    # ===================================================================== #
    when 'ULOCAL'
      i = '/usr/local/'
    # ===================================================================== #
    # === trad
    # ===================================================================== #
    when /^trad$/
      i = '/usr/'
    # ===================================================================== #
    # === --opt_prefix
    # ===================================================================== #
    when /^-?-?opt(_|-)?prefix$/,
         :opt
      i = '/opt/'
    # ===================================================================== #
    # === non_traditional
    #
    # This entry point has various aliases such as :ntrad.
    # ===================================================================== #
    when /^app(_|-)?dir$/,
         /^app(_|-)?dir(_|-)?like$/,
         /^use(_|-)?appdir(_|-)?prefix$/i,
         /^use(_|-)?ntrad(_|-)?prefix(_|-)?at(_|-)?a(_|-)?later(_|-)?time$/i,
         'non_traditional',
         'gobolinux',
         'ntrad',
         'default',
         'app_dir_like',
         'appdir',
         'return_appdir_path',
         'false',
         'f',
         'appdir_prefix',
         ''
      prefix?.clear_program # Clear it initially.
      prefix?.do_use_appdir_prefix
      if handle_which_program?
        i = return_non_traditional_prefix(handle_which_program?)
      end
      # =================================================================== #
      # Since as of May 2014 we get rid of all '-'
      # =================================================================== #
      i.delete!('-') if i.respond_to?(:include?) and i.include? '-'
    end
    # ===================================================================== #
    # === Convert environment variables, if given, and unfreeze frozen
    #     Strings
    # ===================================================================== #
    if i.is_a?(String)
      # =================================================================== #
      # Unfreeze frozen Strings.
      # =================================================================== #
      if i.is_a? String and i.frozen?
        i = i.dup # "unfreeze" it.
      end
      # =================================================================== #
      # === Handle Strings that start with the ':' character
      #
      # Handle the situation when we input a String that starts with
      # the character ':'. This will be assumed to be a shortcut to
      # an environment variable.
      # =================================================================== #
      if i.start_with?(':')
        # ================================================================== #
        # Next, we must add the proper program_version. This is either the
        # program_version at hand - or it is an ENV variable if it exists.
        # We check for the ENV variable first.
        # ================================================================== #
        this_key = (i.delete(':').upcase+'_PREFIX').dup
        if ENV.has_key? this_key
          # =============================================================== #
          # The environment variables must be UPCASED and have appended
          # the string '_PREFIX'.
          # =============================================================== #
          i = ENV[this_key].dup.to_s
        else
          # =============================================================== #
          # Assume a special prefix variant targetting the /Programs/
          # hierarchy.
          # =============================================================== #
          i = programs_directory?+i.to_s.delete(':').capitalize+'/'
          i << program_version?.dup.to_s
        end
      end
      if i.include?('$')
        i = convert_env_variable(i) # Replace ENV variables here.
        i << '/' unless i.end_with? '/'
      end
      if i.include? '--'
        if i.include? '--prefix=' # Input is assumed to be like '--prefix=/Depot/j'
          i = i.split('=').last # ← Obtain just the last part in this case.
        end
      end
    end
    # ===================================================================== #
    # === Ensure a trailing '/' for directories.
    # ===================================================================== #
    unless i.to_s.end_with? '/' # .to_s to protect against Symbols given.
      i << '/' if File.directory?(i.to_s)
    end
  end
  # ======================================================================= #
  # Next, we must check for post-install actions and modify these,
  # if they exist. We only do so if we have an AppDir-prefix.
  # ======================================================================= #
  if is_an_appdir_prefix?(i.to_s)
    consider_modifying_postinstall
  end
  prefix_object?.use_this_as_the_new_prefix = i
end

#set_use_this_sed_line(i) ⇒ Object

#

set_use_this_sed_line

#


723
724
725
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 723

def set_use_this_sed_line(i)
  @internal_hash[:sed] = i
end

#set_user_prefix(i) ⇒ Object

#

set_user_prefix

#


149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 149

def set_user_prefix(
    i = :appdir_prefix
  )
  # ======================================================================= #
  # We must rewrite the program version in the following case.
  #
  # The input may look like this:
  #
  #  "/Programs/Gobjectintrospection/1.53.4/"
  #
  # ======================================================================= #
  if i and use_this_specific_program_version?
    if i.is_a?(String) and i.include?(programs_directory?)
      use_this_regex = /(\d{1,2}\.?\d{1,2}\.?\d{1,2}\/)$/ # See: http://rubular.com/r/PPb2Y96XfF
      i.sub!(use_this_regex, use_this_specific_program_version?)
      i << '/' unless i.end_with? '/'
    elsif i.is_a?(Symbol)
      i = use_this_specific_program_version?
    end
  end
  if i.is_a? Symbol
    # ===================================================================== #
    # Next, perform some sanitize operations.
    #
    # This clause will handle Symbols such as :app_dir_like or
    # :use_ntrad_prefix_at_a_later_time.
    # ===================================================================== #
    case i.to_s # case tag
    # ===================================================================== #
    # === ULOCAL
    #
    # This refers to the commonly used /usr/local/ directory.
    # ===================================================================== #
    when 'ULOCAL'
      i = '/usr/local/'
    # ===================================================================== #
    # === trad
    # ===================================================================== #
    when /^trad$/
      i = '/usr/'
    # ===================================================================== #
    # === --opt_prefix
    # ===================================================================== #
    when /^-?-?opt(_|-)?prefix$/,
         :opt
      i = '/opt/'
    # ===================================================================== #
    # === non_traditional
    #
    # This entry point has various aliases such as :ntrad.
    # ===================================================================== #
    when /^app(_|-)?dir$/,
         /^app(_|-)?dir(_|-)?like$/,
         /^use(_|-)?appdir(_|-)?prefix$/i,
         /^use(_|-)?ntrad(_|-)?prefix(_|-)?at(_|-)?a(_|-)?later(_|-)?time$/i,
         'non_traditional',
         'gobolinux',
         'ntrad',
         'default',
         'app_dir_like',
         'appdir',
         'return_appdir_path',
         'false',
         'f',
         'appdir_prefix',
         ''
      prefix?.clear_program # Clear it initially.
      prefix?.do_use_appdir_prefix
      if handle_which_program?
        i = return_non_traditional_prefix(handle_which_program?)
      end
      # =================================================================== #
      # Since as of May 2014 we get rid of all '-'
      # =================================================================== #
      i.delete!('-') if i.respond_to?(:include?) and i.include? '-'
    end
    # ===================================================================== #
    # === Convert environment variables, if given, and unfreeze frozen
    #     Strings
    # ===================================================================== #
    if i.is_a?(String)
      # =================================================================== #
      # Unfreeze frozen Strings.
      # =================================================================== #
      if i.is_a? String and i.frozen?
        i = i.dup # "unfreeze" it.
      end
      # =================================================================== #
      # === Handle Strings that start with the ':' character
      #
      # Handle the situation when we input a String that starts with
      # the character ':'. This will be assumed to be a shortcut to
      # an environment variable.
      # =================================================================== #
      if i.start_with?(':')
        # ================================================================== #
        # Next, we must add the proper program_version. This is either the
        # program_version at hand - or it is an ENV variable if it exists.
        # We check for the ENV variable first.
        # ================================================================== #
        this_key = (i.delete(':').upcase+'_PREFIX').dup
        if ENV.has_key? this_key
          # =============================================================== #
          # The environment variables must be UPCASED and have appended
          # the string '_PREFIX'.
          # =============================================================== #
          i = ENV[this_key].dup.to_s
        else
          # =============================================================== #
          # Assume a special prefix variant targetting the /Programs/
          # hierarchy.
          # =============================================================== #
          i = programs_directory?+i.to_s.delete(':').capitalize+'/'
          i << program_version?.dup.to_s
        end
      end
      if i.include?('$')
        i = convert_env_variable(i) # Replace ENV variables here.
        i << '/' unless i.end_with? '/'
      end
      if i.include? '--'
        if i.include? '--prefix=' # Input is assumed to be like '--prefix=/Depot/j'
          i = i.split('=').last # ← Obtain just the last part in this case.
        end
      end
    end
    # ===================================================================== #
    # === Ensure a trailing '/' for directories.
    # ===================================================================== #
    unless i.to_s.end_with? '/' # .to_s to protect against Symbols given.
      i << '/' if File.directory?(i.to_s)
    end
  end
  # ======================================================================= #
  # Next, we must check for post-install actions and modify these,
  # if they exist. We only do so if we have an AppDir-prefix.
  # ======================================================================= #
  if is_an_appdir_prefix?(i.to_s)
    consider_modifying_postinstall
  end
  prefix_object?.use_this_as_the_new_prefix = i
end

#set_user_prefix_to_nilObject

#

set_user_prefix_to_nil

#


8712
8713
8714
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8712

def set_user_prefix_to_nil
  set_user_prefix(nil)
end

#shall_we_extract_the_archive?Boolean Also known as: extract_the_archive?

#

shall_we_extract_the_archive?

Query method over as to whether RBT will extract the archive or not.

#

Returns:

  • (Boolean)


1391
1392
1393
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1391

def shall_we_extract_the_archive?
  @internal_hash[:extract_the_archive]
end

#shall_we_use_an_appdir_prefix?Boolean Also known as: appdir_prefix?

#

shall_we_use_an_appdir_prefix?

#

Returns:

  • (Boolean)


413
414
415
# File 'lib/rbt/actions/individual_actions/software_manager/setters.rb', line 413

def shall_we_use_an_appdir_prefix?
  @internal_hash[:shall_we_use_an_appdir_prefix]
end

#short_description?Boolean

#

short_description?

#

Returns:

  • (Boolean)


1215
1216
1217
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1215

def short_description?
  cookbook_dataset?.short_description?
end

#show_all_about(show_this_program = search_for_this_program? # or internal_program_name? ) ⇒ Object Also known as: show_all

#

show_all_about

This method will show the full content of a specific .yml file.

To invoke this method, do something like the following:

ry htop show_all
#


4154
4155
4156
4157
4158
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4154

def show_all_about(
    show_this_program = search_for_this_program? # or internal_program_name?
  )
  action(:ShowAllAbout, show_this_program)
end

#show_all_about_this_dir(i = return_pwd) ⇒ Object

#

show_all_about_this_dir

#


7012
7013
7014
7015
7016
7017
7018
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7012

def show_all_about_this_dir(
    i = return_pwd
  )
  _ = File.basename(i)
  _ = program_information_return_short_name(i).delete('-')
  show_all_about(_) # Delegate to that method here.
end

#show_all_available_programsObject

#

show_all_available_programs

#


2665
2666
2667
2668
2669
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2665

def show_all_available_programs
  available_programs?.each {|this_program|
    e "- #{this_program}"
  }
end

#show_all_binaries_of_this_program(this_program = compile_which_program?, , report_how = :one_line_per_program) ⇒ Object Also known as: feedback_all_binaries

#

show_all_binaries_of_this_program

Use this method to show the registered binaries of the input-argument, the given program at hand. This will display these binaries in one line, as a “Hash”.

Invocation example:

ry binutils --binaries-as-one-line?
#


9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9544

def show_all_binaries_of_this_program(
    this_program = compile_which_program?,
    report_how   = :one_line_per_program # The only other mode is :report_in_one_line
  )
  case this_program
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default
    this_program = compile_which_program?
  end
  if dataset?.nil?
    ensure_that_a_dataset_exists_for_this_program(this_program)
  end
  _ = binaries? # Grab the registered binaries here.
  if _.empty?
    orev "No binaries/executables appear to be registered for "\
         "the program `#{sfancy(this_program)}#{rev}`."
  else
    case report_how
    when :one_line_per_program,
         :default
      e; _.each_with_index {|this_binary, index| index += 1
        index = "  #{slateblue((index.to_s+') ').rjust(5))}"
        e "#{index}#{sfancy(this_binary)}"
      }; e
    else # else we use another mode.
      result = '{'.dup
      result << _.join(',')
      result << '}'
      e result
    end
  end
end

#show_all_locally_available_programs(slice_n_chunks = 3) ⇒ Object

#

show_all_locally_available_programs

Invocation example:

rbt --locally-available-programs?
#


5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5799

def show_all_locally_available_programs(
    slice_n_chunks = 3
  )
  programs_dir = programs_dir?
  all_dirs = Dir[programs_dir+'*'].select {|entry| File.directory? entry }
  all_dirs.map! {|entry|
    use_this_regex = /^#{programs_dir}/
    entry = entry.sub(use_this_regex,'')
    entry # .downcase # To downcase or not to downcase.
  }
  n_programs = all_dirs.size.to_s
  orev "The locally available `#{orange(n_programs)}#{rev}` programs are:"
  sliced = all_dirs.each_slice(slice_n_chunks)
  result = '  '.dup
  sliced.each {|inner_group_array|
    joined = inner_group_array.map {|entry|
      (entry+',').ljust(25)
    }.join
    result << '  '+sfancy(joined.strip).delete(',')+N
  }
  result = result.strip.chop.chomp.strip
  result.sub!(/,\e\[0;37$/, '.') # Reformat it.
  e
  e result
  e
end

#show_all_profiles_fitting_to_this_program(i = :gcc) ⇒ Object

#

show_all_profiles_fitting_to_this_program

This method can be used to show all profiles fitting to this program, such as gcc.

Invocation example:

ry --show-these-profiles=gcc
#


5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5274

def show_all_profiles_fitting_to_this_program(i = :gcc)
  all_available_profiles = return_files_from_the_profiles_directory
  selection = all_available_profiles.select {|entry|
    File.basename(entry).include? i.to_s
  }
  if selection.empty?
    orev "No profiles were found for the program "\
         "called #{steelblue(i.to_s)}#{rev}."
  else
    orev "The following profiles were found for the "\
         "program #{sfancy(i)}#{rev}:"
    e
    selection.each_with_index {|this_file, index| index += 1
      short_name_of_the_file = File.basename(this_file).sub(/.md$/,'')
      colourized_index = royalblue('[')+orangered(index)+royalblue(']')
      e "  #{rev}#{colourized_index} #{steelblue(short_name_of_the_file)}"
    }
    e
  end
end

#show_all_programs_that_have_this_as_dependency(i) ⇒ Object

#

show_all_programs_that_have_this_as_dependency

#


11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11925

def show_all_programs_that_have_this_as_dependency(i)
  i = i.to_s.strip
  all_files = Dir["#{expanded_cookbook_directory?}*.yml"]
  all_files.select!.each {|this_file|
    if File.exist?(this_file)
      deps_on = YAML.load_file(this_file)[:required_deps_on]
      deps_on.any? {|a_dependency|
        a_dependency == i
      }
    else
      false
    end
  }
  if all_files.empty?
    orev "No program has a dependency on #{steelblue(i)}#{rev}."
  else
    orev "The following #{tomato(all_files.size)} #{rev}programs "\
         "have a dependency on #{steelblue(i)}#{rev}:"
    e
    all_files.each {|entry|
      e steelblue("  #{File.basename(entry).delete_suffix('.yml')}")
    }
    e
  end
end

#show_and_store_json_for(this_program = compile_which_program? ) ⇒ Object

#

show_and_store_json_for

This method will load the expanded cookbook dataset (a yaml file), and convert this into json, via the .to_json method.

Invocation example:

rbt htop --json
#


7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7083

def show_and_store_json_for(
    this_program = compile_which_program?
  )
  require 'json'
  hash = {}
  orev 'The json dataset for '+steelblue(this_program)+"#{rev} is:"
  dataset = load_dataset_from_this_expanded_cookbook(this_program)
  hash[this_program.to_sym] = dataset
  e
  pp hash
  e
  orev 'This will be stored into the current directory as well.'
  what = hash.to_json
  # ======================================================================= #
  # Decide where to store the json-file.
  # ======================================================================= #
  into = "#{this_program}.json"
  orev "Storing into the file `#{sfile(into)}#{rev}`."
  write_what_into(what, into)
end

#show_available_aliases(_ = RBT.cookbook_aliases?) ⇒ Object

#

show_available_aliases

To invoke this method, do:

rbt --aliases?
#


2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2212

def show_available_aliases(
    _ = RBT.cookbook_aliases?
  )
  orev "The available #{sfancy(_.size.to_s)} #{rev}aliases are:"
  index = 0
  _.each_pair {|key, value| index += 1
    colourized_index = slateblue((index.to_s+')').rjust(5))
    e colourized_index+' '+sfancy(key.ljust(18))+
      mediumseagreen('')+simp(value)
  }
end

#show_available_batch_compile_options(this_file = RBT.file_cookbook_chained_programs) ⇒ Object

#

show_available_batch_compile_options

#


5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5062

def show_available_batch_compile_options(
    this_file = RBT.file_cookbook_chained_programs
  )
  if File.exist? this_file
    dataset = YAML.load_file(this_file)
    keys = dataset.keys
    orev "These #{teal(keys.size)} #{rev}entries exist:"; e
    keys.each {|this_entry_point|
      e "  #{sfancy(this_entry_point)}"
    }; e
  else
    opnn; no_such_file_exists(this_file)
  end
end

#show_available_headers_of_this_program(i = compile_which_program? ) ⇒ Object

#

show_available_headers_of_this_program

This method will show the available headers of the given program at hand.

Invocation example:

ry glibc --headers?
#


8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8638

def show_available_headers_of_this_program(
    i = compile_which_program?
  )
  array_headers = cookbook_dataset_headers?
  if array_headers.empty?
    orev "The program `#{sfancy(i)}#{rev}` will not install any .h files."
  else
    orev "The program `#{sfancy(i)}#{rev}` will install these .h files:"
    e
    array_headers.each {|this_header_file|
      e "  #{sfancy(this_header_file)}"
    }
    e
  end
end

#show_available_profiles(target_directory = DIRECTORY_RBT_PROFILES) ⇒ Object

#

show_available_profiles

This method will show the available (local) profiles.

To invoke this method try:

rbt --show-available-profiles
#


4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4261

def show_available_profiles(
    target_directory = DIRECTORY_RBT_PROFILES
  )
  available_profiles = return_files_from_the_profiles_directory.map {|entry|
    File.basename(entry).delete_suffix('.md')
  }
  if available_profiles.empty?
    orev "No profiles could be found in the directory "\
         "#{sdir(target_directory)}#{rev}."
  else
    orev "The following profiles are available:"
    e
    available_profiles.each_with_index {|entry, index| index += 1
      result = "  #{entry.ljust(45)}# #{seagreen(index.to_s.rjust(2))}#{rev}"
      e slateblue(result)
    }
    e
  end
end

#show_build_systems_prioritiesObject

#

show_build_systems_priorities

Invocation example:

rbt --prioritize?
#


9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9654

def show_build_systems_priorities
  array = return_build_systems_priorities
  e
  e lightgreen(
      'The build system priority is the following '\
      '(first one has higher priority):'
    )
  e
  array.each_with_index {|content, index| index += 1
    e slateblue(("(#{index}) ").rjust(6))+
      orange(content)
  }
  e
  e rev+'Remember that the per-yaml setting "'+
    steelblue('use_this_build_system')+'" cat'
  e 'overrule this.'
  e
end

#show_compile_chain(i) ⇒ Object

#

show_compile_chain

Show all members of a particular compile-chain.

Invocation examples:

ry --show-chain=plasma
ry --show-compile-chain-of=kde5_plasma
ry --compile-chain-of=kde5_plasma
ry --view=kde5_plasma
ry --view=xfce
#


11595
11596
11597
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11595

def show_compile_chain(i)
  action(:ShowCompileChain, i)
end

#show_compile_time_statisticsObject

#

show_compile_time_statistics

This method will show compile-time statistics for all the programs that the user has compiled through RBT.

Invocation example:

ry --show-compile-time-statistics
#


7867
7868
7869
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7867

def show_compile_time_statistics
  action(:show_compile_time_statistics)
end

#show_components(i) ⇒ Object

#

show_components

Invocation example:

ry --show-components=xfce
#


7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7028

def show_components(i)
  i = i.to_s # Just in case.
  chained_programs = return_chained_programs
  if chained_programs.has_key? i
    _ = chained_programs[i]
    e
    e "#{rev}These components belong to #{steelblue(i)}:"
    e
    _.each_with_index {|this_program, index| index += 1
      e lightgreen("  #{index}) ".rjust(6))+
        steelblue(this_program)
    }
    e
  else
    orev 'No component with that name could be found.'
    orev 'Available keys are:'
    e
    e royalblue(
        chained_programs.keys.join(', ').strip.chop
      )
    e
  end
end

#show_configuration_optionsObject

#

show_configuration_options

#


607
608
609
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 607

def show_configuration_options
  ShowConfigurationOptions.new # This is automatically required.
end

#show_downloadable_programs(i = available_programs?.sort) ⇒ Object

#

show_downloadable_programs

Invocation example:

ry --show-downloadable-programs
#


10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10705

def show_downloadable_programs(
    i = available_programs?.sort
  )
  chunked = i.each_slice(5)
  orev 'The following programs can be downloaded:'
  e
  chunked.each {|this_chunk|
    e "  #{slateblue(this_chunk.join(', ').strip.chop)}"
  }
  e
end

#show_enable_pkgconfig_symlinking_messageObject

#

show_enable_pkgconfig_symlinking_message

#


3133
3134
3135
3136
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3133

def show_enable_pkgconfig_symlinking_message
  orev "Enabling pkgconfig-symlinking of .pc files into `"\
       "#{sdir('/usr/lib/pkgconfig/')}#{rev}`."
end

#show_flexbox?Boolean Also known as: show_the_flexbox?, show_the_infobox?, show_infobox?

#

show_flexbox?

#

Returns:

  • (Boolean)


10734
10735
10736
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10734

def show_flexbox?
  @internal_hash[:show_the_flexbox]
end

#show_gobolinux_instructionsObject

#

show_gobolinux_instructions

To invoke this method do:

rbt --show-gobo-instructions
#


1659
1660
1661
1662
1663
1664
1665
1666
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1659

def show_gobolinux_instructions
  _ = RUBY_SRC_DIR+'rbt/doc/instructions_for_gobolinux.md'
  if File.exist? _
    e File.read(_)
  else
    no_file_exists_at(_)
  end
end

#show_help_for_this_program(i = '', be_silent = false) ⇒ Object

#

show_help_for_this_program

Use this method if you wish to feedback how to use this class.

#


7962
7963
7964
7965
7966
7967
7968
7969
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7962

def show_help_for_this_program(
    i         = '',
    be_silent = false
  )
  be_silent = true if be_silent == :be_silent
  e "#{simp(i)}#{rev} has these options available:" unless be_silent
  display_standard_help_options # This is stored in help.rb
end

#show_how_to_batch_compileObject

#

show_how_to_batch_compile

This method will notify the user in how to batch-compile programs via RBT.

Invocation example:

rbt --show_how_to_batch_compile
#


593
594
595
596
597
598
599
600
601
602
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 593

def show_how_to_batch_compile
  show_available_batch_compile_options
  e
  e 'In order to batch-compile one of these, issue a command such as:'
  e
  e '  rbt --batch-compile=mate'
  e '  rbt --batch-compile=vid_base'
  e '  rbt --batch-compile=terminals'
  e
end

#show_how_to_compile_kdeObject

#

show_how_to_compile_kde

This method will provide some hints on the commandline as to how to batch-compile the various KDE components.

Invocation example:

rbt --show-how-to-compile-kde
#


7619
7620
7621
7622
7623
7624
7625
7626
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7619

def show_how_to_compile_kde
  e
  e '  rbt --batch-compile=kde5_foundation'
  e '  rbt --batch-compile=kde5_plasma'
  e '  rbt --batch-compile=kde5_porting_aids'
  e '  rbt --batch-compile=kde5_applications'
  e
end

#show_information_about_blfs(use_this_key = :blfs) ⇒ Object

#

show_information_about_blfs

We show some information about BLFS webpages.

To invoke this method, you can issue a command such as this here:

rbt binutils --lfs
#


2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2754

def show_information_about_blfs(
    use_this_key = :blfs
  )
  ensure_that_this_key_has_a_dataset(use_this_key)
  dataset = cookbook_dataset?
  if dataset.has_key?(use_this_key) and
    !dataset?.blfs?.empty? # .empty? will assume this to be a String.
    url = dataset?.blfs?
    if url.is_a? Array
      url = url.first
    end
    e "Url is: #{sfancy(url)}"
    set_xorg_buffer(url) if is_roebe?
  else
    orev "The program #{royalblue(compile_which_program?)} "\
         "#{rev}has no blfs entry."
  end
end

#show_installation_procedure_file(this_file = :installation_procedure) ⇒ Object

#

show_installation_procedure_file

Show the content of the file called installation_procedure.yml

To invoke this method, try:

rbt --installation-procedure
#


11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11256

def show_installation_procedure_file(
    this_file = :installation_procedure
  )
  begin
    require 'beautiful_url' unless Object.const_defined? :BeautifulUrl
    if this_file.is_a? Symbol
      this_file = BeautifulUrl[this_file.to_s]
    end
  rescue LoadError; end
  this_file = this_file.first if this_file.is_a? Array
  if File.exist? this_file
    e
    orev 'Making use of the file at'
    orev '`'+sfile(this_file)+rev+'`:'
    e
    e File.read(this_file)
  else
    orev "No file called #{sfile(this_file)}#{rev} was found."
  end
end

#show_instructions_for_gobolinuxObject

#

show_instructions_for_gobolinux

#


11536
11537
11538
11539
11540
11541
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11536

def show_instructions_for_gobolinux
  _ = "#{RUBY_SRC_DIR}rbt/doc/instructions_for_gobolinux.md"
  if File.exist? _
    e File.read(_)
  end
end

#show_last_compiled_program(shall_we_exit = false) ⇒ Object

#

show_last_compiled_program

Use this method to show the last compiled program.

#


2004
2005
2006
2007
2008
2009
2010
2011
2012
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2004

def show_last_compiled_program(
    shall_we_exit = false
  )
  shall_we_exit = true if shall_we_exit == :then_exit
  orev 'The last compiled program was `'+
        sfancy(last_compiled_program?)+"#{rev}` (as registered"
  orev "in the file #{sfile(RBT.file_compiled_programs)}#{rev})."
  exit if shall_we_exit
end

#show_last_configure_options_then_exitObject

#

show_last_configure_options_then_exit

This method will show the last configure option that was used, then it will exit.

Invoke this like so:

rbt lconfigure?
#


2614
2615
2616
2617
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2614

def show_last_configure_options_then_exit
  show_last_options
  exit_program
end

#show_last_options(name_of_the_program = compile_which_program? ) ⇒ Object

#

show_last_options

Use this method to show the last configure options that were used in order to compile a program from source.

To grab this, try:

ry htop --last-options
#


568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 568

def show_last_options(
    name_of_the_program = compile_which_program?
  )
  full_configure_command = return_last_configure_command
  if full_configure_command
    orev "The last configure command for "\
         "`#{simp(name_of_the_program)}#{rev}` was:"
    orev "  #{simp(full_configure_command)}"
  else
    orev "No configure command was used "\
         "for `#{simp(name_of_the_program)}#{rev}`."
  end
end

#show_last_updated(shall_we_exit = true) ⇒ Object

#

show_last_updated

This method will show the last updated programs.

Invocation example:

ry --last_update
#


3305
3306
3307
3308
3309
3310
3311
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3305

def show_last_updated(
    shall_we_exit = true
  )
  require 'rbt/cookbooks/show_last_updated.rb'
  RBT::Cookbooks::ShowLastUpdated.new # bl $RUBY_COOKBOOKS/lib/cookbooks/show_last_updated.rb
  exit_program if shall_we_exit
end

#show_minimal_gcc_configure_optionsObject

#

show_minimal_gcc_configure_options

#


4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4284

def show_minimal_gcc_configure_options
  _ = directory_rbt_profiles?+'gcc_minimal_but_lots_of_languages_enabled.md'
  if File.exist? _
    dataset = readlines(_).reject {|entry|
      begins_with_a_comment?(entry)
    }.join(N).tr(N,' ').squeeze(' ')
    e
    e "  #{steelblue(dataset)}"
    e
  else
    opnn; no_file_exists_at(_)
  end
end

#show_missing_use_this_build_system_entryObject

#

show_missing_use_this_build_system_entry

#


8157
8158
8159
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8157

def show_missing_use_this_build_system_entry
  action(:missing_use_this_build_system_entry)
end

#show_n_largest_local_programs(i = :default) ⇒ Object

#

show_n_largest_local_programs

Show the largest local programs with this method.

Invocation example:

ry --show_highest
#


2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2962

def show_n_largest_local_programs(
    i = :default
  )
  case i
  # ======================================================================= #
  # === :default
  # ======================================================================= #
  when :default
    i = 50
  end
  action(:highest, i)
  exit_program
end

#show_output_from_the_extracter_class?Boolean

#

show_output_from_the_extracter_class?

#

Returns:

  • (Boolean)


1613
1614
1615
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1613

def show_output_from_the_extracter_class?
  @internal_hash[:show_output_from_the_extracter_class]
end

#show_path_to_the_source_directory_yaml_fileObject

#

show_path_to_the_source_directory_yaml_file

This method will simply show the path to the source_dir.yml file.

Usage example:

rbt --path_to_source_directory?
#


10229
10230
10231
10232
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10229

def show_path_to_the_source_directory_yaml_file
  _ = project_yaml_directory?+'configuration/source_dir.yml'
  e sfile(_)
end

#show_pc_files_installed_by_this_program(i = compile_which_program? ) ⇒ Object

#

show_pc_files_installed_by_this_program

Invocation example:

ry samba --pkgconfig-files?
#


5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5377

def show_pc_files_installed_by_this_program(
    i = compile_which_program?
  )
  _ = pc_files?
  if _.empty?
    orev 'The program '+simp(i)+rev+' will not install any .pc file.'
  else
    orev "The program #{gold(i)} #{rev}will install "\
         "the following #{sfancy(_.size.to_s)} #{rev}.pc file(s):"
    e; _.each {|this_pc_file|
      e "  #{sfancy(this_pc_file)}"
    }; e
  end
end

#show_programs_with_a_blfs_entryObject

#

show_programs_with_a_blfs_entry

Invocation example:

ry --show-all-blfs-entries
#


246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 246

def show_programs_with_a_blfs_entry
  _ = Dir["#{individual_cookbooks_dir?}*.yml"]
  matches = _.select {|file|
    dataset = File.read(file)
    dataset.include? ' blfs:'
  }.map {|entry|
    File.basename(entry).sub(/\.yml$/,'')
  }
  unless matches.empty?
    orev "The following #{sandybrown(matches.size.to_s)} #{rev}programs "\
         "have a #{sfancy('blfs')} #{rev}entry:"
    e
    matches.each_with_index {|name_of_the_program, index| index += 1
      index = (index.to_s+') ').rjust(5)
      remote_url = return_blfs_page_of_this_program(name_of_the_program)
      e royalblue(index)+slateblue(name_of_the_program.ljust(24))+
        lightblue(remote_url.to_s)
    }
    e
  end
end

#show_programs_with_this_as_dependency(i) ⇒ Object

#

show_programs_with_this_as_dependency

Invocation example:

ry --show-programs-with-this-as-dependency=cmake
#


3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3403

def show_programs_with_this_as_dependency(i)
  use_this_key = :required_deps_on
  e "#{rev}Next trying to find all programs that depend on #{steelblue(i)}"\
    "#{rev}:"
  e
  array_these_programs_depend_on_the_given_input = []
  available_programs?.each {|this_program|
    expanded_cookbook_dataset = return_dataset_from_this_expanded_cookbook(this_program)
    if expanded_cookbook_dataset
      required_deps_on = expanded_cookbook_dataset[use_this_key]
      if required_deps_on.include? i
        array_these_programs_depend_on_the_given_input << this_program
        e " - #{this_program}"
      end
    end
  }
  e
  e "#{rev}A total of "+
    royalblue(array_these_programs_depend_on_the_given_input.size.to_s)+
    rev+' registered programs depend on '+steelblue(i)+'.'
  e
end

#show_rbt_introObject

#

show_rbt_intro

Invocation example:

ry --show-rbt-intro
ry --intro
#


4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4335

def show_rbt_intro
  e
  e 'Here are some hints to get you started with RBT.'
  e
  e "You can compile a program by issuing #{orange('rbt <name>')}."
  e
  e 'Example:'
  e
  e sfancy('  rbt php')
  e
  e 'You can also compile into a standalone app-dir:'
  e
  e sfancy('  rbt php ntrad')
  e sfancy('  rbt php --app-dir')
  e
  e 'Both variants are synonymous. If in doubt, using the variants'
  e 'that start with '+teal('--')+' is recommended.'
  e
  e 'To speed-up looking for the dataset stored in the various .yml'
  e 'files you can also issue the following command:'
  e
  e sfancy('  rbt --expand')
  e
  e 'This command will expand the dataset into a "sanitized" variant'
  e 'that requires less pre-processing before it can be used for'
  e 'compiling/installing programs from source.'
  e
end

#show_registered_keysObject

#

show_registered_keys

This delegates towards the Register class.

#


11229
11230
11231
11232
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11229

def show_registered_keys
  require 'rbt/utility_scripts/register_program_files_into_global_database.rb'
  RBT::RegisterProgramFilesIntoGlobalDatabase.show_registered_keys
end

#show_statistics_about_the_rbt_projectObject

#

show_statistics_about_the_rbt_project

To invoke this method, do:

rbt --stats?
#


9944
9945
9946
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9944

def show_statistics_about_the_rbt_project
  action(:ShowStatistics)
end

#show_success_or_failure_statusObject Also known as: report_status

#

show_success_or_failure_status (success tag, failure tag, status tag)

This method will report some things, aka the success or failure status of a program.

#


12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12643

def show_success_or_failure_status
  # ======================================================================= #
  # Report the following only if the program has been installed
  # successfully.
  # ======================================================================= #
  if has_the_program_been_installed_successfully?
    orev "The host system architecture was: "\
         "#{slateblue(host_system?)}"
    if is_a_gem?
      # =================================================================== #
      # If it is a .gem file then we will not report as much information.
      # =================================================================== #
      opne teal('The program ')+
           lightgreen(compile_which_program?)+
           teal(' has been installed successfully.')
    else
      _ = return_full_configure_command
      if _.nil? or _.empty?
        # ================================================================== #
        # This entry-point is specifically for e. g. perl-addons and
        # similar programs.
        # ================================================================== #
        opne teal('The program ')+lightgreen(compile_which_program?)+
             teal(' has been installed successfully.')
      else
        opne teal('The program ')+lightgreen(compile_which_program?)+
             teal(' has been installed successfully, into the prefix')
        opne plum(prefix?.to_s)+
             teal('. The full configure command was:')
        e
        e "  #{slateblue(return_full_configure_command)}"
        e
      end
    end
  else
    # ===================================================================== #
    # Else the program has failed during compilation/installation.
    # ===================================================================== #
    opne crimson(
           return_unicode_warning_symbol_or_empty_string+' The program `'
         )+
         teal(compile_which_program?)+
         crimson(
           '` could not be installed. '+
           return_unicode_warning_symbol_or_empty_string
         )
  end
end

#show_temp_directoryObject

#

show_temp_directory

To invoke this from the commandline, do:

ry --tempdir?
#


9984
9985
9986
9987
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9984

def show_temp_directory
  orev "The temporary directory resides "\
       "at `#{sdir(temp_directory?)}#{rev}`."
end

#show_the_available_gems(i = RBT.array_all_rubygems) ⇒ Object Also known as: show_registered_gems

#

show_the_available_gems

To invoke this method from the commandline, try:

rbt --show-registered-gems
#


12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12724

def show_the_available_gems(
    i = RBT.array_all_rubygems
  )
  e
  orev 'These gems are currently available within the RBT project:'
  e
  i.each_with_index {|this_gem, index| index += 1
    e "  #{lightgreen(index.to_s.rjust(4))} #{slateblue(this_gem)}"
  }
  e
end

#show_the_available_profiles_for_configure_optionsObject

#

show_the_available_profiles_for_configure_options

#


5298
5299
5300
5301
5302
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5298

def show_the_available_profiles_for_configure_options
  Dir["#{DIRECTORY_RBT_PROFILES}*.md"].each {|this_profile|
    e "#{rev}  - #{royalblue(File.basename(this_profile)).delete_suffix('.md')}"
  }
end

#show_the_classname?Boolean

#

show_the_classname?

#

Returns:

  • (Boolean)


7215
7216
7217
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7215

def show_the_classname?
  ::RBT.show_the_classname?
end

#show_the_colours_in_useObject

#

show_the_colours_in_use

This method will show the colours in use by RBT::Action::SoftwareManager.

#


10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10609

def show_the_colours_in_use
  _ = RBT.file_colours
  if File.exist? _
    dataset = load_yaml(_)
    orev "The colours in use are:"
    e
    dataset.each_pair {|name, this_colour|
      e "#{(name+':').ljust(12)} colour in use for this entry "\
        "will be `#{::Colours.send(this_colour, this_colour)}.`"
    }
    e
  else
    opnn; no_file_exists_at(_)
  end
end

#show_the_everything_is_finished_messageObject

#

show_the_everything_is_finished_message

#


210
211
212
213
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 210

def show_the_everything_is_finished_message
  orev "Installation of #{steelblue(install_which_program?)} "\
       "#{rev}has finished."
end

#show_the_flexbox(compile_this_program = compile_which_program? ) ⇒ Object Also known as: show_flexbox

#

show_the_flexbox

This will show the flexbox.

The first argument should be the dataset for the program that we are about to install/compile.

#


10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10748

def show_the_flexbox(
    compile_this_program = compile_which_program?
  )
  if show_the_flexbox?
    # =================================================================== #
    # Next determine whether we shall show the required dependencies
    # via the flexbox. Since as of November 2020 this is now the
    # default. At a later point we may disable it again, not sure
    # yet - but I think showing the dependencies is useful for
    # the end user, hence why it is now set to true by default.
    # =================================================================== #
    shall_we_show_the_required_dependencies_via_the_flexbox = always_show_dependencies?
    # =================================================================== #
    # Delegate into AsciiParadise::Flexbox next, if it is available:
    # =================================================================== #
    e
    action(:Flexbox, compile_this_program) {{
      show_required_dependencies_on: shall_we_show_the_required_dependencies_via_the_flexbox,
      use_this_dataset:              self, # sanitize_cookbook?
      use_colours:                   use_colours?
    }}.display
    e
  end
end

#show_the_last_configure_option_for_this_program(this_program = compile_which_program? ) ⇒ Object

#

show_the_last_configure_option_for_this_program

This method will make use of the file configure_command_database.yml. Obviously, the file has to exist in order for this to work.

Invocation example:

ry attica --show-last-configure-option-for-this-program
#


1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1522

def show_the_last_configure_option_for_this_program(
    this_program = compile_which_program?
  )
  _ = RBT.file_configure_database
  if File.exist? _
    dataset = YAML.load_file(_)
    if dataset.has_key? this_program
      result = dataset[this_program]
      orev "The program #{sfancy(this_program)} #{rev}has "\
           "been compiled with this command:"
      e
      e "  #{sfancy(result)}" # Display it without opnn.
      e
    else
      orev "The program #{sfancy(this_program)} #{rev}has not "\
           "been registered/compiled yet."
    end
  else
    orev "No file exists at `#{sfile(_)}#{rev}` so we can not proceed."
    orev 'Nota bene: You should first compile some programs, before'
    orev 'making use of this method.'
  end
end

#show_the_n_last_updated_programs(i = 875) ⇒ Object

#

show_the_n_last_updated_programs

#


48
49
50
51
52
# File 'lib/rbt/actions/individual_actions/software_manager/actions.rb', line 48

def show_the_n_last_updated_programs(
    i = 875
  )
  action(:ShowLastUpdated, display_n_programs: i)        
end

#show_the_recipes_directory(i = recipes_dir? ) ⇒ Object

#

show_the_recipes_directory

#


9640
9641
9642
9643
9644
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9640

def show_the_recipes_directory(
    i = recipes_dir?
  )
  e sfancy(i) # In $RBT/base/base.rb
end

#show_valid_system_tagsObject

#

show_valid_system_tags

Show the allowed, and thus valid, /System/Tags entries.

To invoke this method, do:

ry --valid-sys-tags?
#


1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1454

def show_valid_system_tags
  _ = RBT.file_allowed_tags  # e. g. at rbt/yaml/specification/allowed_tags.yml
  if File.exist? _
    # ===================================================================== #
    # Since the file exists, we can load up the dataset of it.
    # ===================================================================== #
    dataset_containing_the_allowed_tags = YAML.load_file(_).sort
    orev 'The following '+sfancy(dataset_containing_the_allowed_tags.size.to_s)+' '+
          sdir('/System/Tags/')+"#{rev} entries are valid:"
    e
    dataset_containing_the_allowed_tags.each_with_index {|tag, index| index += 1
      e mediumvioletred((index.to_s+') ').rjust(4))+
        sfancy(tag)
    }; e
  else
    orev "No file called #{sfile(_)} #{rev}exists - we thus can not show"
    orev 'any allowed tags.'
  end
end

#show_where_the_base_directory_can_be_foundObject

#

show_where_the_base_directory_can_be_found

To test this method, do:

ry htop base_dir?
#


2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2100

def show_where_the_base_directory_can_be_found
  e
  orev 'The base directory is at: '.ljust(36)+
        sfancy(temp_directory?)
  unless extract_to?.to_s.empty?
    orev "We will extract to this directory:  "\
         "#{sfancy(extract_to?.to_s)}"
  end
  e
end

#show_whether_we_are_using_ccache_or_whether_we_are_notObject

#

show_whether_we_are_using_ccache_or_whether_we_are_not

To invoke this method from the commandline, try:

ry --use-ccache?
#


11188
11189
11190
11191
11192
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11188

def show_whether_we_are_using_ccache_or_whether_we_are_not
  _ = use_ccache?
  orev "Will the RBT project make use of ccache? "\
       "#{sfancy(verbose_truth(_))}"
end

#show_which_colours_will_be_used(use_this_file = RBT_COLOURS_FILE) ⇒ Object

#

show_which_colours_will_be_used

To show which colours will be used for the RBT project.

#


9826
9827
9828
9829
9830
9831
9832
9833
9834
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9826

def show_which_colours_will_be_used(
    use_this_file = RBT_COLOURS_FILE
  )
  orev 'These colours will be used:'
  e
  YAML.load_file(use_this_file).each_pair {|key, value|
    e "  #{key.ljust(12)}#{value}"
  }; e
end

#show_which_compiler_will_be_usedObject

#

show_which_compiler_will_be_used

This method will show which compiler will be used.

Commandline invocation:

ry --compiler?
#


8689
8690
8691
8692
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8689

def show_which_compiler_will_be_used
  orev "The compiler that will be used for compiling "\
       "programs is `#{slateblue(use_which_compiler?)}#{rev}`."
end

#show_which_files_will_be_installed(i = compile_which_program? ) ⇒ Object

#

show_which_files_will_be_installed

This method will show to the user which files will be installed.

Invocation examples:

ry htop ifiles
ry htop --installed-files
ry ruby --installed-files
#


6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6586

def show_which_files_will_be_installed(
    i = compile_which_program?
  )
  file = static_appdir_prefix?+'yaml/registered_files.yml'
  if File.exist? file
    orev 'The following files will be installed by '\
         'the program `'+simp(i)+rev+'`:'
    dataset = YAML.load_file(file).sort
    e; dataset.each {|entry| e "  #{entry}" }; e
  else
    orev "The file #{sfile('registered_files.yml')}"\
         " #{rev}could not be found,"
    orev 'thus we can not show which files are installed.'
  end
end

#simple_or_complex?Boolean Also known as: type_in_use?

#

simple_or_complex?

#

Returns:

  • (Boolean)


12443
12444
12445
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12443

def simple_or_complex?
  @internal_hash[:simple_or_complex]
end

#skip_extracting?Boolean Also known as: skip_extracting_the_archive?

#

skip_extracting?

Query-method over as to whether we will skip extracting the archive at hand. This can usually only be done when the archive has already been extracted somehow.

#

Returns:

  • (Boolean)


985
986
987
988
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 985

def skip_extracting?
  _ = @internal_hash[:skip_extracting]
  _ == true # This check prohibits nil and false.
end

#skip_extracting_if_it_is_a_gem_fileObject

#

skip_extracting_if_it_is_a_gem_file

#


8370
8371
8372
8373
8374
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8370

def skip_extracting_if_it_is_a_gem_file
  if is_a_gem_file?
    skip_extracting
  end
end

#skip_postinstall_actionsObject Also known as: do_skip_postinstall_actions, do_not_run_postinstall_actions, no_postinstall_actions, no_postinstall_step

#

skip_postinstall_actions

Whether to skip postinstall actions or whether we don’t.

#


9432
9433
9434
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9432

def skip_postinstall_actions
  @internal_hash[:run_postinstall_actions] = false
end

#sort_configure_options_alphabeticallyObject

#

sort_configure_options_alphabetically (sort tag)

This is simply a convenience method - we will quickly sort the Array of configure-options alphabetically here.

#


4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4974

def sort_configure_options_alphabetically
  _ = configure_options?
  if _.include? ' '
    splitted = _.split(' ')
    sorted = splitted.sort { |a, b|
      a.delete('-') <=> b.delete('-')
    }.reverse
    joined = sorted.join(' ')
    set_configure_options(joined)
  end
end

#speed_up_the_compilationObject

#

speed_up_the_compilation

We can speed up compilation via the -j option to “make”. Keep in mind that we have to avoid the number “0”, though, as make would complain when this is used.

See:

https://www.math-linux.com/linux/tip-of-the-day/article/speedup-gnu-make-build-and-compilation-process
#


2926
2927
2928
2929
2930
2931
2932
2933
2934
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2926

def speed_up_the_compilation
  use_n_processors = return_n_processors
  if use_n_processors <= 0
    use_n_processors = 1 # ← 1 is always the minimum. "make -j0" would lead to errors.
  end
  append_parameters_to_make(
    " -j#{use_n_processors}"
  )
end

#stop_at_make_install_stageObject

#

stop_at_make_install_stage

This method will allow us to exit once we reach the make install stage.

#


3066
3067
3068
3069
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3066

def stop_at_make_install_stage
  do_not_run_make_install
  do_exit_before_make_install
end

#stop_at_make_stageObject

#

stop_at_make_stage

#


3094
3095
3096
3097
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3094

def stop_at_make_stage
  do_not_run_make_install
  do_exit_before_make
end

#stop_on_error?Boolean

#

stop_on_error?

#

Returns:

  • (Boolean)


852
853
854
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 852

def stop_on_error?
  STOP_ON_ERROR
end

#store_this_as_last_libtool_file(what) ⇒ Object

#

store_this_as_last_libtool_file

We will remove “‘ or unhandled argument” if it is part of the given input at hand.

#


10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10645

def store_this_as_last_libtool_file(what)
  # ======================================================================= #
  # First sanitize the input a little bit:
  # ======================================================================= #
  if what.include? "' or unhandled argument"
    what = what.split(/' or unhandled argument/).first
  end
  unless what.empty?
    base_dir = "#{rbt_log_directory?}libtool/"
    mkdir(base_dir) unless File.directory? base_dir
    into = "#{base_dir}last_faulty_libtool_file.md"
    if is_on_roebe?
      if File.exist?(into) and File.read(into).strip.end_with? what
        # =================================================================== #
        # In this case, we will not store the same result again.
        # =================================================================== #
        return
      end
      orev "Also storing `#{royalblue(what)}#{rev}` "\
           "into `#{sfile(into)}#{rev}`."
    end 
    write_what_into(what, into)
  end
end

#strip_binaries?Boolean

#

strip_binaries?

#

Returns:

  • (Boolean)


1133
1134
1135
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1133

def strip_binaries?
  @internal_hash[:strip_binaries]
end

#strip_the_binaries_of_this_program(i) ⇒ Object

#

strip_the_binaries_of_this_program

Invocation example:

rbt --strip-binaries-of=htop
#


2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2869

def strip_the_binaries_of_this_program(i)
  [i].flatten.compact.each {|this_program|
    binaries_of_this_program = RBT.return_binaries_of_this_program(this_program)
    if binaries_of_this_program.empty?
      orev "The program #{sfancy(this_program)} #{rev}has no associated binaries."
      orev 'Thus, "strip" can not be run on these binaries.'
    else
      orev 'Now running "strip" on '+
           sfancy(binaries_of_this_program.size.to_s)+
           "#{rev} programs:"
      binaries_of_this_program.each {|this_binary|
        run_the_strip_command_on_this_input(this_binary)
      }
    end
  }
end

#suggest_cookbook_for(i) ⇒ Object

#

suggest_cookbook_for

#


9972
9973
9974
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9972

def suggest_cookbook_for(i)
  action(:suggest_cookbook_for, i)
end
#

Use this method to symlink all programs in the $PROGRAMS directory.

Usage example to trigger this method:

ry htop symlink_all_programs
#


5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5845

def symlink_all_programs(
    may_we_symlink = !do_not_symlink?
  )
  case may_we_symlink
  # ======================================================================= #
  # === :do_it
  # ======================================================================= #
  when :do_it
    may_we_symlink = true
  end
  # ======================================================================= #
  # @do_not_symlink = dataset?.do_not_symlink? if dataset?.do_not_symlink?
  # ======================================================================= #
  if may_we_symlink
    require 'rbt/utility_scripts/symlink_all_programs.rb'
    _ = RBT::SymlinkAllPrograms.new # bl $RBT/utility_scripts/symlink_all_programs.rb
    orev "We have finished symlinking all programs in "\
         "#{sdir(_.programs_directory?)}#{rev}."
  end
end
#
#


2027
2028
2029
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2027

def symlink_all_upcased_programs_to_downcased_variants
  action(:SymlinkAllUpcasedProgramsToDowncasedVariants)
end
#
#

Returns:

  • (Boolean)


1589
1590
1591
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1589

def symlink_gir_files?
  @internal_hash[:symlink_gir_files]
end
#

The default prefix, aka the first input argument, should be fine for this class.

#


12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12477

def symlink_glib_schema(
    prefix_where_the_schema_files_reside =
      program_dir?+
      internal_program_name?.capitalize+
      '/Current/share/glib-2.0/schemas/'
  )
  if File.directory? prefix_where_the_schema_files_reside
    RBT::SymlinkGlibSchema.new(prefix_where_the_schema_files_reside) {
      :do_not_report_when_anything_is_missing
    }
  end
end
#
#

Returns:

  • (Boolean)


970
971
972
973
974
975
976
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 970

def symlink_glib_schema?
  _ = cookbooks_dataset_use_glib_schema?
  unless @internal_hash[:symlink_glib_schema].nil? 
    _ = @internal_hash[:symlink_glib_schema]
  end
  return _
end
#

Use this method if you need to find out whether we shall symlink the .h files into the “/usr/include/” hierarchy or whether we should not.

#

Returns:

  • (Boolean)


1825
1826
1827
1828
1829
1830
1831
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1825

def symlink_headers?
  _ = cookbook_dataset_symlink_headers?
  unless @internal_hash[:symlink_headers].nil?
    _ = @internal_hash[:symlink_headers]
  end
  _
end
#
#

Returns:

  • (Boolean)


577
578
579
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 577

def symlink_pkgconfig_files?
  cookbook_dataset?.symlink_pkgconfig_files?
end
#

This is the “action” method, that is the method that will symlink all .gir files into the given target directory at hand.

#


1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1347

def symlink_the_available_gir_files_into_this_target_directory(
    target_directory = :default_target
  )
  case target_directory
  when :default_target
    target_directory = '/usr/share/gir-1.0/'
  end
  gir_files?.each {|this_file|
    original_and_existing_gir_file = "#{prefix?}share/gir-1.0/#{this_file}"
    target_file = "#{target_directory}#{this_file}"
    if File.exist?(target_file) and target_file.end_with?('.gir')
      delete_file(target_file)
    end
    symlink(original_and_existing_gir_file, target_file)
  }
end

#sync_cookbook_dataset_program_version_onto_the_prefix_objectObject

#

sync_cookbook_dataset_program_version_onto_the_prefix_object

#


41
42
43
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 41

def sync_cookbook_dataset_program_version_onto_the_prefix_object
  prefix_object?.sync_cookbook_dataset_program_version_onto_the_prefix_object
end

#tags?Boolean Also known as: tags

#

tags?

Note that this method will attempt to return an Array.

#

Returns:

  • (Boolean)


1800
1801
1802
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1800

def tags?
  cookbook_dataset?.tags?
end

#the_program_is_includedObject

#

the_program_is_included

#


67
68
69
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 67

def the_program_is_included
  RBT::Action::SoftwareManager.the_program_is_included
end

#time_the_compilation?Boolean

#

time_the_compilation?

#

Returns:

  • (Boolean)


1287
1288
1289
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1287

def time_the_compilation?
  @internal_hash[:time_compilation]
end

#to_tar_xz(i, &block) ⇒ Object

#

to_tar_xz

This method can be used to create a .tar.xz archive.

#


548
549
550
551
552
553
554
555
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 548

def to_tar_xz(i, &block)
  if Object.const_defined? :ToTarXz
    ToTarXz.new(i, &block)
  else
    orev "ToTarXz is not available. It can be installed via: "\
         "#{steelblue('gem install to_tar_xz')}"
  end
end

#toggle_debug_valueObject

#

toggle_debug_value

#


8917
8918
8919
8920
8921
8922
8923
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8917

def toggle_debug_value
  what = !DEBUG
  into = DEBUG_FILE
  orev 'Now toggling the debug value used for the RBT project into '
  orev "  #{sfile(into)}"
  save_what_into(what, into)
end

#toggle_the_debug_value_then_query_the_debug_valueObject

#

toggle_the_debug_value_then_query_the_debug_value

#


8909
8910
8911
8912
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8909

def toggle_the_debug_value_then_query_the_debug_value
  toggle_debug_value
  query_debug_value
end

#toplevel_install_which_programs?Boolean

#

toplevel_install_which_programs?

This will always query the toplevel-value, and thus is different to the method called compile_this_program?().

#

Returns:

  • (Boolean)


420
421
422
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 420

def toplevel_install_which_programs?
  ::RBT.install_which_programs?
end

#try_do_determine_which_programs_have_to_be_installed(first_argument = first_argument? ) ⇒ Object

#

try_do_determine_which_programs_have_to_be_installed

#


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 21

def try_do_determine_which_programs_have_to_be_installed(
    first_argument = first_argument?
  )
  if first_argument.nil? or first_argument.empty?
    orev 'Please provide the name of the program that is '\
         'to be installed.'
  else
    _ = first_argument?
    unless _.start_with?('--')
      if _.include? '@'
        # ================================================================== #
        # In this case we have input such as htop@2.2.3.
        # If this is the case then we will not do any sanitizing at all.
        # ================================================================== # 
      else
        # ================================================================== #
        # Now we have to improve on the first argument given. This will try
        # to use all abbreviations, for instance.
        # ================================================================== #
        _ = action(:sanitize_this_program_name, _)
      end
      set_install_these_programs(_)
    end
  end
end

#try_to_autocorrect_this_erroneous_libtool_entry(i) ⇒ Object

#

try_to_autocorrect_this_erroneous_libtool_entry

This method will delegate towards class RBT::Libtool in order to fix a faulty .la file.

#


5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5219

def try_to_autocorrect_this_erroneous_libtool_entry(i)
  require 'rbt/libtool/class_methods/autocorrect_this_file.rb'
  orev "Now delegating towards class #{slateblue('RBT::Libtool')}#{rev} "\
       "to attempt to autocorrect the problem:"
  orev "  #{sfancy(i)}"
  RBT::Libtool.autocorrect_this_file(i)
  # ======================================================================= #
  # The next subsection can re-compile again. We do so at maximum
  # 5 times.
  # ======================================================================= #
  if is_on_roebe? and try_to_autofix? and compiled_n_times? < 5
    increment_compiled_counter # Add +1 to the times we have tried to compile.
    clear_problems
    compile_this_program_again(program?)
  end
end

#try_to_autocorrect_this_erroneous_libtool_entry_later(i) ⇒ Object

#

try_to_autocorrect_this_erroneous_libtool_entry_later

Use this method to register an erroneous libtool entry. It will be fixed at a later time during the regular compile-cycle.

#


11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11076

def try_to_autocorrect_this_erroneous_libtool_entry_later(i)
  # ======================================================================= #
  # Store this faulty .la entry into a local file as well, next. This
  # was added in September 2018.
  # ======================================================================= #
  store_this_as_last_libtool_file(i)
  @internal_hash[:invalid_libtool_archive] = i # This is the libtool-entry that should go away.
  orev 'Note that you can try to correct this error via:'
  e
  e orange('  rbt --fix-libtool-from-file')
  e
end

#try_to_autofix?Boolean Also known as: autofix?, use_autofixing?

#

try_to_autofix?

#

Returns:

  • (Boolean)


11652
11653
11654
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11652

def try_to_autofix?
  @internal_hash[:try_to_autofix]
end

#try_to_automatically_setup_the_rbt_projectObject

#

try_to_automatically_setup_the_rbt_project

This method could be used to automatically try and setup the project on a default GoboLinux system.

#


8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8131

def try_to_automatically_setup_the_rbt_project
  if RBT.is_this_a_real_gobolinux_system?
    orev 'Found a local GoboLinux system.'
    orev 'Setting up some settings to make use of this as our host system.'
    target_file = log_dir?+'is_on_gobolinux.md'
    write_what_into('1', target_file)
    orev 'This will be stored into the file `'+sfile(target_file)+
          rev+'`.'
  end
end

#try_to_batch_compile_this_stack(i) ⇒ Object

#

try_to_batch_compile_this_stack

This method can be used to batch-compile several applications.

Invocation examples:

rbt --batch-compile=autotools
rbt --batch-compile=vid_suite
rbt --batch-compile=mate
rbt --batch-compile=kde5_porting_aids
#


1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1486

def try_to_batch_compile_this_stack(i)
  # ======================================================================== #
  # === Do some sanitizing of the input first.
  # ======================================================================== #
  case i
  # ======================================================================== #
  # === rbt --batch-compile=phonon
  # ======================================================================== #
  when 'phonon',
       /^kde(_|-)?plasma/
    i = 'kde5_plasma'
  # ======================================================================== #
  # === rbt --batch-compile=kde_apps
  # ======================================================================== #
  when /^kde(_|-)?apps/
    i = 'kde5_applications'
  # ======================================================================== #
  # === rbt --batch-compile=protos
  # ======================================================================== #
  when 'protos'
    i = 'xorg_protos'
  end
  case i # case tag
  # ======================================================================== #
  # === rbt --batch-compile=kde5_porting_aids
  # ======================================================================== #
  when /^kde5?(_|-)?porting(_|-)?aids?$/i,
       /^porting(_|-)?aids?$/i
    i = return_kde5_porting_aids
  # ======================================================================== #
  # === rbt --batch-compile=mate
  # ======================================================================== #
  when 'mate',
       /^mate(-|_)?desktop$/
    i = RBT.returned_chained_programs_of_the_mate_desktop
    orev "We will compile all #{sfancy(i.size.to_s)} #{rev}programs "\
         "of the mate-desktop."
    orev 'These include:'
    e; i.each {|entry|
      e "  - #{sfancy(entry)}"
    }; e
  else
    hash = return_chained_programs
    i = hash[i]
  end
  if i.is_a? String and i.include? ','
    i = i.split(',').map(&:strip).flatten # Now it should be an Array.
  end
  if i.is_a? Array
    i.map! {|entry| entry.delete('-') }
  end
  return i
end

#try_to_compile_these_kde_programs(i) ⇒ Object

#

try_to_compile_these_kde_programs

This method has to remain flexible, because the input may be “first=20” or “last=20” and so forth.

Invocation example:

ry --kde1-first=10
#


4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4905

def try_to_compile_these_kde_programs(i)
  if i.frozen?
    i = i.dup
  end
  if i.start_with? '--'
    i.sub!(/^--/,'')
  end
  if i.include? '-'
    these_programs = []
    splitted = i.split('-') # Like: "kde1-first=10"
    last = splitted.last
    first = splitted.first
    case first
    when 'kde1'
      these_programs = return_these_programs(:kde5_foundation)
    when 'kde2'
      these_programs = return_these_programs(:kde5_plasma)
    when 'kde3'
      these_programs = return_these_programs(:kde5_porting_aids)
    when 'kde4'
      these_programs = return_these_programs(:kde5_applications)
    end
    if last # May be like this: "first=10"
      if last.include? 'first='
        n_programs = last.sub(/first=/,'').to_i
        these_programs = these_programs[0 .. (n_programs - 1)]
      end
    end
    set_compile_these_programs(these_programs)
  end
end

#try_to_find_an_alias_to_this_input_unless_the_program_exists(i) ⇒ Object

#

try_to_find_an_alias_to_this_input_unless_the_program_exists

This method will either return the original input unmodified; or it will modify the input in such a way that it points to a valid, registered program.

For example, the String “ph” may become “php”.

#


635
636
637
638
639
640
641
642
643
644
645
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 635

def try_to_find_an_alias_to_this_input_unless_the_program_exists(i)
  unless cookbooks_include_this_program? i.downcase
    is_the_program_included = cookbooks_include_this_program?(
      i.downcase, :with_abbreviations
    )
    if is_the_program_included
      i = abbreviations?[i.downcase]
    end
  end
  return i
end

#try_to_fix_all_shebangsObject

#

try_to_fix_all_shebangs

Use this to fix shebangs of the RBT project.

#


930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 930

def try_to_fix_all_shebangs
  begin
    require 'roebe/classes/shebang_fixer.rb'
    cliner {
      orev 'Trying to fix all Shebangs now:'
      entries = Dir["#{base_directory?}**/**.rb"]
      entries.each { |file|
        file = ENV['RBT_DIR'].to_s+'/'+file
        Roebe::ShebangFixer.new(file)
      }
    }
  rescue LoadError
    orev 'class Roebe::ShebangFixer is not available.'
  end
end

#try_to_install_this_program(i = compile_which_program? ) ⇒ Object

#

try_to_install_this_program

#


1652
1653
1654
1655
1656
1657
1658
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1652

def try_to_install_this_program(
    i = compile_which_program?
  )
  return if i.nil?
  reset_the_cookbook_dataset # Start from a clean state here, by setting it to nil.
  do_compile_this_registered_program(i)
end

#try_to_output_how_many_processors_this_computer_has(file_cpuinfo = FILE_CPUINFO) ⇒ Object

#

try_to_output_how_many_processors_this_computer_has

To try this method on the commandline, do:

ry --n-cores?
#


8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8002

def try_to_output_how_many_processors_this_computer_has(
    file_cpuinfo = FILE_CPUINFO
  )
  if File.exist? file_cpuinfo
    orev 'This computer has '+
         lightseagreen(
           "#{return_n_processors_of_this_computer} processors"
         )+"#{rev}."
  else
    orev 'Can not determine the number of processors as '
    orev "there is no file at #{sfile(file_cpuinfo)}#{rev}."
  end
end

#try_to_recompile_upon_error?Boolean

#

try_to_recompile_upon_error?

#

Returns:

  • (Boolean)


1533
1534
1535
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1533

def try_to_recompile_upon_error?
  @internal_hash[:try_to_recompile_upon_error]
end

#try_to_show_all_binary_duplicates_of_this_program(i = compile_which_program? ) ⇒ Object

#

try_to_show_all_binary_duplicates_of_this_program

Use this method to show which binary duplicates exist for the given input program.

#


7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7458

def try_to_show_all_binary_duplicates_of_this_program(
    i = compile_which_program?
  )
  program_name = i
  if i.nil?
    orev 'A nil value has been found in '+orange(__method__.to_s)+rev+'.'
    pp caller()
  end
  capitalized_program_name = program_name.capitalize
  target = programs_directory?+
           capitalized_program_name+
           program_name.capitalize+'/Current/bin/*'
  orev 'Obtaining all files at `'+sdir(target)+rev+'`.'
  all_binaries = Dir[target]
  all_binaries.select! {|entry|
    File.exist? '/usr/bin/'+File.basename(entry)
  }
  if all_binaries.empty?
    orev 'The '+sdir('/usr/bin/')+
         rev+' hierarchy does not contain '\
         'any of the binaries'
    orev "belonging to #{sfancy(program_name)}#{rev}."
  else
    n_duplicates = all_binaries.size.to_s
    orev "Found #{sfancy(n_duplicates)} #{rev}binary duplicates."
    all_binaries.each {|file|
      e sfile("/usr/bin/#{File.basename(file)}")
    }
  end
end

#try_to_show_the_BLFS_content_of_this_program(i = compile_which_program? ) ⇒ Object

#

try_to_show_the_BLFS_content_of_this_program

This method can be used to show the BLFS content of a program on the commandline.

The argument to this method should be the program that you wish to display on the commandline here.

Invocation examples:

ry gcc --paste-blfs-page
ry libffi --paste-blfs-page
ry php --paste-blfs-page
#


5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5973

def try_to_show_the_BLFS_content_of_this_program(
    i = compile_which_program?
  )
  # ======================================================================= #
  # First, obtain the remove URL that points to the BLFS page.
  # ======================================================================= #
  remote_url = RBT.return_blfs_page_of_this_program(i)
  into_this_html_file = nil
  if remote_url
    what = ''.dup
    orev "A remote URL has been found, at `#{sfancy(remote_url)}#{rev}`."
    orev 'We will next display the content of this remote page '\
         'on the commandline.'
    remote_dataset = URI.open(remote_url).read
    orev 'The data was obtained ('+steelblue('Encoding:')+
         ' '+steelblue(remote_dataset.encoding.to_s)+
         steelblue(')')
    store_here = "#{log_dir?}blfs_webpages/"
    mkdir(store_here) unless File.directory? store_here
    into_this_html_file = "#{store_here}blfs_page_for_#{i}.html"
    orev 'It will be stored into the following file: '
    e
    e "  #{sfile(into_this_html_file)}"
    e
    write_what_into(remote_dataset, into_this_html_file)
    if into_this_html_file and File.exist? into_this_html_file
      remote_dataset = File.read(into_this_html_file, encoding: iso_encoding?)
    end
    orev 'Next, the content of that webpage will be shown as a '+
         gold('STRING')
    orev 'on the commandline, but we will remove all HTML tags.'
    begin
      sanitized_dataset = remote_dataset.gsub(/<\/?[^>]*>/, '')
      sanitized_dataset = sanitized_dataset.split(N).reject {|line|
        line.strip.empty?
      }
    rescue ArgumentError => error
      pp error
    end
    # ===================================================================== #
    # Some HTML entities may have to be re-formatted, for display on the 
    # commandline. For example, '&amp;' is actually Ampersand aka '&'
    # token.
    # ===================================================================== #
    if sanitized_dataset.map! {|entry|
      if entry.include? '&amp;'
        entry.gsub!(/&amp;/,'&')
      end
      entry
    }
    end
    cliner {
      sanitized_dataset.each_with_index {|line, index| index += 1
        line = to_unicode(line)
        e steelblue(index.to_s+') ')+
          sfancy(line)
        what << "#{line}\n"
      }
    }
    if is_on_roebe?
      # =================================================================== #
      # On my home systems, we will also save this result into a
      # local file.
      # =================================================================== #
      target_directory = "#{log_dir?}blfs/"
      mkdir(target_directory) unless File.directory? target_directory
      into = "#{target_directory}#{i}.md" # ← Store it as a .md file.
      write_what_into_via_unicode(what, into)
      if into_this_html_file
        orev "This dataset has also been stored into the "\
             "file `#{sfile(into)}#{rev}`."
      end
    end
    orev "The web-page itself, as a .html page, is "\
         "available at:"
    e
    e "  #{sfile(into_this_html_file)}"
    e 
  else
    orev "No BLFS entry is registered for "\
         "the program `#{sfancy(i)}#{rev}`."
  end
end

#try_to_use_configure_options?Boolean Also known as: use_configure_options?

#

try_to_use_configure_options?

Query whether we will make use of configure options.

Note that this is true by default.

#

Returns:

  • (Boolean)


87
88
89
90
91
92
93
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 87

def try_to_use_configure_options?
  _ = true # ← True by default.
  unless @internal_hash[:try_to_use_configure_options].nil?
    _ = @internal_hash[:try_to_use_configure_options]
  end
  return _
end

#try_to_use_the_file_windows_cookbook?Boolean Also known as: try_to_use_the_file_windows_cookbook

#

try_to_use_the_file_windows_cookbook?

#

Returns:

  • (Boolean)


1724
1725
1726
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1724

def try_to_use_the_file_windows_cookbook?
  config?.try_to_use_the_file_windows_cookbook
end

#try_to_use_this_profile(i) ⇒ Object

#

try_to_use_this_profile

The .tr() operation in the method body is valid, because we will only store the filenames in a lowercased variant, such as “gcc_minimal.md” rather than “gcc-minimal.md”.

Usage examples:

ry gcc --profile=gcc_lfs_pass1
ry gcc --profile=gcc_minimal
#


12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12331

def try_to_use_this_profile(i)
  i = i.to_s.dup.tr('-','_')
  if i.start_with? '-' # This is always a mistake, for the time being, so remove it.
    i[/^-+/] = ''
  elsif i.start_with? '_' # This is always a mistake, for the time being, so remove it.
    i[/^_+/] = ''
  end
  case i
  # ======================================================================= #
  # === gcc-minimal-but-lots-of-languages
  #
  # To use this entry point, try:
  #
  #   ry gcc trad --profile=gccp1
  #   ry gcc --ntrad --use-profile-minimal-gcc-but-lots-of-languages
  #
  # ======================================================================= #
  when /^gcc(-|_)?minimal(-|_)?but(-|_)?lots(-|_)?of(-|_)?languages$/i,
       /^gcc(-|_)?minimal(-|_)?but(-|_)?lots(-|_)?of(-|_)?languages(-|_)?enabled$/i,
       /^basic(-|_)?gcc(-|_)?but(-|_)?with(-|_)?lots(-|_)?of(-|_)?languages(-|_)?enabled$/i,
       /^-?-?basic(-|_)?gcc$/i,
       /^language(-|_)?rich$/i,
       'gccp1',
       /:?gcc1$/i,
       :basic_gcc,
       :basic_gcc_but_with_lots_of_languages_enabled
    i = 'gcc_minimal_but_lots_of_languages_enabled'
    if no_cookbook_dataset?
      set_really_compile_this_program(:gcc)
    end
  # ======================================================================= #
  # === Use the LFS "recommended" version for GLIBC
  #
  # Invocation example:
  #
  #   ry glibc ntrad --dont-symlink --use-glibc1-profile
  #
  # ======================================================================= #
  when /^default(-|_)?lfs(-|_)?glibc$/i,
       :glibc1
    i = 'default_lfs_glibc'
  # ======================================================================= #
  # === qt
  # ======================================================================= #
  when 'qt'
    if no_cookbook_dataset?
      set_really_compile_this_program(:qt)
    end
  # ======================================================================= #
  # === gcc_lfs_pass_1
  # ======================================================================= #
  when /^gcc(_|-)?lfs(_|-)?pass(_|-)?1$/
    i = 'gcc_lfs_pass1.md'
    if no_cookbook_dataset?
      set_really_compile_this_program(:gcc)
    end
  end
  i = i.dup if i.frozen?
  # ======================================================================= #
  # First we will have to try to find the proper profile:
  # ======================================================================= #
  i << '.md' unless i.end_with? '.md'
  target = "#{DIRECTORY_RBT_PROFILES}#{i}"
  if File.exist? target
    orev 'Making use of the profile found at this location:'
    e
    orev "  #{sfile(target)}"
    e
    # ===================================================================== #
    # The file exists, so we can load it.
    # ===================================================================== #
    dataset = File.readlines(target).reject {|line|
      line.strip.start_with? '#' # Get rid of comments.
    }.join(' ').delete("\n").strip.squeeze(' ')
    clear_old_configure_options
    # ===================================================================== #
    # Store it in the internal hash next:
    # ===================================================================== #
    set_configure_options_on_internal_hash(dataset)
  else
    opnn; no_file_exists_at(target)
    orev 'The current behaviour is that RBT will exit upon such an error -'
    orev 'only existing profiles may be used.'
    e
    e "The #{turquoise('available profiles')} #{rev}are:"
    e
    show_the_available_profiles_for_configure_options
    e
    exit
  end
end

#uninstall_this_appdir(i = compile_which_program? ) ⇒ Object

#

uninstall_this_appdir

Invocation example:

rbt evince --uninstall-appdir
#


9789
9790
9791
9792
9793
9794
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9789

def uninstall_this_appdir(
    i = compile_which_program?
  )
  orev "Now trying to uninstall the program called `#{teal(i)}#{rev}`."
  action(:RemoveProgram, i)
end

#unpin_this_program(i) ⇒ Object

#

unpin_this_program

#


9925
9926
9927
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9925

def unpin_this_program(i)
  ::RBT.unpin_this_program(i)
end

#update_all_gems(also_automatically_install_the_updated_gem = ALSO_AUTOMATICALLY_INSTALL_THE_UPDATED_GEM) ⇒ Object

#

update_all_gems

This method allows us to update all gems.

To invoke this method from within RBT::Action::SoftwareManager, try this:

rbt --update-all-gems

Note that the constant ALSO_AUTOMATICALLY_INSTALL_THE_UPDATED_GEM is used to automatically update a thus-downloaded gem.

#


8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8944

def update_all_gems(
    also_automatically_install_the_updated_gem = 
      ALSO_AUTOMATICALLY_INSTALL_THE_UPDATED_GEM
  )
  require 'rbt/check_for_updates/check_for_new_release_on_rubygems.rb'
  orev "Next #{royalblue('updating all local gems')}."
  RBT.update_all_ruby_gems
  if also_automatically_install_the_updated_gem
    array_to_use = RBT.array_these_ruby_gems_were_updated?
    update_these_rubygems(array_to_use)
  end
end

#update_binaries_of_this_program(i) ⇒ Object

#

update_binaries_of_this_program

Invocation examples:

rbt --update-binaries-of=poppler
rbt --update-binaries-of=htop
rbt --update-binaries-of=xinelib
#


11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11316

def update_binaries_of_this_program(i)
  these_binaries = RBT.infer_these_binaries_will_be_installed_by(i)
  # ======================================================================= #
  # Now that we have obtained the binaries we can add it to our
  # .yml file. Note that this will always overwrite any other existing
  # entry, so the first step is to get rid of any old entries, before
  # adding the new entries.
  # ======================================================================= #
  path   = find_this_yaml_file(i)
  string = read_file_in_default_encoding(path)
  if is_on_roebe?
    orev 'Creating a backup of the file first.'
    backup_directory_at = "#{log_dir?}backup/"
    mkdir(backup_directory_at) unless File.directory?(backup_directory_at)
    # ===================================================================== #
    # We will copy the old file, so that we could re-use it if we need to.
    # ===================================================================== #
    opnn; copy_file(
            path,
            backup_directory_at+File.basename(path),
            :be_verbose
          )
  end
  if string.include? ' binaries:'
    if is_on_roebe?
      # =================================================================== #
      # Notify only me on my home system in this case, as most users
      # won't need this information here really.
      # =================================================================== #
      orev "#{tomato('Removing')} #{rev}the old #{slateblue('binaries:')} "\
           "#{rev}entries first."
      new_string = ''.dup
      state_is_open = false
      string.split(N).each {|line|
        if line.include? ' binaries:'
          state_is_open = true
        else
          # =============================================================== #
          # Toggle it unless the next line starts with a ' - '.
          # =============================================================== #
          unless line.start_with?(' - ')
            state_is_open = false
          end
        end
        unless state_is_open
          new_string << line << N
        end
      }
      string = new_string # And re-assign it here.
    end
  end
  # ======================================================================= #
  # Ok, now we can find the proper position and simply add the binaries.
  # We will first check for a "homepage:" String; then "url2:" and
  # then "url1:". These are our "anchors".
  # ======================================================================= #
  if these_binaries.empty?
    orev 'Can not store anything because no binaries could be found.'
  else
    append_this_string = ' binaries:'+N+' - '+these_binaries.join(N+' - ')+N
    splitted = string.split(N)
    array = []
    if string.include? ' blfs: '
      splitted.each {|line|
        if line.include? ' blfs: '
          array << line+N+append_this_string
        else
          array << "#{line}#{N}"
        end
      }
    elsif string.include? 'configure_options: '
      splitted.each {|line|
        if line.include? ' configure_options: '
          array << line+N+append_this_string
        else
          array << "#{line}#{N}"
        end
      }
    elsif string.include? 'url2: '
      splitted.each {|line|
        if line.include? ' url2: '
          array << line+N+append_this_string
        else
          array << "#{line}#{N}"
        end
      }
    else
      orev 'Can not anchor it as no string '\
           'called '+slateblue('blfs:')+
           rev+':, '+slateblue('configure_options:')
      orev 'or '+slateblue('url2:')+rev+' could be found.'
    end
    what = array.join.chomp
    # ===================================================================== #
    # Next update the old content.
    # ===================================================================== #
    into = path
    orev 'Next overwriting the file `'+sfile(into)+rev+'`.'
    write_what_into(what, into)
    if is_on_roebe?
      # =================================================================== #
      # Also auto-updating the rbt project.
      # =================================================================== #
      orev 'Since we are on roebe we will also auto-update the '\
           'rbt project next.'
      cd RUBY_SRC_DIR_AT_HOME+'rbt/'
      require 'roebe/toplevel_methods/rinstall2.rb'
      Roebe.rinstall2
    end
  end
end

#update_binary_names(also_exit = false) ⇒ Object

#

update_binary_names

To invoke this method, try:

ry htop update_binary_names
ry --update-binary-names
#


4571
4572
4573
4574
4575
4576
4577
4578
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4571

def update_binary_names(
    also_exit = false
  )
  also_exit = true if also_exit == :then_exit
  require 'rbt/registered/registered_binaries.rb'
  RBT::Cookbooks::RegisteredBinaries.new
  exit_program if also_exit
end

#update_kde_frameworkObject

#

update_kde_framework

#


5591
5592
5593
5594
5595
5596
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5591

def update_kde_framework
  unless RBT::Cookbooks.const_defined? :UpdateKdeFramework
    require 'rbt/check_for_updates/update_kde_framework.rb'
  end
  UpdateKdeFramework.new
end

#update_kde_plasmaObject

#

update_kde_plasma

Use this method, as delegation, in order to update the KDE5 plasma components.

#


5581
5582
5583
5584
5585
5586
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5581

def update_kde_plasma
  unless RBT::Cookbooks.const_defined? :UpdateKdePlasma
    require 'rbt/check_for_updates/update_kde_plasma.rb'
  end
  UpdateKdePlasma.new
end

#update_kde_porting_aidsObject

#

update_kde_porting_aids

To invoke this, try:

rbt --update-kde-porting-aids
#


2338
2339
2340
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2338

def update_kde_porting_aids
  action(:UpdateKdePortingAids)
end

#update_libraries_of_this_program(i) ⇒ Object

#

update_libraries_of_this_program

Invocation examples:

rbt --update-libraries-of=poppler
rbt --update-libraries-of=htop
rbt --update-libraries-of=xinelib
#


3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3531

def update_libraries_of_this_program(i)
  these_libraries = RBT.infer_these_libraries_will_be_installed_by(i)
  # ======================================================================= #
  # Now that we have obtained the libraries we can add it to our
  # .yml file. Note that this will always overwrite any other existing
  # entry, so the first step is to get rid of any old entries, before
  # adding the new entries.
  # ======================================================================= #
  path   = find_this_yaml_file(i)
  string = read_file_in_default_encoding(path)
  if is_on_roebe?
    orev 'Creating a backup of the file first.'
    backup_directory_at = log_dir?+'backup/'
    mkdir(backup_directory_at) unless File.directory?(backup_directory_at)
    # ===================================================================== #
    # We will copy the old file, so that we could re-use it if we need to.
    # ===================================================================== #
    opnn; copy_file(
            path,
            backup_directory_at+File.basename(path),
            :be_verbose
          )
  end
  if string.include? ' libraries:'
    if is_on_roebe?
      # =================================================================== #
      # Notify only me on my home system in this case, as most users
      # won't need this information here really.
      # =================================================================== #
      orev "#{tomato('Removing')} #{rev}the old "\
           "#{slateblue('libraries:')} #{rev}entries first."
      new_string = ''.dup
      state_is_open = false
      string.split(N).each {|line|
        if line.include? ' libraries:'
          state_is_open = true
        else
          # =============================================================== #
          # Toggle it unless the next line starts with a ' - '.
          # =============================================================== #
          unless line.start_with?(' - ')
            state_is_open = false
          end
        end
        unless state_is_open
          new_string << line << N
        end
      }
      string = new_string # And re-assign it here.
    end
  end
  # ======================================================================= #
  # Ok, now we can find the proper position and simply add the libraries.
  # We will first check for a "homepage:" String; then "url2:" and
  # then "url1:". These are our "anchors".
  # ======================================================================= #
  if these_libraries.empty?
    orev 'Can not store anything because no libraries could be found.'
  else
    append_this_string = ' libraries:'+N+' - '+these_libraries.join(N+' - ')+N
    splitted = string.split(N)
    array = []
    if string.include? ' homepage: '
      splitted.each {|line|
        if line.include? ' homepage: '
          array << line+N+append_this_string
        else
          array << "#{line}#{N}"
        end
      }
    elsif string.include? 'url2: '
      splitted.each {|line|
        if line.include? ' url2: '
          array << line+N+append_this_string
        else
          array << "#{line}#{N}"
        end
      }
    elsif string.include? 'url1: '
      splitted.each {|line|
        if line.include? ' url1: '
          array << line+N+append_this_string
        else
          array << "#{line}#{N}"
        end
      }
    else
      orev 'Can not anchor it as no string '\
           'called '+slateblue('homepage:')+
           rev+':, '+slateblue('url2:')
      orev 'or '+slateblue('url1:')+rev+' could be found.'
    end
    what = array.join.chomp
    # ===================================================================== #
    # Next update the old content.
    # ===================================================================== #
    into = path
    orev 'Next overwriting the file `'+sfile(into)+"#{rev}`."
    write_what_into(what, into)
    if is_on_roebe?
      # =================================================================== #
      # Also auto-updating the rbt project.
      # =================================================================== #
      orev "Since we are on roebe we will also auto-update the "\
           "rbt project next."
      cd "#{RUBY_SRC_DIR_AT_HOME}rbt/"
      require 'roebe/toplevel_methods/rinstall2.rb'
      Roebe.rinstall2
    end
  end
end

#update_library_namesObject

#

update_library_names

To invoke this method, do something like:

ry htop uln
#


2527
2528
2529
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2527

def update_library_names
  RBT::Cookbooks::RegisteredLibraries.new
end

#update_mate_desktop_componentsObject

#

update_mate_desktop_components

Update mate-desktop via this method.

Invocation example:

rbt --update-mate
#


9958
9959
9960
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9958

def update_mate_desktop_components
  action(:CheckForMateDesktopUpdates)
end

#update_program_full_nameObject

#

update_program_full_name

#


8865
8866
8867
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8865

def update_program_full_name
  cookbook_dataset?.update_program_full_name
end

#update_program_nameObject

#

update_program_name

#


1884
1885
1886
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1884

def update_program_name
  cookbook_dataset?.update_program_name
end

#update_program_pathObject Also known as: assemble_full_path

#

update_program_path

#


6203
6204
6205
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6203

def update_program_path
  cookbook_dataset?.update_program_path
end

#update_tagsObject

#

update_tags

This will simply update the tags, by tapping into the Cookbooks project.

#


9528
9529
9530
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9528

def update_tags
  action(:update_tags)
end

#update_these_rubygems(array_to_use = RBT.array_all_rubygems) ⇒ Object

#

update_these_rubygems

This method can be used to specifically update the input-array rubygems.

By default we will feed in all registered rubygems, that is - all .gem files that are registered within the RBT project.

If you want to use another array of programs, pass in the Array of .gem files that you wish to use, into this method.

To invoke this method from the commandline, issue something like this:

rbt --install-all-rubygems
#


7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 7828

def update_these_rubygems(
    array_to_use = RBT.array_all_rubygems
  )
  unless array_to_use.empty?
    initialize_default_values
    array_to_use.each {|this_program|
      orev "Now installing the ruby gem "\
           "called #{slateblue(this_program)}#{rev}:"
      RBT.install_this_rubygem(this_program)
    }
  end
end

#update_this_entry(i) ⇒ Object

#

update_this_entry

#


5107
5108
5109
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5107

def update_this_entry(i)
  action(:UpdateEntry, i)
end

#upload_binaries?Boolean

#

upload_binaries?

#

Returns:

  • (Boolean)


10182
10183
10184
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10182

def upload_binaries?
  @internal_hash[:upload_binaries]
end

#upload_to(upload_this_file = '/Depot/Temp/xchat.desktop', this_url = 'shevegen.square7.ch', optional_cd_into_this_directory = nil) ⇒ Object

#

upload_to

This can be used to upload a RBT file (or any other file) to a remote host, via FTP.

We will make use of the FTP-Paradise project for this.

Usage examples:

ry php upload /tmp/python-3.1.1.recipe
ry php upload
#


6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6513

def upload_to(
    upload_this_file = '/Depot/Temp/xchat.desktop',
    this_url         = 'shevegen.square7.ch',
    optional_cd_into_this_directory = nil
  )
  case this_url
  when :default
    this_url = 'shevegen.square7.ch'
  end
  this_recipe = '/home/Temp/xchat.desktop' if this_recipe.nil?
  ftp = FtpParadise::Connection.new
  ftp. = 'shevegen'
  ftp.password   = ENV['MY_FTP_PASSWORD']
  ftp.url        = this_url
  if optional_cd_into_this_directory
    ftp.change_directory(optional_cd_into_this_directory)
  end
  ftp.upload(upload_this_file)
end

#url1?Boolean Also known as: url?, url1, remote_url?, remote_URL?

#

url1?

#

Returns:

  • (Boolean)


12433
12434
12435
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12433

def url1?
  cookbook_dataset?.url1?
end

#use_a_random_extracted_directoryObject

#

use_a_random_extracted_directory

Use a random name for the extracted directory. That way we can compile the same program concurrently, for whatever the reason (such as when you want to use different options for the compile-run as such).

Usage example:

ry htop --random-extracted-dir
#


1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1289

def use_a_random_extracted_directory
  # ======================================================================= #
  # First build up the gibberish name.
  # ======================================================================= #
  gibberish_name = ''.dup
  possibilities = ('A'..'Z').to_a+
                  ('a'..'z').to_a+
                  ('0'..'9').to_a
  10.times {
    gibberish_name << possibilities.sample
  }
  gibberish_name << '_' # And the last one is a separator-character.
  # ======================================================================= #
  # Next, create that directory - it must end with the assumed
  # extracted-directory name:
  # ======================================================================= #
  target = rbt_log_directory?+
           gibberish_name+
           program_name_and_program_version?+
           '/'
  set_extract_to_this_directory_as_specified_by_the_user(target)
  do_show_the_infobox
  cd(target)
  extract_what_to(program_path?, target) {{ append_to_the_commandline: '--strip-components=1' }}
  cd(target)
  do_these_logic_steps(
    :consider_creating_the_appdir,
    :consider_applying_a_patch,
    :check_for_sed_action,
    :run_preinstall_actions,
    :register_that_this_program_is_currently_being_compiled,
    :run_pre_configure_steps_if_requested_to_do_so,
    :decide_whether_to_build_statically,
    :decide_whether_to_invoke_autogen,
    :decide_whether_to_invoke_the_autoconf_command,
    :run_configure_like_stage,
    :check_for_common_problems_and_common_errors,
    :consider_symlinking_glib_schema_files_into_the_usr_share_hierarchy,
    :prepare_symlink_program_instance,
    :consider_removing_empty_subdirectories,
    :store_time_snapshot,
    :consider_reporting_the_time_it_took_to_compile_this_program,
    :consider_performing_postinstallation_actions,
    :do_strip_the_compiled_binaries,
    :consider_creating_and_populating_the_pkgconfig_directory,
    :register_configure_line_into_configure_database,
    :consider_symlinking_the_pkgconfig_files,
    :consider_checking_whether_the_compiled_binaries_are_already_registered,
    :consider_running_ldconfig
  )
end

#use_a_specific_program_version(i) ⇒ Object

#

use_a_specific_program_version

Use this method to set to a specific program version.

Currently we will act on –version= and on –use-version=.

To check the regex, look here:

http://rubular.com/r/Wnq91wy8Nx

To test this, try any of the following:

ry gcc --version=4.5.3.tar.xz
ry gcc --use-version=4.5.3.tar.xz
ry nano --v=2.4.3
ry mesa --use-this-version=mesa-18.2.6
#


4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4699

def use_a_specific_program_version(i)
  i = i.dup
  if compile_which_program?.nil?
    set_compile_this_program(
      first_non_hyphened_argument_from_the_commandline_arguments
    )
    initialize_cookbook_dataset
  end
  # ======================================================================= #
  # We don't want file-extensions here.
  # ======================================================================= #
  i = remove_file_extension(i)
  if i.include?('=')
    splitted = i.split('=') # Get the last part, e. g. "11.3.0".
    i = splitted.last
  end
  # ======================================================================= #
  # Now we have e. g. input such as "mesa-18.2.6". Or just
  # "11.3.0". In the latter case we have to modify the input
  # a bit.
  # ======================================================================= #
  if i.include?('-') or i.include?('_')
    set_program_name(
      program_information_return_program_name(i)
    )
    set_program_short_name(
      program_information_return_program_name(i)
    )
    i = program_information_return_version(i).dup
  else
    # Else we will just use it directly as version.
  end
  # ======================================================================= #
  # In the past we used a regex, like shown here:
  #
  #   https://rubular.com/r/Z6LP2FCENzPj
  #
  # But we probably don't have to do so since January 2019.
  # ======================================================================= #
  set_program_version(i)
  orev "Setting to the specific version `#{royalblue(i)}#{rev}` "\
       "now (for the program #{orange(compile_which_program?)}#{rev})."
  # ======================================================================= #
  # Set it in the internal Hash - it will be synced lateron, see the
  # file sync.rb for this.
  # ======================================================================= #
  new_target_prefix = rds(
    "#{programs_directory?}/#{compile_which_program?.to_s.capitalize}/#{i}/"
  )
  # ======================================================================= #
  # We will also modify the original program_path.
  # ======================================================================= #
  set_user_prefix(
    new_target_prefix
  )
  if archive_type?
    unless archive_type?.empty?
      empty_archive_type
    end
  else
    set_archive_type('.tar.xz') # Assume a default here.
  end
  update_program_name
  set_program_full_name(
    cookbooks_program_name?
  )
  update_program_path
  cookbook_dataset?.rebuild_program_path
  # ======================================================================= #
  # We must also change url1 in the cookbook dataset. We will apply
  # a regex for this job - see here: https://rubular.com/r/JZKjmx413E3uXI
  # ======================================================================= #
  use_this_regex = /(\d{1,2}\.\d{1,2}\.\d{1,2})/ 
  cookbook_dataset?.set_url1(
    url1?.gsub(
      use_this_regex,
      ProgramInformation.return_version(program_name_and_program_version?)
    )
  )
end

#use_autoconf?Boolean

#

use_autoconf?

This method determines as to whether we will use autoconf or whether we will not. By default the value of @internal_hash is nil. If a user modifies this value from the commandline, to either true or false, then we will use that value; otherwise we will use the value defined in the cookbook-dataset for this particular program at hand.

#

Returns:

  • (Boolean)


8594
8595
8596
8597
8598
8599
8600
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8594

def use_autoconf?
  _ = cookbook_use_autoconf? # ← This is the default.
  unless @internal_hash[:use_autoconf].nil?
    _ = @internal_hash[:use_autoconf]
  end
  return _
end

#use_autogen?Boolean

#

use_autogen?

Query method over as to whether we will use autogen.

#

Returns:

  • (Boolean)


1296
1297
1298
1299
1300
1301
1302
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1296

def use_autogen?
  _ = cookbook_dataset_use_autogen? 
  unless @internal_hash[:use_autogen].nil?
    _ = @internal_hash[:use_autogen]
  end
  _
end

#use_build_directory?Boolean Also known as: use_a_build_directory?, use_build_dir?, do_we_use_a_build_directory?

#

use_build_directory?

Query-method over as to whether we will use a build directory or not.

This method will return a Boolean value (true or false).

#

Returns:

  • (Boolean)


254
255
256
257
258
259
260
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 254

def use_build_directory?
  _ = cookbook_dataset?.use_build_directory?
  unless @internal_hash[:use_build_directory].nil?
    _ = @internal_hash[:use_build_directory]
  end
  return _
end

#use_ccache?Boolean Also known as: will_ccache_be_used?

#

use_ccache?

#

Returns:

  • (Boolean)


11849
11850
11851
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11849

def use_ccache?
  @internal_hash[:use_ccache]
end

#use_configure_as_build_systemObject

#

use_configure_as_build_system

#


2728
2729
2730
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2728

def use_configure_as_build_system
  set_use_this_build_system(:configure)
end

#use_default_chroot_as_prefix(i = '/Depot/Chroot/') ⇒ Object

#

use_default_chroot_as_prefix

Here we will use the default chroot as prefix. On my system this defaults to /Depot/Chroot/.

#


10427
10428
10429
10430
10431
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10427

def use_default_chroot_as_prefix(
    i = '/Depot/Chroot/'
  )
  set_user_prefix(i)
end

#use_default_configure_command(i = 'configure') ⇒ Object

#

use_default_configure_command

This method will hard-set the configure command.

#


8874
8875
8876
8877
8878
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8874

def use_default_configure_command(
    i = 'configure'
  )
  cookbook_dataset?.configure_command_to_use = i
end

#use_maximum_speed_for_compilation?(use_maximum_speed_for_compilation = config?.use_maximum_speed_for_compilation) ⇒ Boolean

#

use_maximum_speed_for_compilation?

#

Returns:

  • (Boolean)


11289
11290
11291
11292
11293
11294
11295
11296
11297
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11289

def use_maximum_speed_for_compilation?(
    use_maximum_speed_for_compilation = config?.use_maximum_speed_for_compilation
  )
  result = false
  if use_maximum_speed_for_compilation
    result = use_maximum_speed_for_compilation
  end
  return result
end

#use_meson_configure_options?Boolean

#

use_meson_configure_options?

#

Returns:

  • (Boolean)


1814
1815
1816
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1814

def use_meson_configure_options?
  @internal_hash[:use_meson_configure_options]
end

#use_opn?Boolean

#

use_opn?

#

Returns:

  • (Boolean)


11691
11692
11693
11694
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11691

def use_opn?
  @internal_hash and # ← Must be guarded a little here.
  @internal_hash[:use_opn] 
end

#use_opt_as_prefixObject

#

use_opt_as_prefix

#


10458
10459
10460
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10458

def use_opt_as_prefix
  set_user_prefix('/opt/')
end

#use_porg?Boolean Also known as: will_we_use_porg?

#

use_porg?

#

Returns:

  • (Boolean)


690
691
692
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 690

def use_porg?
  @internal_hash[:use_porg]
end

#use_the_internal_sed_wrapper?Boolean

#

use_the_internal_sed_wrapper?

Whether we will use the internal sed wrapper, aka class SedWrapper.

Since as of February 2018, we will not do so.

You can query this via the commandline like so:

rbt use-the-internal-sed-wrapper?
#

Returns:

  • (Boolean)


1175
1176
1177
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1175

def use_the_internal_sed_wrapper?
  @internal_hash[:use_the_internal_sed_wrapper]
end

#use_this_as_build_directory?Boolean

#

use_this_as_build_directory?

#

Returns:

  • (Boolean)


220
221
222
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 220

def use_this_as_build_directory?
  @internal_hash[:use_this_as_build_directory]
end

#use_this_as_programs_dir(i = programs_directory? ) ⇒ Object

#

use_this_as_programs_dir

#


10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10077

def use_this_as_programs_dir(
    i = programs_directory?
  )
  i = convert_end_variable # Sanitize it.
  i << '/' unless i.end_with? '/'
  orev "Assigning a new Programs directory at: #{simp(i)}"
  RBT.configuration?.programs_directory = i
  # ======================================================================= #
  # Next we also must sync towards the main dataset.
  # ======================================================================= #
  cookbook_dataset?.programs_directory = i
  cookbook_dataset?.sanitize_prefix :appdir_path
end

#use_this_build_directory?Boolean Also known as: use_which_build_directory?, path_to_build_directory?, build_directory?, location_to_the_build_directory?

#

use_this_build_directory?

Ask the dataset for the proper build directory to use.

This may not always be true though.

#

Returns:

  • (Boolean)


12002
12003
12004
12005
12006
12007
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12002

def use_this_build_directory?
  _ = name_for_the_build_directory?
  # _ = _.path?.to_s if _ # Should be equal to: .path?
  # ^^^ uncommented as of April 2021.
  _
end

#use_this_compile_version(i) ⇒ Object

#

use_this_compile_version

To try this, do:

ry glib --compile-version=2.16.33_ROEBE
#


954
955
956
957
958
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 954

def use_this_compile_version(i)
  compile_as_appdir(nil, :be_silent)
  set_program_version(i)
  set_use_this_prefix(static_appdir_prefix?)
end

#use_this_environment_variable(i) ⇒ Object

#

use_this_environment_variable

This method will use a specific environment variable as the new prefix. An example follows next.

To use this, try a command invocation such as:

--use-this-environment-variable=XFCE_PREFIX
--use-this-environment-variable=MATE_DESKTOP_PREFIX
#


3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3711

def use_this_environment_variable(i)
  i = i.to_s.dup # We only want to work on unfrozen Strings.
  if i.include? '--'
    i.gsub!(/--/,'') # Only get rid of '--', not '-'.
  end
  if i.include? '$'
    i.delete!('$')
  end
  if i.include? '='
    i = i.split('=').last
    # ====================================================================== #
    # Now we assume this to be an environment variable.
    # ====================================================================== #
    if ENV.has_key? i
      i = ENV[i]
    end
  else
    i = ENV[i] if ENV.has_key? i
  end
  # ======================================================================= #
  # Finally, set the user-prefix next.
  # ======================================================================= #
  set_user_prefix(i)
end

#use_this_make_command?(this_make_command_is_to_be_used_if_set = @internal_hash[:use_this_make_command]) ⇒ Boolean Also known as: use_which_make_command?

#

use_this_make_command?

This is most commonly just “make” - but it may also be “ninja” or another build system.

#

Returns:

  • (Boolean)


594
595
596
597
598
599
600
601
602
603
604
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 594

def use_this_make_command?(
    this_make_command_is_to_be_used_if_set = 
      @internal_hash[:use_this_make_command]
  )
  _ = 'make' # Set this as the default.
  _ = cookbook_dataset_make_command? if cookbook_dataset_make_command?
  unless this_make_command_is_to_be_used_if_set.nil?
    _ = this_make_command_is_to_be_used_if_set unless this_make_command_is_to_be_used_if_set.empty?
  end
  return _ # And return it here.
end

#use_this_make_install_command?Boolean

#

use_this_make_install_command?

#

Returns:

  • (Boolean)


427
428
429
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 427

def use_this_make_install_command?
  cookbook_dataset?.use_this_make_install_command?
end

#use_this_specific_program_version?Boolean

#

use_this_specific_program_version?

#

Returns:

  • (Boolean)


1710
1711
1712
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1710

def use_this_specific_program_version?
  @internal_hash[:use_this_specific_program_version]
end

#use_traditional_env_pathObject

#

use_traditional_env_path

This method will “put” /usr/bin/ at the beginning of the path.

It can be invoked from the commandline via:

ry fluxbox --traditional-path
#


12530
12531
12532
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 12530

def use_traditional_env_path
  prepend_env_path_with('/usr/bin/')
end

#use_urlObject

#

use_url

Usage example:

ry ffmpeg use_url
#


2740
2741
2742
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2740

def use_url
  dataset?.program_name = 'USE_URL' # RBT::Cookbooks::SanitizeCookbook will handle this call.
end

#use_utf8_encoding_in_envObject

#

use_utf8_encoding_in_env

#


9633
9634
9635
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9633

def use_utf8_encoding_in_env
  ENV['LC_ALL'] = 'en_US.utf8'
end

#use_which_build_system?Boolean Also known as: build_system_to_be_used?, build_system?, build_type?

#

use_which_build_system?

#

Returns:

  • (Boolean)


1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1333

def use_which_build_system?
  # ======================================================================= #
  # We default to the cookbook dataset when it comes to a specific
  # build system.
  # ======================================================================= #
  _ = cookbookset_dataset_use_which_build_system?
  unless @internal_hash[:use_this_build_system].nil?
    _ = @internal_hash[:use_this_build_system]
  end
  _ = _.to_sym if _
  return _
end

#use_which_compiler?Boolean Also known as: compiler_to_be_used?

#

use_which_compiler?

#

Returns:

  • (Boolean)


1307
1308
1309
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1307

def use_which_compiler?
  config?.use_this_compiler
end

#use_which_configure_command?Boolean Also known as: use_this_configure_command?

#

use_which_configure_command?

#

Returns:

  • (Boolean)


527
528
529
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 527

def use_which_configure_command?
  @internal_hash[:configure_command_to_use]
end

#use_which_prefix?Boolean Also known as: real_prefix?, prefix?, prefix, return_proper_prefix, use_this_prefix?, return_proper_prefix?

#

use_which_prefix?

This will properly handle the prefix in use. It is the general getter-method which should be used whenever we wish to obtain the prefix in use.

Note that user_prefix? can override this.

#

Returns:

  • (Boolean)


126
127
128
129
130
131
132
133
134
135
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 126

def use_which_prefix?
  _ = prefix_object? # .prefix? # @internal_hash[:prefix]
  if _.do_we_want_to_use_an_appdir_prefix?
    _.use_appdir_prefix_for_this_program(compile_which_program?)
  end
  # if user_prefix?
  #   _.set_use_this_prefix(user_prefix?)
  # end
  return _.prefix?
end

#use_which_system_command?Boolean

#

use_which_system_command?

#

Returns:

  • (Boolean)


949
950
951
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 949

def use_which_system_command?
  @internal_hash[:use_which_system_command]
end

#user_prefix?Boolean

#

user_prefix?

#

Returns:

  • (Boolean)


76
77
78
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 76

def user_prefix?
  @internal_hash[:user_prefix]
end

#uses_appdir_prefix?(i = use_which_prefix?.to_s) ⇒ Boolean Also known as: uses_an_appdir_prefix?, is_this_input_an_appdir_prefix?, is_this_an_appdir_prefix?, is_appdir_prefix?, is_an_appdir_prefix?, app_dir_prefix?, is_app_dir?, program_uses_an_appdir_prefix?, appdir_prefix_was_used?

#

uses_appdir_prefix?

This method will return true if the given input is an AppDir-prefix; and false otherwise.

An AppDir prefix is one that may include the programs directory as a String - for example the string “/Programs/” or “/home/Programs/”.

#

Returns:

  • (Boolean)


153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 153

def uses_appdir_prefix?(
    i = use_which_prefix?.to_s
  )
  return false if i.nil?
  case i
  when 'ntrad', 'appdir', 'appdir_prefix'
    return true
  else
    # ===================================================================== #
    # We may also have to check on the number, e. g.
    # (i.to_s =~ /\d+/) # And "has a number".
    # ===================================================================== #
    return i.include?(programs_directory?)
  end
end

#uses_the_meson_build_system?Boolean Also known as: do_we_use_the_meson_build_system?

#

uses_the_meson_build_system?

This method will query whether the meson-build system is used or not.

#

Returns:

  • (Boolean)


10295
10296
10297
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10295

def uses_the_meson_build_system?
  use_this_build_system?.to_sym == :meson
end

#verbose_cflags_in_use?Boolean

#

verbose_cflags_in_use?

#

Returns:

  • (Boolean)


11856
11857
11858
11859
11860
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11856

def verbose_cflags_in_use?
  result = cflags_in_use?.to_s
  result = 'No CFLAGS in use.' if result.empty?
  return result
end

#verbose_disable_ccacheObject

#

verbose_disable_ccache

#


10237
10238
10239
10240
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10237

def verbose_disable_ccache
  orev 'We will not use ccache.'
  disable_ccache
end

#verbose_disable_maximum_speed_for_compilationObject

#

verbose_disable_maximum_speed_for_compilation

#


844
845
846
847
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 844

def verbose_disable_maximum_speed_for_compilation
  orev 'We will not be using maximum speed.'
  configuration?.use_maximum_speed_for_compilation = false
end

#verbose_disable_sedObject

#

verbose_disable_sed

#


4217
4218
4219
4220
4221
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4217

def verbose_disable_sed
  orev "We will not use the "\
       "#{powderblue('internal sed-wrapper')}#{rev}."
  disable_internal_sed
end

#verbose_do_extract_onlyObject

#

verbose_do_extract_only

#


10776
10777
10778
10779
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10776

def verbose_do_extract_only
  orev 'We will merely extract the archive, then exit.'
  @internal_hash[:extract_only] = true
end

#verbose_do_not_strip_the_binariesObject

#

verbose_do_not_strip_the_binaries

This will notify the user what we will do, and also toggle the flag that keeps track over as to whether we will run “strip” on the compiled binaries or whether we will not.

#


1858
1859
1860
1861
1862
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1858

def verbose_do_not_strip_the_binaries
  orev "We will not strip the binaries (in the "\
       "#{sdir('bin/')} #{rev}subdirectory)."
  do_not_strip_binaries
end

#verbose_do_not_use_special_environment_flagsObject

#

verbose_do_not_use_special_environment_flags

If we do not want to use any ENV variable, this entry point will help us.

#


808
809
810
811
812
813
814
815
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 808

def verbose_do_not_use_special_environment_flags
  orev "We will not use any #{teal('special environmental flag')}"\
       "#{rev} (ENV)."
  path = query_path?
  ENV.clear
  set_path(path) # Must re-enable PATH environment as it was.
  @internal_hash[do_not_use_special_environment_flags] = true
end

#verbose_do_not_use_special_flagsObject

verbose_do_not_use_special_flags

#


4225
4226
4227
4228
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4225

def verbose_do_not_use_special_flags
  orev 'We will not use any special ENV flags, save for PATH.'
  clear_env_variables_but_ensure_the_path_variable_works
end
#

This method can be called from the commandline. As a consequence, we must modify the @internal_hash rather than the dataset stored in the cookbooks.

#


5873
5874
5875
5876
5877
5878
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 5873

def verbose_do_symlink_headers_into_usr_include_hierarchy
  orev 'We will try to symlink '+orange('.h')+' files into '\
       'the '+sdir('/usr/include/')+
       "#{rev} hierarchy."
  @internal_hash[:symlink_headers] = true
end

#verbose_enable_glib_schemaObject

#

verbose_enable_glib_schema

#


1986
1987
1988
1989
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1986

def verbose_enable_glib_schema
  orev "Enabling #{slateblue('glib-schemata')} #{rev}next."
  do_use_glib_schema # Enable the glib-schemata here.
end
#
#


2534
2535
2536
2537
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2534

def verbose_enable_pkgconfig_symlink
  show_enable_pkgconfig_symlinking_message
  set_pkgconfig_symlink 'yes'
end

#verbose_enable_porgObject

#

verbose_enable_porg

#


4466
4467
4468
4469
4470
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4466

def verbose_enable_porg
  orev 'We will use the program "'+plum('porg')+
       '" for the "make install" step.'
  enable_porg
end

#verbose_enable_staticObject Also known as: enable_static_compilation

#

verbose_enable_static

This method can be used to enable static compilation of the program. The user can tap into this method by issuing –static on the commandline, for instance.

#


9210
9211
9212
9213
9214
9215
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9210

def verbose_enable_static
  orev "Trying to #{steelblue('compile statically')} "\
       "#{rev}(no shared libraries)."
  do_enable_static_compilation
  append_static_onto_the_cflags
end

#verbose_find_all_keys_starting_with(i) ⇒ Object

#

verbose_find_all_keys_starting_with

This method will feedback all programs that start with a given (input) letter.

#


6366
6367
6368
6369
6370
6371
6372
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6366

def verbose_find_all_keys_starting_with(i)
  orev "Finding all matches starting with the letter `"\
       "#{sfancy(i.delete('*'))}#{rev}` now:"
  e
  find_all_keys_starting_with(i)
  e
end

#verbose_generate_the_pdf_tutorialObject

#

verbose_generate_the_pdf_tutorial

#


10123
10124
10125
10126
10127
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 10123

def verbose_generate_the_pdf_tutorial
  orev 'We will generate a .pdf file next which will contain the'
  orev 'instructions on how to use the RBT project.'
  RBT.generate_pdf_tutorial
end

#verbose_guess_the_build_typeObject

#

verbose_guess_the_build_type

#


11760
11761
11762
11763
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11760

def verbose_guess_the_build_type
  orev "The (guessed) build type is `"+
       "#{slateblue(guess_build_type.to_s)}#{rev}`."
end

#verbose_md5_checking(_ = program_path? ) ⇒ Object

#

verbose_md5_checking

Use this method to do md5-checksum checking.

#


822
823
824
825
826
827
828
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 822

def verbose_md5_checking(
    _ = program_path?
  )
  opne sfancy('The md5sum of `')+simp(program_name?)+
       sfancy('` in `')+sfile(_)+sfancy('` is:')
  orev simp('  '+return_md5(_)) # This method is defined here.
end

#verbose_purge_fhs_binaries_of_this_program(i) ⇒ Object

#

verbose_purge_fhs_binaries_of_this_program

This method will notify the user as to what will be done, then delegate towards purge_fhs_binaries_of_this_program().

#


9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9878

def verbose_purge_fhs_binaries_of_this_program(i)
  i = [i].flatten.compact
  i.each {|entry|
    entry.downcase!
    orev "Now purging all #{mediumspringgreen('binaries')} #{rev}of "\
         "the program `#{sfancy(entry)}#{rev}`, at the #{sdir('/usr/bin/')}"\
         " #{rev}hierarchy."
    purge_fhs_binaries_of_this_program(entry)
  }
end

#verbose_purge_fhs_libraries_of_this_program(i) ⇒ Object

#

verbose_purge_fhs_libraries_of_this_program

This method will notify the user as to what will be done, then delegate towards purge_fhs_libraries_of_this_program().

#


4243
4244
4245
4246
4247
4248
4249
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 4243

def verbose_purge_fhs_libraries_of_this_program(i)
  i = RBT.return_alias_program_name_for(i)
  orev "Now purging all #{mediumspringgreen('lib/')} #{rev}programs "\
       "of `#{sfancy(i)}#{rev}` at the #{sdir('/usr/lib/')}"\
       " #{rev}hierarchy."
  purge_fhs_libraries_of_this_program(i)
end

#verbose_query_whether_this_program_can_be_compiled_statically(this_program = compile_which_program? ) ⇒ Object

#

verbose_query_whether_this_program_can_be_compiled_statically

#


11237
11238
11239
11240
11241
11242
11243
11244
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 11237

def verbose_query_whether_this_program_can_be_compiled_statically(
    this_program = compile_which_program?
  )
  _ = cookbook_dataset?
  orev 'Can the program '+sfancy(this_program)+rev+
       ' be compiled statically: '+
       lightgreen(verbose_truth(_.can_be_compiled_statically?))
end

#verbose_query_whether_we_will_use_the_internal_sed_wrapper(shall_we_exit = :do_not_exit) ⇒ Object

#

verbose_query_whether_we_will_use_the_internal_sed_wrapper

Query whether the internal sed-wrapper will be used.

Invocation example:

rbt --use-the-internal-sed-wrapper?
#


3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 3277

def verbose_query_whether_we_will_use_the_internal_sed_wrapper(
    shall_we_exit = :do_not_exit
  )
  if use_the_internal_sed_wrapper?
    orev 'Yes, the internal sed-wrapper will be used ('+
         slateblue('class SedWrapper')+
         rev+').'
  else
    orev 'No, the internal sed-wrapper will '+
         orange('NOT')+
         rev+' be used (class SedWrapper).'
  end
  case shall_we_exit
  when :and_exit, :and_then_exit
    exit_program
  end
end

#verbose_report_will_we_use_autogen(i = compile_which_program? ) ⇒ Object

#

verbose_report_will_we_use_autogen

This method will output, in a verbose manner, whether we will use autogen or whether we will not.

#


2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2584

def verbose_report_will_we_use_autogen(
    i = compile_which_program?
  )
  if cookbook_dataset?.nil?
    initialize_dataset_for(i)
  end
  will_we_use_autogen = use_autogen?
  if will_we_use_autogen.nil? and cookbook_dataset_use_autogen?
    will_we_use_autogen = true
  end
  if will_we_use_autogen
    orev "Yes, autogen will be used for the "\
         "program `#{sfancy(i)}#{rev}`."
  else
    orev "No, autogen will #{swarn('NOT')} #{rev}be used "\
         "for the program #{sfancy(i)}#{rev}."
  end
end

#verbose_skip_extractingObject

#

verbose_skip_extracting

#


6605
6606
6607
6608
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 6605

def verbose_skip_extracting
  orev 'The archive will not be extracted.'
  skip_extracting
end

#waf_file_exists?(this_file = 'waf') ⇒ Boolean Also known as: waf_file?

#

waf_file_exists?

This boolean query method will determine whether a waf-file exists.

The input-argument is used primarily so that we can use another target-directory for where the ‘waf’ file may exist.

The method resides in this file here because waf ultimately depends on python.

#

Returns:

  • (Boolean)


8065
8066
8067
8068
8069
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 8065

def waf_file_exists?(
    this_file = 'waf'
  )
  File.exist? this_file
end

#warning_argument_was_not_found(i) ⇒ Object

#

warning_argument_was_not_found

Call this method when an argument was not found.

#


390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 390

def warning_argument_was_not_found(i)
  print rev
  cliner
  opnn
  ewarn "Attention: The specified commandline argument"
  e
  e  "  #{sfancy(i.to_s)}"
  e
  opnn
  ewarn 'was NOT found.'
  opnn
  ewarn 'Have a look at the spelling. Should this '\
        'commandline argument exist?'
  orev N
  opnn
  ewarn "If you are convinced that this may be a bug or a "\
        "missing feature that"
  opnn
  ewarn 'should be supported by RBT, feel free to'
  opnn
  ewarn 'report this to the lead developer(s).'
  opne
  report_to_developers
  e
  cliner
  # Finish here, so we display a nice coloured line still.
  # stop_on_error
  exit_program
end

#we_can_not_continue(be_verbose = be_verbose? ) ⇒ Object Also known as: can_not_continue, do_not_continue

#

we_can_not_continue

#


1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
# File 'lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb', line 1194

def we_can_not_continue(
    be_verbose = be_verbose?
  )
  case be_verbose
  when :be_quiet
    be_verbose = false
  end
  if be_verbose
    orev "The RBT scripts can not continue."
  end
  set_can_we_continue(false)
end

#we_can_not_continue_and_we_will_not_run_make_installObject

#

we_can_not_continue_and_we_will_not_run_make_install

#


1086
1087
1088
1089
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 1086

def we_can_not_continue_and_we_will_not_run_make_install
  we_can_not_continue
  do_not_run_make_install
end

#we_tried_to_compile_this_program_n_times?Boolean Also known as: compiled_n_times?

#

we_tried_to_compile_this_program_n_times

#

Returns:

  • (Boolean)


2658
2659
2660
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2658

def we_tried_to_compile_this_program_n_times?
  @internal_hash[:we_tried_to_compile_this_program_n_times]
end

#will_be_extracted_towards?Boolean

#

will_be_extracted_towards?

This method will tell us the full path of the extracted directory for the program at hand.

A trailing ‘/’ is required for the result of this method.

Returns: a String.

#

Returns:

  • (Boolean)


913
914
915
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 913

def will_be_extracted_towards?
  "#{log_directory?}#{program_name_and_program_version?}/"
end

#will_gcc_be_used_for_compilation?Boolean

#

will_gcc_be_used_for_compilation?

#

Returns:

  • (Boolean)


846
847
848
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 846

def will_gcc_be_used_for_compilation?
  use_which_compiler? == 'gcc'
end

#will_we_make_use_of_abbreviations?Boolean

#

will_we_make_use_of_abbreviations?

This will tap into the main (toplevel) configuration setting.

#

Returns:

  • (Boolean)


9724
9725
9726
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 9724

def will_we_make_use_of_abbreviations?
  RBT.configuration?.use_abbreviations
end

#work_on_which_program?Boolean Also known as: work_on_this_program?

#

work_on_which_program?

This method is a bit different to the method called install_which_programs? in that it will always return the first element of the Array, whereas the other method mentioned will yield an Array.

#

Returns:

  • (Boolean)


1382
1383
1384
# File 'lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb', line 1382

def work_on_which_program?
  ::RBT.install_which_programs?.first
end

#zero_this_global_flag_file(i) ⇒ Object

#

zero_this_global_flag_file

#


2783
2784
2785
2786
2787
2788
# File 'lib/rbt/actions/individual_actions/software_manager/misc.rb', line 2783

def zero_this_global_flag_file(i)
  orev "Now resetting all global flags to "\
       "zero again. (File: #{sfile(i)}#{rev})"
  remove_file(i)
  touch_file(i)
end