Firstly, *please* think past a response like 'Why the hell would you want that? invalid!' and allow me to explain why this would be REALLY useful.
Recently I made the very hard sell of using gentoo as a standard deployment platform for services within our organisation. One of the harder hurdles to pass here was the fact that gentoo is essentially versionless and therefore presents a moving target for automated deployments.
We have resolved this issue for the organisation by designating certain stage3s / portage-revisions / basic config changes (eg: layman installed) as standard, unchanging platforms. These are instantiated as vServers with /usr/portage and /usr/local/portage/layman ro-mounted, and /usr/portage/distfiles on tmpfs.
All of our software components are managed as ebuilds, which are auto-generated using SVN commit hooks on our development servers.
For any given service there are typically many complex interdependencies including system-level packages, other packages in our overlay, etc.
The problem is that when we attempt to deploy to a vServer in an automated fashion (eg: for system testing) emerge fails on EAPI=2 packages with USE flag requirements in other packages, cowardly refusing (seemingly no matter which options are supplied!) to rebuild required packages.
I would therefore like to request that this feature is added.
If not, I will write a complex hacky equery depgraph parser / EAPI=2 USE flag RDEPEND searcher that attempts to rebuild any and all required packages prior to executing emerge, though obviously this is not really a good(tm) solution.
Steps to Reproduce:
# emerge from our internal overlay
fails with 'emerge: there are no ebuilds built with USE flags to satisfy "media/gfx/imagemagick[jepg,png,svg,tiff]"'
Should be an option to have any required rebuilds performed automatically (with appropriate warnings).
PS: Extra pledge - if a developer can help me add this feature in portage before Friday I will write a detailed document for other organisations who may wish to use gentoo ebuilds+svn+vservers for highly automated software development / revision management / testing / deployment, which should help to increase gentoo's profile. I'll make sure that document is done before Friday next week.
*** Bug 250286 has been marked as a duplicate of this bug. ***
Just FYI: while waiting for this my current workaround is to add a new setting 'EXTRA_USE="..."' to the ebuild files, extract those USE flags prior to running emerge and append them to /etc/make.conf
Obviously less than ideal, but sufficient until this gets sorted out.
*** This bug has been marked as a duplicate of bug 258371 ***
Wrote hacky workaround.
(In reply to comment #5)
> Wrote hacky workaround.
Why don't you deploy a custom overlay/profile that sets your USE flags correctly via package.use? Packages with changed USE-flags will be rebuilt by the -N option and you have no need for any hacking whatsoever.
Because in the use case described, the required USE flags are unknown. ie: They are only spat out of one or more piecemeal attempts at running emerge. This is emerge's main use case, however the alternate use case of 'install all dependencies, including requisite USE flags please' is not presently met. In automated environments this is a significant use case that makes emerge and the gentoo platform as a whole appear immature, IMHO.
(In reply to comment #7)
> This is emerge's main use case, however the alternate use case of 'install all
> dependencies, including requisite USE flags please' is not presently met.
Maybe --autounmask (from bug 280097) would suit your needs? It's supported in >=portage-2.1.9.