This code is supposed to allow
depends_on "foo" => "with-bar"
to work when foo has only a "without-bar" option.
The options system was not designed to support this. Unfortunately, it
was bolted on anyway. The implementation is extremely difficult to
understand, and it only works for certain types of options, which is
confusing from a user's point of view. Luckily, no formulae in core or
the official taps rely on the behavior in order to function.
It is hindering progress in improving this code, so I am removing it.
Since the Tab is written in the build process, the formula's build
object will have the correct args attached to it already, so we don't
need to reconstruct it.
- 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
If both a formula and its dependencies are changed in a single pull
request it'll fail because the bottle block may no longer be correct.
Handle this case by ignoring bottle pour failures and fetching the
source packages instead of bottles.
Right now this code only produces false positives. When we have real
support for renames, we can implement it more carefully.
ClosesHomebrew/homebrew#31126.
Per the `git-rev-parse(1)` manpage:
--verify Verify that exactly one parameter is provided, and that it
can be turned into a raw 20-byte SHA-1 that can be used to access the
object database. If so, emit it to the standard output; otherwise,
error out.
If you want to make sure that the output actually names an object in
your object database and/or can be used as a specific type of object
For example, git rev-parse "$VAR^{commit}" will make sure $VAR names
an existing object that is a commit-ish (i.e. a commit, or an
annotated tag that points at a commit).
That actually means that:
git rev-parse --verify af8e768e2bd3b4398bca033998f83b0eb8874914
will _always_ return the SHA-1 hash — regardless of whether or not
that's actually a valid reference!
Thus, when `GitDownloadStragtegy#update_repo` tries to check
`has_ref?`, it mistakenly succeeds, and doesn't actually do a `git fetch
origin`.
The fix is to use:
git rev-parse --verify "af8e768e2bd3b4398bca033998f83b0eb8874914^{commit}"
FixesHomebrew/homebrew#31045.
ClosesHomebrew/homebrew#31054.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>