Prepare bottle tooling for formula revisions
This commit is contained in:
parent
17032a600c
commit
44dc21ca5d
@ -6,7 +6,7 @@ require 'bottle_version'
|
|||||||
def bottle_filename f, options={}
|
def bottle_filename f, options={}
|
||||||
options = { :tag => bottle_tag }.merge(options)
|
options = { :tag => bottle_tag }.merge(options)
|
||||||
name = f.name.downcase
|
name = f.name.downcase
|
||||||
version = f.stable.version
|
version = PkgVersion.new(f.stable.version, f.revision)
|
||||||
options[:revision] ||= f.bottle.revision.to_i if f.bottle
|
options[:revision] ||= f.bottle.revision.to_i if f.bottle
|
||||||
"#{name}-#{version}#{bottle_native_suffix(options)}"
|
"#{name}-#{version}#{bottle_native_suffix(options)}"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -115,7 +115,7 @@ module Homebrew extend self
|
|||||||
if ARGV.include? '--no-revision'
|
if ARGV.include? '--no-revision'
|
||||||
bottle_revision = 0
|
bottle_revision = 0
|
||||||
else
|
else
|
||||||
max = f.bottle_version_map('origin/master')[f.version].max
|
max = f.bottle_version_map('origin/master')[f.pkg_version].max
|
||||||
bottle_revision = max ? max + 1 : 0
|
bottle_revision = max ? max + 1 : 0
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ module Homebrew extend self
|
|||||||
HOMEBREW_CELLAR.cd do
|
HOMEBREW_CELLAR.cd do
|
||||||
# Use gzip, faster to compress than bzip2, faster to uncompress than bzip2
|
# Use gzip, faster to compress than bzip2, faster to uncompress than bzip2
|
||||||
# or an uncompressed tarball (and more bandwidth friendly).
|
# or an uncompressed tarball (and more bandwidth friendly).
|
||||||
safe_system 'tar', 'czf', bottle_path, "#{f.name}/#{f.version}"
|
safe_system 'tar', 'czf', bottle_path, "#{f.name}/#{f.pkg_version}"
|
||||||
end
|
end
|
||||||
|
|
||||||
if File.size?(bottle_path) > 1*1024*1024
|
if File.size?(bottle_path) > 1*1024*1024
|
||||||
|
|||||||
@ -49,14 +49,19 @@ class Formula
|
|||||||
unless bottle.checksum.nil? || bottle.checksum.empty?
|
unless bottle.checksum.nil? || bottle.checksum.empty?
|
||||||
@bottle = bottle
|
@bottle = bottle
|
||||||
bottle.url ||= bottle_url(self, bottle.current_tag)
|
bottle.url ||= bottle_url(self, bottle.current_tag)
|
||||||
bottle.version = stable.version
|
bottle.version = PkgVersion.new(stable.version, revision)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@active_spec = determine_active_spec
|
@active_spec = determine_active_spec
|
||||||
validate_attributes :url, :name, :version
|
validate_attributes :url, :name, :version
|
||||||
@build = determine_build_options
|
@build = determine_build_options
|
||||||
@pkg_version = PkgVersion.new(version, revision)
|
|
||||||
|
# TODO: @pkg_version is already set for bottles, since constructing it
|
||||||
|
# requires passing in the active_spec version. This should be fixed by
|
||||||
|
# making the bottle an attribute of SoftwareSpec rather than a separate
|
||||||
|
# spec itself.
|
||||||
|
@pkg_version = PkgVersion.new(version, revision) unless active_spec == bottle
|
||||||
|
|
||||||
@pin = FormulaPin.new(self)
|
@pin = FormulaPin.new(self)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user