Class: FPM::Package::Empty

Inherits:
FPM::Package show all
Defined in:
lib/fpm/package/empty.rb

Overview

Empty Package type. For strict/meta/virtual package creation

Instance Attribute Summary

Attributes inherited from FPM::Package

#architecture, #attributes, #attrs, #category, #config_files, #conflicts, #dependencies, #description, #directories, #epoch, #iteration, #license, #maintainer, #name, #provides, #replaces, #scripts, #url, #vendor, #version

Instance Method Summary collapse

Methods inherited from FPM::Package

apply_options, #build_path, #cleanup, #cleanup_build, #cleanup_staging, #convert, #converted_from, default_attributes, #edit_file, #files, inherited, #input, option, #script, #staging_path, #type, type, types

Methods included from Util

#ar_cmd, #ar_cmd_deterministic?, #copied_entries, #copy_entry, #copy_metadata, #default_shell, #erbnew, #execmd, #expand_pessimistic_constraints, #logger, #program_exists?, #program_in_path?, #safesystem, #safesystemout, #tar_cmd, #tar_cmd_supports_sort_names_and_set_mtime?

Constructor Details

#initialize(*args) ⇒ Empty

Returns a new instance of Empty.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/fpm/package/empty.rb', line 7

def initialize(*args)
  super(*args)

  # Override FPM::Package's default "native" architecture value
  # This feels like the right default because an empty package has no
  # architecture-specific files, and in most cases an empty package should be
  # installable anywhere.
  #
  # https://github.com/jordansissel/fpm/issues/1846
  @architecture = "all"
end

Instance Method Details

#output(output_path) ⇒ Object



19
20
21
# File 'lib/fpm/package/empty.rb', line 19

def output(output_path)
  logger.warn("Your package has gone into the void.")
end

#to_s(fmt) ⇒ Object



22
23
24
# File 'lib/fpm/package/empty.rb', line 22

def to_s(fmt)
  return ""
end