[MacPorts] #49752: root5: runs "port select root ..." on behalf of user, causing unregistered files to be left on the user's system

MacPorts noreply at macports.org
Wed May 2 17:02:27 UTC 2018


#49752: root5: runs "port select root ..." on behalf of user, causing unregistered
files to be left on the user's system
-------------------------+--------------------------
  Reporter:  ryandesign  |      Owner:  cjones051073
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.3.4
Resolution:              |   Keywords:
      Port:  root5       |
-------------------------+--------------------------

Comment (by raimue):

 There are separate issues here:

 * `port select` leaves files behind\\
   This is not a issue of root5 or root6, but a separate base issue (do we
 already have a ticket?). For example, this could be solved by registering
 the symlinks created by `port select` to the corresponding `*_select` port
 in the registry, so they are not left behind. However, discussion of that
 should be subject of another ticket.

 * root5 and root6 run `port select`\\
   If there is a need to have the effect of 'port select' automatically if
 nothing was selected before, that should be a feature of base (or the
 `select` port group?). It should not be implemented in ports separately.
 In general, I do not think it is a good idea to execute the port command
 from within the port command. For example, if `port select` was locking
 the registry for write access, you could run into a deadlock. This would
 better be implemented with the `mportselect` API of macports1.0, but I
 think this is currently not exposed to the slave Tcl interpreter.\\
   As we lived with this state for over two years, I am not saying this
 needs to be removed from root5 and root6 immediately, but there should be
 a plan to replace this with a better implementation in the future.

 A side note for root5 and root6, I noticed the the post-activate phase
 uses `ui_msg`, but should be using `notes`. Notes are repeated for more
 visibility after all dependencies and requested ports are installed, while
 the `ui_msg` is just somewhere in the output.

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


More information about the macports-tickets mailing list