Skip to contentSkip to conversation

libvirt: do not defer postinstall to first boot when not necessary

PATCH In review Chen Qi 2 participants 2 messages Oct 16, 2018

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH v2 1/1 libvirt: do not defer postinstall to first boot when not necessary

The postinstall invokes `/etc/init.d/populate-volatile.sh update'. This is only useful for an on-target package upgrade. For now, this postinstall in libvirt has already got a check against $D to tell whether it's running on target or not, we do not need to use pkg_postinstall_ontarget. Otherwise, we get unnecessary postinstall deferred to first boot, which is not what we want.

Note that the postinstall was originally written as 'pkg_postinstall_${PN}', but was incorrectly modified to be 'pkg_postinstall_ontarget_${PN}' by the following commit.

"""
commit 1e67a44db7ec87617455b3228ee5237ceb037173
Author: He Zhe <[email protected]>
Date: Tue Jul 24 05:50:01 2018 -0700

libvirt: Remove unsupported configure options and fix warning

[snip]
"""

I think the warning about deferred postinstall was caused by some bbappend file instead of the main recipe in this layer.

---
 recipes-extended/libvirt/libvirt_4.7.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-extended/libvirt/libvirt_4.7.0.bb +1 -1
index 47275ae..ecccfee 100644
@@ -311,7 +311,7 @@ do_install_ptest() {
 	done
 }
 
-pkg_postinst_ontarget_${PN}() {
+pkg_postinst_${PN}() {
         if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
                 /etc/init.d/populate-volatile.sh update
         fi
Signature · 1 line
2.7.4
#1 lore raw

v2 is merged.

Bruce

Quoted 51 lines · Chen Qi

The postinstall invokes `/etc/init.d/populate-volatile.sh update'. This is only useful for an on-target package upgrade. For now, this postinstall in libvirt has already got a check against $D to tell whether it's running on target or not, we do not need to use pkg_postinstall_ontarget. Otherwise, we get unnecessary postinstall deferred to first boot, which is not what we want.

Note that the postinstall was originally written as 'pkg_postinstall_${PN}', but was incorrectly modified to be 'pkg_postinstall_ontarget_${PN}' by the following commit.

"""
commit 1e67a44db7ec87617455b3228ee5237ceb037173
Author: He Zhe <[email protected]>
Date: Tue Jul 24 05:50:01 2018 -0700

libvirt: Remove unsupported configure options and fix warning

[snip]
"""

I think the warning about deferred postinstall was caused by some bbappend file instead of the main recipe in this layer.

---
 recipes-extended/libvirt/libvirt_4.7.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-extended/libvirt/libvirt_4.7.0.bb +1 -2
index 47275ae..ecccfee 100644
@@ -311,7 +311,7 @@ do_install_ptest() {
        done
 }
 
-pkg_postinst_ontarget_${PN}() {
+pkg_postinst_${PN}() {
         if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
                 /etc/init.d/populate-volatile.sh update
         fi
--

2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"