From: klu2 Date: Wed, 14 Jun 2006 04:01:11 +0000 (+0000) Subject: Fix two transition issue: X-Git-Tag: edk2-stable201903~25256 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=833b154119b2c08ccaecac2a9d98acd7c1e50f80 Fix two transition issue: 1) Although current PCD tool's code support use packageName, packageGuid, version, arch to identify a module, but these value can not be got from FPD file, so use null for transition phase. 2) Add transition code to check , In future, the checking work should be done by schema checking tools when change occur of from[0..1] to [1] in schema. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@508 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java index fe09be2b9a..473247f847 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java +++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java @@ -1485,15 +1485,15 @@ public class CollectPCDAction { // , It is work around code. // primaryKey1 = UsageInstance.getPrimaryKey(modules.get(index).module.getModuleName(), - translateSchemaStringToUUID(modules.get(index).module.getModuleGuid()), - modules.get(index).module.getPackageName(), - translateSchemaStringToUUID(modules.get(index).module.getPackageGuid()), + null, + null, + null, modules.get(index).module.getArch().toString(), null); primaryKey2 = UsageInstance.getPrimaryKey(modules.get(index2).module.getModuleName(), - translateSchemaStringToUUID(modules.get(index2).module.getModuleGuid()), - modules.get(index2).module.getPackageName(), - translateSchemaStringToUUID(modules.get(index2).module.getPackageGuid()), + null, + null, + null, modules.get(index2).module.getArch().toString(), null); if (primaryKey1.equalsIgnoreCase(primaryKey2)) { @@ -1532,6 +1532,17 @@ public class CollectPCDAction { datum = pcdBuildData.getValue(); maxDatumSize = pcdBuildData.getMaxDatumSize(); + // + // Check is exist? In future, because all schema verification will tools + // will check that, following checking code could be removed. + // + if (pcdBuildData.getTokenSpaceGuid() == null) { + exceptionString = String.format("[FPD file error] There is no for PCD %s in module %s! This is required!", + pcdBuildData.getCName(), + moduleName); + throw new EntityException(exceptionString); + } + // // ------------------------------------------------------------------------------------------- // 2.1.1), Do some necessary checking work for FixedAtBuild, FeatureFlag and PatchableInModule @@ -1676,9 +1687,9 @@ public class CollectPCDAction { // usageInstance = new UsageInstance(token, moduleName, - translateSchemaStringToUUID(modules.get(index).module.getModuleGuid()), - modules.get(index).module.getPackageName(), - translateSchemaStringToUUID(modules.get(index).module.getPackageGuid()), + null, + null, + null, modules.get(index).type, pcdType, modules.get(index).module.getArch().toString(), @@ -1734,6 +1745,16 @@ public class CollectPCDAction { dynamicPcdBuildDataArray = dynamicPcdBuildDefinitions.getPcdBuildDataList(); for (index = 0; index < dynamicPcdBuildDataArray.size(); index ++) { + // + // Check is exist? In future, because all schema verification will tools + // will check that, following checking code could be removed. + // + if (dynamicPcdBuildDataArray.get(index).getTokenSpaceGuid() == null) { + exceptionString = String.format("[FPD file error] There is no for PCD %s in ! This is required!", + dynamicPcdBuildDataArray.get(index).getCName()); + throw new EntityException(exceptionString); + } + dynamicPrimaryKey = Token.getPrimaryKeyString(dynamicPcdBuildDataArray.get(index).getCName(), translateSchemaStringToUUID(dynamicPcdBuildDataArray.get(index).getTokenSpaceGuid())); if (dynamicPrimaryKey.equalsIgnoreCase(token.getPrimaryKeyString())) {