<div dir="ltr"><div class="gmail_quote"><div>Hi</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="m_2910858368235795526gmail-">> About the project, so the `restore`, `snapshot` and `migrate` actions<br>> are going to the action_array list [1]. While the flow was made clear<br>> in the proposal, I think the first step should be to decide on an<br>> exhaustive list of arguments/flags these 3 actions can possibly take.<br>> This will help to design the procedures.<br>><br>> Also, should we keep the code in a different Tcl script migrate.tcl<br>> like `reclaim`?<br><br></span>I would prefer that, yes. You'll just need<br> package provides macports 1.0<br>line at the top and then you can write code as if it was in<br>macports.tcl. Alternatively, you can do what reclaim.tcl does and use<br> package provides migrate 1.0<br>and add 'package require migrate 1.0' in macports.tcl.<br><span class="m_2910858368235795526gmail-"><br></span></blockquote><div><br></div><div>Since we are planning on 3 different actions which can also be used independently like snapshot and migrate, having 2 scripts in the macports1.0 directory directly or keeping these 2 commands in a single script doesn't seem to be good from design pov. We can have a separate folder for new (upcoming) actions with a hope that the existing code be split into "action" modules over the time. </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="m_2910858368235795526gmail-"><br></span>If you need any additional special SQL queries, that can be done, yes.<br>There should be abstractions available in Tcl already so that you don't<br>have to deal with SQLite's C API directly, though.<br><span class="m_2910858368235795526gmail-"><br></span></blockquote><div> </div><div>The cregistry folder seems to have most of the sql queries implemented and to deal with the registry database, I'll only have create, update and select queries to do, so looks like I won't have to deal with C. I went through an entire "port uninstall" example to see how from Tcl gets to sqlite C through registry, so things seem a bit clear than before.</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="m_2910858368235795526gmail-"><br></span>Yes, the testing is not trivial at all. It might make sense to work with<br>mocking a lot here (e.g. overwrite functions that would usually be<br>called by your code to do nothing). That would allow you to run tests<br>without actually changing your system or doing a lot of environment<br>setup.<br><br>Fortunately Tcl makes this quite easy because you can change any<br>function definition at runtime. </blockquote></div><div class="gmail_extra"><div class="gmail_quote"><br class="m_2910858368235795526gmail-Apple-interchange-newline">Is there anything even sacred to Tcl? Till now, it looks like you can just use anything in the language with pretty much anything else. This calls for a new blog post. And planning to discuss on the testing part in next email.</div><br clear="all"><div>Also, can we have a small README with two to three lines kept in every folder in the base code at least? That'll be actually very helpful. </div><div><br></div><div>As Clemens suggested on IRC, will start with an *honest* short daily log of the work like what I did for the project and what I did related to MP etc from today onwards.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also, I tried StackOverflow but does tclsh support all bash commands?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div>Regards,<br><div class="m_2910858368235795526gmail_signature"><div dir="ltr">Umesh Singla</div></div>
</div></div>