Free Software and Linux should not be a choose-your-own-adventure game
Fairly recently, I ran out of disk space. If you're a developer, especially one who uses things like JHBuild, virtualization, etc. - this has almost certainly happened to you. The consequences are pretty unpleasant (search for disk space in the GNOME bugzilla).
This got me to wondering - why the heck didn't GNOME have a low disk space notification? This morning I decided to look into that. Certainly a patch would be not more than 100 lines to do a libnotify notification, along with an action to say empty your trash.
It turns out that I (and at least Fedora) had been victim of two things. 1) autoconf 2) GNOME release policy.
What happened of course is that the code exists - it was just conditional on libnotify-devel being installed. From the Fedora gnome-volume-manager build log:
checking for NOTIFY... no
So the the support wasn't being compiled in, for who knows how long. I just fixed this for Rawhide, but we need to stop thinking of Linux as a source of random bits that you can put together optionally, and instead think of it as one unified stack. That means if you're a software maintainer - your check should not be if (have_libnotify_h), but instead if (linux) { require(libnotify_h) }. GNOME release policy totally ignores the fact that the vast majority of people using GNOME have these components. I understand the desire for things to be optional - we want GNOME to work on Maemo and new devices where not all of the stack may exist. But the right approach is for these new distributions to use flags like --disable-notify. Or we can use a semi-standardized flag like --enable-maemo, since often these non-desktop devices require other source changes too.

(Anonymous)
still could use your patch
It might make sense to have a gnome-settings-daemon watchdog style plugin that watches for low diskspace and related things.
(Anonymous)
Re: still could use your patch
Users need to know when drives hit full (or when they're quickly on the road to being full). Not doing this is a pretty huge mistake (IMO). It's about time we move libnotify and notification-daemon as a part of the platform so that this isn't a game anymore.
(Really, come on; it's a couple hundred kilobytes of well debugged code, and the only real objection to it is the libsexy requirement, which would be trivial to remove with an ifdef WITHOUT breaking significant functionality)
Where to point the finger?
I don't really see how you can pin the blame on autoconf. Whether you want libnotify to be a strict requirement has nothing to do with autoconf.
Re: Where to point the finger?
Re: Where to point the finger?
I already ranted about this in the following article, and provided some suggestions (and code!) on how to improve the situation non-intrusively:
http://www.onlamp.com/pub/a/onlamp/2
yes/no/auto
- yes means error if dependency not found
- auto means use it only if it's found
The main idea here was that an RPM package can --enable-foo=yes to force the dependency to be found when building the RPM.
Doesn't help if the packager doesn't know about the dep, I guess.
(Anonymous)
Re: yes/no/auto
Re: yes/no/auto
Optional dependencies
This isn't an autoconf problem either. Not that I like the autotools (and in fact I'm glad KDE 4 is now using cmake instead), but in this case it's just mechanism. The real problem is how it is being used. KDE 4 implements the same policy using cmake, and it's possible to implement better policies with autoconf.
IMHO, all dependencies which are necessary to implement some feature should be treated as required by default. If the feature is truly important, it should be impossible to disable the dependency (without patching the source code, of course, this is Free Software after all). Otherwise, an explicit --disable-foofeature or --without-foolib should be required to build without it. Building with missing features should be a concious decision by the user/packager, not just due to some -devel package happening to be missing.
Why would you replace something that's objectively correct (use libnotify if it exists; warn/error if it doesn't) with something that isn't (based on the platform, assume you must have it)?
Put another way, if I wanted to know whether or not I could get a lift off someone, I'd be asking them if they owned a car, not asking them if they were American, and subsequently drawing the conclusion that they must own cars.
X is just emerging from the platform-test madness and moving towards feature tests, and I can tell you that the other side makes zero sense.
Because...
Re: Because...
if ! "x$with_libnotify" = xno; then check_for_libnotify_or_error_out else libnotify_explicitly_disabled finot:if "x$platform" = xlinux; then we_have_libnotify_the_compile_will_fail_if_not else we_dont_have_libnotify fiThe former makes sense. The latter does not; not here, and not in any parallel universe.(Anonymous)
This got me to wondering - why the heck...
I totally agree!