Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distgen fails to override --output file with mod 0444 #95

Open
praiskup opened this issue Mar 28, 2019 · 0 comments
Open

distgen fails to override --output file with mod 0444 #95

praiskup opened this issue Mar 28, 2019 · 0 comments
Labels

Comments

@praiskup
Copy link
Member

In Makefiles it is sometimes convenient to make the output file read-only, so users don't mistakenly edit the build product (but rather they edit the template). Distgen though fails to override such files.

Reproducer:

$ cat Makefile 
file: template
        dg --template $< --output $@
        chmod -w $@
$ touch template
$ make
dg --template template --output file
chmod -w file
$ make
make: 'file' is up to date.
$ touch template
$ make
dg --template template --output file
dg: CRITICAL: can't move '/tmp/distgen-890l28un' into 'file'
make: *** [Makefile:2: file] Error 1
@praiskup praiskup added the bug label Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant