Please review: 15190 repository should avoid needless cfg_cache rewrites
Webrev: http://cr.opensolaris.org/~richlowe/pkg-15190 This changes RepositoryConfig in a handful of ways. - They always require at least one associated pathname (though it does not have to exist), this pathname will be read if it exists, and will be that written to by .write() - They will now only actually be written on .write() if their content has changed. - Writes the configuration to a temporary file and renames into place to make the update atomic. The last bullet is the important part, this closes a race in package publication that has been preventing ON publishing packages in parallel, the race is one pkgsend writing the config as another loads it, such that the one loading sees an incomplete (or absent) config and fails claiming publisher.prefix is unset (pkgsend when publishing to a file URI always writes to the config file). Like the other problems ON hit, this would be better solved by correct depot locking, which is apparently being discussed. However, as with --no-index and --no-catalog, avoiding the need to lock along a given fairly narrow path is something I think worth the effort for the sake of ON build parallelism. -- Rich _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
