Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEAA5CD98E2 for ; Wed, 17 Jun 2026 18:11:09 +0000 (UTC) Received: from cpanel10.indieserve.net (cpanel10.indieserve.net [199.212.143.9]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.1572.1781719859582390441 for ; Wed, 17 Jun 2026 11:10:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@crashcourse.ca header.s=default header.b=RxK5rT43; spf=pass (domain: crashcourse.ca, ip: 199.212.143.9, mailfrom: rpjday@crashcourse.ca) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crashcourse.ca; s=default; h=Content-Type:MIME-Version:Message-ID:Subject: To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=D7nDSn1tSrEbh6AU1aUZDprcxtrzVC5vr78E27Lrw+g=; b=RxK5rT43iPgn0ZHQGjvyR4qw27 VeHFuCdcrm/j693CGW5feRnZvo4DSXCp6jxeZavXet20AkxK1NbVCpZSW5QMMce9j6jr6Cf/+ugZF 46CLWOEgB1Omj5pHMGXK6gvop1QcbiKW1vQROYR57T9PlUjWzK0zCR75SMfXL76ilQKYeJlkqTDux 5BTLywG1CDvpFkJQm4XCSsSH/cLWcmUd2jq+tUq4JevD1UvJdMjobQn5NejoyOh9XcOYRND5TZsxs t/h9gdviRMdgrVGiraLAaN0uYKBQhwwSEk7/y9VkjZrFi2BzX0Yiv8PDmfFnJtCbreR/aaCw4ndgH lwP+bLmg==; Received: from pool-174-115-41-146.cpe.net.cable.rogers.com ([174.115.41.146]:44956 helo=trixie) by cpanel10.indieserve.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.4) (envelope-from ) id 1wZuj2-0000000A6g3-2tLp for docs@lists.yoctoproject.org; Wed, 17 Jun 2026 14:10:58 -0400 Date: Wed, 17 Jun 2026 14:10:49 -0400 (EDT) From: "Robert P. J. Day" To: YP docs mailing list Subject: some questions about pkg_postinst* scripts Message-ID: <7741ea2a-aecd-50a1-e1fb-5eb952a7d793@crashcourse.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel10.indieserve.net X-AntiAbuse: Original Domain - lists.yoctoproject.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - crashcourse.ca X-Get-Message-Sender-Via: cpanel10.indieserve.net: authenticated_id: rpjday+crashcourse.ca/only user confirmed/virtual account not confirmed X-Authenticated-Sender: cpanel10.indieserve.net: rpjday@crashcourse.ca X-Source: X-Source-Args: X-Source-Dir: List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 17 Jun 2026 18:11:09 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/9776 in an attempt to document *all* of the features of post-installation scripts (and prerm and so on), i've been reading the docs, and asking google, and looking at various examples in the OE code base, so i have the first of some questions so i can improve that subsection (which, i submit, really deserves to be a full section of the dev manual on its own, and not just a small part of the "new recipe" section). so ... first, if a recipe defines a "pkg_postinst:${PN}" script (or some related pkg_postinst:package script), that script will *always* be invoked on the build host when that package is added to the image during do_rootfs(), is that correct? ignore whether the script is not meant to run on the build host, or whether it checks ${D}, or whether it exits with a non-zero exit code ... leave all that to the side, is it true that it will always at least be *invoked*, regardless of its contents? what it does after being invoked we will leave until later. related to that, the only possibility for it to not be invoked on the build host at all is to define it as pkg_postinst_ontarget:package(), yes? let's start there. rday