fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.08k stars 111 forks source link

Pip caching does not work with auto_detect #173

Closed ParagDoke closed 1 year ago

ParagDoke commented 8 years ago

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?

kengruven commented 8 years ago

Possibly a dupe of #159.

moinfar commented 8 years ago

@ParagDoke

Have you tried building vagrant-cachier? As stated on #159 There hasn't been a release with the changes to enable pip buckets.

On the other hand keep in mind that there is one yum cache directory but each user has its own directory to cache pip packages. Therefore we only consider root's cache directory (or default user as I wrote the code about a year ago!).

Please don't hesitate to ask if you have any further questions.

fgrehm commented 1 year ago

Hey, sorry for the silence here but this project is looking for maintainers :sweat_smile:

As per https://github.com/fgrehm/vagrant-cachier/issues/193, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue :wave: