lib/vanagon/platform/deb.rb
# Returns the commands to add a given repo target and optionally a gpg key to the build system
#
# @param definition [String] URI to the repo (.deb or .list)
# @param gpg_key [String, nil] URI to a gpg key for the repo
Returns the commands to add a given repo target and optionally a gpg key to the build system
Returns the commands to add a given repo target and optionally a gpg key to the build system
def add_repository(definition, gpg_key = nil)
        definition = URI.parse(definition)
        gpg_key = URI.parse(gpg_key) if gpg_key
        provisioning = ["apt-get -qq update && apt-get -qq install curl"]
        if definition.scheme =~ /^(http|ftp)/
          provisioning << add_repo_target(definition)
        end
        if gpg_key
          provisioning << add_gpg_key(gpg_key)
        end
        provisioning << "apt-get -qq update"
      end
def add_repository ( definition , gpg_key = nil ) definition = URI . parse ( definition ) gpg_key = URI . parse ( gpg_key ) if gpg_key provisioning = [ "apt-get -qq update && apt-get -qq install curl" ] if definition . scheme =~ / ^(http|ftp) / provisioning << add_repo_target ( definition ) end if gpg_key provisioning << add_gpg_key ( gpg_key ) end provisioning << "apt-get -qq update" end
Returns the commands to add a given repo target and optionally a gpg key to the build system
Returns the commands to add a given repo target and optionally a gpg key to the build system
# i.e., definition = http://builds.delivery.puppetlabs.net/puppet-agent/0.2.1/repo_configs/deb/pl-puppet-agent-0.2.1-wheezy.list # parse the definition and gpg_key if set to ensure they are both valid URIs
definition
URI to the repo (.deb or .list)
URI to the repo ( . deb or . list )
gpg_key
URI to a gpg key for the repo
URI to a gpg key for the repo