From f5c95611241896923e0d8eea8f5964c1539bafbf Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 27 Jan 2018 01:20:26 -0300 Subject: [PATCH 1/2] fix composer auto_update idempotency in case no update is available --- manifests/composer/auto_update.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/composer/auto_update.pp b/manifests/composer/auto_update.pp index 78c0c626..4bc7ed6a 100644 --- a/manifests/composer/auto_update.pp +++ b/manifests/composer/auto_update.pp @@ -44,7 +44,7 @@ } exec { 'update composer': - command => "${path} --no-interaction --quiet self-update", + command => "${path} --no-interaction --quiet self-update; touch ${path}", environment => $env, onlyif => "test `find '${path}' -mtime +${max_age}`", path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/', '/usr/local/bin', '/usr/local/sbin' ], From bfe1e44bfc4568727991127e9c88c0fd56ea8bcb Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 27 Jan 2018 18:20:37 -0300 Subject: [PATCH 2/2] fix composer auto_update idempotency in case no update is available added a comment to non self-explanatory code --- manifests/composer/auto_update.pp | 1 + 1 file changed, 1 insertion(+) diff --git a/manifests/composer/auto_update.pp b/manifests/composer/auto_update.pp index 4bc7ed6a..a60b765a 100644 --- a/manifests/composer/auto_update.pp +++ b/manifests/composer/auto_update.pp @@ -44,6 +44,7 @@ } exec { 'update composer': + # touch binary when an update is attempted to update its mtime for idempotency when no update is available command => "${path} --no-interaction --quiet self-update; touch ${path}", environment => $env, onlyif => "test `find '${path}' -mtime +${max_age}`",