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

will_build does not work as expected #657

Closed
brussee opened this issue Mar 1, 2016 · 3 comments
Closed

will_build does not work as expected #657

brussee opened this issue Mar 1, 2016 · 3 comments

Comments

@brussee
Copy link
Contributor

brussee commented Mar 1, 2016

if will_build('snappy'):

is not equivalent to

if 'snappy' in recipe.ctx.recipe_build_order:
@inclement
Copy link
Member

From your reply on #kivy, it sounds like your problem was that will_build returns a function. This is deliberate, this function is for passing conditions to recipe builds in the depends list, not for what you're trying.

@brussee
Copy link
Contributor Author

brussee commented Mar 1, 2016

👍

@kived
Copy link
Contributor

kived commented Mar 1, 2016

That's why it's in the patching module. ;-) You can also use if will_build('snappy')(self):, though I don't know if that's really any better than just doing the check in recipe_build_order yourself.

def will_build(recipe_name):
    def will(recipe, **kwargs):
        return recipe_name in recipe.ctx.recipe_build_order
    return will

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

No branches or pull requests

3 participants