# File lib/fpm/package/deb.rb, line 157
  def architecture
    if @architecture.nil? or @architecture == "native"
      # Default architecture should be 'native' which we'll need to ask the
      # system about.
      if program_in_path?("dpkg")
        @architecture = %x{dpkg --print-architecture 2> /dev/null}.chomp
        if $?.exitstatus != 0 or @architecture.empty?
          # if dpkg fails or emits nothing, revert back to uname -m
          @architecture = %x{uname -m}.chomp 
        end
      else
        @architecture = %x{uname -m}.chomp
      end
    end

    case @architecture
    when "x86_64"
      # Debian calls x86_64 "amd64"
      @architecture = "amd64"
    when "noarch"
      # Debian calls noarch "all"
      @architecture = "all"
    end
    return @architecture
  end