Skip to content

Recipe map in v3.0 breaks recipe updating workflow using Recipes folder #886

Closed
@jazzace

Description

THIS IS ONLY INTENDED FOR AUTOPKG BETAS.

Describe the problem
The recipe map in v3.0 breaks a common recipe updating workflow (a method I have taught in conference workshops and presentations). This method involves leveraging the local Recipes folder as the location for recipes being altered/tested so that the search path finds them before anything in the repos, especially if (in the case of an update) the identifier is the same as one in the repos.

Steps to Reproduce

  1. Copy an existing recipe that needs updating (or that you are using as a template) to ~/Library/AutoPkg/Recipes (or another local directory in the RECIPE_SEARCH_DIRS).
  2. Make changes to the recipe in Recipes and save them.
  3. autopkg run --ignore-parent-trust-verification-errors ModifiedRecipe.type

Expected behaviour
AutoPkg will run the recipe in ~/Library/AutoPkg/Recipes.

Actual behaviour
AutoPkg will run the unaltered/original version of the copied recipe (in the case of an update) or will not be able to find the recipe (if the filename or the identifier of the "new" recipe has been changed).

This puts a great deal of friction in the way of people learning how to write recipes, as well as those not using a repository for all of their recipes (e.g., just using ~/Library/AutoPkg/Recipes for private recipes, which is something I do). The only solution (without changing the code) is to force a recipe map rebuild after the recipe has been copied to Recipes, and since there is no verb for that, it is unclear how one might do that reliably. Educating users how to do this will also be a bit of a challenge if the code is not changed to accommodate such a workflow.

Version (please complete the following information):

  • OS version: 13..5.1
  • AutoPkg Version: 3.0.0RC1

Metadata

Assignees

Labels

betaOnly for AutoPkg beta releases

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions