| |
@@ -109,20 +109,6 @@
|
| |
self.set_passed("ruby(abi)" not in br)
|
| |
|
| |
|
| |
- class RubyCheckRequiresRubyRelease(RubyCheckBase):
|
| |
- """ Check if package requires ruby(release) """
|
| |
-
|
| |
- def __init__(self, base):
|
| |
- RubyCheckBase.__init__(self, base)
|
| |
- self.url = _gl_fmt_uri({"section": "Ruby_Compatibility"})
|
| |
- self.text = "Package contains Requires: ruby(release)."
|
| |
- self.automatic = True
|
| |
-
|
| |
- def run_on_applicable(self):
|
| |
- br = self.spec.get_requires()
|
| |
- self.set_passed("ruby(release)" in br)
|
| |
-
|
| |
-
|
| |
class RubyCheckBuildArchitecture(RubyCheckBase):
|
| |
""" Check if package is noarch """
|
| |
|
| |
@@ -210,6 +196,20 @@
|
| |
self.set_passed(rc)
|
| |
|
| |
|
| |
+ class RubyCheckRequiresRubyRelease(NonGemCheckBase):
|
| |
+ """ Check if non-gem package requires ruby(release) """
|
| |
+
|
| |
+ def __init__(self, base):
|
| |
+ NonGemCheckBase.__init__(self, base)
|
| |
+ self.url = _gl_fmt_uri({"section": "Ruby_Compatibility"})
|
| |
+ self.text = "Non-gem package contains Requires: ruby(release)."
|
| |
+ self.automatic = True
|
| |
+
|
| |
+ def run_on_applicable(self):
|
| |
+ br = self.spec.get_requires()
|
| |
+ self.set_passed("ruby(release)" in br)
|
| |
+
|
| |
+
|
| |
class NonGemCheckUsesMacros(NonGemCheckBase):
|
| |
""" Check if spec files uses proper macros instead of hardcoding """
|
| |
|
| |
@@ -247,6 +247,20 @@
|
| |
self.automatic = False
|
| |
|
| |
|
| |
+ class RubyCheckNotRequiresRubyRelease(GemCheckBase):
|
| |
+ """ Check if gem package does not require ruby(release) """
|
| |
+
|
| |
+ def __init__(self, base):
|
| |
+ GemCheckBase.__init__(self, base)
|
| |
+ self.url = _gl_fmt_uri({"section": "Ruby_Compatibility"})
|
| |
+ self.text = "Gem package does not contain Requires: ruby(release)."
|
| |
+ self.automatic = True
|
| |
+
|
| |
+ def run_on_applicable(self):
|
| |
+ br = self.spec.get_requires()
|
| |
+ self.set_passed("ruby(release)" not in br)
|
| |
+
|
| |
+
|
| |
class GemCheckFilePlacement(GemCheckBase):
|
| |
""" Check if gem files are placed in correct directories """
|
| |
|
| |
@@ -429,7 +443,7 @@
|
| |
self.type = "SHOULD"
|
| |
|
| |
def run_on_applicable(self):
|
| |
- gem_install_re = re.compile(r"^.*gem\s+install", re.I)
|
| |
+ gem_install_re = re.compile(r"^(?!#).*gem\s+install", re.I)
|
| |
self.set_passed(self.FAIL if self.spec.find_re(gem_install_re) else self.PASS)
|
| |
|
| |
|
| |
Allow saying 'gem install' in a Ruby spec comment
Ruby check
GemCheckInstallMacro
was asserting the usage of%gem_install
by checking that raw command
gem install
was not used.The check extended to comment rows, too.
There is no reason to complain about that in comments,
and in particular,
gem2rpm
automatically generates such comments.Relaxing the check to skip comment rows.
Fix ruby check for 'ruby(release)'
The Ruby packaging guidelines say that
Requires: ruby(release)
MUST be included for non-gem packages,
but SHOULD NOT be included for gem packages.
Fedora-review was unconditionally checking for inclusion.
Fixed by splitting the check into two complementary cases.