File 0002-Colocation-Fix-NameError-when-creating-2-resource-co.patch of Package hawk.1584

From 15fb8b9c1530377c10239d4d18ae708ae1b4af56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
Date: Tue, 1 Dec 2015 15:45:59 +0100
Subject: [PATCH] Colocation: Fix NameError when creating 2-resource
 constraints (bsc#957369)

---
 hawk/app/models/colocation.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hawk/app/models/colocation.rb b/hawk/app/models/colocation.rb
index 1efcce4..8a196a2 100644
--- a/hawk/app/models/colocation.rb
+++ b/hawk/app/models/colocation.rb
@@ -194,7 +194,7 @@ class Colocation < Constraint
       # don't flip around the other way like we do below)
       collapsed[0][:resources].each do |r|
         cmd += " #{r[:id]}"
-        cmd += ":#{set[:role]}" if collapsed[0][:role]
+        cmd += ":#{collapsed[0][:role]}" if collapsed[0][:role]
       end
     else
       collapsed.each do |set|
-- 
2.6.2

openSUSE Build Service is sponsored by