bugQuilt - Bugs: bug #52325, quiltrc overrides environment


bug #52325: quiltrc overrides environment

Submitter:  None
Submitted:  Wed 01 Nov 2017 06:31:35 PM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  khali
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Fri 03 Nov 2017 03:19:39 PM UTC, comment #3: 

I'm not sure how you manage that, because quilt is really meant to be used by a single user. Two users using quilt on the same project instance at the same time could cause serious damage. So I really hope each user has his/her own instance of the project to work on.

What you seem to be calling for really is a project-specific quiltrc file. While this was never implemented, it has been discussed a few times in the past already. Most recent I can find was:


So maybe it would be the right time to resume the discussion and make it happen.

Jean Delvare <khali>
Group administrator
Thu 02 Nov 2017 06:09:41 PM UTC, comment #2: 

The use case that brought this up is that we have a particular project that uses a script to export the QUILT_* variables to be used for that project.

In order to keep everyone using the same settings for the project, it works well to maintain the variable settings as part of the project and not copy them to a local ~/.quiltrc or /etc/quilt.quiltrc because they could get out of sync if they are changed.  Plus, they are specific to the project and it seems better to keep them separate from global (or user) defaults.

We could use --quiltrc, but it is kind of nice not to have to provide that with each command.

I like your idea about explicitly checking for and not overriding them in the quiltrc, though.  That approach should be sufficient.


Heath Caldwell <hncaldwell>
Thu 02 Nov 2017 10:35:23 AM UTC, comment #1: 

quiltrc is not a configuration file which we parse, it's a bash script snippet which we source. Quilt is blindly running whatever commands are present in that file.

If you don't want it to overwrite values present in the environment, it is your responsibility to implement your quiltrc file in that way. Either by explicitly checking if values are already set:

[ -z "$QUILT_FOO" ] && QUILT_FOO=bar

or by using bash's default value construct:

: ${QUILT_FOO:=bar}

You may argue that the default quiltrc should do things that way. Maybe, but I have to admit I don't really understand your use case. quiltrc is the place to configure quilt, why would you want to configure it from somewhere else in parallel in the first place?

Jean Delvare <khali>
Group administrator
Wed 01 Nov 2017 06:31:35 PM UTC, original submission:  

The values of QUILT_* variables defined in the effective quiltrc file are used even when values have been set for them (and they are exported) in the current environment.

This behavior is opposite from what is normally expected, which would be: if a variable is defined in the current environment, that value would override anything defined in the quiltrc file.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #42318:  keep_current_environment.patch added by None (582B - text/x-patch - Suggested patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hncaldwell (Posted a comment)
  • -email is unavailable- added by khali (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-02 khali StatusNone Need Info
        Assigned toNone khali
    2017-11-01 None Attached File- Added keep_current_environment.patch, #42318

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code