Commit 57d235d7 authored by Vikraman Choudhury's avatar Vikraman Choudhury
Browse files

Merge pull request #129 from artem-sidorenko/makeconf_changes

An option to disable auto remerging by make.conf changes
parents 5556ee1c 9e33406d
...@@ -77,7 +77,7 @@ In order to add entries to `make.conf`: ...@@ -77,7 +77,7 @@ In order to add entries to `make.conf`:
ensure => present, ensure => present,
} }
Changes in the USE variable will also trigger re-emerge of the affected packages. Changes in make.conf will also trigger re-emerge of the affected packages. You can disable this behaviour by setting `make_conf_remerge` to `false`.
You can also specify special content: You can also specify special content:
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
class portage ( class portage (
$make_conf = $portage::params::make_conf, $make_conf = $portage::params::make_conf,
$make_conf_remerge = $portage::params::make_conf_remerge,
$portage_ensure = $portage::params::portage_ensure, $portage_ensure = $portage::params::portage_ensure,
$portage_keywords = $portage::params::portage_keywords, $portage_keywords = $portage::params::portage_keywords,
$portage_use = $portage::params::portage_use, $portage_use = $portage::params::portage_use,
...@@ -57,7 +58,7 @@ class portage ( ...@@ -57,7 +58,7 @@ class portage (
ensure => directory; ensure => directory;
} }
exec { 'changed_makeconf_use': exec { 'changed_makeconf':
command => 'emerge -1 --changed-use $(qlist -vIC | sed \'s/^/=/\')', command => 'emerge -1 --changed-use $(qlist -vIC | sed \'s/^/=/\')',
refreshonly => true, refreshonly => true,
timeout => 43200, timeout => 43200,
...@@ -70,7 +71,10 @@ class portage ( ...@@ -70,7 +71,10 @@ class portage (
owner => 'root', owner => 'root',
group => 'root', group => 'root',
mode => '0644', mode => '0644',
notify => Exec['changed_makeconf_use'], }
if ($make_conf_remerge) {
Concat[$make_conf] ~> Exec['changed_makeconf']
} }
concat::fragment { 'makeconf_header': concat::fragment { 'makeconf_header':
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
# #
class portage::params { class portage::params {
$make_conf = '/etc/portage/make.conf' $make_conf = '/etc/portage/make.conf'
$make_conf_remerge = true
$portage_ensure = installed $portage_ensure = installed
$portage_keywords = undef $portage_keywords = undef
$portage_use = undef $portage_use = undef
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment