mirror of
https://github.com/munki/munki.git
synced 2026-04-23 21:40:25 -05:00
Merge branch 'master' of https://code.google.com/p/munki into development
* 'master' of https://code.google.com/p/munki: Attempt to adjust makecatalogs to play nicer with PackageURL and PackageCompleteURL keys in pkginfo files Adjust error messages; convert munkicommon.display_foo() calls to use extra args instead of % interpolation Fix exception syntax to be python2.5 compatible, maintaining support for OS X 10.5 Leopard. s/munki\./munkicommon./g to fix display_error calls added in rf8c46ec3eb955cef6a2aefcc52be090234ac3705 Initial support for checking for available licensed seats for uninstalled optional_installs Bumping version.plist for next round of development. If self-serve/etc. manifests are corrupt, log and pass instead of crashing. Corrected a typo, thanks to Greg Neagle. Cleaned up the localization a bit.
This commit is contained in:
@@ -145,8 +145,16 @@ def makecatalogs(repopath, options):
|
||||
continue
|
||||
|
||||
#simple sanity checking
|
||||
do_pkg_check = True
|
||||
installer_type = pkginfo.get('installer_type')
|
||||
if not installer_type in ['nopkg', 'apple_update_metadata']:
|
||||
if installer_type in ['nopkg', 'apple_update_metadata']:
|
||||
do_pkg_check = False
|
||||
if pkginfo.get('PackageCompleteURL'):
|
||||
do_pkg_check = False
|
||||
if pkginfo.get('PackageURL'):
|
||||
do_pkg_check = False
|
||||
|
||||
if do_pkg_check:
|
||||
if not 'installer_item_location' in pkginfo:
|
||||
errors.append(
|
||||
"WARNING: file %s is missing installer_item_location"
|
||||
|
||||
@@ -366,11 +366,11 @@ def curl(url, destinationpath,
|
||||
else:
|
||||
temp_download_exists = os.path.isfile(tempdownloadpath)
|
||||
http_result = header.get('http_result_code')
|
||||
if http_result.startswith('2') and \
|
||||
temp_download_exists:
|
||||
if http_result.startswith('2') and temp_download_exists:
|
||||
downloadedsize = os.path.getsize(tempdownloadpath)
|
||||
if downloadedsize >= targetsize:
|
||||
if not downloadedpercent == 100:
|
||||
if targetsize and not downloadedpercent == 100:
|
||||
# need to display a percent done of 100%
|
||||
munkicommon.display_percent_done(100, 100)
|
||||
os.rename(tempdownloadpath, destinationpath)
|
||||
if (resume and not header.get('etag')
|
||||
@@ -439,8 +439,8 @@ def getResourceIfChangedAtomically(url,
|
||||
if xattr_hash == expected_hash:
|
||||
#File is already current, no change.
|
||||
return False
|
||||
elif munkicommon.pref('PackageVerificationMode').lower() in \
|
||||
['hash_strict', 'hash']:
|
||||
elif munkicommon.pref(
|
||||
'PackageVerificationMode').lower() in ['hash_strict', 'hash']:
|
||||
try:
|
||||
os.unlink(destinationpath)
|
||||
except OSError:
|
||||
|
||||
+284
-195
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,6 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.9.0</string>
|
||||
<string>0.9.1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Reference in New Issue
Block a user