@@ -69,7 +69,7 @@ def latest
69
69
query = @resource [ :name ] + "--"
70
70
end
71
71
72
- output = Puppet ::Util . withenv ( { } ) { pkginfo "-Q" , query }
72
+ output = Puppet ::Util . withenv ( { } ) { pkginfo "-Q" , query }
73
73
74
74
if output . nil? or output . size == 0 or output =~ /Error from /
75
75
debug "Failed to query for #{ resource [ :name ] } "
@@ -91,12 +91,12 @@ def latest
91
91
return match [ 2 ]
92
92
end
93
93
94
- vcmp = properties [ :ensure ] . split ( '.' ) . map { |s |s . to_i } <=> match [ 2 ] . split ( '.' ) . map { |s |s . to_i }
94
+ vcmp = properties [ :ensure ] . split ( '.' ) . map { |s |s . to_i } <=> match [ 2 ] . split ( '.' ) . map { |s |s . to_i }
95
95
if vcmp > 0
96
96
# The locally installed package may actually be newer than what a mirror
97
97
# has. Log it at debug, but ignore it otherwise.
98
98
debug "Package #{ resource [ :name ] } #{ properties [ :ensure ] } newer then available #{ match [ 2 ] } "
99
- return properties [ :ensure ]
99
+ properties [ :ensure ]
100
100
else
101
101
match [ 2 ]
102
102
end
@@ -142,11 +142,11 @@ def get_full_name(latest = false)
142
142
use_version = @resource [ :ensure ]
143
143
else
144
144
use_version = ''
145
- end
145
+ end
146
146
"#{ resource [ :name ] } -#{ use_version } -#{ resource [ :flavor ] } "
147
147
elsif resource [ :name ] . to_s . match ( /[a-z0-9]%[0-9a-z]/i )
148
148
"#{ resource [ :name ] } "
149
- elsif not latest
149
+ elsif ! latest
150
150
"#{ resource [ :name ] } --"
151
151
else
152
152
# If :ensure contains a version, use that instead of looking it up.
@@ -168,7 +168,7 @@ def get_full_name(latest = false)
168
168
169
169
def get_version
170
170
pkg_search_name = @resource [ :name ]
171
- unless pkg_search_name . match ( /[a-z0-9]%[0-9a-z]/i ) and not @resource [ :flavor ]
171
+ unless pkg_search_name . match ( /[a-z0-9]%[0-9a-z]/i ) and ! @resource [ :flavor ]
172
172
# we are only called when no flavor is specified
173
173
# so append '--' to the :name to avoid patch versions on flavors
174
174
pkg_search_name << "--"
0 commit comments