[GSoC] migration

Umesh Singla umeshksingla at macports.org
Thu Jul 20 22:22:27 UTC 2017


Hi Brad, Clemens, Josh

Please see inline.

> GSoC Week #7 (13 Jul - 19 Jul)
> >
> > I moved the things to migrate action instead of 'restore' since
> 'restore' looks a subset of 'migrate', so can be dealt easily once migrate
> is over.
>
> I’m not sure I understand and if I do understand I think I disagree.
>

Ah, sorry. I agree. I shouldn't have used the word "subset". I was aware
that only a small section overlaps.

Snapshot is a state of installed and active ports with their variants.
> Restoring a snapshot would turn off all parts and install/activate the
> snapshot ports with variants.
> Migration would be taking a new snapshot, uninstalling all ports,
> upgrading the port command for the new arch and finally restoring the last
> snapshot which would entail installing all ports from snapshot since we
> installed earlier.
>
> Snapshot and restore should be able to be executed without migrate.
>

Yes, that was in mind. But then again, it's good having more clarity as I
go.

Reading below I think I misunderstand so please clarify.
>
> > Agenda for last week:
> >
> >
> > 3. Re-installing the ports from the portlist. I took the help of
> restore_ports.tcl here, which works when called migrate. It uses sort_ports
> [1] function.
> >
> >
> >
> > When we install, is it fine to use [mportexec $workername
> $install_target] from migrate.tcl?
>
> I’m sorry, I don’t know base well enough to answer this. Can you please
> ask Clemens or Josh?
>

@Clemens @Josh, can you clarify this?

> What took time is that these two functions at present take the port list
> in different formats. So, I tried debugging by simply printing on console
> method to know the formats of the two.
> >
> > I want to use the sorting function for dependencies only once instead of
> calling it twice while uninstalling and then re-installing. I'm still
> working on it and actually, close to solve this but thought, better send
> the weekly update first.
>


> I’d check with Clemens on this. He mentored a previous GSoC project which
> used libsolve for dependency calculations. Perhaps there is something to
> borrow or learn from that project?


Sure, I will look into it. For now, I'd like to ask in what order does
"registry::entry imaged" returns the port list? Because I'm running the
sorting function which the restore_ports.tcl uses but it's giving me the
ports in the same order as result.



> >
> > Since migrate action creates a snapshot within and then uses it to redo
> the whole state, I feel creating a snapshot here explicitly is redundant.
>
> Not sure I follow. I imaging migrate action would start by calling
> snapshot, register the snapshot id, uninstall all ports, reinstall the port
> command and finally call restore action with the snapshot id for the last
> snapshot.
>
> > Internally snapshot also uses the same registry C functions to get the
> information first and then save to database as [registry::entry imaged]
> does, so instead of first retrieving from [registry::entry imaged], saving
> it in sqlite and then again fetching all the info using the snapshot-id we
> just got, can't we directly use [registry::entry imaged] here? Am I missing
> something?
>
> Oh, maybe in this case we already have the list in memory? But when we
> upgrade the port command wouldn’t we then call the new port command and
> perform the restore with the upgrade port command?
>

Okay, yes. For a moment, I mixed restore and migrate and forgot about a
different port command now. Also, Brad, when we say "reinstall the port
command", what exactly does it mean? Like, what all steps it could have?
Does it mean including from the installation guide here [1]. I could use
some help here.


> Very good letter Umesh, thanks for the update. I hope my replies and
> questions are useful.
>

Welcome. They are indeed.

Regards,
Umesh Singla

[1]: https://www.macports.org/install.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170721/f711e474/attachment.html>


More information about the macports-dev mailing list