Minor fixups to entropy_mask provider
This commit is contained in:
@@ -11,8 +11,6 @@ Puppet::Type.type(:entropy_mask).provide(:parsed,
|
|||||||
|
|
||||||
defaultfor :operatingsystem => :sabayon
|
defaultfor :operatingsystem => :sabayon
|
||||||
|
|
||||||
commands({:equo => "equo"})
|
|
||||||
|
|
||||||
text_line :blank,
|
text_line :blank,
|
||||||
:match => /^\s*$/
|
:match => /^\s*$/
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ Puppet::Type.newtype(:entropy_mask) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
newproperty(:package) do
|
newproperty(:package) do
|
||||||
desc "Name of hte package being masked"
|
desc "Name of the package being masked"
|
||||||
end
|
end
|
||||||
|
|
||||||
newproperty(:version) do
|
newproperty(:version) do
|
||||||
desc "Version of the package"
|
desc "Version of the package"
|
||||||
|
|
||||||
validate do |value|
|
validate do |value|
|
||||||
raise(ArgumentError, "") if value !~ /^([<>]=?|=)?(\d*(?:\.\d+[a-zA-Z]*)*)(?:_((?:alpha|beta|pre|rc)\d*))?/
|
raise(ArgumentError, "") if value !~ /^(\d*(?:\.\d+[a-zA-Z]*)*)(?:_((?:alpha|beta|pre|rc)\d*))?(-r\d+)?$/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user