Blame SOURCES/0005-Various-fixes-in-Provides-and-Requires-of-scl-packag.patch

d1a94d
From 4daefe484e42d5cccbf1b3fe1e5f3494269c9e98 Mon Sep 17 00:00:00 2001
39593f
From: Jan Zeleny <jzeleny@redhat.com>
39593f
Date: Mon, 27 Jan 2014 10:23:36 +0100
39593f
Subject: [PATCH] Various fixes in Provides and Requires of scl packages
39593f
39593f
- add new Requires: %scl_runtime, to all scl packages
39593f
  (every scl package requires the runtime to be installed anyway)
39593f
- add new Provides: scl-package(%scl) for metapackage and build subpackage
39593f
- exclude both from the main metapackage
39593f
- move the _root_path conditional in macros.scl: when BuildArch is
39593f
  specified in spec file, rpm recursively parses spec file again. That's
39593f
  the reason why the conditional is there. However, when the wrong
39593f
  pieces of code are included in in, it brings some problems. This
39593f
  change keep only the path definition inside the conditional, the rest
39593f
  can be easily redefined again.
39593f
---
39593f
 macros.scl | 8 ++++++--
39593f
 scl.attr   | 3 ++-
39593f
 scldeps.sh | 3 +++
39593f
 3 files changed, 11 insertions(+), 3 deletions(-)
39593f
39593f
diff --git a/macros.scl b/macros.scl
d1a94d
index 8b6377e..d344b5e 100644
39593f
--- a/macros.scl
39593f
+++ b/macros.scl
39593f
@@ -40,6 +40,7 @@
39593f
 %global _mandir			%{_datadir}/man
39593f
 %global _docdir			%{_datadir}/doc
39593f
 %global _defaultdocdir		%{_docdir}
39593f
+}
39593f
 %global scl_pkg_name		%{scl}-%{pkg_name}
39593f
 %global __os_install_post %{expand:
39593f
     /usr/lib/rpm/brp-scl-compress %{_scl_root}
39593f
@@ -58,6 +59,7 @@
39593f
 Summary: Debug information for package %{name}
39593f
 Group: Development/Debug
39593f
 AutoReqProv: 0
39593f
+Requires: %scl_runtime
39593f
 Provides: scl-package(%scl)
39593f
 %description debuginfo
39593f
 This package provides debug information for package %{name}.
39593f
@@ -68,10 +70,12 @@ package or when debugging this package.
39593f
 %endif
39593f
 %{nil}}
39593f
 BuildRequires: scl-utils-build
39593f
-}
39593f
+%if "%{?scl}%{!?scl:0}" == "%{pkg_name}"
39593f
+Requires: %{scl_runtime}
39593f
+Provides: scl-package(%{scl})
39593f
+%endif
39593f
 %{?scl_package_override:%scl_package_override}
39593f
 }
39593f
 
39593f
 %scl_require()	%{_scl_prefix}/%1/enable, %1
39593f
 %scl_require_package() %1-%2
39593f
-
39593f
diff --git a/scl.attr b/scl.attr
d1a94d
index 3e54656..c16ade6 100644
39593f
--- a/scl.attr
39593f
+++ b/scl.attr
39593f
@@ -1,2 +1,3 @@
39593f
 %__scl_provides	%{_rpmconfigdir}/scldeps.sh --provides %{scl}
39593f
-%__scl_path	%{?scl:^%{_scl_prefix}/.*$}
39593f
+%__scl_requires %{_rpmconfigdir}/scldeps.sh --requires %{scl_runtime}
d1a94d
+%__scl_path	%{?scl:^%{_scl_prefix}/.*$|%{_root_sysconfdir}/rpm/macros.%{scl}-config$}
39593f
diff --git a/scldeps.sh b/scldeps.sh
d1a94d
index 268d6bb..df8ddb3 100755
39593f
--- a/scldeps.sh
39593f
+++ b/scldeps.sh
39593f
@@ -9,5 +9,8 @@ case $1 in
39593f
 -P|--provides)
39593f
     echo -n "scl-package($2)"
39593f
     ;;
39593f
+-R|--requires)
39593f
+    echo -n "$2"
39593f
+    ;;
39593f
 esac
39593f
 exit 0
39593f
-- 
39593f
1.9.3
39593f