homebysix / recipe-robot

A kick ass tool for creating AutoPkg recipes.
Apache License 2.0
301 stars 28 forks source link

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

Closed jgstew closed 8 years ago

jgstew commented 8 years ago

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: https://github.com/homebysix/recipe-robot/issues/74 Source Function: https://github.com/homebysix/recipe-robot/blob/b68947416cf9034c77226c896f79274218099415/scripts/recipe_robot_lib/tools.py#L327

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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:

jgstew commented 8 years ago

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 commented 8 years ago

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.