software_spec: use version dups for resources (#534)

Also prevent the commit of formula's HeadVersion from passing to the resource. 

This is a fix of #531
This commit is contained in:
Uladzislau Shablinski 2016-07-16 23:49:32 +03:00 committed by Xu Cheng
parent ccb11935f6
commit 242508fca4

View File

@ -53,7 +53,7 @@ class SoftwareSpec
@resource.owner = self
resources.each_value do |r|
r.owner = self
r.version ||= version
r.version ||= (version.head? ? Version.create("HEAD") : version.dup)
end
patches.each { |p| p.owner = self }
end