Bug 248374 - net/mtr: Fails to package PREFIX != LOCALBASE
Summary: net/mtr: Fails to package PREFIX != LOCALBASE
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-07-30 22:39 UTC by John Hein
Modified: 2022-08-08 06:08 UTC (History)
2 users (show)

See Also:
jcfyecrayz: maintainer-feedback? (sunpoet)
koobs: merge-quarterly?


Attachments
[patch] provide explicit configure option for bash completions dir (624 bytes, patch)
2020-07-30 22:39 UTC, John Hein
no flags Details | Diff
[patch] provide explicit configure option for bash completions dir (v2) (331 bytes, patch)
2020-07-30 22:43 UTC, John Hein
koobs: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2020-07-30 22:39:08 UTC
Created attachment 216895 [details]
[patch] provide explicit configure option for bash completions dir

There is a plist error if bash-completion is installed and PREFIX != LOCALBASE

====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: /usr/loc/share/bash-completion/completions/mtr
Error: Orphaned: @dir /usr/loc/share/bash-completion/completions
Error: Orphaned: @dir /usr/loc/share/bash-completion
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: share/bash-completion/completions/mtr



The attached patch provides an explicit configure option for --with-bash-completiondir.

It also moves USES to make portlint happy.
Comment 1 John Hein 2020-07-30 22:43:34 UTC
Created attachment 216896 [details]
[patch] provide explicit configure option for bash completions dir (v2)

Re-gen patch against latest version of mtr/Makefile.
Comment 2 John Hein 2020-07-30 22:47:17 UTC
QA:
 - confirmed 'make stage check-plist' failure in poudriere with bash-completion installed before applying patch
 - confirmed success in poudriere after patch
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2020-08-01 04:47:45 UTC
Comment on attachment 216896 [details]
[patch] provide explicit configure option for bash completions dir (v2)

Approved by: portmgr (blanket: packaging fix)
MFH: 2020Q3 (blanket: packaging fix)
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-08-02 05:06:08 UTC
(In reply to Kubilay Kocak from comment #3)

No. That does not work.
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-08-02 05:17:48 UTC
(In reply to John Hein from comment #0)

I do not really understand the use case that PREFIX != LOCALBASE.
Since it now installs the bash completion to PREFIX, the PLIST has to be changed as well.
Comment 6 John Hein 2020-08-02 16:33:06 UTC
(In reply to Sunpoet Po-Chuan Hsieh from comment #5)

As described in the first sentence of this bug report, if bash-completion is installed, net/mtr does not install to PREFIX.

To perhaps help clarify that: this happens because 'configure' uses 'pkgconf --variable completionsdir bash-completion' if bash-completion is installed to determine the install location (which will not necessarily be under PREFIX).  If bash-completion is not installed, then it uses a fallback value that is under PREFIX.

How to reproduce:

 sudo make -C /usr/ports/shells/bash-completion install

 sudo make -C /usr/ports/net/mtr stage check-plist PREFIX=/opt



(In reply to Sunpoet Po-Chuan Hsieh from comment #4)

"No. That does not work."   --- _What_ does not work?
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2022-08-08 06:08:58 UTC
Any updates on this one?