Bug 223331 - Add an option to include one configuration file from another
Summary: Add an option to include one configuration file from another
Status: RESOLVED FIXED
Alias: None
Product: kdesrc-build
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist with 10 votes (vote)
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-18 21:20 UTC by Michael G. Hansen
Modified: 2011-04-10 04:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 1.14


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael G. Hansen 2010-01-18 21:20:36 UTC
Version:           1.11 (using Devel)
OS:                Linux
Installed from:    Compiled sources

It would be nice if there were an 'include' option for the configuration to include other configuration files.

My use case: I have kdesvn-build configuration files for KDE 4.2, 4.3, 4.4 and trunk, where there are different options for qt-copy, source-dir and so on. But I also have some applications from extragear (digikam, kipi-plugins) that I want to build for all versions. Right now I have to add them to each configuration file. With an include option, I could write one file for each KDE version, but have a common one for all the extragear applications.
Comment 1 Michael Pyne 2011-04-08 05:15:49 UTC
Git commit 594f40b413c0c0d1e2688be6386d24113367a17b by Michael Pyne.
Committed on 08/04/2011 at 05:15.
Pushed by mpyne into branch 'master'.

Add "include" option for config file reading.

Based on a recommendation from Michael Hansen, this commit adds the
ability to include other files from the rc file used for kdesrc-build.

Tilde-expansion is supported on the filename, but only of the ~/foo
variety (not ~user/foo).

It works by essentially intercepting the input stream as necessary, so
unfortunately things like a common "global" followed by different
"global" sections doesn't work (although let me know if that's needed,
it wouldn't be too hard).

On the other hand each rc-file would be able to include the global
options that are common.

To use, simply use "include /path/to/file-to-include" as a single line
in your config file. Leading spaces are supported, but the remainder of
the file after the "include" and all whitespace immediately following
"include" is assumed to be the filename, so don't leave trailing spaces.

BUG:223331
FIXED-IN:1.14

M  +99   -11   kdesrc-build     

http://commits.kde.org/kdesrc-build/594f40b413c0c0d1e2688be6386d24113367a17b
Comment 2 Michael Pyne 2011-04-09 04:56:50 UTC
Git commit 2b05db10c83346b6b9116e5cd32266f41f43d816 by Michael Pyne.
Committed on 09/04/2011 at 04:55.
Pushed by mpyne into branch 'master'.

Revert "Add "include" option for config file reading."

This reverts commit 594f40b413c0c0d1e2688be6386d24113367a17b.

Although it works for me, I've received reports that it doesn't for
others so until I figure it out I'll simply revert and work on it when I
get a chance.

CCBUG:223331

M  +11   -99   kdesrc-build     

http://commits.kde.org/kdesrc-build/2b05db10c83346b6b9116e5cd32266f41f43d816
Comment 3 Michael Pyne 2011-04-10 04:49:43 UTC
Git commit e3cd4bb57b7216f11040d8582dbb26d6cce54753 by Michael Pyne.
Committed on 10/04/2011 at 04:52.
Pushed by mpyne into branch 'master'.

Add "include" option for config file (try 2).

I actually did some testing of my last attempt at this, but I'm not sure
in retrospect how kdesrc-build even got something coherent from my first
patch given that I forgot to actually assign the output of the various
read line functions to $_ (which had previously been automatically
done), or how I passed the wrong object type to read_line (now
readLogicalLine).

I've increased the testing performed on the patch and it should actually
work this time. For serious.

BUG:223331

M  +127  -16   kdesrc-build     

http://commits.kde.org/kdesrc-build/e3cd4bb57b7216f11040d8582dbb26d6cce54753