Bug 220737 - Mk/bsd.java.mk: Strict JAVA_{VERSION,VENDOR,ERROR} validation
Summary: Mk/bsd.java.mk: Strict JAVA_{VERSION,VENDOR,ERROR} validation
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kyle Evans
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2017-07-14 20:05 UTC by Kyle Evans
Modified: 2018-01-28 14:38 UTC (History)
3 users (show)

See Also:
bapt: maintainer-feedback+
antoine: exp-run+


Attachments
svn(1) diff of Mk/bsd.java.mk (2.36 KB, patch)
2017-07-14 20:05 UTC, Kyle Evans
koobs: maintainer-approval? (java)
koobs: maintainer-approval? (portmgr)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2017-07-14 20:05:05 UTC
Created attachment 184363 [details]
svn(1) diff of Mk/bsd.java.mk

Noticed while working in the regex around here: validation of JAVA_{VERSION,VENDOR,ERROR} does not constitute an error and make(1) will happily continue, potentially doing the wrong thing. Attached patch adjusts it as follows:

* Only validate each var if it's defined
* Also echo "not a valid value" message if the checked var is empty
* Fail the build if validation fails
Comment 1 Kyle Evans freebsd_committer freebsd_triage 2017-07-14 20:22:14 UTC
For some historical value: It looks like this validation was previously strict up until r217132 by kris@ inadvertently changed this.
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2017-08-12 06:17:31 UTC
Can someone review this before the exp-run?
Comment 3 Baptiste Daroussin freebsd_committer freebsd_triage 2017-08-23 14:54:25 UTC
Please proceed on the exp-run
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2017-08-25 08:15:17 UTC
Exp-run looks fine.
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-11-04 01:16:57 UTC
A commit references this bug:

Author: kevans
Date: Sat Nov  4 01:16:32 UTC 2017
New revision: 453438
URL: https://svnweb.freebsd.org/changeset/ports/453438

Log:
  Mk/bsd.java.mk: Strict JAVA_{VERSION,VENDOR,ERROR} validation

  Currently, validation of JAVA_{VERSION,VENDOR,ERROR} does not constitute an
  error and make(1) will happily continue, potentially doing the wrong thing.
  Adjust the behavior as follows:

  - Only validate each var if it's defined
  - Remain verbose about what error exists and what's expected
  - Fail the build if validation fails

  bsd.java.mk exhibited this behavior up until r217132 inadvertently changed
  it to be non-fatal.

  PR:		220737
  Approved by:	portmgr (bdrewery)

Changes:
  head/Mk/bsd.java.mk