diff mbox series

[2/2] package/libglib2: Do not depend on util-linux

Message ID 20190916191605.86764-2-aduskett@gmail.com
State Accepted
Headers show
Series [1/2] package/libglib2: bump to version 2.62.0 | expand

Commit Message

Adam Duskett Sept. 16, 2019, 7:16 p.m. UTC
From: Adam Duskett <Aduskett@gmail.com>

libglib2 needs util-linux only for libmount, which is a configuration option.
Instead, check if util-linux-libmount is selected, and if so, set the option
to true.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
 package/libglib2/Config.in   |  2 --
 package/libglib2/libglib2.mk | 10 +++++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

Comments

Thomas Petazzoni Sept. 17, 2019, 8:02 p.m. UTC | #1
On Mon, 16 Sep 2019 12:16:05 -0700
aduskett@gmail.com wrote:

> From: Adam Duskett <Aduskett@gmail.com>
> 
> libglib2 needs util-linux only for libmount, which is a configuration option.
> Instead, check if util-linux-libmount is selected, and if so, set the option
> to true.
> 
> Signed-off-by: Adam Duskett <Aduskett@gmail.com>
> ---
>  package/libglib2/Config.in   |  2 --
>  package/libglib2/libglib2.mk | 10 +++++++++-
>  2 files changed, 9 insertions(+), 3 deletions(-)

Applied to master, thanks. This may cause problems for people who
currently needed libmount, but do not have anything else in their
configuration that selects util-linux libmount option. Their next
Buildroot build will silently no longer have libmount support.

However, we don't really have a good way to handle such dependencies
that used to be mandatory and become optional, so there's not much we
can do about it.

We might however see a few build issues from reverse dependencies of
libglib2 that do need libmount. Such reverse dependencies will have to
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT by themselves.

Thomas
Carlos Santos Sept. 17, 2019, 8:32 p.m. UTC | #2
On Tue, Sep 17, 2019 at 5:02 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Mon, 16 Sep 2019 12:16:05 -0700
> aduskett@gmail.com wrote:
>
> > From: Adam Duskett <Aduskett@gmail.com>
> >
> > libglib2 needs util-linux only for libmount, which is a configuration option.
> > Instead, check if util-linux-libmount is selected, and if so, set the option
> > to true.
> >
> > Signed-off-by: Adam Duskett <Aduskett@gmail.com>
> > ---
> >  package/libglib2/Config.in   |  2 --
> >  package/libglib2/libglib2.mk | 10 +++++++++-
> >  2 files changed, 9 insertions(+), 3 deletions(-)
>
> Applied to master, thanks. This may cause problems for people who
> currently needed libmount, but do not have anything else in their
> configuration that selects util-linux libmount option. Their next
> Buildroot build will silently no longer have libmount support.
>
> However, we don't really have a good way to handle such dependencies
> that used to be mandatory and become optional, so there's not much we
> can do about it.
>
> We might however see a few build issues from reverse dependencies of
> libglib2 that do need libmount. Such reverse dependencies will have to
> select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT by themselves.

Yet another candidate to depend on the impending util-linux-libs.
Thomas Petazzoni Sept. 17, 2019, 9:23 p.m. UTC | #3
On Tue, 17 Sep 2019 17:32:03 -0300
Carlos Santos <unixmania@gmail.com> wrote:

> > Applied to master, thanks. This may cause problems for people who
> > currently needed libmount, but do not have anything else in their
> > configuration that selects util-linux libmount option. Their next
> > Buildroot build will silently no longer have libmount support.
> >
> > However, we don't really have a good way to handle such dependencies
> > that used to be mandatory and become optional, so there's not much we
> > can do about it.
> >
> > We might however see a few build issues from reverse dependencies of
> > libglib2 that do need libmount. Such reverse dependencies will have to
> > select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT by themselves.  
> 
> Yet another candidate to depend on the impending util-linux-libs.

Indeed, but I don't see how util-linux-libs would have helped handling
"legacy" configurations in the transition from util-linux-libs being a
mandatory dependency to util-linux-libs becoming an optional
dependency. But I could be missing something here, it's getting late
for me.

Thomas
Arnout Vandecappelle Sept. 17, 2019, 9:50 p.m. UTC | #4
On 17/09/2019 22:02, Thomas Petazzoni wrote:
> On Mon, 16 Sep 2019 12:16:05 -0700
> aduskett@gmail.com wrote:
> 
>> From: Adam Duskett <Aduskett@gmail.com>
>>
>> libglib2 needs util-linux only for libmount, which is a configuration option.
>> Instead, check if util-linux-libmount is selected, and if so, set the option
>> to true.
>>
>> Signed-off-by: Adam Duskett <Aduskett@gmail.com>
>> ---
>>  package/libglib2/Config.in   |  2 --
>>  package/libglib2/libglib2.mk | 10 +++++++++-
>>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> Applied to master, thanks. This may cause problems for people who
> currently needed libmount, but do not have anything else in their
> configuration that selects util-linux libmount option. Their next
> Buildroot build will silently no longer have libmount support.

 Begging to differ: when bumping Buildroot version, you should *always* use a
full config, not a defconfig. So libmount will remain selected.

 Regards,
 Arnout

> However, we don't really have a good way to handle such dependencies
> that used to be mandatory and become optional, so there's not much we
> can do about it.
> 
> We might however see a few build issues from reverse dependencies of
> libglib2 that do need libmount. Such reverse dependencies will have to
> select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT by themselves.
> 
> Thomas
>
Thomas Petazzoni Sept. 18, 2019, 7:04 a.m. UTC | #5
On Tue, 17 Sep 2019 23:50:33 +0200
Arnout Vandecappelle <arnout@mind.be> wrote:

> > Applied to master, thanks. This may cause problems for people who
> > currently needed libmount, but do not have anything else in their
> > configuration that selects util-linux libmount option. Their next
> > Buildroot build will silently no longer have libmount support.  
> 
>  Begging to differ: when bumping Buildroot version, you should *always* use a
> full config, not a defconfig. So libmount will remain selected.

Indeed, with a full config, it will be preserved. But I'm pretty sure
lots of people have a defconfig, and use that across a Buildroot
upgrade.

Thomas
diff mbox series

Patch

diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in
index ea946ba05e..31f3649c75 100644
--- a/package/libglib2/Config.in
+++ b/package/libglib2/Config.in
@@ -7,8 +7,6 @@  config BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_LIBFFI
 	select BR2_PACKAGE_PCRE
 	select BR2_PACKAGE_PCRE_UCP
-	select BR2_PACKAGE_UTIL_LINUX
-	select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
 	select BR2_PACKAGE_ZLIB
 	help
 	  Low-level core library that forms the basis of GTK+ and GNOME.
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 5183331c8d..1d5562e017 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -33,7 +33,7 @@  HOST_LIBGLIB2_CONF_OPTS = \
 
 LIBGLIB2_DEPENDENCIES = \
 	host-pkgconf host-libglib2 \
-	libffi pcre util-linux zlib $(TARGET_NLS_DEPENDENCIES)
+	libffi pcre zlib $(TARGET_NLS_DEPENDENCIES)
 
 HOST_LIBGLIB2_DEPENDENCIES = \
 	host-gettext \
@@ -80,6 +80,14 @@  define LIBGLIB2_REMOVE_GDB_FILES
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
+LIBGLIB2_CONF_OPTS += -Dlibmount=true
+LIBGLIB2_DEPENDENCIES += util-linux
+else
+LIBGLIB2_CONF_OPTS += -Dlibmount=false
+endif
+
+
 # Purge useless binaries from target
 define LIBGLIB2_REMOVE_DEV_FILES
 	rm -rf $(TARGET_DIR)/usr/lib/glib-2.0