rbt 0.16.14 → 0.16.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rbt might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/doc/todo/numbered_todo_entries_for_the_RBT_project.md +2 -14
- data/lib/rbt/actions/individual_actions/cookbooks/sanitize_cookbook/sanitize_cookbook.rb +6 -5
- data/lib/rbt/actions/individual_actions/installer/aggregate.rb +0 -28
- data/lib/rbt/actions/individual_actions/software_manager/actions.rb +61 -0
- data/lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb +9 -4
- data/lib/rbt/actions/individual_actions/software_manager/menu.rb +1 -3
- data/lib/rbt/actions/individual_actions/software_manager/misc.rb +64 -225
- data/lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb +83 -10
- data/lib/rbt/actions/individual_actions/software_manager/setters.rb +185 -143
- data/lib/rbt/version/version.rb +1 -1
- metadata +2 -2
@@ -12,23 +12,49 @@ class Action
|
|
12
12
|
|
13
13
|
class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
14
14
|
|
15
|
-
#
|
15
|
+
# ========================================================================== #
|
16
|
+
# === set_extract_to_this_directory_as_specified_by_the_user
|
17
|
+
#
|
18
|
+
# This method can be used by the user to specify a certain directory.
|
19
|
+
# ========================================================================== #
|
20
|
+
def set_extract_to_this_directory_as_specified_by_the_user(
|
21
|
+
i = :random
|
22
|
+
)
|
23
|
+
case i
|
24
|
+
# ======================================================================== #
|
25
|
+
# === :random
|
26
|
+
# ======================================================================== #
|
27
|
+
when :random
|
28
|
+
# ====================================================================== #
|
29
|
+
# In this case we will use a random subdirectory, but within the
|
30
|
+
# temp directory still.
|
31
|
+
# ====================================================================== #
|
32
|
+
i = rbt_temp_dir?+return_n_random_characters(10)
|
33
|
+
end
|
34
|
+
unless i.end_with? '/'
|
35
|
+
i = i.dup if i.frozen?
|
36
|
+
i << '/'
|
37
|
+
end
|
38
|
+
@internal_hash[:extract_to_this_directory_as_specified_by_the_user] = i
|
39
|
+
end
|
40
|
+
|
41
|
+
# ========================================================================== #
|
16
42
|
# === set_retain_the_extracted_source_archive
|
17
|
-
#
|
43
|
+
# ========================================================================== #
|
18
44
|
def set_retain_the_extracted_source_archive(
|
19
45
|
i = true
|
20
46
|
)
|
21
47
|
@internal_hash[:retain_the_extracted_source_archive] = true
|
22
48
|
end; alias set_keep_the_extracted_archive set_retain_the_extracted_source_archive # === set_keep_the_extracted_archive
|
23
49
|
|
24
|
-
#
|
50
|
+
# ========================================================================== #
|
25
51
|
# === do_retain_the_extracted_source_archive
|
26
52
|
#
|
27
53
|
# This delegates towards the method called
|
28
54
|
# .set_retain_the_extracted_source_archive().
|
29
55
|
#
|
30
56
|
# It may also optionally report to the user as to what is being done.
|
31
|
-
#
|
57
|
+
# ========================================================================== #
|
32
58
|
def do_retain_the_extracted_source_archive(
|
33
59
|
be_verbose = be_verbose?
|
34
60
|
)
|
@@ -48,11 +74,11 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
48
74
|
end; alias do_set_keep_extracted do_retain_the_extracted_source_archive # === do_set_keep_extracted
|
49
75
|
alias do_set_keep_extracted_archive do_retain_the_extracted_source_archive # === do_set_keep_extracted_archive
|
50
76
|
|
51
|
-
#
|
77
|
+
# ========================================================================== #
|
52
78
|
# === set_dont_keep_archive
|
53
79
|
#
|
54
80
|
# Use this method when you don't want to keep the extracted archive.
|
55
|
-
#
|
81
|
+
# ========================================================================== #
|
56
82
|
def set_dont_keep_archive(
|
57
83
|
be_verbose = true
|
58
84
|
)
|
@@ -62,13 +88,13 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
62
88
|
@internal_hash[:keep_the_extracted_archive] = false
|
63
89
|
end
|
64
90
|
|
65
|
-
#
|
91
|
+
# ========================================================================== #
|
66
92
|
# === set_keep_the_extracted_archive
|
67
93
|
#
|
68
94
|
# This method will keep the source-archive extracted. Note that this
|
69
95
|
# is not the default - by default we will remove the extracted
|
70
96
|
# archive.
|
71
|
-
#
|
97
|
+
# ========================================================================== #
|
72
98
|
def set_keep_the_extracted_archive(
|
73
99
|
i = true
|
74
100
|
)
|
@@ -85,6 +111,45 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
85
111
|
cookbook_dataset?.set_short_name(i)
|
86
112
|
end; alias set_real_short_name set_short_name # === set_real_short_name
|
87
113
|
|
114
|
+
# ========================================================================== #
|
115
|
+
# === set_permanently_extract_to
|
116
|
+
#
|
117
|
+
# This method will permanently set a new directory to which we
|
118
|
+
# will extract to.
|
119
|
+
#
|
120
|
+
# To invoke this method, do something such as:
|
121
|
+
#
|
122
|
+
# ry --permanently_extract_to=/Depot
|
123
|
+
# ry --permanently_extract_to=/opt
|
124
|
+
# ry --permanently_extract_to=$TEMP_DIR
|
125
|
+
#
|
126
|
+
# ========================================================================== #
|
127
|
+
def set_permanently_extract_to(
|
128
|
+
i = nil
|
129
|
+
)
|
130
|
+
if i
|
131
|
+
target = RBT.permanently_set_temp_directory(i)
|
132
|
+
orev "The RBT scripts will henceforthwith be extracted "\
|
133
|
+
"towards `#{sdir(target)}#{rev}`."
|
134
|
+
else
|
135
|
+
orev 'Please provide an argument.'
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# ========================================================================== #
|
140
|
+
# === set_user_prefix_to_nil
|
141
|
+
# ========================================================================== #
|
142
|
+
def set_user_prefix_to_nil
|
143
|
+
set_user_prefix(nil)
|
144
|
+
end
|
145
|
+
|
146
|
+
# ========================================================================== #
|
147
|
+
# === set_archive_type
|
148
|
+
# ========================================================================== #
|
149
|
+
def set_archive_type(i)
|
150
|
+
cookbook_dataset?.set_archive_type(i)
|
151
|
+
end
|
152
|
+
|
88
153
|
# =========================================================================== #
|
89
154
|
# === set_internal_pid
|
90
155
|
# =========================================================================== #
|
@@ -92,7 +157,7 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
92
157
|
@internal_hash[:pid] = i
|
93
158
|
end; alias set_pid set_internal_pid # === set_pid
|
94
159
|
|
95
|
-
#
|
160
|
+
# ========================================================================== #
|
96
161
|
# === set_these_env_variables
|
97
162
|
#
|
98
163
|
# This method can be used to modify ENV variables.
|
@@ -112,7 +177,7 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
112
177
|
# set_this_env_variable 'CFLAGS = -gcc'
|
113
178
|
# set_this_env_variable 'LIBS: -lpthread'
|
114
179
|
#
|
115
|
-
#
|
180
|
+
# ========================================================================== #
|
116
181
|
def set_these_env_variables(
|
117
182
|
hash_or_string, # We allow Hash and String as input. But String must be in a special format.
|
118
183
|
do_which_action = :report_only,
|
@@ -127,9 +192,9 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
127
192
|
end
|
128
193
|
unless @internal_hash[:do_not_use_special_flags]
|
129
194
|
case do_which_action
|
130
|
-
#
|
195
|
+
# ====================================================================== #
|
131
196
|
# === :be_quiet
|
132
|
-
#
|
197
|
+
# ====================================================================== #
|
133
198
|
when :be_quiet,
|
134
199
|
:be_silent
|
135
200
|
be_verbose = false
|
@@ -139,21 +204,21 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
139
204
|
do_which_action = :do_set_these_variables
|
140
205
|
end
|
141
206
|
case be_verbose
|
142
|
-
#
|
207
|
+
# ====================================================================== #
|
143
208
|
# === :be_verbose
|
144
|
-
#
|
209
|
+
# ====================================================================== #
|
145
210
|
when :be_verbose
|
146
211
|
be_verbose = true
|
147
|
-
#
|
212
|
+
# ====================================================================== #
|
148
213
|
# === :be_quiet
|
149
|
-
#
|
214
|
+
# ====================================================================== #
|
150
215
|
when :be_quiet,
|
151
216
|
:be_silent
|
152
217
|
be_verbose = false
|
153
218
|
end
|
154
|
-
#
|
219
|
+
# ====================================================================== #
|
155
220
|
# === Next, handle Strings
|
156
|
-
#
|
221
|
+
# ====================================================================== #
|
157
222
|
if hash_or_string.is_a? String
|
158
223
|
if hash_or_string.include?('=') or
|
159
224
|
hash_or_string.include?(':')
|
@@ -168,9 +233,9 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
168
233
|
hash_or_string = { this_key => this_value }
|
169
234
|
end
|
170
235
|
end
|
171
|
-
#
|
236
|
+
# ====================================================================== #
|
172
237
|
# === Next, handle Hashes
|
173
|
-
#
|
238
|
+
# ====================================================================== #
|
174
239
|
hash_or_string.each_pair {|key, value|
|
175
240
|
value.strip! if value.is_a? String
|
176
241
|
# =================================================================== #
|
@@ -201,23 +266,23 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
201
266
|
end
|
202
267
|
end; alias set_this_env_variable set_these_env_variables # === set_this_env_variable
|
203
268
|
|
204
|
-
#
|
269
|
+
# ========================================================================== #
|
205
270
|
# === set_extracted_base_directory
|
206
|
-
#
|
271
|
+
# ========================================================================== #
|
207
272
|
def set_extracted_base_directory(i)
|
208
273
|
@internal_hash[:extracted_base_directory] = i
|
209
274
|
end
|
210
275
|
|
211
|
-
#
|
276
|
+
# ========================================================================== #
|
212
277
|
# === set_really_compile_this_program
|
213
|
-
#
|
278
|
+
# ========================================================================== #
|
214
279
|
def set_really_compile_this_program(i = :qt)
|
215
280
|
set_compile_this_program(i)
|
216
281
|
set_compile_these_programs(i) if compile_these_programs?.empty?
|
217
282
|
initialize_cookbook_dataset
|
218
283
|
end
|
219
284
|
|
220
|
-
#
|
285
|
+
# ========================================================================== #
|
221
286
|
# === set_user_prefix (set_prefix tag, set prefix tag)
|
222
287
|
#
|
223
288
|
# This method can be used by the user, to designate another prefix in
|
@@ -225,7 +290,7 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
225
290
|
# which the program will be installed into.
|
226
291
|
#
|
227
292
|
# A specialized class, called RBT::Prefix, will handle the prefix.
|
228
|
-
#
|
293
|
+
# ========================================================================== #
|
229
294
|
def set_user_prefix(
|
230
295
|
i = :appdir_prefix
|
231
296
|
)
|
@@ -247,36 +312,36 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
247
312
|
end
|
248
313
|
end
|
249
314
|
if i.is_a? Symbol
|
250
|
-
#
|
315
|
+
# ====================================================================== #
|
251
316
|
# Next, perform some sanitize operations.
|
252
317
|
#
|
253
318
|
# This clause will handle Symbols such as :app_dir_like or
|
254
319
|
# :use_ntrad_prefix_at_a_later_time.
|
255
|
-
#
|
320
|
+
# ====================================================================== #
|
256
321
|
case i.to_s # case tag
|
257
|
-
#
|
322
|
+
# ====================================================================== #
|
258
323
|
# === ULOCAL
|
259
324
|
#
|
260
325
|
# This refers to the commonly used /usr/local/ directory.
|
261
|
-
#
|
326
|
+
# ====================================================================== #
|
262
327
|
when 'ULOCAL'
|
263
328
|
i = '/usr/local/'
|
264
|
-
#
|
329
|
+
# ====================================================================== #
|
265
330
|
# === trad
|
266
|
-
#
|
331
|
+
# ====================================================================== #
|
267
332
|
when /^trad$/
|
268
333
|
i = '/usr/'
|
269
|
-
#
|
334
|
+
# ====================================================================== #
|
270
335
|
# === --opt_prefix
|
271
|
-
#
|
336
|
+
# ====================================================================== #
|
272
337
|
when /^-?-?opt(_|-)?prefix$/,
|
273
338
|
:opt
|
274
339
|
i = '/opt/'
|
275
|
-
#
|
340
|
+
# ====================================================================== #
|
276
341
|
# === non_traditional
|
277
342
|
#
|
278
343
|
# This entry point has various aliases such as :ntrad.
|
279
|
-
#
|
344
|
+
# ====================================================================== #
|
280
345
|
when /^app(_|-)?dir$/,
|
281
346
|
/^app(_|-)?dir(_|-)?like$/,
|
282
347
|
/^use(_|-)?appdir(_|-)?prefix$/i,
|
@@ -302,10 +367,10 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
302
367
|
# =================================================================== #
|
303
368
|
i.delete!('-') if i.respond_to?(:include?) and i.include? '-'
|
304
369
|
end
|
305
|
-
#
|
370
|
+
# ====================================================================== #
|
306
371
|
# === Convert environment variables, if given, and unfreeze frozen
|
307
372
|
# Strings
|
308
|
-
#
|
373
|
+
# ====================================================================== #
|
309
374
|
if i.is_a?(String)
|
310
375
|
# =================================================================== #
|
311
376
|
# Unfreeze frozen Strings.
|
@@ -352,9 +417,9 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
352
417
|
end
|
353
418
|
end
|
354
419
|
end
|
355
|
-
#
|
420
|
+
# ====================================================================== #
|
356
421
|
# === Ensure a trailing '/' for directories.
|
357
|
-
#
|
422
|
+
# ====================================================================== #
|
358
423
|
unless i.to_s.end_with? '/' # .to_s to protect against Symbols given.
|
359
424
|
i << '/' if File.directory?(i.to_s)
|
360
425
|
end
|
@@ -393,7 +458,7 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
393
458
|
@internal_hash[:is_an_abbreviation] = i
|
394
459
|
end
|
395
460
|
|
396
|
-
#
|
461
|
+
# ========================================================================== #
|
397
462
|
# === set_cflags (cflags tag)
|
398
463
|
#
|
399
464
|
# This method will enable you to set i.e. new cflags. This then also
|
@@ -415,7 +480,7 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
415
480
|
#
|
416
481
|
# make LDFLAGS=-all-static
|
417
482
|
#
|
418
|
-
#
|
483
|
+
# ========================================================================== #
|
419
484
|
def set_cflags(
|
420
485
|
i = default_cflags?,
|
421
486
|
&block
|
@@ -445,37 +510,37 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
445
510
|
)
|
446
511
|
end
|
447
512
|
|
448
|
-
#
|
513
|
+
# ========================================================================== #
|
449
514
|
# === set_use_this_prefix
|
450
515
|
#
|
451
516
|
# This variant will only modify the prefix stored by @prefix.
|
452
|
-
#
|
517
|
+
# ========================================================================== #
|
453
518
|
def set_use_this_prefix(i)
|
454
519
|
prefix_object?.set_prefix(i)
|
455
520
|
end; alias set_prefix set_use_this_prefix # === set_prefix
|
456
521
|
|
457
|
-
#
|
522
|
+
# ========================================================================== #
|
458
523
|
# === set_cookbook_program_name
|
459
|
-
#
|
524
|
+
# ========================================================================== #
|
460
525
|
def set_cookbook_program_name(i)
|
461
526
|
cookbook_dataset?.set_program_name(i)
|
462
527
|
end
|
463
528
|
|
464
|
-
#
|
529
|
+
# ========================================================================== #
|
465
530
|
# === set_user_prefix
|
466
|
-
#
|
531
|
+
# ========================================================================== #
|
467
532
|
def set_user_prefix(i)
|
468
533
|
@internal_hash[:user_prefix] = i
|
469
534
|
end
|
470
535
|
|
471
|
-
#
|
536
|
+
# ========================================================================== #
|
472
537
|
# === set_extract_to_this_directory
|
473
538
|
#
|
474
539
|
# This method can be used to keep track onto which directory archives
|
475
540
|
# will be extracted.
|
476
541
|
#
|
477
542
|
# Within RBT, the target is also known as the "homedir" variable.
|
478
|
-
#
|
543
|
+
# ========================================================================== #
|
479
544
|
def set_extract_to_this_directory(
|
480
545
|
i = RBT.log_directory?,
|
481
546
|
be_verbose = false
|
@@ -508,50 +573,27 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
508
573
|
alias extract_to set_extract_to_this_directory # === extract_to
|
509
574
|
alias set_homedir set_extract_to_this_directory # === set_homedir
|
510
575
|
|
511
|
-
#
|
576
|
+
# ========================================================================== #
|
512
577
|
# === shall_we_use_an_appdir_prefix?
|
513
|
-
#
|
578
|
+
# ========================================================================== #
|
514
579
|
def shall_we_use_an_appdir_prefix?
|
515
580
|
@internal_hash[:shall_we_use_an_appdir_prefix]
|
516
581
|
end; alias appdir_prefix? shall_we_use_an_appdir_prefix? # === appdir_prefix?
|
517
582
|
|
518
|
-
#
|
519
|
-
# === set_extract_to_this_directory_as_specified_by_the_user
|
520
|
-
#
|
521
|
-
# This method can be used by the user to specify a certain directory.
|
522
|
-
# ========================================================================= #
|
523
|
-
def set_extract_to_this_directory_as_specified_by_the_user(
|
524
|
-
i = :random
|
525
|
-
)
|
526
|
-
case i
|
527
|
-
when :random
|
528
|
-
# ===================================================================== #
|
529
|
-
# In this case we will use a random subdirectory, but within the
|
530
|
-
# temp directory still.
|
531
|
-
# ===================================================================== #
|
532
|
-
i = rbt_temp_dir?+return_n_random_characters(10)
|
533
|
-
end
|
534
|
-
unless i.end_with? '/'
|
535
|
-
i = i.dup if i.frozen?
|
536
|
-
i << '/'
|
537
|
-
end
|
538
|
-
@internal_hash[:extract_to_this_directory_as_specified_by_the_user] = i
|
539
|
-
end
|
540
|
-
|
541
|
-
# ========================================================================= #
|
583
|
+
# ========================================================================== #
|
542
584
|
# === set_program_name_and_program_version
|
543
585
|
#
|
544
586
|
# This is simply a wrapper over the corresponding method in the
|
545
587
|
# cookbook-object.
|
546
|
-
#
|
588
|
+
# ========================================================================== #
|
547
589
|
def set_program_name_and_program_version(i)
|
548
590
|
cookbook_dataset?.send(__method__, i)
|
549
591
|
end
|
550
592
|
|
551
593
|
require 'rbt/utility_scripts/symlink_from_to_current/symlink_from_to_current.rb'
|
552
|
-
#
|
594
|
+
# ========================================================================== #
|
553
595
|
# === set_symlink_program
|
554
|
-
#
|
596
|
+
# ========================================================================== #
|
555
597
|
def set_symlink_program(
|
556
598
|
compile_this_program = compile_which_program?,
|
557
599
|
use_this_program_version = program_version?
|
@@ -569,77 +611,77 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
569
611
|
@internal_hash[:symlink_program] = _
|
570
612
|
end
|
571
613
|
|
572
|
-
#
|
614
|
+
# ========================================================================== #
|
573
615
|
# === set_url1
|
574
|
-
#
|
616
|
+
# ========================================================================== #
|
575
617
|
def set_url1(i)
|
576
618
|
cookbook_dataset?.set_url1(i)
|
577
619
|
end; alias set_url set_url1 # === set_url
|
578
620
|
|
579
|
-
#
|
621
|
+
# ========================================================================== #
|
580
622
|
# === set_url2
|
581
|
-
#
|
623
|
+
# ========================================================================== #
|
582
624
|
def set_url2(i)
|
583
625
|
cookbook_dataset?.set_url2(i)
|
584
626
|
end
|
585
627
|
|
586
|
-
#
|
628
|
+
# ========================================================================== #
|
587
629
|
# === set_cookbook_dataset_program_version
|
588
630
|
#
|
589
631
|
# For this method to work, cookbook_dataset? must have been instantiated
|
590
632
|
# before.
|
591
|
-
#
|
633
|
+
# ========================================================================== #
|
592
634
|
def set_cookbook_dataset_program_version(i)
|
593
635
|
cookbook_dataset?.set_program_version(i)
|
594
636
|
end; alias set_cookbook_program_version set_cookbook_dataset_program_version # === set_cookbook_program_version
|
595
637
|
|
596
|
-
#
|
638
|
+
# ========================================================================== #
|
597
639
|
# === set_path
|
598
640
|
#
|
599
641
|
# Set the $PATH variable here through this setter-method. This will
|
600
642
|
# directly modify ENV[] as is.
|
601
|
-
#
|
643
|
+
# ========================================================================== #
|
602
644
|
def set_path(i)
|
603
645
|
i = i.dup # Better to always .dup it when we set it.
|
604
646
|
ENV['PATH'] = i # Must re-enable PATH environment as it was.
|
605
647
|
end
|
606
648
|
|
607
|
-
#
|
649
|
+
# ========================================================================== #
|
608
650
|
# === set_postinstallation
|
609
651
|
#
|
610
652
|
# Note that the postinstallation steps will always be stored as
|
611
653
|
# an Array.
|
612
|
-
#
|
654
|
+
# ========================================================================== #
|
613
655
|
def set_postinstallation(i)
|
614
656
|
@internal_hash[:postinstallation] = [i].flatten.compact
|
615
657
|
end; alias set_postinstall set_postinstallation # === set_postinstall
|
616
658
|
|
617
|
-
#
|
659
|
+
# ========================================================================== #
|
618
660
|
# === set_license
|
619
|
-
#
|
661
|
+
# ========================================================================== #
|
620
662
|
def set_license(i)
|
621
663
|
cookbook_dataset?.set_license(i)
|
622
664
|
end
|
623
665
|
|
624
|
-
#
|
666
|
+
# ========================================================================== #
|
625
667
|
# === set_short_desc
|
626
|
-
#
|
668
|
+
# ========================================================================== #
|
627
669
|
def set_short_desc(i)
|
628
670
|
cookbook_dataset?.set_short_desc(i)
|
629
671
|
end
|
630
672
|
|
631
|
-
#
|
673
|
+
# ========================================================================== #
|
632
674
|
# === set_base_dir
|
633
|
-
#
|
675
|
+
# ========================================================================== #
|
634
676
|
def set_base_dir(i)
|
635
677
|
cookbook_dataset?.set_base_dir = i
|
636
678
|
end
|
637
679
|
|
638
|
-
#
|
680
|
+
# ========================================================================== #
|
639
681
|
# === set_program_version
|
640
682
|
#
|
641
683
|
# Use this method to assign to a new program version at hand.
|
642
|
-
#
|
684
|
+
# ========================================================================== #
|
643
685
|
def set_program_version(i)
|
644
686
|
# ======================================================================= #
|
645
687
|
# The program version is presently (December 2018) not allowed
|
@@ -674,7 +716,7 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
674
716
|
end
|
675
717
|
end; alias set_use_this_version set_program_version # === set_use_this_version
|
676
718
|
|
677
|
-
#
|
719
|
+
# ========================================================================== #
|
678
720
|
# === set_configure_base_directory
|
679
721
|
#
|
680
722
|
# This setter-method sets the @internal_hash[:configure_base_directory],
|
@@ -695,7 +737,7 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
695
737
|
#
|
696
738
|
# Do note that the cookbook-dataset will also retain the original
|
697
739
|
# configure_base_directory.
|
698
|
-
#
|
740
|
+
# ========================================================================== #
|
699
741
|
def set_configure_base_directory(
|
700
742
|
i = :default
|
701
743
|
)
|
@@ -717,16 +759,16 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
717
759
|
@internal_hash[:configure_base_directory] = i # ← Finally, assign it.
|
718
760
|
end; alias set_configure_base_dir set_configure_base_directory # === set_configure_base_dir
|
719
761
|
|
720
|
-
#
|
762
|
+
# ========================================================================== #
|
721
763
|
# === set_configure_options
|
722
764
|
#
|
723
765
|
# This will directly modify the cookbook-dataset.
|
724
|
-
#
|
766
|
+
# ========================================================================== #
|
725
767
|
def set_configure_options(i = '')
|
726
768
|
cookbook_dataset?.configure_options = i
|
727
769
|
end
|
728
770
|
|
729
|
-
#
|
771
|
+
# ========================================================================== #
|
730
772
|
# === set_parameters_to_make
|
731
773
|
#
|
732
774
|
# If we have to pass specials options to the program called "make", then
|
@@ -734,7 +776,7 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
734
776
|
#
|
735
777
|
# These are additional options that can be given to the program called
|
736
778
|
# "make".
|
737
|
-
#
|
779
|
+
# ========================================================================== #
|
738
780
|
def set_parameters_to_make(i)
|
739
781
|
# ======================================================================= #
|
740
782
|
# The parameters must always be kept as an Array.
|
@@ -743,27 +785,27 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
743
785
|
@internal_hash[:parameters_to_make] = i # Do not change them to a String via .to_s
|
744
786
|
end; alias set_make_options set_parameters_to_make # === set_make_options
|
745
787
|
|
746
|
-
#
|
788
|
+
# ========================================================================== #
|
747
789
|
# === set_cookbook_dataset_program
|
748
|
-
#
|
790
|
+
# ========================================================================== #
|
749
791
|
def set_cookbook_dataset_program(i)
|
750
792
|
cookbook_dataset?.set_program(i)
|
751
793
|
end
|
752
794
|
|
753
|
-
#
|
795
|
+
# ========================================================================== #
|
754
796
|
# === set_program_path
|
755
797
|
#
|
756
798
|
# This will only modify a value on the @internal_hash.
|
757
|
-
#
|
799
|
+
# ========================================================================== #
|
758
800
|
def set_program_path(i)
|
759
801
|
@internal_hash[:program_path] = i
|
760
802
|
end
|
761
803
|
|
762
|
-
#
|
804
|
+
# ========================================================================== #
|
763
805
|
# === set_skip_extracting
|
764
806
|
#
|
765
807
|
# Use this method when we shall skip the extracting phase.
|
766
|
-
#
|
808
|
+
# ========================================================================== #
|
767
809
|
def set_skip_extracting(
|
768
810
|
be_verbose = true
|
769
811
|
)
|
@@ -774,9 +816,9 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
774
816
|
@internal_hash[:skip_extracting] = true
|
775
817
|
end; alias do_not_extract set_skip_extracting # === do_not_extract
|
776
818
|
|
777
|
-
#
|
819
|
+
# ========================================================================== #
|
778
820
|
# === set_name_for_the_build_directory
|
779
|
-
#
|
821
|
+
# ========================================================================== #
|
780
822
|
def set_name_for_the_build_directory(
|
781
823
|
i = :use_the_default_name,
|
782
824
|
be_verbose = false
|
@@ -804,53 +846,53 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
804
846
|
alias use_this_build_directory set_name_for_the_build_directory # === use_this_build_directory
|
805
847
|
alias set_use_this_build_directory set_name_for_the_build_directory # === set_use_this_build_directory
|
806
848
|
|
807
|
-
#
|
849
|
+
# ========================================================================== #
|
808
850
|
# === set_use_this_sed_line
|
809
|
-
#
|
851
|
+
# ========================================================================== #
|
810
852
|
def set_use_this_sed_line(i)
|
811
853
|
@internal_hash[:sed] = i
|
812
854
|
end
|
813
855
|
|
814
|
-
#
|
856
|
+
# ========================================================================== #
|
815
857
|
# === set_delay_before_continuing (sleep tag)
|
816
858
|
#
|
817
859
|
# Ensure that the argument passed to us is correct.
|
818
|
-
#
|
860
|
+
# ========================================================================== #
|
819
861
|
def set_delay_before_continuing(n_seconds)
|
820
862
|
sleep(n_seconds.to_i)
|
821
863
|
end
|
822
864
|
|
823
|
-
#
|
865
|
+
# ========================================================================== #
|
824
866
|
# === set_program_full_name
|
825
|
-
#
|
867
|
+
# ========================================================================== #
|
826
868
|
def set_program_full_name(i = :default)
|
827
869
|
cookbook_dataset?.set_program_full_name(i)
|
828
870
|
end
|
829
871
|
|
830
|
-
#
|
872
|
+
# ========================================================================== #
|
831
873
|
# === set_full_configure_command
|
832
|
-
#
|
874
|
+
# ========================================================================== #
|
833
875
|
def set_full_configure_command(i)
|
834
876
|
i.strip! # ← This is mandatory; may be reconsidered in the future though.
|
835
877
|
@internal_hash[:full_configure_command] = i
|
836
878
|
end
|
837
879
|
|
838
|
-
#
|
880
|
+
# ========================================================================== #
|
839
881
|
# === set_use_this_build_system
|
840
882
|
#
|
841
883
|
# Consistently use this method when you modify the value at
|
842
884
|
# @internal_hash[:use_this_build_system].
|
843
885
|
#
|
844
886
|
# We need to ensure that it is a Symbol.
|
845
|
-
#
|
887
|
+
# ========================================================================== #
|
846
888
|
def set_use_this_build_system(i)
|
847
889
|
i = i.to_sym unless i.is_a? Symbol
|
848
890
|
@internal_hash[:use_this_build_system] = i
|
849
891
|
end
|
850
892
|
|
851
|
-
#
|
893
|
+
# ========================================================================== #
|
852
894
|
# === set_pkgconfig_symlink
|
853
|
-
#
|
895
|
+
# ========================================================================== #
|
854
896
|
def set_pkgconfig_symlink(
|
855
897
|
i = true
|
856
898
|
)
|
@@ -879,18 +921,18 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
879
921
|
end
|
880
922
|
end
|
881
923
|
|
882
|
-
#
|
924
|
+
# ========================================================================== #
|
883
925
|
# === set_program_short_name
|
884
|
-
#
|
926
|
+
# ========================================================================== #
|
885
927
|
def set_program_short_name(i)
|
886
928
|
cookbook_dataset?.set_program_short_name(i)
|
887
929
|
end
|
888
930
|
|
889
|
-
#
|
931
|
+
# ========================================================================== #
|
890
932
|
# === set_preinstall_action
|
891
933
|
#
|
892
934
|
# This method can be used to set different pre-install actions.
|
893
|
-
#
|
935
|
+
# ========================================================================== #
|
894
936
|
def set_preinstall_action(i)
|
895
937
|
if i.is_a? String # Strings will become an Array here.
|
896
938
|
if i.include? ','
|
@@ -902,32 +944,32 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
902
944
|
cookbook_dataset?.preinstall = i
|
903
945
|
end
|
904
946
|
|
905
|
-
#
|
947
|
+
# ========================================================================== #
|
906
948
|
# === set_cookbook_dataset_program_path
|
907
|
-
#
|
949
|
+
# ========================================================================== #
|
908
950
|
def set_cookbook_dataset_program_path(i)
|
909
951
|
cookbook_dataset?.set_program_path(i)
|
910
952
|
end
|
911
953
|
|
912
|
-
#
|
954
|
+
# ========================================================================== #
|
913
955
|
# === set_configure_options_on_internal_hash
|
914
|
-
#
|
956
|
+
# ========================================================================== #
|
915
957
|
def set_configure_options_on_internal_hash(i)
|
916
958
|
@internal_hash[:configure_options] = i
|
917
959
|
end
|
918
960
|
|
919
|
-
#
|
961
|
+
# ========================================================================== #
|
920
962
|
# === set_use_this_configure_command
|
921
|
-
#
|
963
|
+
# ========================================================================== #
|
922
964
|
def set_use_this_configure_command(i)
|
923
965
|
@internal_hash[:configure_command_to_use] = i.to_s
|
924
966
|
end
|
925
967
|
|
926
|
-
#
|
968
|
+
# ========================================================================== #
|
927
969
|
# === set_use_this_make_command
|
928
970
|
#
|
929
971
|
# This can be used to use another make command, such as "ninja".
|
930
|
-
#
|
972
|
+
# ========================================================================== #
|
931
973
|
def set_use_this_make_command(
|
932
974
|
i = :default
|
933
975
|
)
|
@@ -942,13 +984,13 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
942
984
|
@internal_hash[:use_this_make_command] = i
|
943
985
|
end
|
944
986
|
|
945
|
-
#
|
987
|
+
# ========================================================================== #
|
946
988
|
# === set_do_not_symlink
|
947
989
|
#
|
948
990
|
# Do not symlink after "make install" stage. This prevents the
|
949
991
|
# symlinking-step from e. g. /Programs/Htop/1.2.0/ into the
|
950
992
|
# /Systemd/Index/ hierarchy.
|
951
|
-
#
|
993
|
+
# ========================================================================== #
|
952
994
|
def set_do_not_symlink(
|
953
995
|
be_verbose = true
|
954
996
|
)
|
@@ -977,27 +1019,27 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
977
1019
|
@internal_hash[:do_not_symlink] = true
|
978
1020
|
end; alias do_not_symlink set_do_not_symlink # === do_not_symlink
|
979
1021
|
|
980
|
-
#
|
1022
|
+
# ========================================================================== #
|
981
1023
|
# === set_use_these_configure_options
|
982
|
-
#
|
1024
|
+
# ========================================================================== #
|
983
1025
|
def set_use_these_configure_options(i)
|
984
1026
|
i.tr!(N,' ') if i.include? N
|
985
1027
|
i.squeeze!(' ')
|
986
1028
|
@internal_hash[:configure_options] = i
|
987
1029
|
end; alias set_configure_options= set_use_these_configure_options # === set_configure_options=
|
988
1030
|
|
989
|
-
#
|
1031
|
+
# ========================================================================== #
|
990
1032
|
# === set_internal_hash_configure_options
|
991
|
-
#
|
1033
|
+
# ========================================================================== #
|
992
1034
|
def set_internal_hash_configure_options(i)
|
993
1035
|
@internal_hash[:configure_options] = i
|
994
1036
|
end
|
995
1037
|
|
996
|
-
#
|
1038
|
+
# ========================================================================== #
|
997
1039
|
# === set_make_command
|
998
1040
|
#
|
999
1041
|
# This method can be used to set which make command is to be used.
|
1000
|
-
#
|
1042
|
+
# ========================================================================== #
|
1001
1043
|
def set_make_command(
|
1002
1044
|
i = 'make'
|
1003
1045
|
)
|