Skip to contentSkip to conversation

Fix oe-stylize.py issues

PATCH New Jose Alarcon 1 participant 4 messages Dec 28, 2015

lore
Share & tools
lore
#0 lore raw

cover Fix oe-stylize.py issues

1) Ensure that the scrip is compatible with earlier versions of python
2) Add common OEvariables to the script
3) Make sure that a warnings printed by the script don't produce bitbake parsing errors

Jose Alarcon (3):
contrib: ensure that oe-stylize.py works with python versions < 3.0
contrib: add missing common OE variables
contrib: print oldline within single quotes

 contrib/oe-stylize.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/3 contrib: ensure that oe-stylize.py works with python versions < 3.0

---
 contrib/oe-stylize.py | 1 +
 1 file changed, 1 insertion(+)
contrib/oe-stylize.py +1 -0
index 712557d..a2fcde1 100755
@@ -19,6 +19,7 @@ TODO:
  - count rule breaks and displays them in the order frequence
 """
 
+from __future__ import print_function 
 import fileinput
 import string
 import re
Signature · 1 line
2.5.0
#2 lore raw

PATCH 2/3 contrib: add missing common OE variables

In reply to Jose Alarcon
---
 contrib/oe-stylize.py | 4 ++++
 1 file changed, 4 insertions(+)
contrib/oe-stylize.py +4 -0
index a2fcde1..7bb310d 100755
@@ -121,6 +121,7 @@ OE_vars = [
     'CONFFILES',
     'CONFLICTS',
     'CORE_EXTRA_D',
+    'CORE_IMAGE_EXTRA_INSTALL',
     'CORE_PACKAGES_D',
     'CORE_PACKAGES_RD',
     'CPPFLAGS',
@@ -141,6 +142,7 @@ OE_vars = [
     'INITSCRIPT_PACKAGES',
     'INITSCRIPT_NAME',
     'INITSCRIPT_PARAMS',
+    'INSANE_SKIP',
     'PACKAGE_INSTALL',
     'KERNEL_IMAGETYPE',
     'KERNEL_IMAGEDEST',
@@ -199,6 +201,8 @@ OE_vars = [
     'UBOOT_MACHINE',
     'UCLIBC_BASE',
     'UCLIBC_PATCHES',
+    'USERADD_PACKAGES',
+    'USERADD_PARAM',
     'VIRTUAL_NAME',
     'XORG_PN',
     'XSERVER',
Signature · 1 line
2.5.0
#3 lore raw

PATCH 3/3 contrib: print oldline within single quotes

In reply to Jose Alarcon
---
 contrib/oe-stylize.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
contrib/oe-stylize.py +2 -2
index 7bb310d..db8a363 100755
@@ -311,10 +311,10 @@ def follow_rule(i, line):
         # if the line still does not respect the rule
         if not rules[i][0](line):
             # this is a rule disgression
-            print ("## Disgression: ", rules[i][2], " in:", oldline)
+            print ("## Disgression: ", rules[i][2], " in: '", oldline, "'")
         else:
             # just remind user about his/her errors
-            print ("## Reminder: ", rules[i][2], " in :", oldline)
+            print ("## Reminder: ", rules[i][2], " in : '", oldline, "'")
     return line
 
 
Signature · 1 line
2.5.0