[prev in list] [next in list] [prev in thread] [next in thread] 

List:       macports-dev
Subject:    Re: [GSoC] migration
From:       Umesh Singla <umeshksingla () macports ! org>
Date:       2017-10-06 16:54:19
Message-ID: CAK2-mZEgL8XWP=HXUhP4oMmkrj4snkpEVGmSPe1SG4LdSAHA5Q () mail ! gmail ! com
[Download RAW message or body]

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@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
>

[Attachment #3 (text/html)]

<div dir="ltr">Hi all,<div><br></div><div>Sorry, I got caught up in academics and \
college stuff. Continuing from where I left:</div><div><br></div><div>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.</div><div><br></div><div>2. Restore now has 3 variations - `port \
restore`, `port restore --last`, `port restore --snapshot-id=$some_id`.</div><div>    \
i. `port restore` asks the  user to select a snapshot interactively to restore. It \
deactivates the currently installed ports and restore the selected \
snapshot.</div><div>      ii. `port restore --last` restores the last \
snapshot.</div><div>      iii. `port restore --snapshot-id=$some_id` restores the \
specified snapshot. It also deactivates the current \
state.</div><div><br></div><div>3. I have tried adding error handling and \
documentation as much as possible but always open to suggestions and \
improvements.</div><div><br></div><div>Keeping this aside, I still wonder what \
happens in case port command doesn&#39;t work on an upgraded  OS at all and user \
doesn&#39;t have any or recent snapshot in the registry. We won&#39;t be able to \
create a snapshot in migration \
step.</div><div><br></div><div>Regards,</div><div>Umesh \
Singla</div><div><br></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Sat, Sep 9, 2017 at 3:48 AM, Joshua Root <span \
dir="ltr">&lt;<a href="mailto:jmr@macports.org" \
target="_blank">jmr@macports.org</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On 2017-9-9 08:10 , Rainer Müller wrote:<br> \
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> On 2017-09-08 23:33, Umesh Singla wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> When I run the `migrate` action with only  one port (expat) \
installed, I<br> get the following:<br>
<br>
$ sudo ./bin/port migrate<br>
<br>
Taking a snapshot of the current state...<br>
<br>
Done: Snapshot &#39;8&#39;:&#39;snapshot created for migration&#39; created at<br>
2017-09-08 21:09:21<br>
<br>
Migration will first uninstall all the installed ports, upgrade MacPorts<br>
and then reinstall them again. Would you like to continue? [Y/n]: Y<br>
</blockquote>
<br>
I would like to repeat that upgrading MacPorts from the &#39;port migrate&#39;<br>
action is not possible. After a major upgrade of macOS we cannot<br>
guarantee that the old version of MacPorts runs at all on this new OS<br>
version. MacPorts has to be reinstalled for the new OS version in an<br>
extra step before.<br>
<br>
The best you can do is printing instructions on where to download MacPorts.<br>
</blockquote>
<br></span>
I think that doing a forced selfupdate is probably possible in most cases. You just \
can&#39;t do everything in one run.<br> <br>
- Josh<br>
</blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic