[MacPorts] #55293: set ${prefix} in portindex

MacPorts noreply at macports.org
Sun Nov 12 11:59:37 UTC 2017


#55293: set ${prefix} in portindex
--------------------------+-----------------
  Reporter:  RJVB         |      Owner:
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:
Resolution:               |   Keywords:
      Port:               |
--------------------------+-----------------

Comment (by RJVB):

 I was waiting for that kind of remark ...

 The point here is not being able to generate a prefix-dependent port index
 (to the extent that dependency and conflict information isn't stored
 there). The point is just avoiding an abort because of a variable that's
 not `not declared` but that's set to a bogus value.

 I realise I made that error myself: what's happening is that `prefix`
 expands to `${prefix}`. If the variable weren't set at all a large number
 of ports wouldn't index, of course.

 This obliges me to do

 ```
 if {[file exists ${prefix}/include/qt5/QtCore/QtCore] || ${os.major} == 10
         || ([catch {registry_active "qt5-kde"}] == 0 || [catch
 {registry_active "qt5-kde-devel"}] == 0) } {
 ```

 instead of

 ```
 if {[file exists ${prefix}/include/qt5/QtCore/QtCore] || ${os.major} ==
 10} {
 ```

--
Ticket URL: <https://trac.macports.org/ticket/55293#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list