<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/BaseTools/Source/Python/Common/Misc.py, branch trunk</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=trunk'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2024-06-04T03:43:08+00:00</updated>
<entry>
<title>Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305b</title>
<updated>2024-06-04T03:43:08+00:00</updated>
<author>
<name>kx</name>
<email>kx@radix.pro</email>
</author>
<published>2024-06-04T03:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7e2ccccace24636f29ddc210b94606abd4c7e42b'/>
<id>urn:sha1:7e2ccccace24636f29ddc210b94606abd4c7e42b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>BaseTools: Fix raw strings containing valid escape characters</title>
<updated>2024-01-10T13:54:01+00:00</updated>
<author>
<name>Joey Vagedes</name>
<email>joey.vagedes@gmail.com</email>
</author>
<published>2023-12-28T16:47:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6c488a2f390d6aacb605b6c370fbe6cc275af4fd'/>
<id>urn:sha1:6c488a2f390d6aacb605b6c370fbe6cc275af4fd</id>
<content type='text'>
Fixes raw regex strings that contain valid (and purposeful) escape
characters as they are being treated as individual characters rather
than the single escaped character they represent (i.e. '\t' is being
treated as a '\' and a 't' rather than a single tab character).

Signed-off-by: Joey Vagedes &lt;joey.vagedes@gmail.com&gt;
Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools: Resolve regex syntax warnings</title>
<updated>2023-12-21T00:33:31+00:00</updated>
<author>
<name>Joey Vagedes via groups.io</name>
<email>joeyvagedes=microsoft.com@groups.io</email>
</author>
<published>2023-12-06T20:27:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9f0061a03b61d282fbc0ba5be22155d06a5e64a1'/>
<id>urn:sha1:9f0061a03b61d282fbc0ba5be22155d06a5e64a1</id>
<content type='text'>
Switches regex patterns to raw text to resolve python 3.12 syntax
warnings in regards to invalid escape sequences, as is suggested by the
re (regex) module in python.

Cc: Rebecca Cran &lt;rebecca@bsdio.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Signed-off-by: Joey Vagedes &lt;joey.vagedes@gmail.com&gt;
Reviewed-by: Rebecca Cran &lt;rebecca@bsdio.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Work around array.array.tostring() removal in python 3.9</title>
<updated>2020-08-14T02:21:18+00:00</updated>
<author>
<name>Cole Robinson</name>
<email>crobinso@redhat.com</email>
</author>
<published>2020-08-11T17:28:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=43bec9ea3d56f3662ede78023baa2a791b66acac'/>
<id>urn:sha1:43bec9ea3d56f3662ede78023baa2a791b66acac</id>
<content type='text'>
In python3, array.array.tostring() was a compat alias for tobytes().
tostring() was removed in python 3.9.

Convert this to use tolist() which should be valid for all python
versions.

This fixes this build error on python3.9:

(Python 3.9.0b5 on linux) Traceback (most recent call last):
  File "/root/edk2/edk2-edk2-stable202002/BaseTools/BinWrappers/PosixLike/../../Source/Python/Trim/Trim.py", line 593, in Main
    GenerateVfrBinSec(CommandOptions.ModuleName, CommandOptions.DebugDir, CommandOptions.OutputFile)
  File "/root/edk2/edk2-edk2-stable202002/BaseTools/BinWrappers/PosixLike/../../Source/Python/Trim/Trim.py", line 449, in GenerateVfrBinSec
    VfrUniOffsetList = GetVariableOffset(MapFileName, EfiFileName, VfrNameList)
  File "/root/edk2/edk2-edk2-stable202002/BaseTools/Source/Python/Common/Misc.py", line 88, in GetVariableOffset
    return _parseForGCC(lines, efifilepath, varnames)
  File "/root/edk2/edk2-edk2-stable202002/BaseTools/Source/Python/Common/Misc.py", line 151, in _parseForGCC
    efisecs = PeImageClass(efifilepath).SectionHeaderList
  File "/root/edk2/edk2-edk2-stable202002/BaseTools/Source/Python/Common/Misc.py", line 1638, in __init__
    if ByteArray.tostring() != b'PE\0\0':
AttributeError: 'array.array' object has no attribute 'tostring'

Signed-off-by: Cole Robinson &lt;crobinso@redhat.com&gt;
Reviewed-by: Yuwei Chen &lt;yuwei.chen@intel.com&gt;
Reviewed-by: Bob Feng &lt;bob.c.feng@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Fix parse PCD GUID expression issue</title>
<updated>2020-05-13T06:37:18+00:00</updated>
<author>
<name>Feng, YunhuaX</name>
<email>YunhuaX.Feng@intel.com</email>
</author>
<published>2020-05-09T00:14:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ceacd9e992cd12f3c07ae1a28a75a6b8750718aa'/>
<id>urn:sha1:ceacd9e992cd12f3c07ae1a28a75a6b8750718aa</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2686

The build tool will give an incorrect GUID value if the GUID includes character ' or " ASCII value.
This patch is going to fix this issue.

Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Signed-off-by: Yunhua Feng &lt;yunhuax.feng@intel.com&gt;
Reviewed-by: Bob Feng &lt;bob.c.feng@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Add map file parsing support for CLANG9</title>
<updated>2019-11-08T00:29:36+00:00</updated>
<author>
<name>Zhiguang Liu</name>
<email>zhiguang.liu@intel.com</email>
</author>
<published>2019-10-29T05:07:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5cef92771fb966b6ebe5eccbd97c2127c091b4e9'/>
<id>urn:sha1:5cef92771fb966b6ebe5eccbd97c2127c091b4e9</id>
<content type='text'>
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;

Signed-off-by: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Add more parameter checking for CopyFileOnChange()</title>
<updated>2019-09-19T00:48:31+00:00</updated>
<author>
<name>Steven Shi</name>
<email>steven.shi@intel.com</email>
</author>
<published>2019-09-18T03:21:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b0c15fb128c518b9acd8611a2deea213e9e55193'/>
<id>urn:sha1:b0c15fb128c518b9acd8611a2deea213e9e55193</id>
<content type='text'>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2193

The current CopyFileOnChange() method in Misc.py does not
accept the input SrcFile parameter as a dir, but the method
does not check the SrcFile is dir or not. This patch is to
add more input parameter type checking and error message output
for method CopyFileOnChange.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Signed-off-by: Steven Shi &lt;steven.shi@intel.com&gt;
Reviewed-by: Bob Feng &lt;bob.c.feng@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools:Remove the unnecessary operation of renaming a file.</title>
<updated>2019-09-17T02:19:05+00:00</updated>
<author>
<name>Feng, Bob C</name>
<email>bob.c.feng@intel.com</email>
</author>
<published>2019-09-04T05:09:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=22e75231aee6361c9c13c0be7f3dd083db8f308e'/>
<id>urn:sha1:22e75231aee6361c9c13c0be7f3dd083db8f308e</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2183

This patch is going to remove rename call to reduce unnecessary
io operation so that saving build time.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Signed-off-by: Zhiju.Fan &lt;zhijux.fan@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Support long file path in windows for misc functions</title>
<updated>2019-08-23T03:26:23+00:00</updated>
<author>
<name>Shi, Steven</name>
<email>steven.shi@intel.com</email>
</author>
<published>2019-08-22T02:43:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6dd9aa40193cc905cda5f97d07e30ffbd5299439'/>
<id>urn:sha1:6dd9aa40193cc905cda5f97d07e30ffbd5299439</id>
<content type='text'>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2103

Current CopyFileOnChange() and SaveFileOnChange() in
BaseTools\Source\Python\Common\Misc.py don't use the dedicated
long file path API to handle the file path strings and cannot
support the long file path copy and save in windows. This patch
enhances them to support the long file path copy and save
correctly.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Signed-off-by: Steven Shi &lt;steven.shi@intel.com&gt;
Reviewed-by: Bob Feng &lt;bob.c.feng@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Improve the file saving and copying reliability</title>
<updated>2019-08-20T06:06:07+00:00</updated>
<author>
<name>Shi, Steven</name>
<email>steven.shi@intel.com</email>
</author>
<published>2019-08-15T14:26:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=94459080c118049aba927ec0444ba5b750b7d2c9'/>
<id>urn:sha1:94459080c118049aba927ec0444ba5b750b7d2c9</id>
<content type='text'>
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2079

The Basetool CopyFileOnChange() and SaveFileOnChange()
functions might raise the IOError occasionally when build
in Windows with multi-process and build cache enabled.
The CopyFileOnChange() and SaveFileOnChange() might be invoked
in multiple sub-processes simultaneously, and this patch adds
global locks to sync these functions invoking which can
harden their reliability.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Bob Feng &lt;bob.c.feng@intel.com&gt;
Signed-off-by: Steven Shi &lt;steven.shi@intel.com&gt;
Reviewed-by: Bob Feng &lt;bob.c.feng@intel.com&gt;
</content>
</entry>
</feed>
