Bug 1886728 - Wrong devtoolset prefix is selected when multiple devtoolset packages is installed
Summary: Wrong devtoolset prefix is selected when multiple devtoolset packages is inst...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: scl-utils
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: alpha
: 3.6
Assignee: Joe Orton
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-09 08:57 UTC by gnaggnoyil
Modified: 2020-10-09 10:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-09 10:08:41 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description gnaggnoyil 2020-10-09 08:57:40 UTC
### Environment

```
$ cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
$ uname -a
Linux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ yum list | grep scl-utils
scl-utils.x86_64                           20130529-19.el7        @anaconda
scl-utils-build.x86_64                     20130529-19.el7        @base
scl-utils-debuginfo.x86_64                 20130529-19.el7        base-debuginfo
```

### Steps to reproduce

1. `yum install centos-release-scl`
2. `yum-config-manager --enable rhel-server-rhscl-7-rpms`
3. `yum install devtoolset-8`
4. `yum install devtoolset-9-build`
5. `curl -L http://vault.centos.org/centos/7/sclo/Source/rh/devtoolset-8-gcc-8.3.1-3.2.el7.src.rpm -O`
6. `yum-builddep devtoolset-8-gcc-8.3.1-3.2.el7.src.rpm`
7. `mkdir -p ~/rpmbuild/SOURCES`
8. `cd ~/rpmbuild/SOURCES && rpm2cpio ~/devtoolset-8-gcc-8.3.1-3.2.el7.src.rpm | cpio -idmv`
9. `cd ~/rpmbuild/SOURCES && rpmbuild -ba --nocheck --noclean gcc.spec`
10. `ls ~/rpmbuild/RPMS/x86_64 | grep 'devtoolset-9-'`

### Expected behavior

Step 10 will not produce any outputs, as there are no packages prefixed with "devtoolset-9-" exists

### Actual behavior

Step 10 produced outputs with filename like "devtoolset-9-gcc-8.3.1-3.2.el7.x86_64.rpm"

### Additional info

Running command `rpmbuild --showrc | grep devtoolset-` after step 3 and before step 4 gives the following output:

```
$ rpmbuild --showrc | grep devtoolset-
-14: enable_devtoolset8 %global ___build_pre %{___build_pre}; source scl_source enable devtoolset-8 || :
-14: scl        devtoolset-8
```

Running the same command after step 4 then gives the following output:

```
$ rpmbuild --showrc | grep devtoolset-
-14: enable_devtoolset8 %global ___build_pre %{___build_pre}; source scl_source enable devtoolset-8 || :
-14: enable_devtoolset9 %global ___build_pre %{___build_pre}; source scl_source enable devtoolset-9 || :
-14: scl        devtoolset-9
```

Comment 2 Joe Orton 2020-10-09 10:08:41 UTC
Please note that we don't support CentOS.  The -build package installed dictates the SCL prefix as indicated:

-14: scl        devtoolset-9


Note You need to log in before you can comment on or make changes to this bug.