summaryrefslogtreecommitdiff
blob: ec30064f20a7aa58bf1f6bedeee0eafe1567e29a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
diff -Naur puppet-0.23.2.orig/conf/gentoo/puppet/puppet.conf puppet-0.23.2/conf/gentoo/puppet/puppet.conf
--- puppet-0.23.2.orig/conf/gentoo/puppet/puppet.conf	1970-01-01 09:00:00.000000000 +0900
+++ puppet-0.23.2/conf/gentoo/puppet/puppet.conf	2007-12-07 18:41:41.000000000 +0900
@@ -0,0 +1,29 @@
+[main]
+    # Where Puppet stores dynamic and growing data.
+    # The default value is '/var/puppet'.
+    vardir = /var/lib/puppet
+
+    # The Puppet log directory.
+    # The default value is '$vardir/log'.
+    logdir = /var/log/puppet
+
+    # Where Puppet PID files are kept.
+    # The default value is '$vardir/run'.
+    rundir = /var/run/puppet
+
+    # Where SSL certificates are kept.
+    # The default value is '$confdir/ssl'.
+    ssldir = $vardir/ssl
+
+[puppetd]
+    # The file in which puppetd stores a list of the classes
+    # associated with the retrieved configuratiion.  Can be loaded in
+    # the separate ``puppet`` executable using the ``--loadclasses``
+    # option.
+    # The default value is '$confdir/classes.txt'.
+    classfile = $vardir/classes.txt
+
+    # Where puppetd caches the local configuration.  An
+    # extension indicating the cache format is added automatically.
+    # The default value is '$confdir/localconfig'.
+    localconfig = $vardir/localconfig
diff -Naur puppet-0.23.2.orig/conf/gentoo/puppet/puppetca.conf puppet-0.23.2/conf/gentoo/puppet/puppetca.conf
--- puppet-0.23.2.orig/conf/gentoo/puppet/puppetca.conf	2007-06-18 07:06:39.000000000 +0900
+++ puppet-0.23.2/conf/gentoo/puppet/puppetca.conf	1970-01-01 09:00:00.000000000 +0900
@@ -1,29 +0,0 @@
-[puppet]
-    # Where Puppet stores dynamic and growing data.
-    # The default value is '/var/puppet'.
-    vardir = /var/lib/puppet
-
-    # The Puppet log directory.
-    # The default value is '$vardir/log'.
-    logdir = /var/log/puppet
-
-    # Where Puppet PID files are kept.
-    # The default value is '$vardir/run'.
-    rundir = /var/run/puppet
-
-    # Where SSL certificates are kept.
-    # The default value is '$confdir/ssl'.
-    ssldir = $vardir/ssl
-
-[puppetd]
-    # The file in which puppetd stores a list of the classes
-    # associated with the retrieved configuratiion.  Can be loaded in
-    # the separate ``puppet`` executable using the ``--loadclasses``
-    # option.
-    # The default value is '$confdir/classes.txt'.
-    classfile = $vardir/classes.txt
-
-    # Where puppetd caches the local configuration.  An
-    # extension indicating the cache format is added automatically.
-    # The default value is '$confdir/localconfig'.
-    localconfig = $vardir/localconfig
diff -Naur puppet-0.23.2.orig/conf/gentoo/puppet/puppetd.conf puppet-0.23.2/conf/gentoo/puppet/puppetd.conf
--- puppet-0.23.2.orig/conf/gentoo/puppet/puppetd.conf	2007-06-18 07:06:39.000000000 +0900
+++ puppet-0.23.2/conf/gentoo/puppet/puppetd.conf	1970-01-01 09:00:00.000000000 +0900
@@ -1,29 +0,0 @@
-[puppet]
-    # Where Puppet stores dynamic and growing data.
-    # The default value is '/var/puppet'.
-    vardir = /var/lib/puppet
-
-    # The Puppet log directory.
-    # The default value is '$vardir/log'.
-    logdir = /var/log/puppet
-
-    # Where Puppet PID files are kept.
-    # The default value is '$vardir/run'.
-    rundir = /var/run/puppet
-
-    # Where SSL certificates are kept.
-    # The default value is '$confdir/ssl'.
-    ssldir = $vardir/ssl
-
-[puppetd]
-    # The file in which puppetd stores a list of the classes
-    # associated with the retrieved configuratiion.  Can be loaded in
-    # the separate ``puppet`` executable using the ``--loadclasses``
-    # option.
-    # The default value is '$confdir/classes.txt'.
-    classfile = $vardir/classes.txt
-
-    # Where puppetd caches the local configuration.  An
-    # extension indicating the cache format is added automatically.
-    # The default value is '$confdir/localconfig'.
-    localconfig = $vardir/localconfig
diff -Naur puppet-0.23.2.orig/conf/gentoo/puppet/puppetmasterd.conf puppet-0.23.2/conf/gentoo/puppet/puppetmasterd.conf
--- puppet-0.23.2.orig/conf/gentoo/puppet/puppetmasterd.conf	2007-06-18 07:06:39.000000000 +0900
+++ puppet-0.23.2/conf/gentoo/puppet/puppetmasterd.conf	1970-01-01 09:00:00.000000000 +0900
@@ -1,29 +0,0 @@
-[puppet]
-    # Where Puppet stores dynamic and growing data.
-    # The default value is '/var/puppet'.
-    vardir = /var/lib/puppet
-
-    # The Puppet log directory.
-    # The default value is '$vardir/log'.
-    logdir = /var/log/puppet
-
-    # Where Puppet PID files are kept.
-    # The default value is '$vardir/run'.
-    rundir = /var/run/puppet
-
-    # Where SSL certificates are kept.
-    # The default value is '$confdir/ssl'.
-    ssldir = $vardir/ssl
-
-[puppetd]
-    # The file in which puppetd stores a list of the classes
-    # associated with the retrieved configuratiion.  Can be loaded in
-    # the separate ``puppet`` executable using the ``--loadclasses``
-    # option.
-    # The default value is '$confdir/classes.txt'.
-    classfile = $vardir/classes.txt
-
-    # Where puppetd caches the local configuration.  An
-    # extension indicating the cache format is added automatically.
-    # The default value is '$confdir/localconfig'.
-    localconfig = $vardir/localconfig
diff -Naur puppet-0.23.2.orig/lib/puppet/provider/package/portage.rb puppet-0.23.2/lib/puppet/provider/package/portage.rb
--- puppet-0.23.2.orig/lib/puppet/provider/package/portage.rb	2007-06-20 08:07:35.000000000 +0900
+++ puppet-0.23.2/lib/puppet/provider/package/portage.rb	2007-12-07 18:46:49.000000000 +0900
@@ -10,8 +10,8 @@
     defaultfor :operatingsystem => :gentoo
 
     def self.instances
-        result_format = /(\S+) (\S+) \[(.*)\] \[[^0-9]*([^\s:]*)(:\S*)?\] ([\S]*) (.*)/
-        result_fields = [:category, :name, :ensure, :version_available, :slot, :vendor, :description]
+        result_format = /(\S+) (\S+) \[([^\[]*)(\[[^\]]*\])?\] \[[^0-9]*([^\s:\[]*)(\[[^\]]*\])?(:\S*)?\] ([\S]*) (.*)/
+        result_fields = [:category, :name, :ensure, :ensure_overlay, :version_available, :overlay, :slot, :vendor, :description]
 
         search_format = "{installedversionsshort}<category> <name> [<installedversionsshort>] [<best>] <homepage> <description>{}"
 
@@ -55,7 +55,7 @@
 
     # The common package name format.
     def package_name
-        "%s/%s" % [@resource[:category], @resource[:name]]
+        @resource[:category] ? "%s/%s" % [@resource[:category], @resource[:name]] : @resource[:name]
     end
 
     def uninstall
@@ -67,11 +67,11 @@
     end
 
     def query
-        result_format = /(\S+) (\S+) \[(.*)\] \[[^0-9]*([^\s:]*)(:\S*)?\] ([\S]*) (.*)/
-        result_fields = [:category, :name, :ensure, :version_available, :slot, :vendor, :description]
+        result_format = /(\S+) (\S+) \[([^\[]*)(\[[^\]]*\])?\] \[[^0-9]*([^\s:\[]*)(\[[^\]]*\])?(:\S*)?\] ([\S]*) (.*)/
+        result_fields = [:category, :name, :ensure, :ensure_overlay, :version_available, :overlay, :slot, :vendor, :description]
 
         search_field = @resource[:category] ? "--category-name" : "--name"
-        search_value = @resource[:category] ? package_name : @resource[:name]
+        search_value = package_name
         search_format = "<category> <name> [<installedversionsshort>] [<best>] <homepage> <description>"
 
         begin
diff -Naur puppet-0.23.2.orig/lib/puppet/provider/service/gentoo.rb puppet-0.23.2/lib/puppet/provider/service/gentoo.rb
--- puppet-0.23.2.orig/lib/puppet/provider/service/gentoo.rb	2007-06-18 07:06:39.000000000 +0900
+++ puppet-0.23.2/lib/puppet/provider/service/gentoo.rb	2007-12-07 18:41:41.000000000 +0900
@@ -29,7 +29,7 @@
         return :false unless line
 
         # If it's enabled then it will print output showing service | runlevel
-        if output =~ /#{@resource[:name]}\s*|\s*default/
+        if output =~ /#{@resource[:name]}\s*\|\s*default/
             return :true
         else
             return :false