Issue #3873 has been updated by Stefan Schulte.
The example in the ticket should work if the `File["$alp"]` would also establish an explicit require `Exec["cleanup_alp"]`. This is because an explicit require always overwrites an implicit autorequire. This seems to be a far better workaround than hacking with `/my/./path` references. Unfortunately an autorequire is not overwritten if the user-defined requires are implicit (a->b->c does overwrite an autorequire b->a, but not c->a). So in my opinion this bug can also be fixed with #5369 ---------------------------------------- Bug #3873: Unexpected dependency created by exec https://projects.puppetlabs.com/issues/3873#change-54228 Author: Ben Beuchler Status: Accepted Priority: Normal Assignee: Randall Hansen Category: RAL Target version: Affected Puppet version: 0.25.4 Keywords: Branch: It looks like the Exec type is automatically creating dependencies on any files mentioned in the "onlyif" and "unless" parameters. While I understand that this is likely to be the most commonly desired behavior, it can unexpectedly break things. As an example, this is the code that triggered the behavior for me: <pre> class syslog-ng::weblogger inherits syslog-ng { $alp = "/var/spool/apache2/access_log_pipe" file { "/var/spool/apache2": ensure => directory, owner => www-data, group => www-data } File["/etc/syslog-ng/syslog-ng.conf"] { require => File[ "$alp" ] } # If apache started first and created $alp as a normal file, delete # it. exec { "cleanup_alp": command => "/bin/rm ${alp}", unless => "/usr/bin/test -p ${alp}", } # If the FIFO doesn't exist, create it. exec { "access_log_pipe": command => "/usr/bin/mkfifo ${alp}", unless => "/usr/bin/test -p ${alp}", require => Exec["cleanup_alp"], } # Ensure permissions are correct on the pipe. file { "$alp": ensure => present, owner => www-data, group => www-data, mode => 0770, require => Exec["access_log_pipe"] } } </pre> I'll attach the relevant section of the `--graph` output. Note the unrequested dependency between `Exec[cleanup_alp]` and `File[/var/spool/apache2/access_log_pipe]`. Filing this as a bug as suggested by Dan Bode: http://groups.google.com/group/puppet-users/browse_thread/thread/73a98af374c3f7f2 -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
