bugQuilt - Bugs: bug #52325, quiltrc overrides environment

 
 

bug #52325: quiltrc overrides environment

Submitted by:  None
Submitted on:  Wed 01 Nov 2017 06:31:35 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Need Info
Privacy: PublicAssigned to: Jean Delvare <khali>
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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:

https://lists.gnu.org/archive/html/quilt-dev/2014-05/msg00000.html

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

Jean Delvare <khali>
Project AdministratorIn charge of this item.
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.

Thanks!

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>
Project AdministratorIn charge of this item.
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.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by hncaldwell (Posted a comment)
  • -unavailable- added by khali (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Nov 2017 10:35:23 AM UTCkhaliStatusNone=>Need Info
      Assigned toNone=>khali
    Wed 01 Nov 2017 06:31:35 PM UTCNoneAttached File-=>Added keep_current_environment.patch, #42318

    Back to the top


    Powered by Savane 3.1-cleanup1