[GSoC 2017] Final Evaluations + Preparation

Umesh Singla umeshksingla at macports.org
Thu Aug 31 20:42:18 UTC 2017


Hi Brad,

On Fri, Sep 1, 2017 at 12:19 AM, Bradley Giesbrecht <pixilla at macports.org>
wrote:

> The evaluation is dependent on the work and effort. We need you to
> communicate the details of what has been accomplished, what works, doesn’t
> work and future plans.
>

Sure.

Effectively, my project had three course of actions to implement -
snapshot, migrate and restore. Out of them, migrate and restore both
depended on the snapshot action largely and also, I divided each of these
actions into procedures or simpler steps further as you probably know from
my previous mails throughout the term. I have the following points to make.
I welcome all kinds of comments.

1. snapshot action is entirely finished for now.

   - All the Tcl and C functions for creating a snapshot, fetching a
   snapshot given its id, fetching a list of recent snapshots, fetching
   properties of a certain snapshot have been finished.
   - This required me to create a new entity named reg_snapshot and wrote
   all the helper functions as well in util.c as were there for entry, file,
   portgroup etc.

2. restore action is also finished for now.

   - It takes an optional argument as 'port restore --snapshot-id <id>' if
   you want to pass in a certain snapshot or without the argument, it lists
   the snapshots on the console and asks user to select an id and proceeds.
   - It first deactivates all the currently active ports and then
   reproduces the install commands for the selected snaphsot. NOTE that it
   doesn't uninstall the original ports, as desired for the minimal build.
   - But before deactivating, it first sorts the portlist in a way that
   dependencies come later.
   - And also, before installing the selected snapshot, it first sorts the
   ports from the snapshot in a way that dependencies come first.
   - I have used "registry::run_target" directly for doing all this and
   tried testing by modifying registry.db locally with many of the scenarios I
   could think of.

3. migrate action had essentially four steps - a) creating a snapshot, b)
uninstall the current ports, c) upgrade port command and d) restore the
last snapshot.

   - Out of these 4, creating a snapshot and restoring are simply imported
   from the respective modules.
   - I have finished the procedure for uninstalling the ports, and verified.
   - The one task that is left to commit, is to cover, if even possible,
   all the scenarios where we need to look for upgrading port command, that
   is, basically check for the change in OS or arch in macports.conf.
   - While I have added the most simple checks for it like here [0], there
   was a wonderful discussion thread on it by Mojca [1] and Clemens [2]
   yesterday covering many good cases like change of compiler, for one or
   change in libraries by Apple, for two. This is what I am working on as
   informed by my last update.

4. I have added most of the documentation for all the modules, functions
and any important steps, listed any minor TODOs in the code itself, added
ui_msg statements, cleaned the code etc.

5. Apart from this, I have been trying to get involved more in the
community on the dev mailing list and as Ken pointed out that writing a
portfile is not a task too difficult, I have been looking at portfile
tutorial as well.

6. Future Plans related to the project:

   - First, finish the part of migration left.
   - Write testcases.
   - On mportinit, we should suggest the user to run `port migrate` instead
   of (or in addition to) the link to migration guide.



> Your branch of base does not build for me, is that expected?


No, it's not expected. It should build. It builds for me locally and almost
all the Travis CI builds have been successfully passing for about last 15
days [3]. Here are the Travis build logs from my last commit [4]. Can you
tell me the error you're getting?

I guess, I'll update my blog with this email. Thanks again for asking for
updates. I only have these points to make at present, but I'll try to
update you with any new developments soon.

Regards,
Umesh Singla

[0]:
https://github.com/macports/macports-base/blob/e3a0dc2ebde62a9c5feac6a1edee1708a95bb02a/src/macports1.0/macports.tcl#L651-L656
[1]:
https://lists.macports.org/pipermail/macports-dev/2017-August/036323.html
[2]:
https://lists.macports.org/pipermail/macports-dev/2017-August/036311.html
[3]: https://github.com/macports/macports-base/commits/gsoc17-migrate
[4]: https://travis-ci.org/macports/macports-base/builds/269010852
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170901/bb508562/attachment.html>


More information about the macports-dev mailing list