mirror of
https://github.com/munki/munki.git
synced 2026-04-30 17:29:21 -05:00
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.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user