Changes between Initial Version and Version 3 of Ticket #73237
- Timestamp:
- Nov 15, 2025, 12:23:50 AM (9 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #73237
-
Property
Type
changed from
defecttorequest -
Property
Summary
changed from
Error: Failed to open statefile for <port>: Could not open file <file>toFeature request: Improve error message when statefile cannot be opened due to insufficient privileges
-
Property
Type
changed from
-
Ticket #73237 – Description
initial v3 1 Today, after updating from 2.11.5 to 2.11.6, I encountered this error: 1 After updating from 2.11.5 to 2.11.6, I initially thought I had hit a bug because the following error appeared when trying to build a local port. However, after Ryan’s explanation, it became clear that this is expected behavior: the macports user simply lacks the necessary permissions to read the Portfile in this location. 2 3 Still, it would be helpful to provide a clearer and more informative message for users who encounter this for the first time. 4 2 5 {{{ 3 6 $ sudo port install -dt pre-commit 4 7 DEBUG: Opening port in directory: /Users/judaew/wrk/github.com/judaew/macports-ports/python/pre-commit 5 DEBUG: OS darwin/24.6.0 (macOS 15.7.2) arch i386 6 DEBUG: Re-registering default for distname 7 DEBUG: Re-registering <...cut...> 8 ... 8 9 DEBUG: Sourcing PortGroup python 1.0 from /Users/judaew/wrk/github.com/judaew/macports-ports/_resources/port1.0/group/python-1.0.tcl 9 DEBUG: only one arch supported, so not adding the default universal variant 10 DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies 11 DEBUG: Finished running callback portconfigure::add_automatic_compiler_dependencies 12 DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies 13 DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies 14 DEBUG: Running callback portstartupitem::add_notes 15 DEBUG: Finished running callback portstartupitem::add_notes 10 ... 16 11 DEBUG: Running callback python_add_dependencies 17 12 DEBUG: Finished running callback python_add_dependencies … … 26 21 Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. 27 22 Error: Processing of port pre-commit failed 28 29 >>>>>>30 31 $ tree /Users/judaew/wrk/github.com/judaew/macports-ports/python/pre-commit32 /Users/judaew/wrk/github.com/judaew/macports-ports/python/pre-commit33 ├── Portfile34 └── work -> /opt/local/var/macports/build/pre-commit-f505e05e/work35 36 2 directories, 1 file37 38 >>>>>>39 40 $ ls -lR /opt/local/var/macports/build/*pre-commit*41 /opt/local/var/macports/build/_Users_judaew_wrk_github.com_judaew_macports-ports_python_pre-commit:42 total 043 lrwxr-xr-x 1 macports wheel 49 Nov 14 02:43 pre-commit -> /opt/local/var/macports/build/pre-commit-f505e05e44 45 /opt/local/var/macports/build/pre-commit-f505e05e:46 total 047 drwxr-xr-x 4 macports wheel 128 Nov 14 02:43 work48 49 /opt/local/var/macports/build/pre-commit-f505e05e/work:50 total 051 23 }}} 52 53 Maybe related to #72740, IDK.
