Description of problem: The 'devtoolset-6' and 'devtoolset-8' enable script exports a PYTHONPATH like this: /opt/rh/devtoolset-6/root/usr/lib64/python2.7/site-packages:/opt/rh/devtoolset-6/root/usr/lib/python2.7/site-packages Version-Release number of selected component (if applicable): - DTS 8 How reproducible: Steps to Reproduce: 1. run the DTS 8 enable script 2. 3. Actual results: PYTHONPATH becomes /opt/rh/devtoolset-6/root/usr/lib64/python2.7/site-packages:/opt/rh/devtoolset-6/root/usr/lib/python2.7/site-packages Expected results: - DTS doesn't have python - The directories do not exist Additional info: this was originally introduced in the devtoolset-1.1 release. $ git show 38b3081c6e2e0b034f229d8fa3c93787293ae8d4 commit 38b3081c6e2e0b034f229d8fa3c93787293ae8d4 Author: Frank Ch. Eigler <fche> Date: Wed Aug 22 13:15:16 2012 -0400 enable script: add PYTHONPATH as per PERL5LIB diff --git a/devtoolset-1.1.spec b/devtoolset-1.1.spec index 5c92f90..bc9ef90 100644 --- a/devtoolset-1.1.spec +++ b/devtoolset-1.1.spec @@ -3,7 +3,7 @@ Summary: Package that installs %scl Name: %scl_name Version: 1 -Release: 6%{?dist} +Release: 7%{?dist} BuildArch: noarch License: GPLv2+ Group: Applications/File @@ -56,6 +56,9 @@ export PERL5LIB=%{_scl_root}/%{perl_vendorarch}:%{_scl_root}/usr/lib/perl5:%{_sc # or else /etc/ld.so.conf.d files? rpmlibdir=`rpm --eval "%%{_libdir}"` export LD_LIBRARY_PATH=%{_scl_root}$rpmlibdir${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} +# duplicate python site.py logic for sitepackages +pythonvers=`python -c 'import sys; print sys.version[:3]'` +export PYTHONPATH=%{_scl_root}/lib64/python$pythonvers/site-packages:%{_scl_root}/lib/python$pythonvers/site-packages${PYTHONPATH:+:${PYTHONPATH}} EOF mkdir -p %{buildroot}/%{_scl_root}/usr/bin cat > %{buildroot}/%{_scl_root}/usr/bin/sudo <<\EOF @@ -90,6 +93,9 @@ mkdir -p %{buildroot}%{_docdir} %{_root_sysconfdir}/rpm/macros.%{scl}-config %changelog +* Wed Aug 22 2012 Frank Ch. Eigler <fche> 1-7 +- add $PYTHONPATH definition, roughly paralleling PERL5LIB + * Tue Aug 21 2012 Frank Ch. Eigler <fche> 1-6 - bz849452: include a %{_scl_root}/usr/bin/sudo wrapper. - add %{_scl_root}/usr/lib/perl5 to PERL5LIB.
I assume we did this with some python-related code we do or did ship with some dts component, maybe gdb or systemtap. Does this variable setting pose any problems?
A search over a variety of dts6+ packages, I see none that contain content in either that python site-packages or perl. It seems we can drop both settings.
*** Bug 1749434 has been marked as a duplicate of this bug. ***
Patch committed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:4132