From 43446a5df9c8ada6f977ecdc1ab7a9ff3c4cb9bd Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Thu, 23 Jan 2025 21:05:29 +0530 Subject: [PATCH 1/2] use both AssemblyVersion and Assembly Version Reference: https://github.com/aboutcode-org/scancode-toolkit/issues/3790 Signed-off-by: Alok Kumar --- src/packagedcode/win_pe.py | 1 + ...crosoft.Practices.EnterpriseLibrary.Caching.dll.expected.json | 1 + tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json | 1 + tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json | 1 + tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json | 1 + tests/packagedcode/data/win_pe/chcp.com.expected.json | 1 + tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json | 1 + tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json | 1 + tests/packagedcode/data/win_pe/euc-jp.so.expected.json | 1 + tests/packagedcode/data/win_pe/file.exe.expected.json | 1 + tests/packagedcode/data/win_pe/libiconv2.dll.expected.json | 1 + tests/packagedcode/data/win_pe/libintl3.dll.expected.json | 1 + tests/packagedcode/data/win_pe/stdole2.tlb.expected.json | 1 + tests/packagedcode/data/win_pe/tbs.sys.expected.json | 1 + tests/packagedcode/data/win_pe/tre4.dll.expected.json | 1 + tests/packagedcode/data/win_pe/zlib1.dll.expected.json | 1 + 16 files changed, 16 insertions(+) diff --git a/src/packagedcode/win_pe.py b/src/packagedcode/win_pe.py index 2790cf5a6aa..2400f772eeb 100644 --- a/src/packagedcode/win_pe.py +++ b/src/packagedcode/win_pe.py @@ -110,6 +110,7 @@ def logger_debug(*args): 'ProductVersion', # the actual version 'FileVersion', # another common version 'Assembly Version', # a version common in MSFT, redundant when present with ProductVersion + 'AssemblyVersion', # a version common in MSFT, redundant when present with ProductVersion 'BuildDate', # rare but useful when there 2013/02/04-18:07:46 2018-11-10 14:38 diff --git a/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.expected.json b/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.expected.json index c54cfd4a90d..00c7bed7cc5 100644 --- a/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.expected.json +++ b/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "2.0.0.0", "FileVersion": "2.0.0.0", "Assembly Version": "2.0.0.0", + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft Enterprise Library for .NET", "OriginalFilename": "Microsoft.Practices.EnterpriseLibrary.Caching.dll", diff --git a/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json b/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json index 996b6b9c0ba..f164ecac685 100644 --- a/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json +++ b/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "4.2.1507.0118", "FileVersion": "4.2.1507.0118", "Assembly Version": "4.2.1507.118", + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Moq", "OriginalFilename": "Moq.Silverlight.dll", diff --git a/tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json b/tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json index a7a86d981b2..edde0d9dca7 100644 --- a/tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json +++ b/tests/packagedcode/data/win_pe/Windows.AI.winmd.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.10011.16384", "FileVersion": "10.0.10011.16384", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Windows SDK", "OriginalFilename": "", diff --git a/tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json b/tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json index bd7cdbb0ff2..36292fe45d1 100644 --- a/tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json +++ b/tests/packagedcode/data/win_pe/_ctypes_test.pyd.expected.json @@ -3,6 +3,7 @@ "ProductVersion": null, "FileVersion": null, "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": null, "OriginalFilename": null, diff --git a/tests/packagedcode/data/win_pe/chcp.com.expected.json b/tests/packagedcode/data/win_pe/chcp.com.expected.json index f32b310f048..5d1a1f3d8ee 100644 --- a/tests/packagedcode/data/win_pe/chcp.com.expected.json +++ b/tests/packagedcode/data/win_pe/chcp.com.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.17763.1", "FileVersion": "10.0.17763.1 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "CHCP.COM", diff --git a/tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json b/tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json index f4c972a0396..22dde26f180 100644 --- a/tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json +++ b/tests/packagedcode/data/win_pe/clfs.sys.mui.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.18362.1256", "FileVersion": "10.0.18362.1256 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "Clfs.Sys.MUI", diff --git a/tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json b/tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json index d4eea7da1d6..e49dd23b1e8 100644 --- a/tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json +++ b/tests/packagedcode/data/win_pe/crypt32.dll.mun.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.18362.1256", "FileVersion": "10.0.18362.1256 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "CRYPT32.DLL", diff --git a/tests/packagedcode/data/win_pe/euc-jp.so.expected.json b/tests/packagedcode/data/win_pe/euc-jp.so.expected.json index bd7cdbb0ff2..36292fe45d1 100644 --- a/tests/packagedcode/data/win_pe/euc-jp.so.expected.json +++ b/tests/packagedcode/data/win_pe/euc-jp.so.expected.json @@ -3,6 +3,7 @@ "ProductVersion": null, "FileVersion": null, "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": null, "OriginalFilename": null, diff --git a/tests/packagedcode/data/win_pe/file.exe.expected.json b/tests/packagedcode/data/win_pe/file.exe.expected.json index 1eb171d9749..44e8468cce5 100644 --- a/tests/packagedcode/data/win_pe/file.exe.expected.json +++ b/tests/packagedcode/data/win_pe/file.exe.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "5.03.3414.16721", "FileVersion": "5.03.3414.16721", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "File", "OriginalFilename": "file.exe", diff --git a/tests/packagedcode/data/win_pe/libiconv2.dll.expected.json b/tests/packagedcode/data/win_pe/libiconv2.dll.expected.json index 9ac7a5dcea6..c73fb1e849a 100644 --- a/tests/packagedcode/data/win_pe/libiconv2.dll.expected.json +++ b/tests/packagedcode/data/win_pe/libiconv2.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "1.9.2.1519", "FileVersion": "1.9.2.1519", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "LibIconv", "OriginalFilename": "libiconv2.dll", diff --git a/tests/packagedcode/data/win_pe/libintl3.dll.expected.json b/tests/packagedcode/data/win_pe/libintl3.dll.expected.json index c2e81d04a2e..48c789a1aba 100644 --- a/tests/packagedcode/data/win_pe/libintl3.dll.expected.json +++ b/tests/packagedcode/data/win_pe/libintl3.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "0.14.4.1952", "FileVersion": "0.14.4.1952", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "GetText", "OriginalFilename": "libintl3.dll", diff --git a/tests/packagedcode/data/win_pe/stdole2.tlb.expected.json b/tests/packagedcode/data/win_pe/stdole2.tlb.expected.json index c80f73252c1..d51a91c9b66 100644 --- a/tests/packagedcode/data/win_pe/stdole2.tlb.expected.json +++ b/tests/packagedcode/data/win_pe/stdole2.tlb.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.18362.1256", "FileVersion": "10.0.18362.1256 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "STDOLE2.TLB", diff --git a/tests/packagedcode/data/win_pe/tbs.sys.expected.json b/tests/packagedcode/data/win_pe/tbs.sys.expected.json index 247a8632e0d..39edfdfda4e 100644 --- a/tests/packagedcode/data/win_pe/tbs.sys.expected.json +++ b/tests/packagedcode/data/win_pe/tbs.sys.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "10.0.17763.1697", "FileVersion": "10.0.17763.1697 (WinBuild.160101.0800)", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Microsoft\u00ae Windows\u00ae Operating System", "OriginalFilename": "TBS.SYS", diff --git a/tests/packagedcode/data/win_pe/tre4.dll.expected.json b/tests/packagedcode/data/win_pe/tre4.dll.expected.json index 0377b71b7d4..25c0280c77e 100644 --- a/tests/packagedcode/data/win_pe/tre4.dll.expected.json +++ b/tests/packagedcode/data/win_pe/tre4.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "0.7.5.3276", "FileVersion": "0.7.5.3276", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Tre", "OriginalFilename": "tre4.dll", diff --git a/tests/packagedcode/data/win_pe/zlib1.dll.expected.json b/tests/packagedcode/data/win_pe/zlib1.dll.expected.json index f0327fd6b95..dd5ee0d3675 100644 --- a/tests/packagedcode/data/win_pe/zlib1.dll.expected.json +++ b/tests/packagedcode/data/win_pe/zlib1.dll.expected.json @@ -3,6 +3,7 @@ "ProductVersion": "1.2.3.2532", "FileVersion": "1.2.3.2532", "Assembly Version": null, + "AssemblyVersion": null, "BuildDate": null, "ProductName": "Zlib", "OriginalFilename": "zlib1.dll", From abe6c8ebb6a80803fd8e181b6bf1634c2ee1883a Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Sun, 22 Jun 2025 15:21:10 +0530 Subject: [PATCH 2/2] minor changes Signed-off-by: Alok Kumar --- src/packagedcode/win_pe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packagedcode/win_pe.py b/src/packagedcode/win_pe.py index 2400f772eeb..00225b55541 100644 --- a/src/packagedcode/win_pe.py +++ b/src/packagedcode/win_pe.py @@ -110,7 +110,7 @@ def logger_debug(*args): 'ProductVersion', # the actual version 'FileVersion', # another common version 'Assembly Version', # a version common in MSFT, redundant when present with ProductVersion - 'AssemblyVersion', # a version common in MSFT, redundant when present with ProductVersion + 'AssemblyVersion', # a version common in MSFT, redundant when present with ProductVersion 'BuildDate', # rare but useful when there 2013/02/04-18:07:46 2018-11-10 14:38