"Failed to open portfile from registry" while reinstalling because of configure.optflags

Clemens Lang cal at macports.org
Wed Oct 26 09:50:33 PDT 2016


Hi,

On Wed, Oct 26, 2016 at 02:17:53AM +0200, René J.V. Bertin wrote:
> Yeah. There could be a check if the Portfile exists to catch the 1st
> possibility

That would introduce a race condition, wouldn't it? Checking whether a
file exists before doing something with it is a classic mistake.

> and some more information about the error (if there was one) could be
> useful too; the catch command can return a string with that
> information.

That information already exists, and you'll see it in debug mode.

> > Additional files are not saved alongside the port. You should
> > probably avoid depending on external files for the pre- and
> > post-deactivate phases and running the Portfile.
> 
> Or doing anything with them in the shared parts of the Portfile...

That's what I meant when I said "running the Portfile".

-- 
Clemens


More information about the macports-dev mailing list