rebuilding / upgrading a package at the same version

Richard L. Hamilton rlhamil at smart.net
Fri Mar 10 00:05:14 UTC 2023


I use

port -n upgrade --force --no-rev-upgrade portname

The -n prevents rebuilding everything portname depends on (which would otherwise happen with --force ). The --force and --no-rev-upgrade should be obvious.

You should do a

port clean portname

first, but if you are going to build with

configure.compiler=something_other_than_previously_used

you have to, or it will likely refuse to build because the leftover build information doesn't match.


> On Mar 9, 2023, at 17:35, Riccardo Mottola via macports-users <macports-users at lists.macports.org> wrote:
> 
> Hi,
> 
> 
> Riccardo Mottola via macports-users wrote:
>> Hi,
>> 
>> how can I rebuild a port without it being detected as "upgrade" because it stays at the same version?
>> It may happen because rev-upgrade detects it but fails to build (e.g. want to change the compiler) or because for some strange reason rev-upgrade fails to detect and I want to rebuild it anyway.
>> 
>> upgrade maintains variants and also the status if the package was requested or not, as well as not needing to mess with dependencies.
>> 
>> 
> 
> I ask again...
> Any "way to force a rebuild/reinstall? I need it not only to be able to set the compiler, but also to be able to selectively upgrade. E.g. rev-upgrade detects 5 ports, if the first fails, it continues failing there, I want to manually rebuild the others.
> 
> Thanks,
> 
> Riccardo
> 



More information about the macports-users mailing list