Skip to contentSkip to conversation

sstate.bbclass: use tabs for indentation

PATCH Superseded Martin Jansa 2 participants 4 messages Dec 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sstate.bbclass: use tabs for indentation

* it's terrible, but this is what oe-core wants and it's better than mixing tabs and spaces in the same function

---
 meta/classes/sstate.bbclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta/classes/sstate.bbclass +5 -5
index 14de791c81..18e3492674 100644
@@ -753,13 +753,13 @@ sstate_create_package () {
 		return
 	fi
 
-        mkdir -p `dirname ${SSTATE_PKG}`
+	mkdir -p `dirname ${SSTATE_PKG}`
 	TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
 
-        # Use pigz if available
-        OPT="-czS"
-        if [ -x "$(command -v pigz)" ]; then
-            OPT="-I pigz -cS"
+	# Use pigz if available
+	OPT="-czS"
+	if [ -x "$(command -v pigz)" ]; then
+		OPT="-I pigz -cS"
         fi
 
 	# Need to handle empty directories
Signature · 1 line
2.20.1
#1 lore raw
Quoted 19 lines · Martin Jansa

* it's terrible, but this is what oe-core wants and it's better than mixing tabs and spaces in the same function

---
  meta/classes/sstate.bbclass | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
meta/classes/sstate.bbclass +1 -1
index 14de791c81..18e3492674 100644
@@ -753,13 +753,13 @@ sstate_create_package () {
  		return
  	fi
 
-        mkdir -p `dirname ${SSTATE_PKG}`
+	mkdir -p `dirname ${SSTATE_PKG}`
  	TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
 

meta/classes/sstate.bbclass sstate_create_package () { · line 764

Quoted 10 lines
meta/classes/sstate.bbclass +4 -4
-        # Use pigz if available
-        OPT="-czS"
-        if [ -x "$(command -v pigz)" ]; then
-            OPT="-I pigz -cS"
+	# Use pigz if available
+	OPT="-czS"
+	if [ -x "$(command -v pigz)" ]; then
+		OPT="-I pigz -cS"
          fi
 

Nice cleanup. Doesn't this final 'fi' still look funky though ?

Quoted 2 lines
meta/classes/sstate.bbclass +0 -0
  	# Need to handle empty directories
#2 lore raw
Quoted 21 lines · Jacob Kroon
Quoted 20 lines · Martin Jansa

* it's terrible, but this is what oe-core wants and it's better than mixing tabs and spaces in the same function

---
  meta/classes/sstate.bbclass | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
meta/classes/sstate.bbclass +1 -4
index 14de791c81..18e3492674 100644
@@ -753,13 +753,13 @@ sstate_create_package () {
  		return
  	fi
-        mkdir -p `dirname ${SSTATE_PKG}`
+	mkdir -p `dirname ${SSTATE_PKG}`
  	TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
-        # Use pigz if available
-        OPT="-czS"
-        if [ -x "$(command -v pigz)" ]; then
Quoted 8 lines

meta/classes/sstate.bbclass sstate_create_package () { · line 763

Quoted 6 lines
meta/classes/sstate.bbclass +4 -1
-            OPT="-I pigz -cS"
+	# Use pigz if available
+	OPT="-czS"
+	if [ -x "$(command -v pigz)" ]; then
+		OPT="-I pigz -cS"
          fi

Nice cleanup. Doesn't this final 'fi' still look funky though ?

Yes, you're right, it was still using 8 spaces as well. Hard to notice when the other half of the file commonly uses 8 spaces and the git diff with mixed tabs and spaces is always a bit ugly.

Sent v2. Thanks for noticing.

Quoted 3 lines
Quoted 3 lines
meta/classes/sstate.bbclass +0 -0
  	# Need to handle empty directories
 
#3 lore raw

PATCH v2 1/1 sstate.bbclass: use tabs for indentation

In reply to Martin Jansa

* it's terrible, but this is what oe-core wants and it's better than mixing tabs and spaces in the same function

---
 meta/classes/sstate.bbclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta/classes/sstate.bbclass +6 -6
index 14de791c81..6603c6e926 100644
@@ -753,14 +753,14 @@ sstate_create_package () {
 		return
 	fi
 
-        mkdir -p `dirname ${SSTATE_PKG}`
+	mkdir -p `dirname ${SSTATE_PKG}`
 	TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
 
-        # Use pigz if available
-        OPT="-czS"
-        if [ -x "$(command -v pigz)" ]; then
-            OPT="-I pigz -cS"
-        fi
+	# Use pigz if available
+	OPT="-czS"
+	if [ -x "$(command -v pigz)" ]; then
+		OPT="-I pigz -cS"
+	fi
 
 	# Need to handle empty directories
 	if [ "$(ls -A)" ]; then
Signature · 1 line
2.20.1