From patchwork Mon Sep 30 07:51:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Kjaergaard X-Patchwork-Id: 278936 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 E69A52C0097 for ; Mon, 30 Sep 2013 17:51:20 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 890C53FA48 for ; Mon, 30 Sep 2013 09:51:18 +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 9ABE83FA48 for ; Mon, 30 Sep 2013 09:51:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=1579; q=dns/txt; s=ironport2; t=1380527475; x=1412063475; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=tGrUP9uZhjYF8KMmkRF5k809JNveq9z3I384ELMnVXU=; b=Nc/hOFN/RhNszM/L8uCVJVmLXGC3aW31uxzUEle/bQXUsiBTGMTI1aqP vFGHx6zf5R29VrpjnWVt1f2Le6R/fkilS7X7cFaqDMtrMJWhZRdRJCRZC bhRW6aAY5qV2Hx995xzPYPwoFAGN2DYmDg2tevtc3jUYNH4CvOAQKyr0j 8=; X-IronPort-AV: E=Sophos;i="4.90,1006,1371074400"; d="scan'208";a="3699112" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 30 Sep 2013 09:51:15 +0200 Received: from arh116.prevas.se (172.16.11.2) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server (TLS) id 14.2.347.0; Mon, 30 Sep 2013 09:51:14 +0200 From: To: Subject: [core] class/dupdate: add use flag to set run script name Date: Mon, 30 Sep 2013 09:51:12 +0200 Message-ID: <1380527472-21475-1-git-send-email-jabk@prevas.dk> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.16.11.2] Cc: Jacob Kjaergaard 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 Hi, this adds useflags to set the executable of dupdate which may differ from recipe to recipe. Backward compability is maintained through default settings. -Jacob --- classes/dupdate-image.oeclass | 8 +++++--- conf/dupdate.conf | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 conf/dupdate.conf \ No newline at end of file diff --git a/classes/dupdate-image.oeclass b/classes/dupdate-image.oeclass index be47976..0fe8b3a 100644 --- a/classes/dupdate-image.oeclass +++ b/classes/dupdate-image.oeclass @@ -19,6 +19,8 @@ CLASS_FLAGS += "dupdate_script dupdate_version" DEFAULT_USE_dupdate_script = "" DEFAULT_USE_dupdate_version = "" +require conf/dupdate.conf + do_install[postfuncs] += "do_install_dupdate_image" do_install_dupdate_image () { install -m 664 ${B}/${IMAGE_BASENAME}${DUPDATE_IMAGE_EXT} ${D}/ @@ -44,9 +46,9 @@ do_rstage_dupdate_version[dirs] = "${RSTAGE_DIR}" do_rstage_dupdate_script () { script="${USE_dupdate_script}" - if [ "$script" != "run_update.sh" ] ; then - mv $script run_update.sh - fi + if [ "$script" != "${USE_dupdate_exefile}" ] ; then + mv $script ${USE_dupdate_exefile} + fi } do_rstage_dupdate_script[dirs] = "${RSTAGE_DIR}" diff --git a/conf/dupdate.conf b/conf/dupdate.conf new file mode 100644 index 0000000..c8d4162 --- /dev/null +++ b/conf/dupdate.conf @@ -0,0 +1,2 @@ +RECIPE_FLAGS += "dupdate_exefile" +DEFAULT_USE_dupdate_exefile = "run_update.sh"