[Pulp-dev] Vagrant packaging workaround

Sean Myers sean.myers at redhat.com
Mon Feb 13 21:20:30 UTC 2017


It looks like the vagrant setup for Pulp 2 leaves a few packages installed that
shouldn't be. Specifically, the 'lazy' ansible role is installing packages
related to the streamer, which remain installed after provisioning. This doesn't
apply if you aren't using the lazy role in ansible, but you most likely are.

bizhang is properly fixing this for https://pulp.plan.io/issues/2497, but in the
meantime you can work around the issue by removing all pulp packages before
starting work.

To rudely remove pulp packages:

rpm -qa|grep pulp| sudo xargs -n 1 rpm -e --nodeps

In english, this removes any package with 'pulp' in its name, regardless of whether
or not that remove breaks dependencies.

You can also add this to your Vagrantfile, using an "inline" shell provisioning step:

dev.vm.provision "shell", inline: "rpm -qa|grep pulp| sudo xargs -n 1 rpm -e --nodeps"

This provisioning step should happen right before the provisioning step that runs
vagrant-setup.sh

Note: The rpm command will fail if no pulp packages are installed, which presumably
means that Vagrant has been fixed. If vagrant fails with and error message like
"==> dev: rpm: no packages given for erase" when running vagrant up, that provisioning
step can be removed, and provisioning can be completed by calling "vagrant provision".

This hasn't been thoroughly tested, so if this solution is incorrect or incomplete,
I apologize. Please reply with corrections if any are needed. :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 866 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20170213/f654315a/attachment.sig>


More information about the Pulp-dev mailing list