<div dir="ltr">Hi Brad, Clemens, Josh<div><br></div><div>Please see inline.<br><div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_6740887253302580255gmail-">
> GSoC Week #7 (13 Jul - 19 Jul)<br>
><br>
> 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.<br>
<br>
</span>I’m not sure I understand and if I do understand I think I disagree.<br></blockquote><div> </div><div>Ah, sorry. I agree. I shouldn't have used the word "subset". I was aware that only a small section overlaps.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Snapshot is a state of installed and active ports with their variants.<br>
Restoring a snapshot would turn off all parts and install/activate the snapshot ports with variants.<br>
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.<br>
<br>
Snapshot and restore should be able to be executed without migrate.<br></blockquote><div> </div><div>Yes, that was in mind. But then again, it's good having more clarity as I go.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Reading below I think I misunderstand so please clarify.<br>
<span class="gmail-m_6740887253302580255gmail-"><br>
> Agenda for last week:<br>
><br>
><br>
> 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.<br>
><br>
><br>
><br>
> When we install, is it fine to use [mportexec $workername $install_target] from migrate.tcl?<br>
<br>
</span>I’m sorry, I don’t know base well enough to answer this. Can you please ask Clemens or Josh?<br></blockquote><div><br></div><div>@Clemens @Josh, can you clarify this?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_6740887253302580255gmail-">
> 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.<br>
><br>
> 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.<br></span></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> 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?</blockquote><div><br></div><div>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. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_6740887253302580255gmail-">
><br>
> 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.<br>
<br>
</span>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.<br>
<span class="gmail-m_6740887253302580255gmail-"><br>
> 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?<br>
<br>
</span>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?<br></blockquote><div><br></div><div>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.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Very good letter Umesh, thanks for the update. I hope my replies and questions are useful.<br></blockquote><div><br></div><div>Welcome. They are indeed.</div><div><br></div><div>Regards,</div><div>Umesh Singla</div><div><br></div><div>[1]: <a href="https://www.macports.org/install.php">https://www.macports.org/install.php</a></div></div><br></div></div></div></div>