Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 488690 - x11-libs/libnotify is useless without notification-daemon
Summary: x11-libs/libnotify is useless without notification-daemon
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-20 08:32 UTC by Jesús Guerrero Botella (RETIRED)
Modified: 2013-10-20 10:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesús Guerrero Botella (RETIRED) gentoo-dev 2013-10-20 08:32:55 UTC
I have used libnotify's notify-send in the past for some purposes.

Today, while trying to hack something to notify me on low battery (it's about time to change my battery, but you know...) I noticed that this tool no longer works.

Googling a bit revealed that at some point someone decided that the notification daemon should be split from libnotify, the problem with that is that the notify-send command stopped working, unless you manually install and run x11-misc/notification-daemon

I am not sure what the best way to handle this would be. I'd suggest either pulling it unconditionally as a dependency or at least, print some ewarn or something and offer a "daemon" use flag which should be enabled by default.



Reproducible: Always

Steps to Reproduce:
1. emerge libnotify and make sure notification-daemon is NOT installed
2. try notify-send something
3. it does nothing and it doesn't even error out
Actual Results:  
The tool doesn't work at all.

Expected Results:  
The tool should put a nice notification on your screen.

I guess libnotify is still useful for programmers this way, but users would expect that the notify-send command worked out of the box. That's the whole purpose of having a package manager that can resolve dependencies...
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2013-10-20 08:38:10 UTC
The ebuild already has a depend on virtual/notification-daemon
And desktops like GNOME and KDE have internal notification-daemons and don't require anything extra, so they are included in the virtual
There is no way to force user to *run* one of them, that's completely up to the user, like you
There is no bug here
Comment 2 Jesús Guerrero Botella (RETIRED) gentoo-dev 2013-10-20 08:47:21 UTC
Then it's strange, I am seeing the PDEPEND in the ebuild right now, but the certain thing is that I've had libnotify installed for ages, and, until five minutes ago, I had NOT installed virtual/notification-daemon, nor x11-misc/notification-daemon in my system.

I update regularly, I am not installing any of these from an overlay, and I certainly have all my dependency tree resolved and clean. Any idea on what can have happened here?

I am not familiar with PDEPEND, I have no idea if that's what's causing this hitch, but, certainly, something IS happening here.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2013-10-20 09:00:04 UTC
(In reply to Jesús Guerrero from comment #2)
> Then it's strange, I am seeing the PDEPEND in the ebuild right now, but the
> certain thing is that I've had libnotify installed for ages, and, until five
> minutes ago, I had NOT installed virtual/notification-daemon, nor
> x11-misc/notification-daemon in my system.
> 
> I update regularly, I am not installing any of these from an overlay, and I
> certainly have all my dependency tree resolved and clean. Any idea on what
> can have happened here?
> 
> I am not familiar with PDEPEND, I have no idea if that's what's causing this
> hitch, but, certainly, something IS happening here.

You might have one of the other providers installed, like for example kde-base/knotify or gnome-base/gnome-shell
And then if you run eg. Xfce, fluxbox or whatever else, nothing is pulled in, because knotify and gnome-shell are notification agents themself

It's outside of the scope of package maintainer to check what you actually *run*

Please note that notification-daemon installs Gentoo specific DBUS file that makes it autostart, even if user doesn't start it, and this is not supported by upstream. Otherwise it would also work in a way you'd have to run it yourself, or let the desktop run it using the /etc/xdg autostart .desktop file
I will propably be removing the DBUS file once GNOME 3.8+ has been stabilized altogether since it should be only the job of the desktop to run whatever it needs, not any magical autostart you seem to rely upon
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2013-10-20 09:00:26 UTC
(In reply to Samuli Suominen from comment #3)
> It's outside of the scope of package maintainer to check what you actually
> *run*

*package manager :-)
Comment 5 Jesús Guerrero Botella (RETIRED) gentoo-dev 2013-10-20 09:07:19 UTC
I use openbox, there's no big desktop here, so no other provider. No login manager either, because mingetty

In any case, the point still stands: why has virtual/notification-daemon not been pulled into my system, being a PDEPEND? If you say that there's no problem in that, then I'll take your word for it; but I can't say I understand the logic in there because I do not.

I can understand that, if the virtual is installed, then there's a provider and nothing else needs to be installed. But in my case this PDEPEND was not fulfilled, and still nothing was pulled as a dependency.

That is, unless I am not understanding what a PDEPEND is at all, which could perfectly be the case...
Comment 6 Jesús Guerrero Botella (RETIRED) gentoo-dev 2013-10-20 09:08:00 UTC
> because mingetty

*besides mingetty
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2013-10-20 09:39:35 UTC
(In reply to Jesús Guerrero from comment #5)
> I use openbox, there's no big desktop here, so no other provider. No login
> manager either, because mingetty
> 
> In any case, the point still stands: why has virtual/notification-daemon not
> been pulled into my system, being a PDEPEND? If you say that there's no
> problem in that, then I'll take your word for it; but I can't say I
> understand the logic in there because I do not.

PDEPEND is always pulled in 'anytime after' libnotify in the depgraph:

ssuominen@null ~/gentoo-x86/sys-power/cpupower $ sudo emerge -pv xfce4-notifyd

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R    ] xfce-extra/xfce4-notifyd-0.2.4  USE="-debug" 354 kB
[nomerge       ]  x11-libs/libnotify-0.7.6  USE="introspection {-test}" 
[ebuild  N     ]   virtual/notification-daemon-0  USE="-gnome" 0 kB
[ebuild  N     ]  x11-libs/libnotify-0.7.6  USE="introspection {-test}" 274 kB

Total: 3 packages (2 new, 1 reinstall), Size of downloads: 627 kB
ssuominen@null ~/gentoo-x86/sys-power/cpupower $ sudo emerge -pv libnotify

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild  N     ] x11-libs/libnotify-0.7.6  USE="introspection {-test}" 274 kB
[ebuild  N     ]  virtual/notification-daemon-0  USE="-gnome" 0 kB

Total: 2 packages (2 new), Size of downloads: 274 kB
ssuominen@null ~/gentoo-x86/sys-power/cpupower $ 

If you are saying your package manager is broken and is ignoring PDEPEND, then by all means, reopen the bug and let the bug go to the package manager maintainers
Comment 8 Jesús Guerrero Botella (RETIRED) gentoo-dev 2013-10-20 10:22:08 UTC
Well, let's see. I uninstalled again notification-daemon, the virtual and the actual thing as well.

Now, I do this, and it works like in your case:

# emerge -pv libnotify                                                

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] virtual/notification-daemon-0  USE="-gnome" 0 kB
[ebuild   R    ] x11-libs/libnotify-0.7.5-r1  USE="introspection -doc {-test}" 0 kB

Total: 2 packages (1 new, 1 reinstall), Size of downloads: 0 kB

It turns out that I have awesome installed, even though I don't use it. Since that package fulfils the virtual, now I understand why nothing else is being pulled. Not that that will help me though... But it works the way it's designed. Yes.

Still, an ewarn in virtual/notification-daemon with a brief note telling that "if you don't use any of {.....} you should install || (foo bar moo cow) to get notifications to actually work" would be nice. So, the time the virtual is pulled, you will at least know how to proceed if you are not a gnome user ;)

We already give similar recommendations in some other ebuilds.

Thank you and sorry for all the noise. :)