Ticket #12172 (closed defect: fixed)
bash-completion 20060301 (partly?) broken
| Reported by: | jmpp@… | Owned by: | yeled@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | Port Bugs |
| Component: | ports | Version: | 1.4.40 |
| Keywords: | Cc: | yeled@…, jmpp@… | |
| Port: |
Description
Stand alone installation of the port seems to work just fine, accessing the following instruction works:
xinstall -m 644 -c ${filesdir}/port.cmd ${destroot}${prefix}/etc/bash_completion.d/port
However, when installing as a dependency of another port (like subversion +bash_completion), accessing the port.cmd file through the ${filesdir} variable fails because it refers to files/ with respect to the current port{dir,path} (which is subversion's in this case, though MacPorts should cd into the port{dir,path} of the dependency currently being handled) and therefore port.cmd cannot be found.
I'd say this is a bug in MacPorts itself (not cd'ing into the port{dir,path} of the depedency being handled?), but for the time being here's a quicker fix to get bash-completion installing as a dependency of another port:
xinstall -m 644 -c ${filespath}/port.cmd ${destroot}${prefix}/etc/bash_completion.d/port
That is, exchange ${filesdir} for ${filespath} and the reference to port.cmd will be its full path. The attached patch does exactly that.
-jmpp

