You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running berks install, cookbooks end up in a 'weird' state. For instance, one or more cookbook dirs may get created into the local directory:
$ rm -rf ~/.berkshelf/cookbooks/ Berksfile.lock && berks install
Resolving cookbook dependencies...
Fetching 'something' from source at .
Fetching 'test' from source at test/cookbooks/test
Fetching cookbook index from https://supermarket.myorg.com...
Installing ark (3.1.0) from https://supermarket.myorg.com ([opscode] https://supermarket.myorg.com:443/api/v1)
Installing chocolatey (2.0.0) from https://supermarket.myorg.com ([opscode] https://supermarket.myorg.com:443/api/v1)
Installing build-essential (8.0.0) from https://supermarket.myorg.com ([opscode] https://supermarket.myorg.com:443/api/v1)
C:/opscode/chefdk/embedded/lib/ruby/gems/2.5.0/gems/mixlib-archive-0.4.6/lib/mixlib/archive/lib_archive.rb:29: warning: conflicting chdir during another chdir block
C:/opscode/chefdk/embedded/lib/ruby/gems/2.5.0/gems/mixlib-archive-0.4.6/lib/mixlib/archive/lib_archive.rb:29: warning: conflicting chdir during another chdir block
Installing compat_resource (12.16.3) from https://supermarket.myorg.com ([opscode] https://supermarket.myorg.com:443/api/v1)
Installing consul (3.1.100) from https://supermarket.myorg.com ([opscode] https://supermarket.myorg.com:443/api/v1)
$ ll
total 33
drwxr-xr-x 1 user 1049089 0 Aug 2 09:28 ark/ # <= unexpected !
drwxr-xr-x 1 user 1049089 0 Jul 20 17:38 attributes/
-rw-r--r-- 1 user 1049089 128 Jul 20 17:38 Berksfile
-rw-r--r-- 1 user 1049089 1020 Jul 20 17:38 CHANGELOG.md
-rw-r--r-- 1 user 1049089 1133 Jul 20 17:38 chefignore
-rw-r--r-- 1 user 1049089 3563 Jul 20 17:38 kitchen.yml
drwxr-xr-x 1 user 1049089 0 Jul 20 17:38 libraries/
-rw-r--r-- 1 user 1049089 1017 Jul 20 17:38 metadata.rb
-rw-r--r-- 1 user 1049089 3704 Jul 20 17:38 README.md
drwxr-xr-x 1 user 1049089 0 Jul 20 17:38 recipes/
drwxr-xr-x 1 user 1049089 0 Jul 20 17:38 resources/
drwxr-xr-x 1 user 1049089 0 Jul 20 17:38 templates/
drwxr-xr-x 1 user 1049089 0 Jul 20 17:38 test/
drwxr-xr-x 1 user 1049089 0 Jul 20 17:38 user_data/
Steps to Reproduce:
chefdk 3.1.0, windows, git-bash, and a cookbook with many deps
from a cookbook directory, try: rm -rf ~/.berkshelf/cookbooks Berksfile.lock && berks install
Expected Result:
Expecting no warnings or errors and expecting no misplaced cookbook directories.
Actual Result:
Blank cookbook dirs may be created in local dir. Warning messages produced about conflicting chdir.
The text was updated successfully, but these errors were encountered:
Thinking maybe the threadsafeness issue applies here.
After applying a monkeypatch like:
class LibArchive
attr_reader :options
attr_reader :archive
class << self
attr_accessor :mutex_chdir
end
Mixlib::Archive::LibArchive.mutex_chdir = Mutex.new
<...>
Mixlib::Archive::LibArchive.mutex_chdir.synchronize do
Dir.chdir(destination) do
reader = ::Archive::Reader.open_filename(@archive)
Version:
0.4.6 via chefdk
Environment:
Windows 10, git-bash, chefdk 3.1.0 or 3.2.2
Scenario:
After running berks install, cookbooks end up in a 'weird' state. For instance, one or more cookbook dirs may get created into the local directory:
Steps to Reproduce:
chefdk 3.1.0, windows, git-bash, and a cookbook with many deps
from a cookbook directory, try:
rm -rf ~/.berkshelf/cookbooks Berksfile.lock && berks install
Expected Result:
Expecting no warnings or errors and expecting no misplaced cookbook directories.
Actual Result:
Blank cookbook dirs may be created in local dir. Warning messages produced about conflicting chdir.
The text was updated successfully, but these errors were encountered: