wiki:SummerOfCode2015Libsolv

Version 3 (modified by JacksonIsaac (Jackson Isaac), 9 years ago) (diff)

Add note to rebuild portindex manually for libsolv branch.

This wiki gives detailed information of the project "Dependency calculation using SAT solving" as part of GSoC 2015. wiki:SummerOfCode2015#dependencies

Student Mentor
Jackson Isaac Clemens Lang

Installing gsoc15-dependency branch
Create a folder under ~/Development/libsolv so that we can clone and install the branch inside this prefix and not interfere with the stable MacPorts installation.

mkdir -p ~/Development/libsolv
cd ~/Development/libsolv
svn co https://svn.macports.org/repository/macports/branches/gsoc15-dependency
cd gsoc15-dependency/base
env PATH=/usr/bin:/bin:/usr/sbin:/sbin CFLAGS="-pipe -Os" ./configure --enable-readline --prefix ~/Development/libsolv/mp_gsoc && make
sudo make install

Creating alias for gsoc15-dependency port

echo "alias portlibsolv=\"$HOME/Development/libsolv/mp_gsoc/bin/port\"" >> ~/.bash_profile
echo "alias sudo=\"sudo \"" >> ~/.bash_profile

I have written a small shell script to do the above tasks at https://raw.githubusercontent.com/JacksonIsaac/macports-libsolv/master/mplibsolv.sh

Re-Build portindex
For now, you will need to rebuild the portindex as conflicts field (required to set up solv information) has been added to the portindex in libsolv branch which is not yet merged with trunk. To do so run the following command:

sudo /path/to/libsolv/branch/prefix/bin/portindex -f

This will build the portindex again and may take ~10-15 minutes depending on the hardware configuration.

Note: You would have to do this each time you do a selfupdate/sync to update the ports.

Testing libsolv engine
Use -l option to use libsolv engine for search and install commands.

portlibsolv search -l <portname>
portlibsolv install -l <portname>
portlibsolv install -l <portname> <conflictingportname>

Note: portlibsolv is our alias for gsoc15-dependecy branch's port command.