autopkg and munki import inconsistencies

122 views
Skip to first unread message

Gabriele Bartoli

unread,
Aug 20, 2020, 1:50:05 PM8/20/20
to autopkg-discuss
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
  1. Run the override recipe once from within `autoPkgr`. Everything works as expected.
  2. Run the recipe again, but from the command line using `autoPkg` directly, and I get the expected "it's already there!" message
  3. I delete the package from `munki_repo/pkgs` and the .plist form `/pkgsinfo`
  4. 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.
package_not_imported.png
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.
  1. 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.
  2. If deleted, it is imported again when running the override recipe, as expected.
  3. 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.
multiple_imports.png

----------------------

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!

Ben Goodstein

unread,
Aug 20, 2020, 2:21:04 PM8/20/20
to autopkg...@googlegroups.com
This is actually more of a munki question, but...After you do anything that could change the catalogs (e.g. deleting pkginfo or pkgs from the munki repo, or importing something new into the munki repo) you must run makecatalogs On the command line. Remember you can run it at the end of a list of recipes in autopkg by running the “stub” recipe MakeCatalogs.munki

Until you do that the munki catalogs will not reflect what is on disk.

Ben Goodstein

On 20 Aug 2020, at 18:50, Gabriele Bartoli <gabr...@fairphone.com> wrote:

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
  1. Run the override recipe once from within `autoPkgr`. Everything works as expected.
  2. Run the recipe again, but from the command line using `autoPkg` directly, and I get the expected "it's already there!" message
  3. I delete the package from `munki_repo/pkgs` and the .plist form `/pkgsinfo`
  4. 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.
<package_not_imported.png>

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.
  1. 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.
  2. If deleted, it is imported again when running the override recipe, as expected.
  3. 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.
<multiple_imports.png>


----------------------

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!

--
You received this message because you are subscribed to the Google Groups "autopkg-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autopkg-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autopkg-discuss/399f32c1-0af3-4cdb-9e56-197aad4bf5aan%40googlegroups.com.
<multiple_imports.png>
<package_not_imported.png>

Gregory Neagle

unread,
Aug 20, 2020, 6:07:35 PM8/20/20
to autopkg...@googlegroups.com

Gabriele Bartoli

unread,
Aug 21, 2020, 4:22:26 AM8/21/20
to autopkg-discuss
Drat, I knew I was missing something obvious. And my Google-fu apparently failed me.

Thanks for the pointers. I am trying to reverse engineer how the our setup works and I am clearly doing it backwards :D

Cheers!
Reply all
Reply to author
Forward
0 new messages