#1 Change logic on dnf vars to detect non-Stream installations properly
Opened 3 years ago by neil. Modified 2 years ago
rpms/ neil/centos-release-nfv c8-sig-nfv  into  c8-sig-nfv

@@ -1,7 +1,7 @@ 

  Summary: Config to enable the repository for the NFV SIG

  Name: centos-release-nfv

  Version: 1

- Release: 3%{?dist}

+ Release: 4%{?dist}

  License: GPLv2

  Group: System Environment/Base

  URL: http://wiki.centos.org/SpecialInterestGroup/NFV
@@ -54,7 +54,7 @@ 

  if [ -f /etc/os-release ]; then

      source /etc/os-release

  fi

- if [[ $ID == 'centos' && $NAME == *'Stream' ]] || [ $ID != 'centos' ]; then

+ if [[ $ID == 'centos' && $NAME == *'Stream' ]]; then

      echo "8-stream" > /etc/dnf/vars/nfvsigdist

  else

      echo "8" > /etc/dnf/vars/nfvsigdist
@@ -78,6 +78,9 @@ 

  %config(noreplace) %{_sysconfdir}/yum.repos.d/CentOS-NFV-extras.repo

  

  %changelog

+ * Mon Nov 08 2021 Neil Hanlon <neil@resf.org> - 1-4

+ - Fix logic for dnf vars to detect non-Stream installations

+ 

  * Thu Apr 15 2021 Alfredo Moralejo <amoralej@redhat.com> - 1-3

  - Use different repos for CentOS Linux 8 and CentOS Stream 8

  

Hello,

Thank you for taking the time to look at this PR.

I found this while working on a related project and it was similar to another PR I've opened with the Advanced-Virt SIG. It appears the logic here is/was similarly applied, but it appears to detect all non-Stream installations as "stream" because of the || [ $ID != 'centos' ] which prevents installation/use on any non-CentOS machine. This PR modifies the logic to set the '8' nfvsigdist var on both CentOS 8 (non stream) as well as any derivatives which may be utilizing the release package.

Best,
Neil

https://pagure.io/centos-sig-virt/sig/issue/1

1 new commit added

  • bump release
3 years ago
Metadata