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

Install all licenses #8256

Closed
wants to merge 1 commit into from
Closed

Conversation

vladimyr
Copy link
Contributor

@vladimyr vladimyr commented Aug 8, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Handle cases of dual licensing where license filenames start with "LICENSE-" or "LICENCE-" prefix.
Continuation of #7953

Handle cases of dual licensing where license filenames start with
"LICENSE-" or "LICENCE-" prefix.
def list?(file)
return false if %w[.DS_Store INSTALL_RECEIPT.json].include?(file)

!copy?(file)
end

def copy?(file)
return true if license?(file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the two entries in BASENAMES are not used anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True that, do we want to get rid of them?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either that, or move them to something like BASENAME_REGEXES:

BASENAME_REGEXES = [/^licen(c|s)e(\-|$)/].freeze

and change the check to

BASENAMES.include?(file) || BASENAME_REGEXES.any? { |r| r.match?(file) }

so we don't even need the license? helper function.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't even need to be an array of regexes.

@MikeMcQuaid
Copy link
Member

@vladimyr Did you get my email on 26th June? If not: let me know and I'll resend. Thanks!

@Rylan12
Copy link
Member

Rylan12 commented Aug 27, 2020

@vladimyr any progress on this? I've found another similar instance that should probably be added to this PR.

In Homebrew/homebrew-core#60066 I realized that the COPYING files was copied but lot COPYING.LESSER. I had a potential solution open in #8499 but it probably makes more sense to add it here.

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 15, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 15, 2020
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

Successfully merging this pull request may close these issues.

None yet

5 participants