Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

brew pull --bottle fetches wrong bottles if one is not built for this system #48731

Closed
apjanke opened this issue Feb 2, 2016 · 4 comments
Closed
Labels

Comments

@apjanke
Copy link
Contributor

apjanke commented Feb 2, 2016

The bottle-pulling part of brew pull --bottle won't work quite right when run on an OS version which does not have a bottle for that OS version. It will publish the bottles to bintray, but when trying to fetch them to verify their availability, it will fetch the formula's source distribution instead.

For example, PR 48724 updates sourcekitten, which only has bottles for 10.10 Yosemite and newer. If I do brew pull --bottle 48724 on a 10.9 system, I get this.

$ brew pull --bottle 48724
######################################################################## 100.0%
==> Applying patch
Applying: sourcekitten 0.9.0
==> Patch closes issue #48724
Switched to a new branch 'pull-bottle-48724'
######################################################################## 100.0%
==> Applying patch
Applying: sourcekitten 0.9.0
Applying: sourcekitten: update 0.9.0 bottle.
First, rewinding head to replay your work on top of it...
Applying: sourcekitten: update 0.9.0 bottle.
Switched to branch 'master'
Updating c60c5db..58a64b6
Fast-forward
 Library/Formula/sourcekitten.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Deleted branch pull-bottle-48724 (was 58a64b6).
==> Publishing on Bintray:
{"files":2}
==> Patch changed:
 Library/Formula/sourcekitten.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
==> Cloning https://github.com/jpsim/SourceKitten.git
Cloning into '/Library/Caches/Homebrew/sourcekitten--git'...
remote: Counting objects: 147, done.
remote: Compressing objects: 100% (133/133), done.
remote: Total 147 (delta 23), reused 54 (delta 8), pack-reused 0
Receiving objects: 100% (147/147), 220.28 KiB | 0 bytes/s, done.
Resolving deltas: 100% (23/23), done.
Checking connectivity... done.
Note: checking out 'fe838df11c6fd9337320ae47bf12351b88c968d1'.

Looks like this happens because it grabs the bottle files with a regular fetch operation on the formula, assuming that will get a bottle, instead of doing a download specifically for the bottle file.

Low impact: basically, it won't do the waiting until the bottle files appear on Bintray, so you might push the commit before the bottle files for it are ready. And if the publishing to Bintray failed, it won't detect it.

@apjanke apjanke added the bug label Feb 2, 2016
@MikeMcQuaid
Copy link
Member

Looks like this happens because it grabs the bottle files with a regular fetch operation on the formula, assuming that will get a bottle, instead of doing a download specifically for the bottle file.

Low impact: basically, it won't do the waiting until the bottle files appear on Bintray, so you might push the commit before the bottle files for it are ready. And if the publishing to Bintray failed, it won't detect it.

Nice spot here. I guess ideally we'd just read the DSL and do something like download the newest bottle if there's none available (to verify they are published).

@apjanke
Copy link
Contributor Author

apjanke commented Feb 2, 2016

That's what I'm thinking too. I'll do a PR for it once I've finished my other brew pull PR.

@DomT4
Copy link
Member

DomT4 commented Feb 2, 2016

It will publish the bottles to bintray, but when trying to fetch them to verify their availability, it will fetch the formula's source distribution instead.

I honestly thought this behaviour was intentional, heh.

@UniqMartin
Copy link
Contributor

Closing in favor of Homebrew/brew#132 where this will be addressed very soon, I guess.

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants