registry lock

Rainer Müller raimue at macports.org
Wed Nov 18 04:01:22 PST 2015


On 2015-11-18 12:52, René J.V. Bertin wrote:
> I agree that there should be a lock that prevents concurrent access
> to the registry database, as that's something that appears likely to
> lead to registry corruption. If the registry lock were to be set when
> doing an (un)install or (de)activate, it'd be set very quickly when
> issuing `port uninstall` or `port deactivate`, right?

The problem is the time between the decision and when it is actually
executed. The state should not change between that or you will run into
problems.

For example, see this report from before we had this locking:
http://trac.macports.org/ticket/19935

As I said, there is potential to allow certain operations with
fine-grained locking, but it requires more planning to get this right.
Just enforcing serialization of all actions that modify the registry is
the easy solution that works in most cases.

Rainer


More information about the macports-dev mailing list