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

Problem: want to install additional config files #835

Merged
merged 4 commits into from
Jan 12, 2017

Conversation

vyskocilm
Copy link
Contributor

Solution: add type="config" to zproject_install.gsl

Michal Vyskocil added 4 commits January 12, 2017 08:58
Solution: use combination of output to clear the file + append
Solution: add config type to install model
Solution: create builds/zinstall directory first
@@ -22,6 +22,7 @@ function zinstall_include (filename)
endif
endfunction

directory.create ("builds/zinstall")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should only be created if zinstall is used!

Copy link
Contributor Author

@vyskocilm vyskocilm Jan 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried the simplest way how to do it
project.has_install = (count (main, (count (main.install) > 0)) > 0)

but it crashes gsl. I'll create minimal reproducer and add issue for imatix/gsl.
imatix/gsl#141

Can we solve it in another PR, please?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple solution might be:

for project.main where defined (main->install)
    if !file.exists ("builds/zinstall")
        directory.create ("builds/zinstall")
    endif
...

@sappo
Copy link
Member

sappo commented Jan 12, 2017

I'm not sure this problem is valid. Configuration files should never be part of the project itself! What are those configuration files?

@sappo
Copy link
Member

sappo commented Jan 12, 2017

@vyskocilm do you have an example project?

@vyskocilm
Copy link
Contributor Author

vyskocilm commented Jan 12, 2017

@sappo https://github.com/42ity/fty-metric-composite/blob/master/src/fty-metric-composite.cfg.example

The example configuration is treated as a template for various instances of other services.

so you then have [email protected], [email protected] and so...

I can change it for type="datadir", installation of additional data files should be harmless. Makes a sense?

@jimklimov
Copy link
Member

jimklimov commented Jan 12, 2017 via email

@sappo
Copy link
Member

sappo commented Jan 12, 2017

I understand the problem, still I think a user wont get the model. But lacking any better ideas I'll merge it for now.

@sappo sappo merged commit ed951a3 into zeromq:master Jan 12, 2017
@sappo
Copy link
Member

sappo commented Jan 12, 2017

@vyskocilm #834 might be a cleaner solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants