After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644064 - [patch] improve CUPS detection
[patch] improve CUPS detection
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-07 00:31 UTC by Saleem Abdulrasool
Modified: 2011-03-15 12:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-build-improve-CUPS-detection.patch (1.51 KB, patch)
2011-03-07 00:31 UTC, Saleem Abdulrasool
committed Details | Review
0002-build-use-sed-instead-of-awk.patch (1.20 KB, patch)
2011-03-12 05:43 UTC, Saleem Abdulrasool
none Details | Review
0002-build-use-cut-instead-of-awk.patch (1.15 KB, patch)
2011-03-12 05:43 UTC, Saleem Abdulrasool
committed Details | Review
0002-build-use-sed-instead-of-awk.patch (1.20 KB, patch)
2011-03-12 05:51 UTC, Saleem Abdulrasool
none Details | Review

Description Saleem Abdulrasool 2011-03-07 00:31:08 UTC
The attached patch cleans up the CUPS detection in configure.
Comment 1 Saleem Abdulrasool 2011-03-07 00:31:28 UTC
Created attachment 182654 [details] [review]
0001-build-improve-CUPS-detection.patch
Comment 2 Matthias Clasen 2011-03-07 04:35:18 UTC
I agree that using cups-config is an improvement, but awk instead of sed seems like a lateral move...
Comment 3 Saleem Abdulrasool 2011-03-07 16:27:10 UTC
The improvement in that case is 2 execs -> 1 exec.  It's also a lot more clear whats happening.  But, feel free to view it as a lateral move :-).
Comment 4 Bastien Nocera 2011-03-11 13:12:36 UTC
(In reply to comment #3)
> The improvement in that case is 2 execs -> 1 exec.  It's also a lot more clear
> whats happening.  But, feel free to view it as a lateral move :-).

Could you please remake this patch, as well as the one against gnome-settings-daemon to use sed instead?
Comment 5 Saleem Abdulrasool 2011-03-12 02:35:55 UTC
Sure, though, can you give a reason as to why sed is preferred over awk when the awk is simpler?
Comment 6 Bastien Nocera 2011-03-12 04:16:06 UTC
Because I can maintain sed scripts, not awk ones.
Comment 7 Saleem Abdulrasool 2011-03-12 05:43:05 UTC
Created attachment 183199 [details] [review]
0002-build-use-sed-instead-of-awk.patch

Fair enough, attached is a supplementary patch that uses sed.  FWIW, the majority of the GNOME modules that checked the DBus version also used awk as it so happens, but the maintainence argument is valid.
Comment 8 Saleem Abdulrasool 2011-03-12 05:43:46 UTC
Created attachment 183200 [details] [review]
0002-build-use-cut-instead-of-awk.patch

This is an alternative btw, that uses cut instead of sed.
Comment 9 Saleem Abdulrasool 2011-03-12 05:51:29 UTC
Created attachment 183203 [details] [review]
0002-build-use-sed-instead-of-awk.patch

Hopefully the correct version this time.
Comment 10 Bastien Nocera 2011-03-15 12:41:03 UTC
I like the cut patch better (from comment 8), could I please get the changes squashed into one patch?
Comment 11 Bastien Nocera 2011-03-15 12:43:54 UTC
Squashed the 2 patches together