diff mbox series

[isar-cip-core,1/5] squashfs-img: Cosmetic cleanups

Message ID f8bf883a040a9b1b50eee89177b6a5b69ee88b0c.1650384418.git.jan.kiszka@siemens.com (mailing list archive)
State New
Headers show
Series Read-only rootfs for non-secure swupdate / cleanups / fixes | expand

Commit Message

Jan Kiszka April 19, 2022, 4:06 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

SQUASHFS_EXCLUDE_DIRS is given a default value in this class, so the
'or ""' is redundant. Furthermore, remove the unneeded space from the
SQUASHFS_CREATION_ARGS default assignment as well as misleading comment
in front of its anonymous constructor function.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 classes/squashfs-img.bbclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/classes/squashfs-img.bbclass b/classes/squashfs-img.bbclass
index 0fcfca5..04bb67c 100644
--- a/classes/squashfs-img.bbclass
+++ b/classes/squashfs-img.bbclass
@@ -1,7 +1,7 @@ 
 #
 # CIP Core, generic profile
 #
-# Copyright (c) Siemens AG, 2021
+# Copyright (c) Siemens AG, 2021-2022
 #
 # Authors:
 #  Quirin Gylstorff <quirin.gylstorff@siemens.com>
@@ -15,14 +15,14 @@  IMAGER_INSTALL += "squashfs-tools"
 
 SQUASHFS_EXCLUDE_DIRS ?= ""
 SQUASHFS_CONTENT ?= "${PP_ROOTFS}"
-SQUASHFS_CREATION_ARGS ?= " "
-# Generate squashfs filesystem image
+SQUASHFS_CREATION_ARGS ?= ""
+
 python __anonymous() {
-    exclude_directories = (d.getVar('SQUASHFS_EXCLUDE_DIRS') or "").split()
+    exclude_directories = d.getVar('SQUASHFS_EXCLUDE_DIRS').split()
     if len(exclude_directories) == 0:
         return
-    # use wildcard to exclude only content of the the directory
-    # this allows to use the directory as a mount point
+    # Use wildcard to exclude only content of the directory.
+    # This allows to use the directory as a mount point.
     args = " -wildcards"
     for dir in exclude_directories:
         args += " -e {dir}/* ".format(dir=dir)