Hola Amigos,

Okay first I am going to show how you can clone and test my MacPorts Development branch and set it up safely so that it does not interfere with the installed MacPorts version. And then we will be setting up libsolv from upstream to test our search implemented using libsolv.

Setting up MacPorts libsolv branch.

Now we have set up MacPorts and libsolv. Time to do some testing using libsolv search. As of now I have added all the possible options that MacPorts inbuilt search provides, few of them would be –description, –name, –license, etc.

Before starting to work on dependency calculation, neverpanic asked me to start from smaller modules like setting up the solv’s (libsolv’s representation of the ports), add more information to the solvable like evr, license, vendor, category, etc. We kept adding the dependency information for later as we wanted to test if the solv’s are setup correctly or not.

After setting up this information, we implemented search module which will take the options, passed as arguments on command line, from port.tcl. We used relevant solv flag’s for searching the libsolv cache. Finally we finished everything and I made sure to follow “Commit early and commit often” motto. My mentor reviewed the commits and gave his inputs on how I can optimize the code. After getting desired results, I worked on clean-up of the codebase and optimizing wherever possible.

Once this was done we started figuring out how can we setup dependency information of the solvables. We looked into the PortIndex and libsolv-bindings manual and matched the appropriate flags to be used and drafted a plan.

You can also test out MacPorts libsolv search by passing -l option (to use libsolv engine).

Some example commands are:

portgsoc -l search libsolv
portgsoc -l search --category math
portgsoc -l search --exact --case-sensitive gcc5

P.S.: This post was lying around in my drafts for quite some time. From now, I will try to publish as much as of my pending drafts and also publish recent posts about my work.

Let the Windows be open, and feel the Freedom.


One thought on “[GSoC 2015] Implement libsolv Search

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s