Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

Pip caching does not work with auto_detect #173

@ParagDoke

Description

@ParagDoke

Hello there.
Many thanks Fabio and everyone for this excellent plugin.

I'm using Vagrant version 1.8.1 on Ubuntu x64 14.04 with cachier plugin version:
vagrant-cachier (1.2.1).

And recently observed that auto_detect on a CentOS guest did not cache pip packages. This is what I have in my Vagrantfile:

  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.scope       = :machine
    config.cache.auto_detect = true
  end

I use VAGRANT_DOTFILE_PATH="~/.vagrant"
When I see /home/parag.doke/.vagrant/machines/myvm/cache, I only see a "yum" folder there. And I am sure I ran pip install commands inside the guest.

@moinfar seems to have made some changes to this file: https://github.com/fgrehm/vagrant-cachier/blob/da0eff6a71c8e292ccf5b938402bac7f8c37561c/lib/vagrant-cachier/capabilities.rb

Specifically the linux / redhat / pip related lines are:

      guest_capability 'linux', 'pip_cache_dir' do
        require_relative 'cap/linux/pip_cache_dir'
        Cap::Linux::PipCacheDir
      end

And also

      guest_capability 'redhat', 'yum_cache_dir' do
        require_relative 'cap/redhat/yum_cache_dir'
        Cap::RedHat::YumCacheDir
      end

As of writing, there is no block like:

      guest_capability 'redhat', 'pip_cache_dir' do
        require_relative 'cap/linux/pip_cache_dir'
        Cap::Linux::PipCacheDir
      end

I'm nowhere close to a Ruby novice. Will RedHat and Debian capabilities inherit Linux capabilities?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions