Received: from cpanel7.indieserve.net (cpanel7.indieserve.net [199.212.143.8]) by mx.groups.io with SMTP id smtpd.web12.604.1586274451427044872 for ; Tue, 07 Apr 2020 08:47:31 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: crashcourse.ca, ip: 199.212.143.8, mailfrom: rpjday@crashcourse.ca) Received: from cpeac202e043973-cmac202e043970.sdns.net.rogers.com ([174.114.100.179]:51570 helo=localhost.localdomain) by cpanel7.indieserve.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jLqRl-0014aB-UK for openembedded-core@lists.openembedded.org; Tue, 07 Apr 2020 11:47:30 -0400 Date: Tue, 7 Apr 2020 11:47:27 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: OE Core mailing list Subject: why two pkg_postinst-${PN} routines in quagga.inc? Message-ID: MIME-Version: 1.0 X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel7.indieserve.net X-AntiAbuse: Original Domain - lists.openembedded.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - crashcourse.ca X-Get-Message-Sender-Via: cpanel7.indieserve.net: authenticated_id: rpjday+crashcourse.ca/only user confirmed/virtual account not confirmed X-Authenticated-Sender: cpanel7.indieserve.net: rpjday@crashcourse.ca X-Source: X-Source-Args: X-Source-Dir: Content-Type: text/plain; charset=US-ASCII wanted to expand on the explanation of post-install scripts using examples out of OE/YP layers, and ran across this oddity in meta-openembedded/meta-networking, in quagga.inc. here's what's at line 146: pkg_postinst_${PN} () { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then if [ -n "$D" ]; then OPTS="--root=$D" fi systemctl $OPTS mask quagga.service fi } but here's what's further down at line 204: pkg_postinst_${PN} () { if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then ${sysconfdir}/init.d/populate-volatile.sh update fi } where the second definition appears to override the first one. is there some magic regarding defining two pkg_postinst() routines for the same package? or is that just an oversight? rday