summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2024-02-01 10:15:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-08 10:53:13 +0000
commit57d82f92c1060c5f15072f5d266dbac11665ae26 (patch)
treefe8d1d4ee1557cc0389222de1eece9ca501253e6 /meta/classes-global
parenteda2fe2ac0e123541e1282deef365d20bb2a0914 (diff)
downloadpoky-57d82f92c1060c5f15072f5d266dbac11665ae26.tar.gz
classes/package_rpm: streamline the logic in one of the condition blocks
(From OE-Core rev: e6a8ca554509c0edf9fd36ced88165dc3caf0e87) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r--meta/classes-global/package_rpm.bbclass6
1 files changed, 2 insertions, 4 deletions
diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass
index 45ac138084..3743be8c82 100644
--- a/meta/classes-global/package_rpm.bbclass
+++ b/meta/classes-global/package_rpm.bbclass
@@ -243,13 +243,11 @@ python write_specfile () {
243 p = path + '/' + dir 243 p = path + '/' + dir
244 # All packages own the directories their files are in... 244 # All packages own the directories their files are in...
245 target.append(get_attr(dir) + '%dir "' + escape_chars(p) + '"') 245 target.append(get_attr(dir) + '%dir "' + escape_chars(p) + '"')
246 else: 246 elif path:
247 # packages own only empty directories or explict directory. 247 # packages own only empty directories or explict directory.
248 # This will prevent the overlapping of security permission. 248 # This will prevent the overlapping of security permission.
249 attr = get_attr(path) 249 attr = get_attr(path)
250 if path and not files and not dirs: 250 if (not files and not dirs) or path in dirfiles:
251 target.append(attr + '%dir "' + escape_chars(path) + '"')
252 elif path and path in dirfiles:
253 target.append(attr + '%dir "' + escape_chars(path) + '"') 251 target.append(attr + '%dir "' + escape_chars(path) + '"')
254 252
255 for file in files: 253 for file in files: