[GSoC] migration

Umesh Singla umeshksingla at macports.org
Mon Jun 19 17:58:07 UTC 2017

Hi Bradley,

I'm having a bit difficulty in implementing the body of snapshot procedure.
Basically what I need to do now is (as I have written in my notes, so you
can tell me if I'm on right track in my thoughts as well):

"get the list of installed ports, their-installed-variants and
then add one port at a time to the 2nd table, its variants to the 3rd
after all this, add an entry in the snapshot table for the entire snapshot,
that's it."

I can get this info from `port -v installed` and `port -v installed
requested` command, that is, calling *action_installed* [1] which in turn,
calls *registry::installed* [2] for each port from *snapshot_main*. Is this
best way to go?

Further, can you point me to some port action where it deals with
retrieving and populating tables as a hint? The *action_target* used for
most of the port commands like *install*, *clean*, *fetch* doesn't really
hint on how to deal with it.

I hunted down till I reached *macports::registry.format*  -->
*files which have a bunch of functions using *registry::entry* which I
think is the most "basic" operation and then, also *receipt_sqlite::*
*create_entry_l* function.

Do I need to write for inserting into tables? If yes, write direct SQL
queries or Tcl procedures ( a better way, I think)?

Any help would be appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170619/2dbdce23/attachment.html>

More information about the macports-dev mailing list