From patchwork Wed Jul 10 12:21:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kjaergaard X-Patchwork-Id: 258036 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 4951F2C02C1 for ; Wed, 10 Jul 2013 22:21:25 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 0AAD03F84A for ; Wed, 10 Jul 2013 14:21:15 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by hugin.dotsrc.org (Postfix) with ESMTPS id 8E7433F84A for ; Wed, 10 Jul 2013 14:21:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=1110; q=dns/txt; s=ironport2; t=1373458873; x=1404994873; h=from:to:cc:subject:date:message-id:mime-version; bh=TUwyvnkNxv/ykxQjmfxbFEmPE0q5QTRAGvwDD0jtDVo=; b=KzorxZOpWdvToJ3D/2Q4M5IhIsJCEI+zzQCG3X0iwmPTwgBJgiNh5eJe irnCUDo/LlsrDfMXRlEZcr4WZNaQq7pp/Ja+wwRk/BgGAYz/z/+32EivP uoi4iEtTvqi7n9mJ6AKJr5V64+hEbWBSLneNtC0i7gGKM3IBtArcCPoP9 U=; X-IronPort-AV: E=Sophos;i="4.87,1036,1363129200"; d="scan'208";a="3018977" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 10 Jul 2013 14:21:12 +0200 Received: from arh116.prevas.se (172.16.11.7) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server (TLS) id 14.2.342.3; Wed, 10 Jul 2013 14:21:12 +0200 From: To: Subject: [PATCH] sysvinit: fix install hook. Date: Wed, 10 Jul 2013 14:21:09 +0200 Message-ID: <1373458869-16597-1-git-send-email-jabk@prevas.dk> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Originating-IP: [172.16.11.7] X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Jacob Kjaergaard previously init.d scripts should be installed prior to sysvinit do_install[postfunc] call. that could result in a race depending on implementation += or =+ in the individual recipes. That was error-prone! Now add sysvinit install as task after install before split to overcome this problem. --- classes/sysvinit.oeclass | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/sysvinit.oeclass b/classes/sysvinit.oeclass index c48987a..c4f449f 100644 --- a/classes/sysvinit.oeclass +++ b/classes/sysvinit.oeclass @@ -11,8 +11,8 @@ RDEPENDS_${PN}:>USE_sysvinit = " ${RDEPENDS_SYSVINIT}" CLASS_FLAGS += "sysvinit" -do_install[postfuncs] += "do_install_sysvinit" -python do_install_sysvinit () { +addtask do_install_sysvinit after do_install before do_split +def do_install_sysvinit(d): import os path = d.get("D") @@ -64,4 +64,5 @@ python do_install_sysvinit () { if os.path.exists(dst): os.remove(dst) os.symlink(src, dst) -} + +