Friday, October 14, 2016


This week I implemented a custom solution for creating a pypi mirror for only packages necessary for whatever projects we deploy to production. Openstack has a great solution for this in github, however it was a bit dated and had some deprecated options used in the code which caused some issues. I've since forked their repo and made changes so that it all works as it should. You can see my changes here and pull the code for your own use. I am currently in the process of having it approved and merged into OpenStack's master pypi-mirror repo.

Sunday, April 17, 2016

3 Steps to fixing "ldconfig empty, not checked" due to corrupted pkgs.

Worked this out today, figured I'd toss it on the blog for fun and hopefully to help others.

 1) Get the initial list of empty libs from pacman
cat /var/log/pacman.log | grep --text empty | awk '{print $6}' | sort -u >> /tmp/liblist
2) Determine which packages they belong to so you know which need to be re-installed
for X in $(cat /tmp/liblist); do pkgfile -s $X;done | sort -u >> /tmp/pkglist
3) Force reinstall the packages
sudo pacman -Syyy && for X in $(cat /tmp/pkglist); do sudo pacman -S --noconfirm --force $X; done
Be sure to understand these commands and what they are doing, don't just blindly run commands you find on the web. In my case these all worked out perfectly for me, they should in most cases. If something bad should come of you running these commands, I am not liable. :-P