> On Mar 1, 2017, at 4:13 PM, Ryan Schmidt <[email protected]> wrote: > > On Mar 1, 2017, at 18:04, Mark Anderson <[email protected]> wrote: >> >> I think the "best" course of action for you is to delete all the users and >> then follow the migration instructions. But yeah, there has to be some way >> to undo this damage programmatically. > > I don't believe following the migration instructions will do anything useful. > It's for moving to a different CPU or OS version; I'm not doing either. > > Deleting ports' user accounts and their home directories, then deactivating > and reactivating the ports that created them, should cause new accounts and > home directories to be created in the right place. This assumes there is no > useful information in the home directories; I don't know if that's the case. > It also assumes there is no data anywhere else owned by those users; > recreating the users would result in different user IDs. > > There is certainly stuff in the MacPorts prefix that should be owned by the > macports user so deleting and recreating that user would require additional > cleanup in the form of changing all that ownership. I'd prefer to avoid that, > so it would be simpler to just edit the NFSHomeDirectory of the macports user > and move its home directory back. That could also be done with all the other > users; I should be able to get the correct home directory locations by using > dscl on the old computer.
I was not suggesting a fix for your current situation but rather a way to document and avoid it. Other then using dscl, as you mention, to manually fix things I don’t know what else can be done after the fact. > I'm just unclear why I'm the first to report this problem. Has nobody used > migration assistant? Or has everybody just ended up with broken installations > and either not realized or not bothered to report it? I have used migration assistant with the approach I mentioned, I migrated only my “home” account and followed the MacPorts migration instructions. If I ended up with broken ports I yet to notice. Perhaps we could register the accounts port creates along with file permissions and provide “fix permissions” functionality similar to Disk Utility. — Brad
