saltstack-formulas / php-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
57 stars 231 forks source link

Fix conflicting IDs using new structure #119

Closed hackel closed 6 years ago

hackel commented 7 years ago

Trying to update my servers from php 7.0 to to 7.1 by upgrading to the latest release of this formula after #115. I get the following error:

Detected conflicting IDs, SLS IDs need to be globally unique.
The conflicting ID is 'php_7.1_link' and is found in SLS 'base:php.ng.cli.install' and SLS 'base:php.ng.fpm.install'

This was because I need both php-fpm and the php cli. I simply restricted the rule to state==cli, but should this be moved into cli/install.sls instead?

aboe76 commented 7 years ago

@hackel what should the alternatives.set be when you only install fpm?

just trying to figure out if you are correct in moving it to cli/install.sls

hackel commented 7 years ago

@aboe76 As far as I know, php-fpm doesn't install any alternatives. The only binary is /usr/sbin/php7.1-fpm which shouldn't conflict with anything. Only cli needs to mange /usr/bin/php.

aboe76 commented 7 years ago

Wouldn't it be better to move the link to the cli install.sls then if it's only meant for cli stuff.

hackel commented 7 years ago

@aboe76 Yes, I think so. I tried to change as little as possible for this PR to make it work. :)

@sc250024 Could you chime in on this, since you just added the alternatives bit recently.

aboe76 commented 7 years ago

@hackel is this still an issue?with #129 merged?

aboe76 commented 7 years ago

I think #135 is a better fix

aboe76 commented 7 years ago

@hackel I think this can be closed now?