New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #18270 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

port distfiles shouldn't require root

Reported by: ryandesign@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.8.0
Component: base Version: 1.7.0
Keywords: Cc:
Port:

Description

port distfiles shouldn't require root access to run, since it's only displaying information:

$ port distfiles apache2
Error: Unable to execute port: /opt/local/var/macports/build/_Users_rschmidt_macports_dports_www_apache2/work/.macports.apache2.state is not writable - check permission on port directory
$

Attachments

macports-diststate.diff (615 bytes) - added by afb@… 4 years ago.
macports-diststate.diff

Change History

comment:1 Changed 4 years ago by dluke@…

It looks like it just wants root to write the statefile (which it probably shouldn't need to do), so if you've been building things as non-root, it wouldn't need root.

comment:2 Changed 4 years ago by ryandesign@…

Right, but does it really need to write a statefile? port lint and port livecheck were recently enhanced to not require root; I figured a similar change could be made to port distfiles.

Changed 4 years ago by afb@…

macports-diststate.diff

comment:3 Changed 4 years ago by afb@…

Same goes for port distcheck, it uses an (outdated) hard-coded list of targets rather than checking target_state

comment:4 Changed 4 years ago by raimue@…

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r48483.

dlist_search is maybe not the fastest option to implement this, I copied this from eval_targets.

comment:5 Changed 4 years ago by raimue@…

  • Milestone changed from MacPorts Future to MacPorts 1.8.0
Note: See TracTickets for help on using tickets.