[Pulp-dev] Vagrant packaging workaround

Joe Adams adams10301 at gmail.com
Tue Feb 14 14:09:45 UTC 2017


I believe that the 'no packages given for erase' can be solved with the
xargs option '--no-run-if-empty'. That will prevent xargs from executing
anything if there are no arguments to pass.

The revised command would be:
rpm -qa|grep pulp| sudo xargs -n 1 --no-run-if-empty rpm -e --nodeps

On Mon, Feb 13, 2017 at 4:20 PM, Sean Myers <sean.myers at redhat.com> wrote:

> 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. :)
>
>
> _______________________________________________
> Pulp-dev mailing list
> Pulp-dev at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20170214/5731139d/attachment.htm>


More information about the Pulp-dev mailing list