install-patch-install cycles & install without activate

Rainer Müller raimue at macports.org
Tue May 29 20:20:43 UTC 2018


On 2018-05-29 20:31, macports at parvis.nl wrote:
> I'm trying to work as much as possible with scripted procedures.
> 
> After an initial install of a new/modified port, I need to apply/change patches.
> 
> My workflow is:
> 
>   port install munin
> 
>   #- cycle start
>   port clean --work munin
>   create patches against the unmodified tarball
>   port clean --work munin
>   port install munin
>   test
>   #- cycle end
> 
> Problem here is that if Portfile  isn't changed, install will skip all phases, including checksum, extract, patch, configure, build, destroot, "install", activate.

That is the intended behavior. If the port is already installed with the
same name/version/revision/epoch, then it will not be build from source.

> I can port clean --all munin but then I need to fetch again, and that is not needed.

I do not think this would change anything. If the port is already
installed, 'port install' will not attempt to build from source.

>   Q1) What is the port command to execute all needed phases, starting with patch?
> 
> Somewhere it says something like install creates a tarball from destroot, activate unpackes that tarball.
> Above I wrote "install" because I'm looking for the port verb that does exactly this.
> I would like to be able to do the complete installation process without activate.
> 
> My experience is this:
> port install does
> - if activated: nothing
> - else: do all steps from $(port work munin)/.macportsmunin.state
> Is this correct? If this is true, port deactivate munin && port install munin would be enough.

Maybe it helps to know that 'port install' is remapped to the activate
port1.0 target internally. If the port is already activated, there is
nothing left to do.

Without verifiying this, I think 'port deactivate && port install' would
only re-activate the already installed version.

I think you are looking for a way to force a reinstall which would be:
  sudo port -n upgrade --force munin

>   Q2) What is the port command to execute all needed phases, except activate?

There is no port action to do that. The closest equivalent would be to
run 'port destroot' and examine the work/destroot/ directory instead of
installing the files directly.

Rainer


More information about the macports-dev mailing list