Fix for makepkginfo for really old package formats with missing version info.

This commit is contained in:
Greg Neagle
2011-11-01 10:16:10 -07:00
parent 288dbc880a
commit 25c87bdddf
+3 -1
View File
@@ -1145,7 +1145,7 @@ def getOnePackageInfo(pkgpath):
FoundationPlist.NSPropertyListSerializationException):
pkginfo['packageid'] = 'BAD PLIST in %s' % \
os.path.basename(pkgpath)
pkginfo['version'] = '0.0.0.0.0'
pkginfo['version'] = '0.0'
## now look for applications to suggest for blocking_applications
#bomlist = getBomList(pkgpath)
#if bomlist:
@@ -1166,6 +1166,8 @@ def getOnePackageInfo(pkgpath):
info = fileobj.read()
fileobj.close()
infolines = info.splitlines()
pkginfo['version'] = '0.0'
pkginfo['name'] = 'UNKNOWN'
for line in infolines:
parts = line.split(None, 1)
if len(parts) == 2: