Closed amcnea closed 11 years ago
This is interesting. Why use order instead of require? Seems to me you could save a lot of trouble just using require instead.
The reasoning behind that is for cross formula communication The issue isn't as pronounced when looking at just the php state, however, when looking at cross formula behaviour it becomes more important. For instance, you can have a php.ini file for apache, but this file requires that php is installed.
I didn't want to make dependencies between apache and php as apache doesn't require php and vice versa. I didn't mind internal requirements or requirements on other packages if they are indeed required. Without cross formula dependencies you get ordering issues. My solution was to not force a relationship between the formulas, but instead have all of the formulas follow a standard block schema.
But your right, internally I should have used requires. I guess once the block system was in place, I got a little lazy. When I have some time I can add those in.
I understand where you're coming from on that angle. Unfortunately, having cross-dependencies between formulas is unavoidable. For instance, Wordpress will always require php, as will Drupal. However, when one formula includes another formula, it should probably be explicitly documented in the calling formula (perhaps a standardized section in the README?). Beyond that, I now understand why you used the ordering method that you did, but it should be updated as soon as possible. Until then, let's get this code merged.
Sorry about the delay, I have been ridiculously busy. Anyway, I wanted to try and add in the requirements relationships this weekend. Upon examining the relationships, most of the php5 modules are dependent upon 1 of 2 parent packages. Basically if you are using the php5 package then all the modules are dependent on it, alternatively this is true of the php5-fpm package as well.
I feel I could fix this problem if the php modules were declared in the pillar data, but that is more of a next generation of the script instead of fix a simple relationship bug.
The ordering actually fixes this, you just have to declare which main package you are installing in you top.sls. Anyway, If you want to way in as to what you think I should do; I don't mind adding them. I just don't think in this particular case it is warranted.
Here is my apt-get output:
apt-get -s install php5 php-apc apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 php-apc php5 php5-cli php5-common ssl-cert
apt-get -s install php-apc php-apc php5-common php5-fpm
apt-get -s install php5 php5-curl apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 php5 php5-cli php5-common php5-curl ssl-cert
apt-get -s install php5-curl php5-common php5-fpm
This handles the basics of installing php5