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

AutoPkg should rebuild missing recipe map on demand #884

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

AutoPkg should rebuild missing recipe map on demand #884

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
autopkg should always build a recipe map if one is missing.
If an AutoPkg user installs 3.0 RC1 or uses the the dev branch as of this commit: 1831864 if the next thing they do is attempt to run a recipe (a common thing to do with AutoPkg), they are greeted with this error:

Cannot read the recipe map file!
Cannot parse the recipe map - it's either missing or invalid!
Try adding or removing a repo to rebuild it.

AutoPkg output

$ autopkg run GoogleChrome.download
Cannot read the recipe map file!
Cannot parse the recipe map - it's either missing or invalid!
Try adding or removing a repo to rebuild it.

Expected behavior
autopkg should almost never output this error message.
autopkg should always build a recipe map if one doesn't exist.

Version (please complete the following information):

  • OS version: 13.5.1
  • AutoPkg Version: commit 1831864
@gregneagle gregneagle added the beta Only for AutoPkg beta releases label Aug 23, 2023
@nmcspadden nmcspadden changed the title autopkg dev branch AutoPkg should rebuild missing recipe map on demand Aug 23, 2023
@jgstew
Copy link
Contributor

jgstew commented Aug 30, 2023

I've hit a version of this as well.

It seems like the error should trigger a build/rebuild of the map and a retry.

This fails to ever list the repos defined even though they are due to the map file error:

python ..\autopkg\Code\autopkg repo-list
Cannot read the recipe map file!
Cannot parse the recipe map - it's either missing or invalid!
Try adding or removing a repo to rebuild it.

then this ends up fixing it, while also giving the info:

python ..\autopkg\Code\autopkg info        
Cannot read the recipe map file!
Cannot find or read the recipe map! Creating it now...
Current preferences:
{'RECIPE_REPOS': {'C:\\Users\\jgstew\\Library\\AutoPkg\\RecipeRepos\\com.github.autopkg.hansen-m-recipes': {'URL': 'https://github.com/autopkg/hansen-m-recipes'},
                  'C:\\Users\\jgstew\\Library\\AutoPkg\\RecipeRepos\\com.github.autopkg.homebysix-recipes': {'URL': 'https://github.com/autopkg/homebysix-recipes'},
                  'C:\\Users\\jgstew\\Library\\AutoPkg\\RecipeRepos\\com.github.jgstew.jgstew-recipes': {'URL': 'https://github.com/jgstew/jgstew-recipes'}},
 'RECIPE_SEARCH_DIRS': ['.',
                        '~/Library/AutoPkg/Recipes',
                        '/Library/AutoPkg/Recipes',
                        'C:\\Users\\jgstew\\Library\\AutoPkg\\RecipeRepos\\com.github.jgstew.jgstew-recipes',
                        'C:\\Users\\jgstew\\Library\\AutoPkg\\RecipeRepos\\com.github.autopkg.hansen-m-recipes',
                        'C:\\Users\\jgstew\\Library\\AutoPkg\\RecipeRepos\\com.github.autopkg.homebysix-recipes']}

And after that, repo-list works again.

@nmcspadden
Copy link
Contributor

This has been resolved for now in 1c6389a.

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