[Buildroot] [PATCH 1/1] package/collectd: fix netsnmp dependency handling

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sun Aug 11 13:03:48 UTC 2019


Hello Bernd,

On Sat, 10 Aug 2019 14:29:04 +0200
Bernd Kuhls <bernd.kuhls at t-online.de> wrote:

> diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk
> index 8eb7aa2ec0..ff36adaef3 100644
> --- a/package/collectd/collectd.mk
> +++ b/package/collectd/collectd.mk
> @@ -182,8 +182,10 @@ endif
>  ifeq ($(BR2_PACKAGE_MYSQL),y)
>  COLLECTD_CONF_OPTS += --with-libmysql=$(STAGING_DIR)/usr
>  endif
> -ifeq ($(BR2_PACKAGE_NETSNMP),y)
> +ifeq ($(BR2_PACKAGE_COLLECTD_SNMP),y)
>  COLLECTD_CONF_OPTS += --with-libnetsnmp=$(STAGING_DIR)/usr
> +else
> +COLLECTD_CONF_OPTS += --with-libnetsnmp=no
>  endif

We normally use --without-foo instead of --with-foo=no.

But more importantly, there is already a --without-snmp that is passed
when BR2_PACKAGE_COLLECTD_SNMP is disabled:

	$(if $(BR2_PACKAGE_COLLECTD_SNMP),--enable-snmp,--disable-snmp) \

Isn't that sufficient ?

Also, if the --disable-snmp isn't sufficient, then don't we have the
same problem for MySQL, PostgreSQL and a number of other dependencies ?

For example, for MySQL, we have in CONF_OPTS:

	$(if $(BR2_PACKAGE_COLLECTD_MYSQL),--enable-mysql,--disable-mysql) \

Then in DEPENDENCIES:

	$(if $(BR2_PACKAGE_COLLECTD_MYSQL),mysql) \

And later:

ifeq ($(BR2_PACKAGE_MYSQL),y)
COLLECTD_CONF_OPTS += --with-libmysql=$(STAGING_DIR)/usr
endif

So we have the exact same situation as SNMP.

Could you have a look into this ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list