Este contenido no está disponible en el idioma seleccionado.
Chapter 3. Advanced Topics
		This chapter discusses advanced topics on packaging Software Collections.
	
3.1. Software Collection Automatic Provides and Requires and Filtering Support
Copiar enlaceEnlace copiado en el portapapeles!
Important
				The functionality described in this section is not available in Red Hat Enterprise Linux 5 and 6.
			
			RPM in Red Hat Enterprise Linux 7 features support for automatic 
Provides and Requires and filtering. For example, for all Python libraries, RPM automatically adds the following Requires:
		Requires: python(abi) = (version)
Requires: python(abi) = (version)
			As explained in Section 2.9, “Converting a Conventional Spec File”, you should prefix this 
Requires with %{?scl_prefix} when converting your conventional RPM package:
		Requires: %{?scl_prefix}python(abi) = (version))
Requires: %{?scl_prefix}python(abi) = (version))
			Keep in mind that the scripts searching for these dependencies must sometimes be rewritten for your Software Collection, as the original RPM scripts are not extensible enough, and, in some cases, filtering is not usable. For example, to rewrite automatic Python 
Provides and Requires, add the following lines in the macros.%{scl}-config macro file:
		%__python_provides /usr/lib/rpm/pythondeps-scl.sh --provides %{_scl_root} %{scl_prefix}
%__python_requires /usr/lib/rpm/pythondeps-scl.sh --requires %{_scl_root} %{scl_prefix}
%__python_provides /usr/lib/rpm/pythondeps-scl.sh --provides %{_scl_root} %{scl_prefix}
%__python_requires /usr/lib/rpm/pythondeps-scl.sh --requires %{_scl_root} %{scl_prefix}
			The 
/usr/lib/rpm/pythondeps-scl.sh file is based on a pythondeps.sh file from the conventional package and adjusts search paths.
		
			If there are 
Provides or Requires that you need to adjust, for example, a pkg_config Provides, there are two ways to do it:
		- Add the following lines in themacros.%{scl}-configmacro file so that it applies to all packages in the Software Collection:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 
- Or, alternatively, add the following lines after tag definitions in every spec file for which you want to filterProvidesorRequires:%{?scl:%filter_from_provides s|pkgconfig|%{?scl_prefix}pkgconfig|g} %{?scl:%filter_from_requires s|pkgconfig|%{?scl_prefix}pkgconfig|g} %{?scl:%filter_setup}%{?scl:%filter_from_provides s|pkgconfig|%{?scl_prefix}pkgconfig|g} %{?scl:%filter_from_requires s|pkgconfig|%{?scl_prefix}pkgconfig|g} %{?scl:%filter_setup}Copy to Clipboard Copied! Toggle word wrap Toggle overflow 
Important
				When using filters, you need to pay attention to the automatic dependencies you change. For example, if the conventional package contains 
Requires: pkgconfig(package_1) and Requires: pkgconfig(package_2), and only package_2 is included in the Software Collection, ensure that you do not filter the Requires tag for package_1.