Message ID | 1417357142-14307-20-git-send-email-thomas.petazzoni@free-electrons.com |
---|---|
State | Accepted |
Headers | show |
Thomas, All, On 2014-11-30 15:18 +0100, Thomas Petazzoni spake thusly: > Also makes the installation of the init script unconditional. > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > --- > package/gpsd/gpsd.mk | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk > index 7dc27e8..5092b38 100644 > --- a/package/gpsd/gpsd.mk > +++ b/package/gpsd/gpsd.mk > @@ -206,10 +206,11 @@ define GPSD_INSTALL_TARGET_CMDS > $(SCONS) \ > $(GPSD_SCONS_OPTS) \ > install) > - if [ ! -f $(TARGET_DIR)/etc/init.d/S50gpsd ]; then \ > - $(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd; \ > - $(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd; \ > - fi > +endef > + > +define GPSD_INSTALL_INIT_SYSV > + $(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd > + $(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd Unrelated to your patch, but since the variable is a plural DEVICES, I would expect to be able to set more than one device. In this case, what is the format of this devices list? Is it comma-separated? If so, the sed expression above would break, no? (Cc-ing Simon and Gustavo, since they have contributed significantly to that package.) Anyway, since this is not a problem your patch is introducing, and it is just cleaning up the exisiting code: Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Regards, Yann E. MORIN. > endef > > define GPSD_INSTALL_STAGING_CMDS > -- > 2.1.0 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > Also makes the installation of the init script unconditional. > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Committed, thanks.
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes: >> +define GPSD_INSTALL_INIT_SYSV >> + $(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd >> + $(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd > Unrelated to your patch, but since the variable is a plural DEVICES, I > would expect to be able to set more than one device. In this case, what > is the format of this devices list? Is it comma-separated? If so, the > sed expression above would break, no? > (Cc-ing Simon and Gustavo, since they have contributed significantly to > that package.) I don't know gpsd, but judging from Config.in, S50gpsd and http://www.catb.org/gpsd/gpsd.html it looks to be space separated, so it should be OK (unless one of the words ends up with a comma).
diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk index 7dc27e8..5092b38 100644 --- a/package/gpsd/gpsd.mk +++ b/package/gpsd/gpsd.mk @@ -206,10 +206,11 @@ define GPSD_INSTALL_TARGET_CMDS $(SCONS) \ $(GPSD_SCONS_OPTS) \ install) - if [ ! -f $(TARGET_DIR)/etc/init.d/S50gpsd ]; then \ - $(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd; \ - $(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd; \ - fi +endef + +define GPSD_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd + $(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd endef define GPSD_INSTALL_STAGING_CMDS
Also makes the installation of the init script unconditional. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- package/gpsd/gpsd.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)