From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH v2 2/2] classes/package_rpm: streamline the logic in one of the condition blocks
Date: Thu, 1 Feb 2024 10:15:04 +0100 [thread overview]
Message-ID: <20240201091504.1944076-2-alex@linutronix.de> (raw)
In-Reply-To: <20240201091504.1944076-1-alex@linutronix.de>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
meta/classes-global/package_rpm.bbclass | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass
index 45ac138084b..3743be8c821 100644
--- a/meta/classes-global/package_rpm.bbclass
+++ b/meta/classes-global/package_rpm.bbclass
@@ -243,13 +243,11 @@ python write_specfile () {
p = path + '/' + dir
# All packages own the directories their files are in...
target.append(get_attr(dir) + '%dir "' + escape_chars(p) + '"')
- else:
+ elif path:
# packages own only empty directories or explict directory.
# This will prevent the overlapping of security permission.
attr = get_attr(path)
- if path and not files and not dirs:
- target.append(attr + '%dir "' + escape_chars(path) + '"')
- elif path and path in dirfiles:
+ if (not files and not dirs) or path in dirfiles:
target.append(attr + '%dir "' + escape_chars(path) + '"')
for file in files:
--
2.39.2
prev parent reply other threads:[~2024-02-01 9:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 9:15 [PATCH v2 1/2] classes/package_rpm: additionally escape \ and " in filenames Alexander Kanavin
2024-02-01 9:15 ` Alexander Kanavin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240201091504.1944076-2-alex@linutronix.de \
--to=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox