Bug 238603 - devel/llvm80 not PREFIX-safe
Summary: devel/llvm80 not PREFIX-safe
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-16 10:14 UTC by Mikhail Teterin
Modified: 2019-06-18 17:52 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brooks)
koobs: merge-quarterly?


Attachments
Replace /usr/local with ${PREFIX} (534 bytes, patch)
2019-06-16 10:14 UTC, Mikhail Teterin
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Teterin freebsd_committer 2019-06-16 10:14:35 UTC
Created attachment 205113 [details]
Replace /usr/local with ${PREFIX}

On a system with PREFIX being something other than /usr/local, the post-install target fails to remove the ${STAGEDIR}/usr/local/llvm80/include/llvm/TextAPI/MachO ...

The trivial fix is attached, however, I'd suggest using "${RM} -r" instead of ${RMDIR}" because the latter will gratuitously fail upon a rerun of the staging.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-06-16 10:53:04 UTC
Comment on attachment 205113 [details]
Replace /usr/local with ${PREFIX}

Approved by: portmgr (blanket(s): just fix it, ports compliance)
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-06-16 10:54:13 UTC
@Mikhail The change is a blanket approval candidate.

Feel free to assign yourself, commit, mfh (if appropriate, I haven't looked), and close
Comment 3 Brooks Davis freebsd_committer 2019-06-17 17:56:49 UTC
Thanks!  I'll commit shortly.

The RMDIR won't fail on restage because the directory is always (re)created during the do-install phase.  I prefer RMDIR because it will start failing if upstream starts putting files in the directory.
Comment 4 commit-hook freebsd_committer 2019-06-17 21:02:15 UTC
A commit references this bug:

Author: brooks
Date: Mon Jun 17 20:52:16 UTC 2019
New revision: 504435
URL: https://svnweb.freebsd.org/changeset/ports/504435

Log:
  Fix a bug when ${PREFIX} != /usr/local.[0]

  As of LLVM 8.0.1, pre-releases have moved to github.  Chase this change.

  PR:		238603 [0]
  Submitted by:	mi [0]
  MFH:		2019Q2

Changes:
  head/devel/llvm80/Makefile
  head/devel/llvm80/distinfo
Comment 5 commit-hook freebsd_committer 2019-06-18 17:47:02 UTC
A commit references this bug:

Author: brooks
Date: Tue Jun 18 17:46:42 UTC 2019
New revision: 504489
URL: https://svnweb.freebsd.org/changeset/ports/504489

Log:
  MFH: r504435 r504436

  Fix a bug when ${PREFIX} != /usr/local.[0]

  As of LLVM 8.0.1, pre-releases have moved to github.  Chase this change.

  PR:		238603 [0]
  Submitted by:	mi [0]

  Revert accidental update to distinfo.

  Reported by:	Christoph Moench-Tegeder <cmt@burggraben.net>

  Approved by:	portmgr (blanket fixes)

Changes:
_U  branches/2019Q2/
  branches/2019Q2/devel/llvm80/Makefile
  branches/2019Q2/devel/llvm80/distinfo