public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yuwei Chen" <yuwei.chen@intel.com>
To: "Liang, MingyueX" <mingyuex.liang@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Feng, Bob C" <bob.c.feng@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>
Subject: Re: [PATCH V2] BaseTools: Resolve index out of range errors.
Date: Mon, 16 Nov 2020 00:40:23 +0000	[thread overview]
Message-ID: <DM5PR11MB1594770999713A40AB8198C796E30@DM5PR11MB1594.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201113073301.1028-1-mingyuex.liang@intel.com>

Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>

> -----Original Message-----
> From: Mingyue Liang <mingyuex.liang@intel.com>
> Sent: Friday, November 13, 2020 3:33 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
> Subject: [PATCH V2] BaseTools: Resolve index out of range errors.
> 
> This problem is generated by solving bz2972's patch, and the commit ID is
> 0af7f8e6a9253960ba820cd6ddfd8c36543d30cb.
> 
> This is a problem when updating the DEPs file.
> The code does not consider that there is only one line of content in the file,
> so the filter condition is added to prevent the index from exceeding the
> range.
> 
> Signed-off-by: Mingyue Liang <mingyuex.liang@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
> 
> V2:
>   Change the title to make it clearer and more descriptive.
> 
>  BaseTools/Source/Python/AutoGen/IncludesAutoGen.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> index b06ef42573fd..5ec26eb98b42 100644
> --- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
> @@ -291,7 +291,8 @@ ${END}
>                  targetitem = self.GetRealTarget(source_abs.strip(" :"))
> 
>                  targetitem += ": "
> -                targetitem += lines[1]
> +                if len(lines)>=2:
> +                    targetitem += lines[1]
>                  newcontent.append(targetitem)
>                  newcontent.extend(lines[2:])
>                  newcontent.append("\n")
> --
> 2.29.2.windows.2


  reply	other threads:[~2020-11-16  0:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13  7:33 [PATCH V2] BaseTools: Resolve index out of range errors Mingyue Liang
2020-11-16  0:40 ` Yuwei Chen [this message]
2020-11-18  1:40 ` Bob Feng
     [not found] ` <164876971E6C4F0C.5807@groups.io>
2020-11-18  2:23   ` [edk2-devel] " Bob Feng
2020-11-18  5:36     ` 回复: " gaoliming
2020-11-19  2:18       ` Bob Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM5PR11MB1594770999713A40AB8198C796E30@DM5PR11MB1594.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox