force rebuild a port

Richard L. Hamilton rlhamil at smart.net
Wed Mar 6 22:49:00 UTC 2024


How about

port -n upgrade --force --no-rev-upgrade crankyport

It might not work if crankyport needs the latest of something it depends on and that isn't already up-to-date. But a lot of times, it does work.

> On Mar 6, 2024, at 15:14, Bill Cole <macportsusers-20171215 at billmail.scconsult.com> wrote:
> 
> On 2024-03-06 at 14:19:59 UTC-0500 (Wed, 6 Mar 2024 20:19:59 +0100)
> Riccardo Mottola via macports-users <riccardo.mottola at libero.it>
> is rumored to have said:
> 
>> Hi!
>> 
>> suppose I want to rebuild a port, but it has no version update.
>> 1) e.g. rev-upgrade shows it to be rebuild but "port outdated" doesn't show it.
>> 2) Or I want to rebuild it with a different compiler.
>> 
>> How can I do? "port upgrade X" will do nothing because X is not outdated.
>> "port upgrade --force X" will upgrade all dependencies, which is a little too much...
>> 
>> 1) in my case has issues because it wants to rebuild many packages and starts with one that breaks, so it never gets to the next one.
>> I tried using "-p" but apparently it is not respected for "port -p rev-upgrade" and still dies.
> 
> Try it stepwise. I believe that this will work to rebuild and install 'crankyport' and nothing else, provided that none of the dependencies are out of date.
> 
> port fetch crankyport
> port build crankyport
> port uninstall crankyport
> port install crankyport
> 
> But you need to understand that if a port has a dependency on another port, that dependency can only be met by the current version of that port. MacPorts has no mechanism to just use whatever version of a p[rt you happen to have installed.
> 
> 
> -- 
> Bill Cole
> bill at scconsult.com or billcole at apache.org
> (AKA @grumpybozo and many *@billmail.scconsult.com addresses)
> Not Currently Available For Hire
> 



More information about the macports-users mailing list