GNOME Bugzilla – Bug 160698
libgnomeprint requires libgnomecups
Last modified: 2005-07-05 10:43:39 UTC
libgnomeprint in GARNOME 2.9.2 requires libgnomecups, attaching patch to include it as a dep from the geektoys directory
Created attachment 34586 [details] [review] Patch to add libgnomecups dependency to libgnomeprint
libgnomeprint does not necessarily depend on libgnomecups -- only, if you are using CUPS, AFAIK. Thus, as it isn't always a dependency and aslibgnomecups isn't part of the official GNOME D&DP, the dependency should not be hard coded into the Makefiles. On the other hand, a lot of folks seem to have issues with this... NOTABUG ?
*** Bug 160697 has been marked as a duplicate of this bug. ***
Confirmed now. Anyway, not sure if this is valid bug or not.
This should be fixed, but by using a shell command in the Makefile to determine if CUPS is being used. Is this possible?
Should be possible by checking 'cups-config', just like libgnomecups's configure does. A patch should go in to platform/libgnomeprint/Makefile, altering it's dependencies. I will check this later today.
Assuming libgnomeprint depends on lignomecups if (and only if) CUPS is used, and assuming determining whether cups is available or not can be done by cups-config, this line added after the CONFIGURE_ARGS line in libgnomeprint/Makefile will add the dependency: CONFIGURE_ARGS += $(shell if test -e "`which cups-config 2> /dev/null`"; then \ echo path/cups; \ fi ) However, cups-config is needed by lignomecups for building, but it is provided by libcups2-devel RPM on my system. Thus the above should fail, if CUPS is used, libgnomecups is needed, but the devel package isn't installed yet. (Which means, you get the very same error as before. This will add the dependency automagically only, if the devel package is installed already.) There should be a better solution...
Created attachment 34617 [details] [review] Patch to add deps for libgnomecups to libgnomeprint as needed.
Created attachment 34635 [details] [review] Changed patch to run before configure. Changed patch to run before configure instead of fetch.
Doh! I sure meant to alter LIBDEPS rather than CONFIGURE_ARGS. IMHO it is cleaner, to use the given LIBDEPS than to bypass the structure used in every other Garnome Makefile and start calling sub makes on our own... My patch implements this. Note on comment #9: Without redirecting error messages by 'which' a pretty ugly error message will be displayed if cups-config isn't installed. Which should be avoided, as not using CUPS is not an error. The caveat in comment #7 applies anyway. Is checking for cups-config really the way to go?
Created attachment 34642 [details] [review] patch to alter libgnomeprint/Makefile LIBDEPS
Comment on attachment 34635 [details] [review] Changed patch to run before configure. Yes, Karsten piping the error output of `which` to /dev/null would be cleaner but since it has no effect on the functionality it's not really needed. :-) But cleaner is always better. Anyway, I like your patch better and it's actually cleaner since it uses LIBDEPS. As to whether checking for cups-config is the best solution: I think the best solution would be if pkg-config checked to see if both cups devel and libgnomecups were present before trying to build cups support into libgnomeprint.
On my system pkg-config doesn't know about cups, and 'cups-config --libs' does its duty. Due to this shortage and as libgnomeprint uses cups-config itself, I came up with this idea in the first place. Anyway, I still don't know, if this is correct in all cases.
OK, a test for this was included in both branches of GARNOME -- can I get a show of hands if this is still broken for anyone except my one Red Hat 9 box? Tempted to mark this as FIXED, just to get a 0% outstanding report on the patch dilligence rant that Luis posted to d-d-l ... but i'll NEEDINFO it instead, for now -- just incase.
Sure, WORKSFORME. :-) Anyway, getting the impression I'm talking to myself here. No one ever responded to my caveat in comment #7, so yet again. 'cups-config' is needed by lignomecups for building and the patch actually checks for this -- however, it is provided by libcups2-devel RPM on my system. Thus the patch will fail, if CUPS is used and libgnomecups is needed, but the devel package is *not* installed yet. The patch does not determine, if CUPS is used, but rather if the devel package is installed. It will fail like any other devel requirement, which is not met when building Garnome.
*poke* Seems my patch works fine, no additional reports/complaints or new bugs. Can we finally close this bug as FIXED?
the fix works fine thanks
Thanks Stef. :) OK, going ahead then and finally closing FIXED.