From 9f9ed8bc566438aaa069cdecff9179861987ff10 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 15 Mar 2011 20:31:18 +0000 Subject: [PATCH] fix failure to update import.xml hash after modifying it --- direct/src/p3d/PatchMaker.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/direct/src/p3d/PatchMaker.py b/direct/src/p3d/PatchMaker.py index 0efa12f255..ba7bd3b222 100644 --- a/direct/src/p3d/PatchMaker.py +++ b/direct/src/p3d/PatchMaker.py @@ -526,7 +526,8 @@ class PatchMaker: # Also copy the seq to the import desc file, for # documentation purposes. - importDescFullpath = Filename(self.patchMaker.installDir, self.packageDesc.cStr()[:-3] + 'import.xml') + importDescFilename = self.packageDesc.cStr()[:-3] + 'import.xml' + importDescFullpath = Filename(self.patchMaker.installDir, importDescFilename) doc = TiXmlDocument(importDescFullpath.toOsSpecific()) if doc.LoadFile(): xpackage = doc.FirstChildElement('package') @@ -544,6 +545,13 @@ class PatchMaker: fileSpec.fromFile(self.patchMaker.installDir, self.packageDesc) fileSpec.storeXml(self.contentsDocPackage) + # Also important to update the import.xml hash. + ximport = self.contentsDocPackage.FirstChildElement('import') + if ximport: + fileSpec = FileSpec() + fileSpec.fromFile(self.patchMaker.installDir, importDescFilename) + fileSpec.storeXml(ximport) + # Also copy the package seq value into the # contents.xml file, mainly for documentation purposes # (the authoritative seq value is within the desc