{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/42857","labels_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42857/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42857/comments","events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42857/events","html_url":"https://github.com/Homebrew/homebrew/pull/42857","id":100550930,"number":42857,"title":"fix migrator bug","user":{"login":"vladshablinsky","id":4408920,"avatar_url":"https://avatars.githubusercontent.com/u/4408920?v=3","gravatar_id":"","url":"https://api.github.com/users/vladshablinsky","html_url":"https://github.com/vladshablinsky","followers_url":"https://api.github.com/users/vladshablinsky/followers","following_url":"https://api.github.com/users/vladshablinsky/following{/other_user}","gists_url":"https://api.github.com/users/vladshablinsky/gists{/gist_id}","starred_url":"https://api.github.com/users/vladshablinsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladshablinsky/subscriptions","organizations_url":"https://api.github.com/users/vladshablinsky/orgs","repos_url":"https://api.github.com/users/vladshablinsky/repos","events_url":"https://api.github.com/users/vladshablinsky/events{/privacy}","received_events_url":"https://api.github.com/users/vladshablinsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-12T14:00:50Z","updated_at":"2015-08-12T14:08:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/42857","html_url":"https://github.com/Homebrew/homebrew/pull/42857","diff_url":"https://github.com/Homebrew/homebrew/pull/42857.diff","patch_url":"https://github.com/Homebrew/homebrew/pull/42857.patch"},"body":"```\r\nbrew install go-app-engine-32\r\nbrew unlink go-app-engine-32\r\nbrew install go-app-engine-64\r\n```\r\n\r\nthen rename `go-app-engine-32` to `app-engine-go-32`\r\nand `migrate` or `update` and we have:\r\n\r\n```\r\n==> Migrating go-app-engine-32 to app-engine-go-32\r\n==> Unlinking go-app-engine-32\r\nMoving to: /usr/local/Cellar/app-engine-go-32\r\n==> Linking app-engine-go-32\r\nError: Error while executing `brew link` step on app-engine-go-32\r\nCould not symlink bin/appcfg.py\r\nTarget /usr/local/bin/appcfg.py\r\nis a symlink belonging to go-app-engine-64. You can unlink it:\r\n  brew unlink go-app-engine-64\r\n\r\nTo force the link and overwrite all conflicting files:\r\n  brew link --overwrite app-engine-go-32\r\n\r\nTo list all files that would be deleted:\r\n  brew link --overwrite --dry-run app-engine-go-32\r\n\r\nPossible conflicting files are:\r\n/usr/local/bin/appcfg.py -> /usr/local/Cellar/go-app-engine-64/1.9.24/bin/appcfg.py\r\n/usr/local/bin/bulkload_client.py -> /usr/local/Cellar/go-app-engine-64/1.9.24/bin/bulkload_client.py\r\n/usr/local/bin/bulkloader.py -> /usr/local/Cellar/go-app-engine-64/1.9.24/bin/bulkloader.py\r\n/usr/local/bin/dev_appserver.py -> /usr/local/Cellar/go-app-engine-64/1.9.24/bin/dev_appserver.py\r\n/usr/local/bin/download_appstats.py -> /usr/local/Cellar/go-app-engine-64/1.9.24/bin/download_appstats.py\r\n/usr/local/bin/goapp -> /usr/local/Cellar/go-app-engine-64/1.9.24/bin/goapp\r\nError: error occured while migrating.\r\nBackuping...\r\nError: No such file or directory - /usr/local/Cellar/go-app-engine-32\r\n```\r\n\r\nThis happens because we try to link app-engine-go-32\r\n even if go-app-engine-32 wasn’t linked.\r\n\r\nBackup fails because it uses realpath on the file that doesn't exist.\r\n\r\n* Fix backup\r\n* Don't link unlinked kegs.\r\n\r\ncc @mikemcquaid @xu-cheng "},"comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments/130316696","html_url":"https://github.com/Homebrew/homebrew/pull/42857#issuecomment-130316696","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/42857","id":130316696,"user":{"login":"mikemcquaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/mikemcquaid","html_url":"https://github.com/mikemcquaid","followers_url":"https://api.github.com/users/mikemcquaid/followers","following_url":"https://api.github.com/users/mikemcquaid/following{/other_user}","gists_url":"https://api.github.com/users/mikemcquaid/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemcquaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemcquaid/subscriptions","organizations_url":"https://api.github.com/users/mikemcquaid/orgs","repos_url":"https://api.github.com/users/mikemcquaid/repos","events_url":"https://api.github.com/users/mikemcquaid/events{/privacy}","received_events_url":"https://api.github.com/users/mikemcquaid/received_events","type":"User","site_admin":true},"created_at":"2015-08-12T14:08:27Z","updated_at":"2015-08-12T14:08:27Z","body":"Looks good to me. @xu-cheng, let me know your thoughts."}}