FS#40672 - [network-manager-applet] consider splitting libnm-gtk.so*

Attached to Project: Arch Linux
Opened by Andrew (abrouwers) - Wednesday, 04 June 2014, 02:31 GMT
Last edited by Jan Alexander Steffens (heftig) - Wednesday, 09 July 2014, 19:14 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Unless I'm misunderstanding, it seems that nm-applet is an optional dep in gnome-shell (adding some additional functionality), and g-c-c too only uses the libnm shared library.

To avoid installing nm-applet (which is autoloaded), could it be considered to split out the library, similar to what was done with modemmanager? This seems to be a popular solution in fedora and debian, at least, and would reduce the number of processes that load with gnome.
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Wednesday, 09 July 2014, 19:14 GMT
Reason for closing:  Implemented
Comment by Andrew (abrouwers) - Wednesday, 04 June 2014, 11:21 GMT
Sorry, a little vague above; I meant g-shell only uses libnm-*.so from networkmanager, and g-c-c uses the same, but also libnm-gtk* from network-manager-applet.

[ajb@thinkpad ~]$ ldd /usr/bin/gnome-shell | grep libnm
libnm-util.so.2 => /usr/lib/libnm-util.so.2 (0x00007f8315372000)
libnm-glib.so.4 => /usr/lib/libnm-glib.so.4 (0x00007f8315133000)
[ajb@thinkpad ~]$
[ajb@thinkpad ~]$ ldd /usr/bin/gnome-control-center | grep libnm
libnm-glib-vpn.so.1 => /usr/lib/libnm-glib-vpn.so.1 (0x00007f3eb1ca6000)
libnm-gtk.so.0 => /usr/lib/libnm-gtk.so.0 (0x00007f3eb1a7a000)
libnm-util.so.2 => /usr/lib/libnm-util.so.2 (0x00007f3eb1816000)
libnm-glib.so.4 => /usr/lib/libnm-glib.so.4 (0x00007f3eb15d7000)
Comment by Andrew (abrouwers) - Thursday, 05 June 2014, 02:20 GMT
OK, it's my first split PKGBUILD, but I think I got this correct! The packages build well, and I also rebuilt g-c-c (changing the dep to libnm-gtk) + g-shell (again depending on libnm-gtk, with network-manager-applet as an optdepends).

Restarting g-shell works correctly after removing network-manager-applet. Makes the install footprint slightly smaller, including less memory being loaded for the common use case.
Comment by Andrew (abrouwers) - Wednesday, 09 July 2014, 18:30 GMT
I tested with NM 0.9.10 , and everything still works really well, splitting out the library actually used by g-shell / gnome-control-center.
Comment by Jan Alexander Steffens (heftig) - Wednesday, 09 July 2014, 18:36 GMT
To be honest I'd rather patch nm-applet's desktop file not to load in GNOME.
Comment by Andrew (abrouwers) - Wednesday, 09 July 2014, 18:56 GMT
Ah, interesting idea. I originally suggested the split, as it seems popular among other distros (granted, the distros that typically split out libraries).
Comment by Jan Alexander Steffens (heftig) - Wednesday, 09 July 2014, 19:14 GMT
Split out the library for now. Might revisit the NotShowIn stuff, but MATE might be pretending to be GNOME, and there the applet is still needed.

Loading...