From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web12.2153.1598983449313492258 for ; Tue, 01 Sep 2020 11:04:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F1O6F+wi; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598983448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2vx+e9RuEo/OMwtH/9Yjo9yLTMAipk/Lqwh1dfFZARU=; b=F1O6F+wiCKbh1Exi85264GhwT2wAU1lbr7tHyJeD8WNAMwOjsotaRgcFpTlqrUQvZUIdYA tN2V8d1UlMkH/DN3w3/3/COANV1lXrXH5jLpF7EM44DX0HPSdFgqV3v619ggyB4jzxFRNd 9SG9MNKGSw7mhzM1nKoVI/PB46OK+nQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-406-nGzcdT4lNLip91Wa7JZ9Qg-1; Tue, 01 Sep 2020 14:03:58 -0400 X-MC-Unique: nGzcdT4lNLip91Wa7JZ9Qg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F8A918A2243; Tue, 1 Sep 2020 18:03:57 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-251.ams2.redhat.com [10.36.112.251]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7AED45C1BB; Tue, 1 Sep 2020 18:03:55 +0000 (UTC) Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtQYXRjaCBWMl0gQmFzZVRvb2xzL0VjYzogRml4IGFuIGlzc3VlIG9mIHBhdGggc2VwYXJhdG9yIGNvbXBhdGliaWxpdHk=?= To: devel@edk2.groups.io, gaoliming@byosoft.com.cn, bob.c.feng@intel.com Cc: 'Yuwei Chen' , 'Shenglei Zhang' References: <20200901102315.38840-1-bob.c.feng@intel.com> <003f01d6806e$1885ad20$49910760$@byosoft.com.cn> From: "Laszlo Ersek" Message-ID: <46e6486c-a9f2-49f6-a7fe-93ec67a664d8@redhat.com> Date: Tue, 1 Sep 2020 20:03:54 +0200 MIME-Version: 1.0 In-Reply-To: <003f01d6806e$1885ad20$49910760$@byosoft.com.cn> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Language: en-US On 09/01/20 16:42, gaoliming wrote: > Reviewed-by: Liming Gao Merged in commit 751355992635, via . Thanks Laszlo >> -----邮件原件----- >> 发件人: bounce+27952+64887+4905953+8761045@groups.io >> 代表 Bob Feng >> 发送时间: 2020年9月1日 18:23 >> 收件人: devel@edk2.groups.io >> 抄送: Liming Gao ; Yuwei Chen >> ; Shenglei Zhang >> 主题: [edk2-devel] [Patch V2] BaseTools/Ecc: Fix an issue of path > separator >> compatibility >> >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2904 >> >> 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 = """ >> 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 = %s group by BelongsToFile) and >> B.BelongsToFile = A.ID and B.Model = %s) >> and (Model = %s or Model = %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 = EccGlobalData.gDb.TblInf.Exec(SqlCommand) >> for Record in RecordSet: >> Path = Record[1] >> Path = 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 = Pcd[3] >> BelongsToFile = Pcd[4] >> SqlCommand = """ >> select ID from File where FullPath in >> - (select B.Path || '\\' || A.Value1 from INF >> as A, File as B where A.Model = %s and A.BelongsToFile = %s >> + (select B.Path || '%s' || A.Value1 from >> INF as A, File as B where A.Model = %s and A.BelongsToFile = %s >> and B.ID = %s and (B.Model = %s or >> B.Model = %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 = >> EccGlobalData.gDb.TblFile.Exec(SqlCommand) >> for Tbl in TableSet: >> TblName = 'Identifier' + str(Tbl[0]) >> SqlCommand = """ >> select Name, ID from %s where >> value like '%s' and Model = %s >> -- >> 2.20.1.windows.1 >> >> >> > > > > > >