build: store source modified time in tabfile
This commit is contained in:
parent
b24f174325
commit
6c8c56a689
@ -130,7 +130,7 @@ class Build
|
|||||||
formula.install
|
formula.install
|
||||||
|
|
||||||
stdlibs = detect_stdlibs(ENV.compiler)
|
stdlibs = detect_stdlibs(ENV.compiler)
|
||||||
Tab.create(formula, ENV.compiler, stdlibs.first, formula.build).write
|
Tab.create(formula, ENV.compiler, stdlibs.first, formula.build, formula.source_modified_time).write
|
||||||
|
|
||||||
# Find and link metafiles
|
# Find and link metafiles
|
||||||
formula.prefix.install_metafiles Pathname.pwd
|
formula.prefix.install_metafiles Pathname.pwd
|
||||||
|
|||||||
@ -78,7 +78,6 @@ class Formula
|
|||||||
# This contains all the attributes (e.g. URL, checksum) that apply to the
|
# This contains all the attributes (e.g. URL, checksum) that apply to the
|
||||||
# stable version of this formula.
|
# stable version of this formula.
|
||||||
# @private
|
# @private
|
||||||
|
|
||||||
attr_reader :stable
|
attr_reader :stable
|
||||||
|
|
||||||
# The development {SoftwareSpec} for this {Formula}.
|
# The development {SoftwareSpec} for this {Formula}.
|
||||||
@ -108,6 +107,10 @@ class Formula
|
|||||||
# @private
|
# @private
|
||||||
attr_reader :active_spec_sym
|
attr_reader :active_spec_sym
|
||||||
|
|
||||||
|
# most recent modified time for source files
|
||||||
|
# @private
|
||||||
|
attr_reader :source_modified_time
|
||||||
|
|
||||||
# Used for creating new Homebrew versions of software without new upstream
|
# Used for creating new Homebrew versions of software without new upstream
|
||||||
# versions.
|
# versions.
|
||||||
# @see .revision
|
# @see .revision
|
||||||
@ -1550,6 +1553,7 @@ class Formula
|
|||||||
|
|
||||||
def stage
|
def stage
|
||||||
active_spec.stage do
|
active_spec.stage do
|
||||||
|
@source_modified_time = active_spec.source_modified_time
|
||||||
@buildpath = Pathname.pwd
|
@buildpath = Pathname.pwd
|
||||||
env_home = buildpath/".brew_home"
|
env_home = buildpath/".brew_home"
|
||||||
mkdir_p env_home
|
mkdir_p env_home
|
||||||
|
|||||||
@ -8,7 +8,7 @@ require "version"
|
|||||||
class Resource
|
class Resource
|
||||||
include FileUtils
|
include FileUtils
|
||||||
|
|
||||||
attr_reader :mirrors, :specs, :using
|
attr_reader :mirrors, :specs, :using, :source_modified_time
|
||||||
attr_writer :version
|
attr_writer :version
|
||||||
attr_accessor :download_strategy, :checksum
|
attr_accessor :download_strategy, :checksum
|
||||||
|
|
||||||
@ -87,6 +87,7 @@ class Resource
|
|||||||
def unpack(target = nil)
|
def unpack(target = nil)
|
||||||
mktemp(download_name) do
|
mktemp(download_name) do
|
||||||
downloader.stage
|
downloader.stage
|
||||||
|
@source_modified_time = downloader.source_modified_time
|
||||||
if block_given?
|
if block_given?
|
||||||
yield self
|
yield self
|
||||||
elsif target
|
elsif target
|
||||||
|
|||||||
@ -25,7 +25,7 @@ class SoftwareSpec
|
|||||||
attr_reader :bottle_specification
|
attr_reader :bottle_specification
|
||||||
attr_reader :compiler_failures
|
attr_reader :compiler_failures
|
||||||
|
|
||||||
def_delegators :@resource, :stage, :fetch, :verify_download_integrity
|
def_delegators :@resource, :stage, :fetch, :verify_download_integrity, :source_modified_time
|
||||||
def_delegators :@resource, :cached_download, :clear_cache
|
def_delegators :@resource, :cached_download, :clear_cache
|
||||||
def_delegators :@resource, :checksum, :mirrors, :specs, :using
|
def_delegators :@resource, :checksum, :mirrors, :specs, :using
|
||||||
def_delegators :@resource, :version, :mirror, *Checksum::TYPES
|
def_delegators :@resource, :version, :mirror, *Checksum::TYPES
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user