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

3.0 RC1: running (non-trivial) recipes by path fails #883

Closed
gregneagle opened this issue Aug 23, 2023 · 2 comments
Closed

3.0 RC1: running (non-trivial) recipes by path fails #883

gregneagle opened this issue Aug 23, 2023 · 2 comments
Assignees
Labels
beta Only for AutoPkg beta releases

Comments

@gregneagle
Copy link
Contributor

THIS IS ONLY INTENDED FOR AUTOPKG BETAS.

Describe the problem
In autopkg 3.0 RC1, attempting to run a recipe by path where the recipe refers to a parent fails unless the parent is in the "recipe map". It fails even if the parent recipe is in the same directory as the (child) recipe being run.

AutoPkg output
autopkg run -v /Users/my_user/Library/AutoPkg/RecipeRepos/pkg-recipes/Keka/Keka.pkg.recipe
Looking for com.github.redacted.download.Keka...
Did not find com.github.redacted.download.Keka in recipe map
Search GitHub AutoPkg repos for a com.github.redacted.download.Keka recipe? [y/n]: n
We are not currently searching on-disk for recipes; if you intended to run a specific file not in the recipe map, please pass in an absolute file path instead.
Could not find parent recipe for /Users/my_user/Library/AutoPkg/RecipeRepos/pkg-recipes/Keka/Keka.pkg.recipe
**load_recipe time: 4.5761670419888105

Nothing downloaded, packaged or imported.

Expected behavior
autopkg should successfully run the recipe.

Version (please complete the following information):

  • OS version: 13.5.1
  • AutoPkg Version: 3.0RC1
@gregneagle gregneagle added the beta Only for AutoPkg beta releases label Aug 23, 2023
@jgstew
Copy link
Contributor

jgstew commented Sep 6, 2023

I ran into this same issue. I was able to work around it by adding the path containing the recipes to the RECIPE_SEARCH_DIRS so that it would be built into the map.

In the above example it would mean you would have to have /Users/my_user/Library/AutoPkg/RecipeRepos/pkg-recipes in that value in the preferences and rebuild the map if not rebuilt already.

I'm not sure what a good solution to this is though. It might mean that a temporary map needs built following backwards from the currently referenced recipe, or fall back to the previous method of recipe lookup that does not depend on a map in these cases, even if it is much slower.

It is kind of unfriendly that autopkg basically just doesn't work the way it used to unless everything is in the recipe map file.

@nmcspadden
Copy link
Contributor

This was very similar to #886 and was fixed with the same commit. The local path is added to the recipe map build when it tries to find a recipe not currently in the map. After that, if it can't find it within any of the search directories, it gives up (or asks Github...).

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

No branches or pull requests

3 participants