#304 Add a check for gcc/gcc-c++/clang in BR
Merged 5 years ago by ngompa. Opened 5 years ago by eclipseo.
Unknown source add_gcc_check  into  devel

file modified
+20
@@ -288,4 +288,24 @@

          self.type = 'MUST'

  

  

+ class CheckGccBuildRequires(CCppCheckBase):

+     """ Check that gcc/gcc-c++/clang is present """

+     def __init__(self, base):

+         CCppCheckBase.__init__(self, base)

+         self.url = 'https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B'

+         self.text = 'If your application is a C or C++ application you must ' \

+                     'list a BuildRequires against gcc, gcc-c++ or clang.'

+         self.automatic = True

+         self.type = 'MUST'

+ 

+     def run_on_applicable(self):

+         """ Run the check """

+         br = self.spec.build_requires

+         if not 'gcc' in br and not 'gcc-c++' in br and not 'clang' in br:

+             self.set_passed(self.FAIL, 'No gcc, gcc-c++ or clang found in ' \

+                                        'BuildRequires')

+             return

+         self.set_passed(self.PASS)

+ 

+ 

  # vim: set expandtab ts=4 sw=4:

rebased onto 5adbe7503a429f71b96fc44c2a2fa3dad4e290e4

5 years ago

LGTM, this patch was longly awaited

@eclipseo Could you please rebase this?

rebased onto bc7505c

5 years ago

Ping. Can some admin merge it?

Pull-Request has been merged by ngompa

5 years ago
Metadata