OK, it means we just need to check dec file

Best Regards
Heng

> -----Original Message-----
> From: Gao, Liming <liming....@intel.com>
> Sent: Tuesday, March 31, 2020 10:52 AM
> To: Luo, Heng <heng....@intel.com>; Ni, Ray <ray...@intel.com>;
> devel@edk2.groups.io
> Cc: Bi, Dandan <dandan...@intel.com>; Dong, Eric <eric.d...@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to
> package path
> 
> Ray:
>   Package has dec file in its root directory. Package DSC file is optional.
> 
> Thanks
> Liming
> -----Original Message-----
> From: Luo, Heng <heng....@intel.com>
> Sent: 2020年3月31日 9:25
> To: Ni, Ray <ray...@intel.com>; devel@edk2.groups.io
> Cc: Bi, Dandan <dandan...@intel.com>; Gao, Liming <liming....@intel.com>;
> Dong, Eric <eric.d...@intel.com>
> Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature domains to
> package path
> 
> Hi Liming,
> I will apply the change below if you agree to  we treat a folder that contains
> ".dec" and "dsc" files as a package directory:
> 
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index
> b9ad980510..bb25699ed8 100644
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -16,6 +16,7 @@ imported functions from board directory  import os
> import re  import sys
> +import glob
>  import signal
>  import shutil
>  import argparse
> @@ -123,7 +124,10 @@ def pre_build(build_config, build_type="DEBUG",
> silent=False, toolchain=None):
>      # add all feature domains in WORKSPACE_FEATURES to package path
>      for filename in os.listdir(config["WORKSPACE_FEATURES"]):
>          filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> -        if os.path.isdir(filepath):
> +        # feature domains folder does not contain dec or dsc file
> +        if os.path.isdir(filepath) and \
> +          not glob.glob(os.path.join(filepath, "*.dec")) and \
> +          not glob.glob(os.path.join(filepath, "*.dsc")):
>              config["PACKAGES_PATH"] += os.pathsep + filepath
>      config["PACKAGES_PATH"] += os.pathsep + config["WORKSPACE_DRIVERS"]
>      config["PACKAGES_PATH"] += os.pathsep + \
> 
> Best Regards
> Heng
> 
> > -----Original Message-----
> > From: Ni, Ray <ray...@intel.com>
> > Sent: Monday, March 30, 2020 5:01 PM
> > To: Luo, Heng <heng....@intel.com>; devel@edk2.groups.io
> > Cc: Bi, Dandan <dandan...@intel.com>; Gao, Liming
> > <liming....@intel.com>; Dong, Eric <eric.d...@intel.com>
> > Subject: RE: [PATCH 1/3] Platform/Intel: Add all pathes of feature
> > domains to package path
> >
> > > +    # add all feature domains in WORKSPACE_FEATURES to package path
> > > +    for filename in os.listdir(config["WORKSPACE_FEATURES"]):
> > > +        filepath = os.path.join(config["WORKSPACE_FEATURES"], filename)
> > > +        if os.path.isdir(filepath):
> > > +            config["PACKAGES_PATH"] += os.pathsep + filepath
> >
> > Will this change include "AdvancedFeaturePkg" and "TemplateFeaturePkg"
> > folder as well?
> >
> > Can you please revise the patch to skip adding folders that contains
> > package contents to the PACKAGES_PATH?
> >
> > Liming,
> > What's the criteria of a package? Can we treat a folder that contains ".dec"
> > and "dsc" files as a package directory?
> >
> > Thanks,
> > Ray

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56713): https://edk2.groups.io/g/devel/message/56713
Mute This Topic: https://groups.io/mt/72646657/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to