Skip to contentSkip to conversation

docbook-utils-native: Fix re-execution of the unpack task

PATCH New Richard Purdie 1 participant 1 message Apr 16, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docbook-utils-native: Fix re-execution of the unpack task

If the do_unpack task is re-executed, the sed_done stamp was not removed, the sed commands wouldn't re-run and the build would fail in do_compile. This patch ensures the stamp is in ${S} and that we clean that directory when unpack runs so it is a build from sctatch at that point.

[YOCTO #2194]

---

meta/recipes-devtools/docbook-utils/docbook-utils-native_0.6.14.bb +3 -2
index 2a89479..5e1384d 100644
@@ -21,16 +21,17 @@ inherit autotools native
 
 do_configure_prepend() {
 	# Fix hard-coded references to /etc/sgml
-	if [ ! -e ${WORKDIR}/.sed_done ]; then
+	if [ ! -e ${S}/.sed_done ]; then
 		sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" bin/jw.in
 		sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" doc/man/Makefile.am
 		sed -i -e "s|/etc/sgml|${sysconfdir}/sgml|g" doc/HTML/Makefile.am
 
 		# Point jw to the native sysroot catalog
 		sed -i -e 's|^SGML_EXTRA_CATALOGS=""|SGML_EXTRA_CATALOGS=":${sysconfdir}/sgml/catalog"|g' bin/jw.in
-		touch ${WORKDIR}/.sed_done
+		touch ${S}/.sed_done
 	fi
 }
+do_unpack[cleandirs] += "${S}"
 
 do_install() {
 	install -d ${D}${bindir}