[GSoC] migration

Bradley Giesbrecht pixilla at macports.org
Sat Jun 24 20:29:32 UTC 2017


> On Jun 22, 2017, at 8:15 PM, Joshua Root <jmr at macports.org> wrote:
> 
> On 2017-6-23 11:29 , Bradley Giesbrecht wrote:
>>> On Jun 21, 2017, at 7:25 PM, Umesh Singla <umeshksingla at macports.org> wrote:
>>> 
>>> Hi
>>> 
>>>     Taking a step back for a moment, why is an SQL database the best way
>>>     to store this data? What sorts of queries are you going to want to
>>>     run on it? Would a text (Tcl array) representation similar to the
>>>     PortIndex be a better fit?
>>> 
>>> 
>>> We need to store all the information about the existing state of the ports first, then uninstall all the ports and re-install on the updated OS after self-updating using the info we have in the database. So, we can't have a temporary kind of Tcl array representation.
>>> 
>>> A Tcl array representation doesn't have to be temporary. It can easily be written to a file.
>>> 
>>> If the only operations are going to be storing the list of ports and then reinstalling all the ports in the list, that says to me that SQL is much more complexity than you need.
>>> 
>>> I'll check with my mentor. I may not have been clear in explaining the need for SQL or Tcl array representation could be an easy way go.
>> I assumed we would allow multiple snapshots and be able to chose from a list of snapshots by date-sequence.
> 
> Sure.
> 
>> For the migration functionality wouldn’t we only install “requested” ports? Dependencies could be different with a platform change.
>> Also, if the installed variants for a given port are the default variants would we want to ignore variants?
> 
> These two points are related. A requested flag for variants is needed to be able to do the right thing.
> 
> We don't want to ignore variants exactly; we want to apply only the requested variants (positive and negative) when reinstalling ports.

Is a “default” variant requested? I believe some ports have different default variants depending on the platform, operation system or other environment factors. Shouldn’t we be replicating the actual user install commands as close as possible? Should we include variants the user did not supply to the port install command?

A snapshot would be a list of install commands that created the current installed state. Restoring a snapshot would deactivate the active ports and reproduce the install commands for the selected snapshot. Migrate would amount to creating a new snapshot, uninstalling installed ports and reproducing the install commands for the last snapshot. 


Regards,
Bradley Giesbrecht (pixilla)



More information about the macports-dev mailing list