Skip to contentSkip to conversation

CheckforGPLv3: Improve find/grep check

PATCH In review Saul Wold 2 participants 2 messages Aug 25, 2015

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 CheckforGPLv3: Improve find/grep check

Add additional information to help determine what is reporting the GPLv3 if there is a match

---
 lib/python2.7/site-packages/autobuilder/buildsteps/CheckForGPLv3.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/python2.7/site-packages/autobuilder/buildsteps/CheckForGPLv3.py +1 -1
index 0cc5b2c..ace6473 100644
@@ -28,7 +28,7 @@ class CheckForGPLv3(ShellCommand):
         ShellCommand.__init__(self, **kwargs)
 
     def start(self):
-        self.command = 'for x in `find ./build/tmp/deploy/licenses -name "license.manifest"`; do cat $x|grep GPLv3; done'
+        self.command = 'find ./build/tmp/deploy/licenses -name "license.manifest" -exec grep -H -B1 GPLv3 {} \\;'
         self.description = ["Checking to ensure no GPLv3 packages"]
         ShellCommand.start(self)
 
Signature · 1 line
2.1.0
#1 lore raw
Quoted 16 lines · Saul Wold

Add additional information to help determine what is reporting the GPLv3 if there is a match

---
lib/python2.7/site-packages/autobuilder/buildsteps/CheckForGPLv3.py | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
lib/python2.7/site-packages/autobuilder/buildsteps/CheckForGPLv3.py +0 -0
index 0cc5b2c..ace6473 100644

lib/python2.7/site-packages/autobuilder/buildsteps/CheckForGPLv3.py class CheckForGPLv3(ShellCommand): · line 31

Quoted 5 lines
lib/python2.7/site-packages/autobuilder/buildsteps/CheckForGPLv3.py +1 -1
@@ -28,7 +28,7 @@ class CheckForGPLv3(ShellCommand):
        ShellCommand.__init__(self, **kwargs)
 
    def start(self):
-        self.command = 'for x in `find ./build/tmp/deploy/licenses -name "license.manifest"`; do cat $x|grep GPLv3; done'
+        self.command = 'find ./build/tmp/deploy/licenses -name "license.manifest" -exec grep -H -B1 GPLv3 {} \\;'

how about GPL-3.0 and LGPL-3.0 will that be caught ?

Quoted 11 lines
lib/python2.7/site-packages/autobuilder/buildsteps/CheckForGPLv3.py +0 -1
        self.description = ["Checking to ensure no GPLv3 packages"]
        ShellCommand.start(self)
 
--

2.1.0

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto