Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger rebuild after package_* addition/edit #26

Open
tampakrap opened this issue Feb 12, 2013 · 3 comments
Open

trigger rebuild after package_* addition/edit #26

tampakrap opened this issue Feb 12, 2013 · 3 comments

Comments

@tampakrap
Copy link

Currently I have implemented some code in portage::package in my fork to rebuild every time one of the package_* entries are touched. It would be better though if we add a new parameter in the provider, so we can do something like:

package_keywords { 'app-admin/puppet':
  keywords => '~x86',
  target => 'puppet',
  rebuild => true,
}

Default value should be false, in order to avoid useless rebuilds
The command that should be triggered is /usr/bin/emerge -u1 --changed-use ${name}

@adrienthebo
Copy link

👍 from me, will look at this more closely tonight.

@adrienthebo
Copy link

If this is going to be behavior injected into the provider then it's going to need more work than I initially considered. This would require that package_* types are always run before the associated packages and can trigger a reinstallation/rebuild, and I don't know how that would work on a provider level.

@tampakrap
Copy link
Author

No, you are wrong. You just need to run the command I gave in the summary, no need to check if the package is there or whatever. The command there will take care everything. I have implemented that behavior in portage::package already and it works, but the problem there is that the command executes max 4 times (for each package_* entry) if all of them are assigned. Having this in provider level will solve the problem, as I will be able in portage::package to trigger the rebuild after all of those entries are filed, without checking order or dependencies between them. Plus it would be useful to have this one in cases where only a package_* type is used, without involving portage::package at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants