Bug 14120 - pkg_postinst_ontarget_${PN}
Summary: pkg_postinst_ontarget_${PN}
Status: RESOLVED NOTABUG
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 3.1.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.0 M3
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-11-09 03:18 UTC by Robert Berger
Modified: 2022-01-21 22:16 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Berger 2020-11-09 03:18:02 UTC
When exactly is pkg_postinst_ontarget_${PN} executed on the target?

I would like to make sure that the time is correct (ntp service running and the time is right;)) and then it's executed.

Is the mechanism explained somewhere?

The only thing I find is this:

cat /var/log/postinstall.log 
Created gpg homedir
Importing keys from 'ipkkeypub.gpg'...
Importing keys from 'key-ipkkey.gpg'...
OK
gpg (GnuPG) 2.2.20-unknown; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Configuring sysvinit-inittab.
Configuring opkg-keyrings.
root@multi-v7-ml:/var/log# 

-----

with system-v init I see:

/etc/init.d/run-postinsts

-----

and this:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb

-----

start 99 S .

which looks like it some time at the end of the init scripts.

-----

This would mean that S99 after S20.

S20ntpd

Hmmm
Comment 1 Randy MacLeod 2020-11-12 15:44:22 UTC
There is no existing bug that we could find but ontarget is mentioned a few times (3?) in:
  https://docs.yoctoproject.org/singleindex.html

Robert, Could you and Alex agree on the text and submit a doc patch?
Comment 2 Alexander Kanavin 2020-11-12 15:51:58 UTC
I guess it should be enough to say that running postinsts on first boot is provided by the run-postinsts service (available both via systemd and sysvinut), and refer anyone wanting details to http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/run-postinsts

I don't know if anyone ensured it happens at truly the 'right' moment during boot, it is what it is. Patches welcome.
Comment 3 Randy MacLeod 2021-07-08 15:15:31 UTC
Robert, I assume that you won't have time to work on this so I've moved it to unassigned.
Comment 4 Alexander Kanavin 2022-01-21 22:16:59 UTC
Closing as this is not a bug; if documentation needs adjustment, please submit the needed patches directly.