Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew bottle --merge --keep-old broken if root_url specified #4554

Closed
2 of 5 tasks
fredemmott opened this issue Jul 26, 2018 · 7 comments
Closed
2 of 5 tasks

brew bottle --merge --keep-old broken if root_url specified #4554

fredemmott opened this issue Jul 26, 2018 · 7 comments
Assignees
Labels
outdated PR was locked due to age

Comments

@fredemmott
Copy link
Contributor

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • ran a brew command and reproduced the problem with multiple formulae?
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

Skipped some of these the bug is fairly clear from the source of homebrew itself:

To reproduce, build a bottle with a root url including URI scheme, and with --json. Then try to use brew bottle --merge --json.

This will fail, as the : gets removed from the old root url here:

old_value = old_value_original.to_s.delete ":'\""

As can be demonstrated by:

irb(main):003:0> '"https://example.com"'.delete ":\""
=> "https//example.com"

... and can be verified by inserting p statements here:

next unless old_value.empty? || value != old_value

--keep-old will fail as https//example.com !== https://example.com

@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Jul 26, 2018

Nice find. Any chance of a PR here?

@fredemmott
Copy link
Contributor Author

I'll start that process; will probably take a few weeks.

@fredemmott
Copy link
Contributor Author

Actually yes, looks like that got approved when I was on vacation :)

@MikeMcQuaid MikeMcQuaid added the help wanted We want help addressing this label Aug 2, 2018
@scpeters
Copy link
Member

I just ran into this issue as well.

@scpeters
Copy link
Member

I've made an attempt at solving this in scpeters@5d4df3b, but now it's inserting double "" around the old sha256 values:

$ brew bottle --merge --write --no-commit ./ignition-math2--2.9.0.mojave.bottle.json --keep-old --verbose --debug
==> osrf/simulation/ignition-math2
  bottle do
    root_url "http://gazebosim.org/distributions/ign-math/releases"
    cellar :any
    sha256 "9b8c15784c4b1c6fa1237d8810576cdba6095d40c073989e2af335328939148d" => :mojave
    sha256 ""2f48914f690352add2d2fce6cd22a260e43ea54a02da386bef4bba1470bf7750"" => :high_sierra
    sha256 ""5e313d779a496c3963d57495723506400fc1d71bf831d3cfff0f9e9d09bb46fc"" => :sierra
    sha256 ""59eb583fb73e998510a3571a794e96b57a49b68ddca4cd03119d748c6d51d655"" => :el_capitan
    sha256 ""401ecbcc6c53af2ba8161790115a0df3cefbe393cafa72358fd92441bccdb633"" => :yosemite
  end

@scpeters
Copy link
Member

fixed in scpeters@9f9bb7c

I'll submit a PR

scpeters added a commit to scpeters/brew that referenced this issue Sep 12, 2018
Don't strip the : from root_url when using --keep-old.
Closes Homebrew#4554.
@ghost ghost assigned scpeters Sep 12, 2018
@ghost ghost added in progress Maintainers are working on this and removed help wanted We want help addressing this labels Sep 12, 2018
@scpeters
Copy link
Member

see #4892

@ghost ghost removed the in progress Maintainers are working on this label Sep 13, 2018
@lock lock bot added the outdated PR was locked due to age label Oct 13, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Oct 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

3 participants