Patchwork wpa-supplicant: fix breakage during rebuild

login
register
mail settings
Submitter Steve Sakoman
Date March 2, 2012, 7:58 p.m.
Message ID <1330718323-17978-1-git-send-email-steve@sakoman.com>
Download mbox | patch
Permalink /patch/22591/
State Accepted
Commit 857840472705af1c0fbb8db917b4bb6809b929a6
Headers show

Comments

Steve Sakoman - March 2, 2012, 7:58 p.m.
Install phase currently edits files in $S with sed. This causes breakage
if install is run a second time (due to sstate hash rebuild for example)

The result is hidden build breakage, in particular
/usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service now contains:

Exec=/usr/usr/sbin/wpa_supplicant -u

rather than:

Exec=/usr/sbin/wpa_supplicant -u

This patch does the sed edit after the files are copied to $D, which should be safe.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 .../wpa-supplicant/wpa-supplicant-0.7.inc          |    2 +-
 .../wpa-supplicant/wpa-supplicant_0.7.3.bb         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Richard Purdie - March 2, 2012, 10:36 p.m.
On Fri, 2012-03-02 at 11:58 -0800, Steve Sakoman wrote:
> Install phase currently edits files in $S with sed. This causes breakage
> if install is run a second time (due to sstate hash rebuild for example)
> 
> The result is hidden build breakage, in particular
> /usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service now contains:
> 
> Exec=/usr/usr/sbin/wpa_supplicant -u
> 
> rather than:
> 
> Exec=/usr/sbin/wpa_supplicant -u
> 
> This patch does the sed edit after the files are copied to $D, which should be safe.
> 
> Signed-off-by: Steve Sakoman <steve@sakoman.com>
> ---
>  .../wpa-supplicant/wpa-supplicant-0.7.inc          |    2 +-
>  .../wpa-supplicant/wpa-supplicant_0.7.3.bb         |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc
index 99317e4..539ab8c 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-0.7.inc
@@ -58,8 +58,8 @@  do_install () {
 	install -d ${D}/${sysconfdir}/dbus-1/system.d
 	install -m 644 ${S}/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d
 	install -d ${D}/${datadir}/dbus-1/system-services
-	sed -i -e s:${base_sbindir}:${sbindir}:g ${S}/dbus/*.service
 	install -m 644 ${S}/dbus/*.service ${D}/${datadir}/dbus-1/system-services
+	sed -i -e s:${base_sbindir}:${sbindir}:g ${D}/${datadir}/dbus-1/system-services/*.service
 
 	install -d ${D}/etc/default/volatiles
 	install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_0.7.3.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_0.7.3.bb
index 49f5482..c607fad 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_0.7.3.bb
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_0.7.3.bb
@@ -1,6 +1,6 @@ 
 require wpa-supplicant-0.7.inc
 
-PR = "r6"
+PR = "r7"
 
 SRC_URI[md5sum] = "f516f191384a9a546e3f5145c08addda"
 SRC_URI[sha256sum] = "d0cd50caa85346ccc376dcda5ed3c258eef19a93b3cade39d25760118ad59443"