mirror of
https://github.com/munki/munki.git
synced 2026-04-24 22:08:33 -05:00
Changes to getInstalledPackageVersion(pkgid) to deal with Leopard and later's package database, which does not always preserve the full five-part version number.
git-svn-id: http://munki.googlecode.com/svn/trunk@181 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -613,7 +613,11 @@ def getInstalledPackageVersion(pkgid):
|
||||
|
||||
if pkgid == foundbundleid:
|
||||
display_debug2("\tThis machine has %s, version %s" % (pkgid, foundvers))
|
||||
return padVersionString(foundvers,5)
|
||||
components = str(foundvers).split(".")
|
||||
if len(components) > 2:
|
||||
return foundvers
|
||||
else:
|
||||
return padVersionString(foundvers,3)
|
||||
|
||||
# This package does not appear to be currently installed
|
||||
display_debug2("\tThis machine does not have %s" % pkgid)
|
||||
|
||||
Reference in New Issue
Block a user