Hi Ryan,

Do you think it would be possible to adjust reclaim so that it does not GC any 
recently deactivated port@version?

The recovery procedure from a port regression can be a bit finicky even for 
people who speak git.  On the one hand, we are encouraged to reclaim every now 
and again to free disk space, but the reclaim significantly increases the cost 
of a port regression.  We might not realise we have pulled a regression until 
it is too late.  It would be great if we could more easily roll back with a 
quick 'port activate' -- even after a reclaim.

A port@version that was last deactivated over (e.g.) a month ago is unlikely to 
be needed again; it may be reclaimed.
A port@version that was last deactivated yesterday might be needed in case of a 
regression; keep this for a little longer.
The problem is that reclaim does not currently distinguish between these two 
practical outcomes.

Let's say the moment of port deactivation were to be stored in the registry as 
a time stamp alongside the port@version.  macports.conf is extended with a new 
knob that specifies how long to keep a recently deactivated port@version.  (It 
can default to zero so that there is no change for existing users; reclaim 
immediately as before.)  On reclaim, after divining the set of port@versions 
that are eligible for GC, it filters the set by deactivation time and only 
reclaims port@versions that have been disused for at least the configured 
duration.

This may go some way towards obviating the need for 
wiki/howto/InstallingOlderPort for most users who find themselves in need of 
that article.  Roll-back would be fast as there would be no need to rebuild 
from source.  Better to burn some bytes on disk than cycles on the CPU, 
especially on older Macs.

On Wed, 24 Jun 2026, at 10:53, Ryan Carsten Schmidt wrote:
> "port install" accepts not only port names but also URLs.

This is neat trick in the meantime, though.  Thanks.

Reply via email to