[GSoC] migration
Umesh Singla
umeshksingla at macports.org
Fri Oct 6 16:42:19 UTC 2017
Hi all,
Sorry, I got caught up in academics and college stuff. Continuing from
where I left:
1. I broke migrate action into two parts - `port migrate` followed by `port
restore --last` to achieve the functionality we wanted. Now, migrate
creates a snapshot, uninstalls the ports and upgrades the port command
using forced and nosync selfupdate.
2. Restore now has 3 variations - `port restore`, `port restore --last`,
`port restore --snapshot-id=$some_id`.
i. `port restore` asks the user to select a snapshot interactively to
restore. It deactivates the currently installed ports and restore the
selected snapshot.
ii. `port restore --last` restores the last snapshot.
iii. `port restore --snapshot-id=$some_id` restores the specified
snapshot. It also deactivates the current state.
3. I have tried adding error handling and documentation as much as possible
but always open to suggestions and improvements.
Keeping this aside, I still wonder what happens in case port command
doesn't work on an upgraded OS at all and user doesn't have any or recent
snapshot in the registry. We won't be able to create a snapshot in
migration step.
Regards,
Umesh Singla
On Sat, Sep 9, 2017 at 3:48 AM, Joshua Root <jmr at macports.org> wrote:
> On 2017-9-9 08:10 , Rainer Müller wrote:
>
>> On 2017-09-08 23:33, Umesh Singla wrote:
>>
>>> When I run the `migrate` action with only one port (expat) installed, I
>>> get the following:
>>>
>>> $ sudo ./bin/port migrate
>>>
>>> Taking a snapshot of the current state...
>>>
>>> Done: Snapshot '8':'snapshot created for migration' created at
>>> 2017-09-08 21:09:21
>>>
>>> Migration will first uninstall all the installed ports, upgrade MacPorts
>>> and then reinstall them again. Would you like to continue? [Y/n]: Y
>>>
>>
>> I would like to repeat that upgrading MacPorts from the 'port migrate'
>> action is not possible. After a major upgrade of macOS we cannot
>> guarantee that the old version of MacPorts runs at all on this new OS
>> version. MacPorts has to be reinstalled for the new OS version in an
>> extra step before.
>>
>> The best you can do is printing instructions on where to download
>> MacPorts.
>>
>
> I think that doing a forced selfupdate is probably possible in most cases.
> You just can't do everything in one run.
>
> - Josh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20171006/f499d332/attachment.html>
More information about the macports-dev
mailing list