Hi there, me again.
I am back with more questions about autopkg not handling the munki import bit as I expect it to. And it is probably my fault, but I am once again stumped.
Note that AutoPkgr is also involved, but I have a feeling this is the right place to ask about my issues.
Setup
- Clean Catalina install
- Clean AutoPkgr install, with consequent installation of autoPkg 2.1 and Munki tools 5.0.1.4059
- `munki_repo` folder stored on the same machine for the time being
- Using the `Handbrake` recipe for testing purposes. Override created via AutoPkgr, with no extra addition.
Issue 1 - Item already in repo
What happens
- Run the override recipe once from within `autoPkgr`. Everything works as expected.
- Run the recipe again, but from the command line using `autoPkg` directly, and I get the expected "it's already there!" message
- I delete the package from `munki_repo/pkgs` and the .plist form `/pkgsinfo`
- Run the recipe one more time:
Expected: the package is imported.
Actual behavior: I get `Item [...] already exists in the munki repo as [...]` message and the package is not imported.
What else I tried
Not working
- Removing everything from both `pkgs` and `pkgsinfo` folders doesn't make a difference
- Emptying the recycle bin doesn't make a difference
- Removing cached downloads form `AutoPkg/Cache` prompts a new download, but not the import
- Tried with different recipes
- Rebooting the machine
Working
- If I never run the recipe from within `AutoPkgr` the issue doesn't seem to present itself.
- If I wait long enough
Issue 2 - Multiple imports of the same file
What happens
This kinda picks up where the other one left off.
- Run the override recipe for the first time from the command line with `autopkg`. Everything works as expected. The file is downloaded, processed and imported.
- If deleted, it is imported again when running the override recipe, as expected.
- If I run the recipe without removing the files from `pkgs` and `pkgsinfo`:
Expected: nothing happens, as the package is already there. I should get a "Item already in the repo" message.
Actual behavior: the package is imported again, and again.
----------------------
I am a bit stumped here, because I cannot understand how I am getting two completely opposite behaviors, both unexpected, with the only difference being whether or not I run the override recipe the first time using AutoPkgr.
I have a pretty strong feeling that if I wait a bit and run them again, the first issue will "disappear", but I don't know about the second.
Any input is appreciated, as I am installing everything from scratch and I'd like to get the setup to work properly before I start playing with remote folders and customized overrides.
Thanks a lot!