rbt 0.16.12 → 0.16.13

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rbt might be problematic. Click here for more details.

@@ -340,13 +340,6 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
340
340
  RBT.return_this_plasma_component
341
341
  end
342
342
 
343
- # ========================================================================= #
344
- # === create_programs_url_file
345
- # ========================================================================= #
346
- def create_programs_url_file
347
- action(__method__.to_sym)
348
- end
349
-
350
343
  # ========================================================================= #
351
344
  # === compile_these_tags
352
345
  #
@@ -1095,22 +1088,6 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
1095
1088
  do_not_run_make_install
1096
1089
  end
1097
1090
 
1098
- # ========================================================================= #
1099
- # === generate_shell_completion
1100
- #
1101
- # Generates shell completion code. Right now it will only work for Bash.
1102
- #
1103
- # Invocation example:
1104
- #
1105
- # ry --generate_shell_completion
1106
- #
1107
- # ========================================================================= #
1108
- def generate_shell_completion(
1109
- for_this_shell = :all
1110
- )
1111
- action(:GenerateShellCompletion, for_this_shell)
1112
- end
1113
-
1114
1091
  # ========================================================================= #
1115
1092
  # === append_enable_shared_to_the_configure_options
1116
1093
  #
@@ -3415,13 +3392,6 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
3415
3392
  consider_enabling_python3(true)
3416
3393
  end
3417
3394
 
3418
- # ========================================================================= #
3419
- # === return_xfce_components
3420
- # ========================================================================= #
3421
- def return_xfce_components
3422
- action(:return_xfce_components)
3423
- end
3424
-
3425
3395
  # ========================================================================= #
3426
3396
  # === show_programs_with_this_as_dependency
3427
3397
  #
@@ -6179,17 +6149,6 @@ end # end false clause (DEBUG - FIXME!!!)
6179
6149
  e
6180
6150
  end
6181
6151
 
6182
- # ========================================================================= #
6183
- # === backup_program
6184
- #
6185
- # Backup an existingp rogram under the /Programs/ hierarchy.
6186
- # ========================================================================= #
6187
- def backup_program(
6188
- i = compile_which_program?
6189
- )
6190
- action(:backup_program, i)
6191
- end
6192
-
6193
6152
  # ========================================================================= #
6194
6153
  # === decide_whether_to_invoke_autogen
6195
6154
  #
@@ -7058,15 +7017,6 @@ end # end false clause (DEBUG - FIXME!!!)
7058
7017
  show_all_about(_) # Delegate to that method here.
7059
7018
  end
7060
7019
 
7061
- # ========================================================================= #
7062
- # === show_the_n_last_updated_programs
7063
- # ========================================================================= #
7064
- def show_the_n_last_updated_programs(
7065
- i = 875
7066
- )
7067
- action(:ShowLastUpdated, display_n_programs: i)
7068
- end
7069
-
7070
7020
  # ========================================================================= #
7071
7021
  # === show_components
7072
7022
  #
@@ -7236,161 +7186,6 @@ end # end false clause (DEBUG - FIXME!!!)
7236
7186
  install_the_linux_kernel_header_files_via_this_prefix(:appdir_prefix)
7237
7187
  end
7238
7188
 
7239
- # ========================================================================= #
7240
- # === set_user_prefix (set_prefix tag, set prefix tag)
7241
- #
7242
- # This method can be used by the user, to designate another prefix in
7243
- # use for the given program. This will be the target directory into
7244
- # which the program will be installed into.
7245
- #
7246
- # A specialized class, called RBT::Prefix, will handle the prefix.
7247
- # ========================================================================= #
7248
- def set_user_prefix(
7249
- i = :appdir_prefix
7250
- )
7251
- # ======================================================================= #
7252
- # We must rewrite the program version in the following case.
7253
- #
7254
- # The input may look like this:
7255
- #
7256
- # "/Programs/Gobjectintrospection/1.53.4/"
7257
- #
7258
- # ======================================================================= #
7259
- if i and use_this_specific_program_version?
7260
- if i.is_a?(String) and i.include?(programs_directory?)
7261
- use_this_regex = /(\d{1,2}\.?\d{1,2}\.?\d{1,2}\/)$/ # See: http://rubular.com/r/PPb2Y96XfF
7262
- i.sub!(use_this_regex, use_this_specific_program_version?)
7263
- i << '/' unless i.end_with? '/'
7264
- elsif i.is_a?(Symbol)
7265
- i = use_this_specific_program_version?
7266
- end
7267
- end
7268
- if i.is_a? Symbol
7269
- # ===================================================================== #
7270
- # Next, perform some sanitize operations.
7271
- #
7272
- # This clause will handle Symbols such as :app_dir_like or
7273
- # :use_ntrad_prefix_at_a_later_time.
7274
- # ===================================================================== #
7275
- case i.to_s # case tag
7276
- # ===================================================================== #
7277
- # === ULOCAL
7278
- #
7279
- # This refers to the commonly used /usr/local/ directory.
7280
- # ===================================================================== #
7281
- when 'ULOCAL'
7282
- i = '/usr/local/'
7283
- # ===================================================================== #
7284
- # === trad
7285
- # ===================================================================== #
7286
- when /^trad$/
7287
- i = '/usr/'
7288
- # ===================================================================== #
7289
- # === --opt_prefix
7290
- # ===================================================================== #
7291
- when /^-?-?opt(_|-)?prefix$/,
7292
- :opt
7293
- i = '/opt/'
7294
- # ===================================================================== #
7295
- # === non_traditional
7296
- #
7297
- # This entry point has various aliases such as :ntrad.
7298
- # ===================================================================== #
7299
- when /^app(_|-)?dir$/,
7300
- /^app(_|-)?dir(_|-)?like$/,
7301
- /^use(_|-)?appdir(_|-)?prefix$/i,
7302
- /^use(_|-)?ntrad(_|-)?prefix(_|-)?at(_|-)?a(_|-)?later(_|-)?time$/i,
7303
- 'non_traditional',
7304
- 'gobolinux',
7305
- 'ntrad',
7306
- 'default',
7307
- 'app_dir_like',
7308
- 'appdir',
7309
- 'return_appdir_path',
7310
- 'false',
7311
- 'f',
7312
- 'appdir_prefix',
7313
- ''
7314
- prefix?.clear_program # Clear it initially.
7315
- prefix?.do_use_appdir_prefix
7316
- if handle_which_program?
7317
- i = return_non_traditional_prefix(handle_which_program?)
7318
- end
7319
- # =================================================================== #
7320
- # Since as of May 2014 we get rid of all '-'
7321
- # =================================================================== #
7322
- i.delete!('-') if i.respond_to?(:include?) and i.include? '-'
7323
- end
7324
- # ===================================================================== #
7325
- # === Convert environment variables, if given, and unfreeze frozen
7326
- # Strings
7327
- # ===================================================================== #
7328
- if i.is_a?(String)
7329
- # =================================================================== #
7330
- # Unfreeze frozen Strings.
7331
- # =================================================================== #
7332
- if i.is_a? String and i.frozen?
7333
- i = i.dup # "unfreeze" it.
7334
- end
7335
- # =================================================================== #
7336
- # === Handle Strings that start with the ':' character
7337
- #
7338
- # Handle the situation when we input a String that starts with
7339
- # the character ':'. This will be assumed to be a shortcut to
7340
- # an environment variable.
7341
- # =================================================================== #
7342
- if i.start_with?(':')
7343
- # ================================================================== #
7344
- # Next, we must add the proper program_version. This is either the
7345
- # program_version at hand - or it is an ENV variable if it exists.
7346
- # We check for the ENV variable first.
7347
- # ================================================================== #
7348
- this_key = (i.delete(':').upcase+'_PREFIX').dup
7349
- if ENV.has_key? this_key
7350
- # =============================================================== #
7351
- # The environment variables must be UPCASED and have appended
7352
- # the string '_PREFIX'.
7353
- # =============================================================== #
7354
- i = ENV[this_key].dup.to_s
7355
- else
7356
- # =============================================================== #
7357
- # Assume a special prefix variant targetting the /Programs/
7358
- # hierarchy.
7359
- # =============================================================== #
7360
- i = programs_directory?+i.to_s.delete(':').capitalize+'/'
7361
- i << program_version?.dup.to_s
7362
- end
7363
- end
7364
- if i.include?('$')
7365
- i = convert_env_variable(i) # Replace ENV variables here.
7366
- i << '/' unless i.end_with? '/'
7367
- end
7368
- if i.include? '--'
7369
- if i.include? '--prefix=' # Input is assumed to be like '--prefix=/Depot/j'
7370
- i = i.split('=').last # ← Obtain just the last part in this case.
7371
- end
7372
- end
7373
- end
7374
- # ===================================================================== #
7375
- # === Ensure a trailing '/' for directories.
7376
- # ===================================================================== #
7377
- unless i.to_s.end_with? '/' # .to_s to protect against Symbols given.
7378
- i << '/' if File.directory?(i.to_s)
7379
- end
7380
- end
7381
- # ======================================================================= #
7382
- # Next, we must check for post-install actions and modify these,
7383
- # if they exist. We only do so if we have an AppDir-prefix.
7384
- # ======================================================================= #
7385
- if is_an_appdir_prefix?(i.to_s)
7386
- consider_modifying_postinstall
7387
- end
7388
- prefix_object?.use_this_as_the_new_prefix = i
7389
- end; alias set_use_this_prefix set_user_prefix # === set_use_this_prefix
7390
- alias prefix= set_user_prefix # === prefix=
7391
- alias set_prefix set_user_prefix # === set_prefix
7392
- alias set_prefix_to_use set_user_prefix # === set_prefix_to_use
7393
-
7394
7189
  # ========================================================================= #
7395
7190
  # === feedback_whether_we_will_use_stow
7396
7191
  #
@@ -7596,15 +7391,6 @@ end # end false clause (DEBUG - FIXME!!!)
7596
7391
  }
7597
7392
  end; alias download download_program # === download
7598
7393
 
7599
- # ========================================================================= #
7600
- # === set_really_compile_this_program
7601
- # ========================================================================= #
7602
- def set_really_compile_this_program(i = :qt)
7603
- set_compile_this_program(i)
7604
- set_compile_these_programs(i) if compile_these_programs?.empty?
7605
- initialize_cookbook_dataset
7606
- end
7607
-
7608
7394
  # ========================================================================= #
7609
7395
  # === delete
7610
7396
  #
@@ -8310,13 +8096,6 @@ end # end false clause (DEBUG - FIXME!!!)
8310
8096
  }
8311
8097
  end; alias run_waf_based_installation run_waf # === run_waf_based_installation
8312
8098
 
8313
- # ========================================================================= #
8314
- # === set_extracted_base_directory
8315
- # ========================================================================= #
8316
- def set_extracted_base_directory(i)
8317
- @internal_hash[:extracted_base_directory] = i
8318
- end
8319
-
8320
8099
  # ========================================================================= #
8321
8100
  # === report_n_programs
8322
8101
  #
@@ -9960,204 +9739,6 @@ end # end false clause (DEBUG - FIXME!!!)
9960
9739
  @internal_hash[:is_an_abbreviation] = i
9961
9740
  end
9962
9741
 
9963
- # ========================================================================= #
9964
- # === is_this_a_registered_binary?
9965
- # ========================================================================= #
9966
- def is_this_a_registered_binary?(i)
9967
- i != return_program_based_on_this_binary(i)
9968
- end
9969
-
9970
- # ========================================================================= #
9971
- # === directory_rbt_profiles?
9972
- #
9973
- # This will point to a location such as
9974
- # "/home/Programs/Ruby/2.6.5/lib/ruby/site_ruby/2.6.0/rbt/misc/profiles/"
9975
- # ========================================================================= #
9976
- def directory_rbt_profiles?
9977
- DIRECTORY_RBT_PROFILES
9978
- end
9979
-
9980
- # ========================================================================= #
9981
- # === is_a_gem_file?
9982
- #
9983
- # Query whether we have a .gem file at hand here.
9984
- # ========================================================================= #
9985
- def is_a_gem_file?(
9986
- i = program_path?
9987
- )
9988
- if i
9989
- i.to_s.end_with? '.gem'
9990
- end
9991
- end; alias is_a_gem? is_a_gem_file? # === is_a_gem?
9992
-
9993
- # ========================================================================= #
9994
- # === is_on_32_bit_system?
9995
- # ========================================================================= #
9996
- def is_on_32_bit_system?
9997
- TARGET_CPU == 'i686'
9998
- end
9999
-
10000
- # ========================================================================= #
10001
- # === set_these_env_variables
10002
- #
10003
- # This method can be used to modify ENV variables.
10004
- #
10005
- # The first input argument to this method should be the Hash, consisting
10006
- # of the key-value pairs in the form of key being the NAME of the shell
10007
- # variable that is to be modified; and the corresponding value being
10008
- # the new VALUE that you wish to set this variable to.
10009
- #
10010
- # The third argument to this method determines whether we will output
10011
- # what we do to the user. By default this is true, but sometimes we
10012
- # may want to be able to quietly set these environment variables,
10013
- # such as when we attempt to use clang.
10014
- #
10015
- # Legitimate usage examples for this method, in ruby, would be:
10016
- #
10017
- # set_this_env_variable 'CFLAGS = -gcc'
10018
- # set_this_env_variable 'LIBS: -lpthread'
10019
- #
10020
- # ========================================================================= #
10021
- def set_these_env_variables(
10022
- hash_or_string, # We allow Hash and String as input. But String must be in a special format.
10023
- do_which_action = :report_only,
10024
- be_verbose = true,
10025
- &block
10026
- )
10027
- if block_given?
10028
- yielded = yield
10029
- if yielded.is_a? Symbol
10030
- do_which_action = yielded
10031
- end
10032
- end
10033
- unless @internal_hash[:do_not_use_special_flags]
10034
- case do_which_action
10035
- # ===================================================================== #
10036
- # === :be_quiet
10037
- # ===================================================================== #
10038
- when :be_quiet,
10039
- :be_silent
10040
- be_verbose = false
10041
- # =================================================================== #
10042
- # Also change the do_which_action variable.
10043
- # =================================================================== #
10044
- do_which_action = :do_set_these_variables
10045
- end
10046
- case be_verbose
10047
- # ===================================================================== #
10048
- # === :be_verbose
10049
- # ===================================================================== #
10050
- when :be_verbose
10051
- be_verbose = true
10052
- # ===================================================================== #
10053
- # === :be_quiet
10054
- # ===================================================================== #
10055
- when :be_quiet,
10056
- :be_silent
10057
- be_verbose = false
10058
- end
10059
- # ===================================================================== #
10060
- # === Next, handle Strings
10061
- # ===================================================================== #
10062
- if hash_or_string.is_a? String
10063
- if hash_or_string.include?('=') or
10064
- hash_or_string.include?(':')
10065
- if hash_or_string.include?('=')
10066
- use_this_as_split_token = '='
10067
- elsif hash_or_string.include?(':')
10068
- use_this_as_split_token = ':'
10069
- end
10070
- splitted = hash_or_string.sub(/^export /,'').split(use_this_as_split_token)
10071
- this_key = splitted.first
10072
- this_value = splitted.last
10073
- hash_or_string = { this_key => this_value }
10074
- end
10075
- end
10076
- # ===================================================================== #
10077
- # === Next, handle Hashes
10078
- # ===================================================================== #
10079
- hash_or_string.each_pair {|key, value|
10080
- value.strip! if value.is_a? String
10081
- # =================================================================== #
10082
- # Make some exceptions, e. g. for gems.
10083
- # =================================================================== #
10084
- return if cookbook_dataset_has_been_initialized? and is_a_gem?
10085
- if be_verbose and is_compiled? and !extract_only? and not value.to_s.empty?
10086
- # ================================================================== #
10087
- # Notify the user as to the env-value modification. Since as of
10088
- # November 2018 we will no longer use opnn() here.
10089
- # ================================================================== #
10090
- e " #{sfancy(key)} #{rev}will be set to the "\
10091
- "value(s): #{lightblue(value.to_s)}#{rev}"
10092
- end
10093
- if value.is_a? FalseClass or
10094
- value.is_a? TrueClass or
10095
- value.is_a? Integer
10096
- value = value.to_s
10097
- end
10098
- case do_which_action
10099
- when :do_set_these_variables
10100
- # ================================================================== #
10101
- # Next set the value to the environment variable.
10102
- # ================================================================== #
10103
- ENV[key] = value
10104
- end
10105
- }
10106
- end
10107
- end; alias set_this_env_variable set_these_env_variables # === set_this_env_variable
10108
-
10109
- # ========================================================================= #
10110
- # === set_cflags (cflags tag)
10111
- #
10112
- # This method will enable you to set i.e. new cflags. This then also
10113
- # allows you to compile some programs in a different manner, such as
10114
- # if you wish to compile that particular program statically.
10115
- #
10116
- # The default argument to this method will be a copy of ENV['CFLAGS'].
10117
- #
10118
- # You can overrule this via a shortcut, if you want to, by passing
10119
- # true as argument, or even better, a Symol such as :static. This
10120
- # will then allow you to perform the static build, if the program
10121
- # at hand allows for this.
10122
- #
10123
- # -static-libgcc may also be an option here.
10124
- #
10125
- # The variable LDFLAGS may be important as well.
10126
- #
10127
- # For instance:
10128
- #
10129
- # make LDFLAGS=-all-static
10130
- #
10131
- # ========================================================================= #
10132
- def set_cflags(
10133
- i = default_cflags?,
10134
- &block
10135
- )
10136
- case i # case tag
10137
- # ======================================================================= #
10138
- # === :clear
10139
- # ======================================================================= #
10140
- when :clear
10141
- i = ''
10142
- # ======================================================================= #
10143
- # Enable static builds for the CFLAGS at hand
10144
- # ======================================================================= #
10145
- when :overrule_static_build,
10146
- :static,
10147
- :build_static,
10148
- true
10149
- i = "#{old_cflags?} -static -g"
10150
- end
10151
- # ======================================================================= #
10152
- # Do the actual assignment next.
10153
- # ======================================================================= #
10154
- set_this_env_variable(
10155
- "CFLAGS: #{i}",
10156
- :do_set_these_variables,
10157
- &block
10158
- )
10159
- end
10160
-
10161
9742
  # ========================================================================= #
10162
9743
  # === feedback_configure_options
10163
9744
  #
@@ -13681,4 +13262,4 @@ def self.update_these_rubygems(
13681
13262
  end
13682
13263
  end
13683
13264
 
13684
- end
13265
+ end
@@ -12,6 +12,50 @@ class Action
12
12
 
13
13
  class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
14
14
 
15
+ # ========================================================================= #
16
+ # === is_this_a_registered_binary?
17
+ # ========================================================================= #
18
+ def is_this_a_registered_binary?(i)
19
+ i != return_program_based_on_this_binary(i)
20
+ end
21
+
22
+ # ========================================================================= #
23
+ # === directory_rbt_profiles?
24
+ #
25
+ # This will point to a location such as
26
+ # "/home/Programs/Ruby/2.6.5/lib/ruby/site_ruby/2.6.0/rbt/misc/profiles/"
27
+ # ========================================================================= #
28
+ def directory_rbt_profiles?
29
+ DIRECTORY_RBT_PROFILES
30
+ end
31
+
32
+ # ========================================================================= #
33
+ # === is_a_gem_file?
34
+ #
35
+ # Query whether we have a .gem file at hand here.
36
+ # ========================================================================= #
37
+ def is_a_gem_file?(
38
+ i = program_path?
39
+ )
40
+ if i
41
+ i.to_s.end_with? '.gem'
42
+ end
43
+ end; alias is_a_gem? is_a_gem_file? # === is_a_gem?
44
+
45
+ # ========================================================================= #
46
+ # === is_on_32_bit_system?
47
+ # ========================================================================= #
48
+ def is_on_32_bit_system?
49
+ TARGET_CPU == 'i686'
50
+ end
51
+
52
+ # ========================================================================== #
53
+ # === appdir_prefix_points_at?
54
+ # ========================================================================== #
55
+ def appdir_prefix_points_at?
56
+ prefix_object?.prefix?
57
+ end
58
+
15
59
  # ========================================================================== #
16
60
  # === prefix_object?
17
61
  # ========================================================================== #
@@ -1635,13 +1679,6 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
1635
1679
  return result
1636
1680
  end
1637
1681
 
1638
- # ========================================================================== #
1639
- # === appdir_prefix_points_at?
1640
- # ========================================================================== #
1641
- def appdir_prefix_points_at?
1642
- real_prefix?.prefix?
1643
- end
1644
-
1645
1682
  # ======================================================================= #
1646
1683
  # === cookbook_program_name_and_program_version?
1647
1684
  # ======================================================================= #