Blame SOURCES/0006-Modified-the-behavior-of-debuginfo-generation-proces.patch

d0d21f
From a2aefc2276e124b1c329a722ed43cf7fcf7f473f Mon Sep 17 00:00:00 2001
d0d21f
From: Jan Zeleny <jzeleny@redhat.com>
d0d21f
Date: Wed, 30 Jul 2014 10:00:26 +0200
d0d21f
Subject: [PATCH] Modified the behavior of debuginfo generation process
d0d21f
d0d21f
* add correct dependencies to debuginfo packages.
d0d21f
* add conditional definition of __debug_package macro
d0d21f
  (allow turning debuginfor packages off)
d0d21f
* remove automatic creation of debuginfo for metapackage
d0d21f
---
d0d21f
 macros.scl | 51 ++++++++++++++++++++++++++++++++++-----------------
d0d21f
 1 file changed, 34 insertions(+), 17 deletions(-)
d0d21f
d0d21f
diff --git a/macros.scl b/macros.scl
d0d21f
index d344b5e80f4fa6d97c7243df2f40847303eb26df..db85a5002f831e5e319152db8eba6e9e92efec82 100644
d0d21f
--- a/macros.scl
d0d21f
+++ b/macros.scl
d0d21f
@@ -3,6 +3,39 @@
d0d21f
 # Copyright (C) 2012 Red Hat, Inc.
d0d21f
 #   Written by Jindrich Novy <jnovy@redhat.com>.
d0d21f
 
d0d21f
+%scl_debug() %{expand:
d0d21f
+%define old_debug %{lua:print(rpm.expand("%{debug_package}"):len())}
d0d21f
+%global debug_package %{expand:
d0d21f
+%if "%{?old_debug}" == "0"
d0d21f
+       %{expand: %{nil}}
d0d21f
+%else
d0d21f
+%if "%{?scl}%{!?scl:0}" == "%{pkg_name}"
d0d21f
+        %{expand: %{nil}}
d0d21f
+%else
d0d21f
+%ifnarch noarch
d0d21f
+%package debuginfo
d0d21f
+Summary: Debug information for package %{name}
d0d21f
+Group: Development/Debug
d0d21f
+AutoReqProv: 0
d0d21f
+Requires: %scl_runtime
d0d21f
+Provides: scl-package(%scl)
d0d21f
+%{lua:
d0d21f
+        debuginfo=tonumber(rpm.expand("%{old_debug}"))
d0d21f
+        if debuginfo > 0 then
d0d21f
+                rpm.define("__debug_package 1")
d0d21f
+        end
d0d21f
+}
d0d21f
+%description debuginfo
d0d21f
+This package provides debug information for package %{name}.
d0d21f
+Debug information is useful when developing applications that use this
d0d21f
+package or when debugging this package.
d0d21f
+%files debuginfo -f debugfiles.list
d0d21f
+%defattr(-,root,root)
d0d21f
+%endif
d0d21f
+%endif
d0d21f
+%endif
d0d21f
+%{nil}}}
d0d21f
+
d0d21f
 %scl_package() %{expand:%{!?_root_prefix:
d0d21f
 %global pkg_name		%1
d0d21f
 %global scl_name		%{scl}
d0d21f
@@ -42,6 +75,7 @@
d0d21f
 %global _defaultdocdir		%{_docdir}
d0d21f
 }
d0d21f
 %global scl_pkg_name		%{scl}-%{pkg_name}
d0d21f
+%scl_debug
d0d21f
 %global __os_install_post %{expand:
d0d21f
     /usr/lib/rpm/brp-scl-compress %{_scl_root}
d0d21f
     %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}
d0d21f
@@ -52,23 +86,6 @@
d0d21f
     /usr/lib/rpm/redhat/brp-python-hardlink
d0d21f
     %{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars}
d0d21f
 %{nil}}
d0d21f
-%global debug_package %{expand:
d0d21f
-%ifnarch noarch
d0d21f
-%global __debug_package 1
d0d21f
-%package debuginfo
d0d21f
-Summary: Debug information for package %{name}
d0d21f
-Group: Development/Debug
d0d21f
-AutoReqProv: 0
d0d21f
-Requires: %scl_runtime
d0d21f
-Provides: scl-package(%scl)
d0d21f
-%description debuginfo
d0d21f
-This package provides debug information for package %{name}.
d0d21f
-Debug information is useful when developing applications that use this
d0d21f
-package or when debugging this package.
d0d21f
-%files debuginfo -f debugfiles.list
d0d21f
-%defattr(-,root,root)
d0d21f
-%endif
d0d21f
-%{nil}}
d0d21f
 BuildRequires: scl-utils-build
d0d21f
 %if "%{?scl}%{!?scl:0}" == "%{pkg_name}"
d0d21f
 Requires: %{scl_runtime}
d0d21f
-- 
d0d21f
1.9.3
d0d21f