From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.243]) by mx.groups.io with SMTP id smtpd.web12.10616.1599007150792973544 for ; Tue, 01 Sep 2020 17:39:11 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.243, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 02 Sep 2020 08:39:07 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , Cc: "'Yuwei Chen'" , "'Shenglei Zhang'" References: <20200901102315.38840-1-bob.c.feng@intel.com> <003f01d6806e$1885ad20$49910760$@byosoft.com.cn> <46e6486c-a9f2-49f6-a7fe-93ec67a664d8@redhat.com> In-Reply-To: <46e6486c-a9f2-49f6-a7fe-93ec67a664d8@redhat.com> Subject: =?UTF-8?B?5Zue5aSNOiDlm57lpI06IFtlZGsyLWRldmVsXSBbUGF0Y2ggVjJdIEJhc2VUb29scy9FY2M6IEZpeCBhbiBpc3N1ZSBvZiBwYXRoIHNlcGFyYXRvciBjb21wYXRpYmlsaXR5?= Date: Wed, 2 Sep 2020 08:39:09 +0800 Message-ID: <000e01d680c1$78c8fe50$6a5afaf0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHqPvJ7Q3TbrIYwjtu9r+Hh4uAMNgKJCiOZAfyQOZupCNgsIA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Laszlo: Thank you! Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+64917+4905953+8761045@groups.i= o > =E4=BB=A3=E8=A1=A8 Laszlo= Ersek > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B49=E6=9C=882=E6=97=A5 = 2:04 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaoliming@byosoft.com= .cn; > bob.c.feng@intel.com > =E6=8A=84=E9=80=81: 'Yuwei Chen' ; 'Shenglei Zhang= ' > > =E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D: [edk2-devel] [Patch V2] Base= Tools/Ecc: Fix an issue of path > separator compatibility >=20 > On 09/01/20 16:42, gaoliming wrote: > > Reviewed-by: Liming Gao >=20 > Merged in commit 751355992635, via > . >=20 > Thanks > Laszlo >=20 > >> -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > >> =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+64887+4905953+8761045@group= s.io > >> =E4=BB=A3=E8=A1=A8 Bob= Feng > >> =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B49=E6=9C=881=E6=97= =A5 18:23 > >> =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > >> =E6=8A=84=E9=80=81: Liming Gao ; Yuwei Chen > >> ; Shenglei Zhang > >> =E4=B8=BB=E9=A2=98: [edk2-devel] [Patch V2] BaseTools/Ecc: Fix an iss= ue of path > > separator > >> compatibility > >> > >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2904 > >> > >> The path separator is different in Windows and Linux, the > >> original code does not handle this difference. This patch > >> is to fix this issue. > >> > >> Signed-off-by: Bob Feng > >> Cc: Liming Gao > >> Cc: Yuwei Chen > >> Cc: Shenglei Zhang > >> --- > >> V2 > >> Change to a better method to get path separator. > >> > >> BaseTools/Source/Python/Ecc/Check.py | 8 ++++---- > >> 1 file changed, 4 insertions(+), 4 deletions(-) > >> > >> diff --git a/BaseTools/Source/Python/Ecc/Check.py > >> b/BaseTools/Source/Python/Ecc/Check.py > >> index 0fdc7e35c1..6087abfa4d 100644 > >> --- a/BaseTools/Source/Python/Ecc/Check.py > >> +++ b/BaseTools/Source/Python/Ecc/Check.py > >> @@ -1101,15 +1101,15 @@ class Check(object): > >> for Item in InfPathSet: > >> if Item[0] not in InfPathList: > >> InfPathList.append(Item[0]) > >> SqlCommand =3D """ > >> select ID, Path, FullPath from File where > >> upper(FullPath) not in > >> - (select upper(A.Path) || '\\' || > >> upper(B.Value1) from File as A, INF as B > >> + (select upper(A.Path) || '%s' || > >> upper(B.Value1) from File as A, INF as B > >> where A.ID in (select BelongsToFile > from > >> INF where Model =3D %s group by BelongsToFile) and > >> B.BelongsToFile =3D A.ID and B.Model > =3D %s) > >> and (Model =3D %s or Model =3D %s) > >> - """ % (MODEL_EFI_SOURCE_FILE, > >> MODEL_EFI_SOURCE_FILE, MODEL_FILE_C, MODEL_FILE_H) > >> + """ % (os.sep, MODEL_EFI_SOURCE_FILE, > >> MODEL_EFI_SOURCE_FILE, MODEL_FILE_C, MODEL_FILE_H) > >> RecordSet =3D EccGlobalData.gDb.TblInf.Exec(SqlCommand) > >> for Record in RecordSet: > >> Path =3D Record[1] > >> Path =3D Path.upper().replace('\X64', '').replace('\= IA32', > >> '').replace('\EBC', '').replace('\IPF', '').replace('\ARM', '') > >> if Path in InfPathList: > >> @@ -1130,13 +1130,13 @@ class Check(object): > >> if Pcd[3]: > >> PcdName =3D Pcd[3] > >> BelongsToFile =3D Pcd[4] > >> SqlCommand =3D """ > >> select ID from File where FullPath in > >> - (select B.Path || '\\' || A.Value1 from > INF > >> as A, File as B where A.Model =3D %s and A.BelongsToFile =3D %s > >> + (select B.Path || '%s' || A.Value1 from > >> INF as A, File as B where A.Model =3D %s and A.BelongsToFile =3D %s > >> and B.ID =3D %s and (B.Model =3D %s or > >> B.Model =3D %s)) > >> - """ % (MODEL_EFI_SOURCE_FILE, > >> BelongsToFile, BelongsToFile, MODEL_FILE_C, MODEL_FILE_H) > >> + """ % (os.sep, > >> MODEL_EFI_SOURCE_FILE, BelongsToFile, BelongsToFile, MODEL_FILE_C, > >> MODEL_FILE_H) > >> TableSet =3D > >> EccGlobalData.gDb.TblFile.Exec(SqlCommand) > >> for Tbl in TableSet: > >> TblName =3D 'Identifier' + str(Tbl[0]) > >> SqlCommand =3D """ > >> select Name, ID from %s where > >> value like '%s' and Model =3D %s > >> -- > >> 2.20.1.windows.1 > >> > >> > >> > > > > > > > > > > > > >=20 >=20 >=20