diff mbox

[core] class/dupdate: add use flag to set run script name

Message ID 1380527472-21475-1-git-send-email-jabk@prevas.dk
State Accepted
Delegated to: Esben Haabendal
Headers show

Commit Message

Jacob Kjaergaard Sept. 30, 2013, 7:51 a.m. UTC
From: Jacob Kjaergaard <jacob@barsoekjaergaard.dk>

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

Comments

Esben Haabendal Oct. 14, 2013, 11:40 a.m. UTC | #1
Merged to master, thanks.

/Esben
diff mbox

Patch

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"