diff options
| author | Koen Kooi <koen.kooi@oss.qualcomm.com> | 2025-09-09 13:24:48 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-11 11:31:55 +0100 |
| commit | b73418195246565de33b94ca24288f1c2da1b22b (patch) | |
| tree | 5c88a18b7ebdb5e6b83fc64e7c9d9bd7443248b6 | |
| parent | b499241d85eddc4a0790e6ba7f273a264ac6aa52 (diff) | |
| download | poky-b73418195246565de33b94ca24288f1c2da1b22b.tar.gz | |
systemd: change pni-names logic to something less confusing
Using bb.utils.contains in negative logic leads to either overly verbose
or plain confusing code, so harness the power of Ross and Antonin to
make this less verbose and slightly clearer.
This moves the negative logic from the inline python ('true if not') to
bash ('if !').
(From OE-Core rev: 52ea4612f9262a9e607fb3eee08906ec687197ee)
Signed-off-by: Koen Kooi <koen.kooi@oss.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/systemd/systemd_257.8.bb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd_257.8.bb b/meta/recipes-core/systemd/systemd_257.8.bb index 6399c57640..549eb7fb29 100644 --- a/meta/recipes-core/systemd/systemd_257.8.bb +++ b/meta/recipes-core/systemd/systemd_257.8.bb | |||
| @@ -401,7 +401,7 @@ do_install() { | |||
| 401 | fi | 401 | fi |
| 402 | 402 | ||
| 403 | # Actively disable Predictable Network Interface Names | 403 | # Actively disable Predictable Network Interface Names |
| 404 | if ${@ 'true' if not bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d) else 'false'}; then | 404 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then |
| 405 | sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link | 405 | sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link |
| 406 | fi | 406 | fi |
| 407 | } | 407 | } |
