<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14120</bug_id>
          
          <creation_ts>2020-11-09 03:18:02 +0000</creation_ts>
          <short_desc>pkg_postinst_ontarget_${PN}</short_desc>
          <delta_ts>2022-01-21 22:16:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>3.1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.0 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Berger">pokylinux</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>alex.kanavin</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>88583</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Berger">pokylinux</who>
    <bug_when>2020-11-09 03:18:02 +0000</bug_when>
    <thetext>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&apos;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 &apos;ipkkeypub.gpg&apos;...
Importing keys from &apos;key-ipkkey.gpg&apos;...
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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88598</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-11-12 15:44:22 +0000</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88601</commentid>
    <comment_count>2</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2020-11-12 15:51:58 +0000</bug_when>
    <thetext>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&apos;t know if anyone ensured it happens at truly the &apos;right&apos; moment during boot, it is what it is. Patches welcome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90890</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-07-08 15:15:31 +0000</bug_when>
    <thetext>Robert, I assume that you won&apos;t have time to work on this so I&apos;ve moved it to unassigned.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92383</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2022-01-21 22:16:59 +0000</bug_when>
    <thetext>Closing as this is not a bug; if documentation needs adjustment, please submit the needed patches directly.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>