[MacPorts] #65721: app portgroup: callback not used, causing issues when combined with other pgs

MacPorts noreply at macports.org
Thu Aug 25 18:01:51 UTC 2022


#65721: app portgroup: callback not used, causing issues when combined with other
pgs
----------------------+-----------------------
  Reporter:  mascguy  |      Owner:  mascguy
      Type:  defect   |     Status:  assigned
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:  2.7.2
Resolution:           |   Keywords:  portgroup
      Port:  gramps   |
----------------------+-----------------------

Comment (by mascguy):

 On a separate note: Presently the app pg checks for the executable in a
 `pre-destroot` block, which can potentially be premature. I'd like to move
 this check to `post-destroot`:

 {{{
 pre-destroot {
     if {[tbool app.create]} {
         # Ensure app.name is valid.
         if {[regexp {[/]} ${app.name}]} {
             return -code error "app.name ${app.name} contains illegal
 characters"
         }

         # Make the app bundle directories.
         xinstall -d
 ${destroot}${applications_dir}/${app.name}.app/Contents/MacOS \
 ${destroot}${applications_dir}/${app.name}.app/Contents/Resources
     }
 }
 }}}

 We can continue to create the app bundle directories in the `pre-destroot`
 block. But to avoid issues, we shouldn't check for executable existence
 until `post-destroot`.

 Thoughts?

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


More information about the macports-tickets mailing list