build: store source modified time in tabfile
This commit is contained in:
parent
b24f174325
commit
6c8c56a689
@ -130,7 +130,7 @@ class Build
|
||||
formula.install
|
||||
|
||||
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
|
||||
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
|
||||
# stable version of this formula.
|
||||
# @private
|
||||
|
||||
attr_reader :stable
|
||||
|
||||
# The development {SoftwareSpec} for this {Formula}.
|
||||
@ -108,6 +107,10 @@ class Formula
|
||||
# @private
|
||||
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
|
||||
# versions.
|
||||
# @see .revision
|
||||
@ -1550,6 +1553,7 @@ class Formula
|
||||
|
||||
def stage
|
||||
active_spec.stage do
|
||||
@source_modified_time = active_spec.source_modified_time
|
||||
@buildpath = Pathname.pwd
|
||||
env_home = buildpath/".brew_home"
|
||||
mkdir_p env_home
|
||||
|
||||
@ -8,7 +8,7 @@ require "version"
|
||||
class Resource
|
||||
include FileUtils
|
||||
|
||||
attr_reader :mirrors, :specs, :using
|
||||
attr_reader :mirrors, :specs, :using, :source_modified_time
|
||||
attr_writer :version
|
||||
attr_accessor :download_strategy, :checksum
|
||||
|
||||
@ -87,6 +87,7 @@ class Resource
|
||||
def unpack(target = nil)
|
||||
mktemp(download_name) do
|
||||
downloader.stage
|
||||
@source_modified_time = downloader.source_modified_time
|
||||
if block_given?
|
||||
yield self
|
||||
elsif target
|
||||
|
||||
@ -25,7 +25,7 @@ class SoftwareSpec
|
||||
attr_reader :bottle_specification
|
||||
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, :checksum, :mirrors, :specs, :using
|
||||
def_delegators :@resource, :version, :mirror, *Checksum::TYPES
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user