aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/patch.rb
AgeCommit message (Collapse)Author
2017-10-08Clean up code style and remove `.rubocop_todo.yml`.Markus Reiter
2017-06-12Autocorrect Rubocop Style/SpecialGlobalVars.Mike McQuaid
2017-05-22patch: clean up with ForwardableAlyssa Ross
2016-09-24Fix Style/GuardClause.Markus Reiter
2016-09-23Fix RuboCop CaseEquality.Markus Reiter
2016-09-17rubocop --auto-correct all hash-rocket usage.Mike McQuaid
2016-09-17rubocop --auto-correct all remaining files.Mike McQuaid
But remove some manual `.freeze`s on constants that shouldn't be constants.
2016-02-06Array#count alias didn't always existMisty De Meo
Fixes mistydemeo/tigerbrew#408.
2016-02-01DSL method "apply" to specify patch filesilovezfs
The "apply" DSL method can be called from patch-do blocks to specify the paths within an archive of the desired patch files, which will be applied in the order in which they were supplied to the "apply" calls. If "apply" isn't used, raise an error whenever the extracted directory doesn't contain exactly one file. The "apply" method can be called zero or more times within a patch-do block with the following syntaxes supported: apply "single_apply" apply "multiple_apply_1", "multiple_apply_2" apply [array_of_apply] If apply must be used, a single call using the second syntax above is usually best practice. Each apply leaf should be the relative path to a specific patch file in the extracted directory. For example, if extracting this-v123-patches.tar.gz gives you this-123 this-123/.DS_Store this-123/LICENSE.txt this-123/patches this-123/patches/A.diff this-123/patches/B.diff this-123/patches/C.diff this-123/README.txt and you want to apply only B.diff and C.diff, then you need to use "patches/B.diff" and "patches/C.diff" for the lowest-level apply leaves. The code was provided by Xu Cheng. Any mistakes are mine.
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-01-08Remove the direct url writer from ResourceJack Nagel
2014-12-26Allow debugging patching failuresJack Nagel
Closes Homebrew/homebrew#33056.
2014-12-23Don't raise NotImplementedErrorJack Nagel
2014-09-18Pass command and arg list into ErrorDuringExecution constructorJack Nagel
2014-07-29Simplify internal representation of patchesJack Nagel
- remove support for IO objects, since we no longer access ::DATA directly - since we don't need to support IO objects, use a separate class for string patches and stop wrapping strings in StringIO ojects
2014-07-29Decouple DATA patches from the executing scriptJack Nagel
2014-07-28Make Patch a module since it only has singleton methodsJack Nagel
2014-07-28Remove inheritance patch classesJack Nagel
2014-07-10Fix method signatureJack Nagel
2014-07-10Legacy patches are never StringIOsJack Nagel
2014-07-01Always use class.name to build inspect stringsJack Nagel
2014-03-18Remove redundant methodJack Nagel
This already happens in the superclass.
2014-03-18Always use CurlDownloadStrategy for legacy patchesJack Nagel
Fixes Homebrew/homebrew#27671.
2014-03-15Set patch name on initializationJack Nagel
2014-03-14Remove use of Forwardable from ExternalPatchJack Nagel
2014-03-14Ensure patch cache path is unique even when checksum is missingJack Nagel
2014-03-13Add inspect methods to patch classesJack Nagel
2014-03-13Drop version from cached patch filenamesJack Nagel
2014-03-13Teach audit about new patches implementationJack Nagel
2014-03-13Teach fetch to download patchesJack Nagel
2014-03-13Enable new patch implementation with compatibility layerJack Nagel
2014-03-13New patch implementation and DSLJack Nagel
This commit introduces a new patch implementation that supports checksums and caching. Patches are declared in blocks: patch do url ... sha1 ... end A strip level of -p1 is assumed. It can be overridden using a symbol argument: patch :p0 do url ... sha1 ... end Patches can be declared in stable, devel, and head blocks. This form is preferred over using conditionals. stable do # ... patch do url ... sha1 ... end end Embedded (__END__) patches are declared like so: patch :DATA patch :p0, :DATA Patches can also be embedded by passing a string. This makes it possible to provide multiple embedded patches while making only some of them conditional. patch :p0, "..."