Opened 8 weeks ago

Last modified 7 weeks ago

#70853 new defect

MacPort silently fails when upgrading crystal

Reported by: anta40 (Andre Tampubolon) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: Cc:
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Yesterday, I installed Crystal. So far works fine. About 10 minutes ago, I ran sudo port selfupdate and found this:

--->  Checking for newer releases of MacPorts
MacPorts base version 2.10.1 installed,
MacPorts base version 2.10.1 available.
--->  MacPorts base is already the latest version
--->  Updating the ports tree

The ports tree has been updated.

2 ports are outdated. Run 'port outdated' for details.
To upgrade your installed ports, you should run
  port upgrade outdated

OK, let's run port upgrade outdated

version:1
:debug:main Starting logging for crystal @1.13.3_0
:debug:sysinfo macOS 12.7.6 (darwin/21.6.0) arch i386
:debug:sysinfo MacPorts 2.10.1
:debug:sysinfo Xcode none, CLT 14.2.0.0.1.1668646533
:debug:sysinfo SDK 12
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 12.0
:msg:main --->  Computing dependencies for crystal:info:main .:debug:main crystal has no conflicts
:debug:main Searching for dependency: boehmgc
:debug:main Found Dependency: receipt exists for boehmgc
:debug:main Searching for dependency: gmp
:debug:main Found Dependency: receipt exists for gmp
:debug:main Searching for dependency: libevent
:debug:main Found Dependency: receipt exists for libevent
:debug:main Searching for dependency: libiconv
:debug:main Found Dependency: receipt exists for libiconv
:debug:main Searching for dependency: libxml2
:debug:main Found Dependency: receipt exists for libxml2
:debug:main Searching for dependency: libyaml
:debug:main Found Dependency: receipt exists for libyaml
:debug:main Searching for dependency: llvm-18
:debug:main Found Dependency: receipt exists for llvm-18
:debug:main Searching for dependency: openssl
:debug:main Found Dependency: receipt exists for openssl
:debug:main Searching for dependency: pcre
:debug:main Found Dependency: receipt exists for pcre
:debug:main Searching for dependency: zlib
:debug:main Found Dependency: receipt exists for zlib
:debug:main Searching for dependency: pkgconfig
:debug:main Found Dependency: receipt exists for pkgconfig
:debug:main Executing org.macports.main (crystal)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:archivefetch archivefetch phase started at Sat Sep 21 18:33:10 WIB 2024
:msg:archivefetch --->  Fetching archive for crystal
:warn:archivefetch Your DNS servers incorrectly claim to know the address of nonexistent hosts. This may cause checksum mismatches for some ports. See this page for more information: <https://trac.macports.org/wiki/MisbehavingServers>
:debug:archivefetch Executing org.macports.archivefetch (crystal)
:info:archivefetch --->  crystal-1.13.3_0.darwin_21.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
:error:archivefetch Failed to archivefetch crystal: /opt/local/var/macports/incoming/verified must be writable
:debug:archivefetch Error code: NONE
:debug:archivefetch Backtrace: /opt/local/var/macports/incoming/verified must be writable
:debug:archivefetch     while executing
:debug:archivefetch "portarchivefetch::fetchfiles"
:debug:archivefetch     (procedure "portarchivefetch::archivefetch_main" line 5)
:debug:archivefetch     invoked from within
:debug:archivefetch "$procedure $targetname"
:error:archivefetch See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_crystal/crystal/main.log for details.

Whoops. Perhaps I forgot sudo? So I tried again.

$ sudo port upgrade outdated
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

It silently fails. Rebooting my Mac (Monterey 12.7.6) doesn't solve the issue.

Change History (4)

comment:1 Changed 8 weeks ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

Try debug mode (sudo port -d upgrade outdated) to see what's going on.

comment:2 Changed 8 weeks ago by anta40 (Andre Tampubolon)

Find these at the end:

DEBUG: couldn't open "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_crystal/crystal/work/.macports.crystal.state": permission denied
    while executing
"open $statefile a+"
    (procedure "open_statefile" line 111)
    invoked from within
"open_statefile"
    (procedure "check_variants" line 28)
    invoked from within
"check_variants install"
    invoked from within
"$workername eval [list check_variants $target]"
    (procedure "mportexec" line 8)
    invoked from within
"mportexec $mport install"

BTW, I found something interesting:

$ sudo port uninstall crystal
$ sudo port upgrade outdated

All of the outdated packages will be updated. Then try to install crystal again:

$ sudo port install crystal
Error: Unable to execute port crystal: couldn't open "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_crystal/crystal/work/.macports.crystal.state": permission denied
Last edited 8 weeks ago by anta40 (Andre Tampubolon) (previous) (diff)

comment:3 Changed 8 weeks ago by anta40 (Andre Tampubolon)

This works. Wonder if it's a proper solution, though.

$ sudo port install crystal
Error: Unable to execute port crystal: couldn't open "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_crystal/crystal/work/.macports.crystal.state": permission denied
$ sudo rm -Rf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_crystal
$ sudo port install crystal
--->  Computing dependencies for crystal
--->  Fetching archive for crystal
Warning: Your DNS servers incorrectly claim to know the address of nonexistent hosts. This may cause checksum mismatches for some ports. See this page for more information: <https://trac.macports.org/wiki/MisbehavingServers>
--->  Attempting to fetch crystal-1.13.3_0.darwin_21.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/crystal
--->  Attempting to fetch crystal-1.13.3_0.darwin_21.x86_64.tbz2.rmd160 from http://jog.id.packages.macports.org/macports/packages/crystal
--->  Installing crystal @1.13.3_0
--->  Activating crystal @1.13.3_0
--->  Cleaning crystal
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.

comment:4 in reply to:  3 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to anta40:

$ sudo rm -Rf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_crystal

sudo port clean crystal should have been equivalent, and is what we always recommend trying before filing a bug report.

Note: See TracTickets for help on using tickets.