Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 10.14.0
-
Component/s: None
-
Labels:
-
Environment:
omnios, chef 10.14.beta.3 (build from master 8/12/2012)
Description
The "Version" string may apparently sometimes contain the version again in parenthesis, as observed here:
root@omnios-vagrant:~# pkg info -r tmux | grep Version
Version: 1.6 (1.6)
This is on OmniOS, I don't know if it does similar on OI/OS. This isn't every package, and a possible workaround is to specify the version number or latest as a resource attribute. When Chef attempts to install a package that has this kind of version specified, it fails.
Recipe:
package "tmux" do action :install end
Output:
[2012-08-13T05:29:36+00:00] INFO: Processing package[tmux] action install (base::default line 2) [2012-08-13T05:29:36+00:00] DEBUG: Checking package status for tmux Name: terminal/tmux Summary: terminal multiplexer State: Not installed Publisher: omnios Version: 1.6 (1.6) Build Release: 5.11 Branch: 0.151002 Packaging Date: Thu Apr 19 01:49:01 2012 Size: 602.12 kB FMRI: pkg://omnios/terminal/tmux@1.6,5.11-0.151002:20120419T014901Z [2012-08-13T05:29:37+00:00] DEBUG: Executing pkg install -q --accept tmux@1.6 (1.6) [2012-08-13T05:29:37+00:00] DEBUG: ---- Begin output of pkg install -q --accept tmux@1.6 (1.6) ---- [2012-08-13T05:29:37+00:00] DEBUG: STDOUT: [2012-08-13T05:29:37+00:00] DEBUG: STDERR: sh: syntax error at line 1: `(' unexpected [2012-08-13T05:29:37+00:00] DEBUG: ---- End output of pkg install -q --accept tmux@1.6 (1.6) ---- [2012-08-13T05:29:37+00:00] DEBUG: Ran pkg install -q --accept tmux@1.6 (1.6) returned 3 ================================================================================ Error executing action `install` on resource 'package[tmux]' ================================================================================ Chef::Exceptions::Exec ---------------------- pkg install -q --accept tmux@1.6 (1.6) returned 3, expected 0 ---- Begin output of pkg install -q --accept tmux@1.6 (1.6) ---- STDOUT: STDERR: sh: syntax error at line 1: `(' unexpected ---- End output of pkg install -q --accept tmux@1.6 (1.6) ---- Resource Declaration: --------------------- # In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/base/recipes/default.rb 1: package "git" 2: package "tmux" do 3: action :install 4: end 5: # zone "test" do Compiled Resource: ------------------ # Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/base/recipes/default.rb:2:in `from_file' package("tmux") do action [:install] retries 0 retry_delay 2 package_name "tmux" cookbook_name :base recipe_name "default" end [2012-08-13T05:29:37+00:00] DEBUG: Re-raising exception: Chef::Exceptions::Exec - package[tmux] (base::default line 2) had an error: Chef::Exceptions::Exec: pkg install -q --accept tmux@1.6 (1.6) returned 3, expected 0 ---- Begin output of pkg install -q --accept tmux@1.6 (1.6) ---- STDOUT: STDERR: sh: syntax error at line 1: `(' unexpected ---- End output of pkg install -q --accept tmux@1.6 (1.6) ----
It works with either of these:
package "tmux" do version "1.6" action :install end package "tmux" do version "latest" action :install end
Pull request: https://github.com/opscode/chef/pull/364