port upgrade outdated from 2.0.2 to 2.0.3 messed up user database
Ryan Schmidt
ryandesign at macports.org
Fri Oct 14 18:46:48 PDT 2011
On Oct 14, 2011, at 20:12, Ryan Schmidt wrote:
>> I feel that, if that's the case, we should start ensuring that selfupdate can run itself twice (looks a file to signal "do selfupdate").
>
> That would be a possible enhancement, but of course, it won't help anybody upgrading *from* any existing version of MacPorts. It'll only help us in the future.
But be sure you understand what the problem is. Prior to MacPorts 2.0.2, selfupdate did this:
1. The old version of MacPorts runs "sync" to download the new portfiles
2. The old MacPorts indexes those new ports
3. The old MacPorts downloads the code for the new version of MacPorts
4. The old MacPorts compiles the new MacPorts
5. The old MacPorts exits; any subsequent invocation of "port" will be the new version
The order may not be completely correct but the point is that the problem is that the old MacPorts is not capable of correctly indexing the ports that were just downloaded, if the ports contain new syntax only understood by the new MacPorts. Therefore MacPorts 2.0.2 and up skips step 2 if a new version of MacPorts has been downloaded, and prints a message telling the user to run selfupdate again. When the user does so, it'll be the new version of MacPorts running that is capable of indexing the ports correctly.
If you wanted to make this all work in a single selfupdate run, you'd have to have a way for the old MacPorts to launch the new MacPorts to do the indexing. That might be tricky.
More information about the macports-users
mailing list