Minor fixups to entropy_mask provider

This commit is contained in:
2016-10-10 21:43:30 +01:00
parent 0da0175b3f
commit 11aa4bcb50
2 changed files with 2 additions and 4 deletions

View File

@@ -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*$/

View File

@@ -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