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

Recipe Robot refuses to make bigfix recipe because others already exist #77

Closed
jgstew opened this issue Nov 17, 2015 · 5 comments
Closed
Labels

Comments

@jgstew
Copy link
Contributor

jgstew commented Nov 17, 2015

I set Recipe robot to only generate BigFix recipes, then ran it with a TextWrangler URL. Recipe Robot threw an error and would not generate the BigFix recipe even though no existing ones were found.

The is_existing = True on Line 361 of tools.py seems to prevent any recipe from being generated if any other recipe exists. It should only do this if all recipes requested to be generated already exist. If this means recipe-robot needs to make a redundant download recipe, then I feel like it should.

Related: #74
Source Function:

for this_search in recipe_searches:

Searching for existing AutoPkg recipes for "TextWrangler"...
    Found existing TextWrangler.munki.recipe
    Found existing TextWrangler.install.recipe
    Found existing TextWrangler.jss.recipe
    Found existing TextWrangler.download.recipe
    Found existing TextWrangler.absolute.recipe
    Found existing TextWrangler.ds.recipe
    Found existing TextWrangler.sccm.recipe
    Found existing TextWrangler.pkg.recipe
[ERROR] Sorry, AutoPkg recipes already exist for this app, and I can't blend new recipes with existing recipes.

Here are my suggestions:
    - See if one of the above recipes meets your needs, either as-is or using an override.
    - Write your own recipe using one of the above as the ParentRecipe.
    - Or if you must, write your own recipe from scratch.
[ERROR]
@homebysix
Copy link
Owner

This is normal behavior. If Recipe Robot sees any existing recipes at all, it doesn't generate recipes.

You can use --ignore-existing to bypass this behavior, then switch the ParentRecipe keys around manually if you want to integrate new recipes and existing ones, but that can get messy.

@jgstew
Copy link
Contributor Author

jgstew commented Nov 17, 2015

It just seemed a little odd that it would ignore the generation of all recipes if ANY existed. I assumed the behavior was that it would ignore generation of specific recipes that already existed.

As a long term feature request, it would be interesting if recipe-robot could make use of existing download or pkg recipes that already exist for use in a recipe type that does not yet exist.

I remember seeing something about ignore existing somewhere, but I don't think it showed up when I was looking at the command line argument options.

@jgstew
Copy link
Contributor Author

jgstew commented Nov 18, 2015

Given the current behavior, I'd almost expect --ignore-existing to mean that only those that are not existing would get generated if I have all types selected.

There are 4 different states I can see being valid:

  • Don't generate any recipes if there are existing ones
  • Only generate the missing recipes if there are existing ones
  • Only generate the missing recipes + dependencies(download,pkg) if there are existing ones.
  • Generate all recipes even if there are existing ones

@jgstew
Copy link
Contributor Author

jgstew commented Nov 18, 2015

This issue should be marked "wontfix" so that it is easier to view the closed issues that have not been addressed because they could be valid to take on in the future, even if they are not important enough to keep open.

@homebysix
Copy link
Owner

For a while, --ignore-existing was --include-existing because we thought the default behavior would be to generate the recipes that don't exist.

Now, --ignore-existing is meant to refer to the fact that Recipe Robot decides not to create any recipes if it sees existing recipes, and overriding that behavior requires us to literally ignore the existing recipes to continue.

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

No branches or pull requests

2 participants