Hola amigos,

I was busy with MacPorts work and then after MidTerm Evaluations of GSoC I got busy with academics so couldn’t enough time to update my blog and document my work. GSoC Final Evaluations are near and I have completed major part of our project. I will be posting a series of blog post documenting my work and GSoC 2015 experience.

For libsolv to work we had to create a libsolv pool, in short cache. Initially we used the PortIndex contents to create this libsolv pool. PortIndex is Macports’ cache for fast access of port information. As the project moved forward and more features were added, we realized that just the PortIndex information wasn’t enough for libsolv to work efficiently. We added another field ‘conflicts’ to PortIndex to support setting up of dependency information in the libsolv pool.

In the first few weeks when we were implementing search using libsolv, we had set up all the fields in libsolv that were available in PortIndex. We did notice that as the information increased, the overhead of creating the pool increased. But we had a check in place so that it is made sure that if the pool exists then it is not created again.

After search was implemented successfully with desired results we moved on to our main goal of dependency calculation using libsolv. We came across lot of hurdles while setting up solv information for the dependency calculation to work properly.

We needed a ‘repo’ of installed solvs in our libsolv pool. So we read this information from the registry that keeps track of all the installed ports. Then we noticed that we had set ‘obsoletes’ field in the solv with ‘replaced_by’ field in PortIndex, which later turned out to be the inverse. So we had to come up with an efficient solution to reverse map the replaced_by and obsoletes field e.g., A replaced_by B, C means B, C obsoletes A.

Now we had to set up the build-time and run-time dependencies which was a bit confusing at first. We need to pass a $marker value as the argument to the function call used to set up the dependencies(dep_array). For the time being, we just went with the default value.

Now, the libsolv pool is set up and running successfully with better results as compared to the built-in engine used for dependency and conflict resolution.

I will discuss more about dependency calculation and conflict resolution in detail in upcoming posts.

Let the Windows be open, and feel the Freedom.


One thought on “[GSoC 2015] Create libsolv Pool

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s