From ee1bcac831451f03e311795500625289ff689fce Mon Sep 17 00:00:00 2001 From: Brian Warsing Date: Fri, 1 May 2015 11:13:18 -0700 Subject: [PATCH] follow symlinks when walking pkgs and pkgsinfo To protect against infinite recursion, `os.walk` will not follow symlinks by default. However, this safety feature can hamper the utility of makecatalogs if admins want to symlink-in resources from multiple munki repos, so turn it off. --- code/client/makecatalogs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/client/makecatalogs b/code/client/makecatalogs index be403d23..220a8f3f 100755 --- a/code/client/makecatalogs +++ b/code/client/makecatalogs @@ -167,7 +167,7 @@ def makecatalogs(repopath, options): catalogs['all'] = [] # Walk through the pkginfo files - for dirpath, dirnames, filenames in os.walk(pkgsinfopath): + for dirpath, dirnames, filenames in os.walk(pkgsinfopath, followlinks=True): for dirname in dirnames: # don't recurse into directories that start # with a period. @@ -234,7 +234,7 @@ def makecatalogs(repopath, options): do_pkg_check = False if pkginfo.get('PackageURL'): do_pkg_check = False - + if do_pkg_check: if not 'installer_item_location' in pkginfo: