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

MakeCatalogs: Check for munki_repo_changed #419

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Munki/MakeCatalogsProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def main(self):
except (IOError, OSError):
run_results = []

something_imported = False
repo_changed = False
# run_results is an array of autopackager.results,
# which is itself an array.
# look through all the results for evidence that
Expand All @@ -72,12 +72,12 @@ def main(self):
# but might be harder to grasp...
for result in run_results:
for item in result:
if item.get("Processor") == "MunkiImporter":
if item["Output"].get("pkginfo_repo_path"):
something_imported = True
break
if ("Output" in item and
item["Output"].get("munki_repo_changed", False)):
repo_changed = True
break

if not something_imported and not self.env.get("force_rebuild"):
if not repo_changed and not self.env.get("force_rebuild"):
self.output("No need to rebuild catalogs.")
self.env["makecatalogs_resultcode"] = 0
self.env["makecatalogs_stderr"] = ""
Expand Down