[GSoC] migration
Joshua Root
jmr at macports.org
Thu Jun 22 01:18:26 UTC 2017
On 2017-6-22 02:09 , Umesh Singla wrote:
> Hi Josh,
>
> 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.
> The way to get the list of installed ports is with 'registry::entry
> imaged'. Have a look at how reclaim.tcl does it for example.
>
>
>
> Yes, thanks for this. @Brad, 'registry::entry imaged' or
> 'registry::entry installed', may be?
>
> I found 2 functions reg_entry_imaged() and reg_entry_installed() in
> registry, which look almost similar implementation wise. Can you tell me
> what is an imaged port? I mean, how will the two results be different?
In registry2 parlance, "imaged" means installed and "installed" means
active. Confusing I know.
- Josh
More information about the macports-dev
mailing list