-
Notifications
You must be signed in to change notification settings - Fork 235
Conversation
In this case I think it may be more clear to copy and paste the small handful of necessary functions from |
Is it possible to not modify |
From the looks of it, yes! |
The way I see it, we're trying to depend on the host system as little as possible and the assumption is going to be that With $ ag "depends_on.*x11.*=>.*\""
homebrew-x11/gv.rb
15: depends_on :x11 => "2.7.2" |
With this in mind, I'm hesitant to introduce any version checking on X.Org. Currently, the version is coming up as "0.0.0", which could be worse, I guess. We could introduce some version number into it, based on either the upstream release numbers or BLFS', but that would make updating X.Org a pain since it would be in a different repository than this requirement or any tests for it. |
I suggest using the version number of the |
Yep, I agree. I don't think any version checking is needed. |
@@ -39,7 +39,8 @@ def test_dependency_tags | |||
|
|||
def test_requirement_creation | |||
@d.add :x11 | |||
assert_instance_of X11Requirement, find_requirement(X11Requirement) | |||
assert_instance_of X11Requirement, find_requirement(X11Requirement) if OS.mac? | |||
assert_instance_of XorgRequirement, find_requirement(XorgRequirement) unless OS.mac? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer one of either
if OS.mac?
assert_instance_of X11Requirement, find_requirement(X11Requirement)
else
assert_instance_of XorgRequirement, find_requirement(XorgRequirement)
end
or
req = OS.mac? ? X11Requirement : XorgRequirement
assert_instance_of req, find_requirement(req)
with a preference for the latter (untested code). I'm not sure the latter is actually legal code. Guess we'll find out.
Looking good! I'm glad to see that the |
def initialize(name = "xorg", tags = []) | ||
@name = name | ||
if /(\d\.)+\d/ === tags.first | ||
tags.shift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this means that we chop out the version number for compatibility with X11Requirement, but we don't store it since the XQuartz version numbers are meaningless on Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
Looking good, Bob! This patch is just about ready to merge. |
👍 Nice! Thanks, Bob. Should we bottle up X11 before merging this, to give a better user experience and since this pulls in like 70 formula? Are the X11 library bottles |
Yes, definitely. I'll submit the first batch tonight.
Guess we'll find out! My hunch is "no" but we'll see. |
It would be great if they could be |
Marking as blocked by maxim-belkin/homebrew-xorg#21, but it's a soft-block. Also note that I'm going to want to sanity-check this one last time before merging. |
end | ||
|
||
def message | ||
s = "X.Org is required to install this formula." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest a more descriptive message. Maybe something like something like:
X.Org is required to install this formula. Use: brew tap linuxbrew/xorg && brew install xorg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there is a default_formula
defined, I believe this message won't ever be displayed. I didn't catch that before. This method def message
can be removed entirely.
The existing X11 requirement only works for OS X, and works in concert with XQuartz. For Linux, we want to install upstream X.Org instead.
brew tests
with your changes locally?The existing X11 requirement only works for OS X, and works in concert
with XQuartz. For Linux, we want to install upstream X.Org instead.