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

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