From 9c39530a777ef6ab7250ebe5f94c0cb73cb471ae Mon Sep 17 00:00:00 2001 From: Juha Kallioinen Date: Wed, 18 Dec 2013 12:23:11 +0000 Subject: [PATCH] [spectacle] Only insert %defattr if not already there Signed-off-by: Juha Kallioinen --- spectacle/spec/spec.tmpl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/spectacle/spec/spec.tmpl b/spectacle/spec/spec.tmpl index 975db04..88e70ff 100644 --- a/spectacle/spec/spec.tmpl +++ b/spectacle/spec/spec.tmpl @@ -863,11 +863,15 @@ $str_newline.join($extra.content.postun[$sp.Name]) #else %files #end if -%defattr(-,root,root,-) #if "Files" in $metadata: +#if not '%defattr' in $metadata.Files[0] +%defattr(-,root,root,-) +#end if #for $f in $metadata.Files $arch_line($f) #end for +#else +%defattr(-,root,root,-) #end if # >> files #if $extra.content.has_key("files") and $extra.content.files.has_key("main") @@ -891,11 +895,15 @@ $str_newline.join($extra.content.files.main) #else %files $pkg_name #end if -%defattr(-,root,root,-) #if "Files" in $sp: +#if not '%defattr' in $sp.Files[0] +%defattr(-,root,root,-) +#end if #for $f in $sp.Files $arch_line($f) #end for +#else +%defattr(-,root,root,-) #end if # >> files $sp.Name #if $extra.content.has_key("files") and $extra.content.files.has_key($sp.Name)