Class: Rpm2Cpio
Instance Attribute Summary collapse
-
#flags_all ⇒ Object
Returns the value of attribute flags_all.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#rpm_file ⇒ Object
Returns the value of attribute rpm_file.
Attributes inherited from CliFuncs
#base_dir, #data_dir, #ignore_bad_exit
Instance Method Summary collapse
-
#initialize ⇒ Rpm2Cpio
constructor
A new instance of Rpm2Cpio.
- #rpm2cpio ⇒ Object
Methods inherited from CliFuncs
#clear_values, #flag_add, #flags_run, #run_and_capture, #set_dirs
Constructor Details
#initialize ⇒ Rpm2Cpio
Returns a new instance of Rpm2Cpio.
8 9 10 11 12 13 14 15 |
# File 'lib/cli_funcs_rpm2cpio.rb', line 8 def initialize super @output = "" @utility = CliUtils.new("rpm2cpio").utility_path @packages_dir = SYSTEM_CONFIG["packages_dir"] @default_dist = SYSTEM_CONFIG["default_dist"] @rpm_file = "" end |
Instance Attribute Details
#flags_all ⇒ Object
Returns the value of attribute flags_all.
5 6 7 |
# File 'lib/cli_funcs_rpm2cpio.rb', line 5 def flags_all @flags_all end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
6 7 8 |
# File 'lib/cli_funcs_rpm2cpio.rb', line 6 def output @output end |
#rpm_file ⇒ Object
Returns the value of attribute rpm_file.
5 6 7 |
# File 'lib/cli_funcs_rpm2cpio.rb', line 5 def rpm_file @rpm_file end |
Instance Method Details
#rpm2cpio ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cli_funcs_rpm2cpio.rb', line 17 def rpm2cpio # This should turn capture3 into binary mode just by being set opts = Hash.new # Run our command and capture the binary output into @output begin @output, stderr_str, status = Open3.capture3(@utility, @rpm_file, opts) puts [@utility, @rpm_file, opts].flatten.inspect if DEBUG rescue Exception => e puts "Tried to run #{@utility} #{@rpm_file} #{opts.inspect} during Rpm2Cpio.rpm2cpio, received exception: #{e}" end end |