diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2024-11-07 18:55:47 -0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-11-12 23:19:50 +0000 |
commit | 7c78f4ef96020b702c027d179895c9f97179b4fc (patch) | |
tree | 0fe52377c5cd29216d0b6323c01668458583d68a | |
parent | 7bba250fd35409339c4349cc4fb82fe5a47ea872 (diff) | |
download | meta-virtualization-7c78f4ef96020b702c027d179895c9f97179b4fc.tar.gz |
libvirt: set USERADD_DEPENDS to avoid package_write_rpm failure
When do_package uses state cache and is not re-run but do_package_write_rpm
is re-run, then we get the following error:
Exception: KeyError: 'getpwuid(): uid not found: 996'
This is because libvirt does chown to polkitd in do_install and polkitd
is from polkit.
Here's an easy way to reproduce this issue:
bitbake libvirt -c cleansstate && bitbake libvirt -c package && \
bitbake libvirt -c clean && bitbake libvirt -c package_write_rpm
So make use of USERADD_DEPENDS to ensure polkitd exists to fix this issue.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-extended/libvirt/libvirt_10.0.0.bb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt_10.0.0.bb b/recipes-extended/libvirt/libvirt_10.0.0.bb index a33b6980..22193ff3 100644 --- a/recipes-extended/libvirt/libvirt_10.0.0.bb +++ b/recipes-extended/libvirt/libvirt_10.0.0.bb | |||
@@ -11,6 +11,8 @@ DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux | |||
11 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)} \ | 11 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)} \ |
12 | ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', 'gnutls-native', '', d)}" | 12 | ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', 'gnutls-native', '', d)}" |
13 | 13 | ||
14 | USERADD_DEPENDS = "${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'polkit', '', d)}" | ||
15 | |||
14 | # libvirt-guests.sh needs gettext.sh | 16 | # libvirt-guests.sh needs gettext.sh |
15 | # | 17 | # |
16 | RDEPENDS:${PN} = "gettext-runtime" | 18 | RDEPENDS:${PN} = "gettext-runtime" |