If this broke another use case, send the details and I'll debug it here.
But these changes are required for some configurations, so I'm not going to
simply revert.

Bruce


On Thu, Sep 29, 2022 at 12:37 PM Jose Quaresma <[email protected]>
wrote:

> This reverts commit 9320c2a1aaa085e94abd15ede0d93ffdab578e9d.
>
> The strip_common_prefix function is changed in a way that they will
> use the expanded path of the input argument.
> There are some changes in the process_file function for the *.cfg files
> only and not none for *.scc, *.patch and *defconfig.
>
> This doesn't work for cases where we have the defconfig files
> provided in the some meta-layer and fail with:
>
> [ERROR]: processing of file /tmp/tmp.8hcr45TMiO failed
>
> The content of the '/tmp/tmp.8hcr45TMiO' file is currently:
>
> | #
> | # spp v0.8
> | # processed: Thu Sep 29 04:15:36 PM UTC 2022
> | #
> | # This is a preprocessor output file, do not edit
> | #
> | #
> | prefix
> | kconf non-hardware
> /build/conf/../../layers/meta-lmp/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-dev-mfgtool/imx8mq-evk/defconfig
> | # run time: 0 seconds
> | # processed files:
> | # _cfg
> /build/conf/../../layers/meta-lmp/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-dev-mfgtool/imx8mq-evk/defconfig
>
> and with this patch applied (without 9320c2a):
>
> | #
> | # spp v0.8
> | # processed: Thu Sep 29 04:18:21 PM UTC 2022
> | #
> | # This is a preprocessor output file, do not edit
> | #
> | #
> | prefix
> /build/conf/../../layers/meta-lmp/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-dev-mfgtool/imx8mq-evk/defconfig
> | kconf non-hardware
> /build/conf/../../layers/meta-lmp/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-dev-mfgtool/imx8mq-evk/defconfig
> | # run time: 0 seconds
> | # processed files:
> | # _cfg
> /build/conf/../../layers/meta-lmp/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-dev-mfgtool/imx8mq-evk/defconfig
>
> so the 9320c2a patch removes the prefix in this use case.
>
> Signed-off-by: Jose Quaresma <[email protected]>
> ---
>  tools/scc-cmds/kconf.cmd |  4 ----
>  tools/spp                | 17 ++---------------
>  2 files changed, 2 insertions(+), 19 deletions(-)
>
> diff --git a/tools/scc-cmds/kconf.cmd b/tools/scc-cmds/kconf.cmd
> index e0d4351..a98ae99 100644
> --- a/tools/scc-cmds/kconf.cmd
> +++ b/tools/scc-cmds/kconf.cmd
> @@ -53,10 +53,6 @@ kconf() {
>      eval echo
> "configs/${cbranch_name}/${relative_config_dir}/${simple_config_name} \#
> ${type}" >> "${configqueue}"
>      eval echo "\$text" $outfile_append
>
> -    if [ -n "${verbose}" ]; then
> -        echo "config: rel: ${relative_config_dir} name:
> ${simple_config_name} [${cbranch_name}][${prefix}]" >&2
> -    fi
> -
>      if [ "${type}" == "hardware" ]; then
>          echo
> "${outdir}/configs/${cbranch_name}/${relative_config_dir}/${simple_config_name}"
> >> ${outdir}/hardware_frags.txt
>      fi
> diff --git a/tools/spp b/tools/spp
> index f9bb76b..4d3fa10 100755
> --- a/tools/spp
> +++ b/tools/spp
> @@ -113,11 +113,6 @@ warn()
>  strip_common_prefix()
>  {
>      in_name=$1
> -    if [ -n "$in_name" ]; then
> -       in_name=$(readlink -f $in_name)
> -    fi
> -
> -    # >&2 echo "strip_common_prefix: $1 -> $in_name"
>
>      # this takes an input name and searches all known paths.
>      # the relocation that removes the MOST from the original is
> @@ -437,7 +432,6 @@ header()
>             one_less_dir=${d%/}
>             # strip last path component
>             one_less_dir=${one_less_dir%/*}
> -           one_less_dir=$(readlink -f $one_less_dir)
>
>             echo "reloc_dir $one_less_dir"
>         done
> @@ -516,17 +510,10 @@ process_file()
>                  echo "[ERROR]: could not find config fragment: $in"
>                  exit 1
>              fi
> -            # old
> -            # relative_kconf=$(strip_common_prefix $kconf_name)
> -            # containing_dir=${kconf_name/$relative_kconf}
> -            # new
> -            relative_kconf=$(strip_common_prefix $kconf_name_new)
> -            containing_dir=${kconf_name_new/$relative_kconf}
> +            relative_kconf=$(strip_common_prefix $kconf_name)
> +            containing_dir=${kconf_name/$relative_kconf}
>              echo "prefix ${containing_dir}"
>              echo "kconf non-hardware ${kconf_name_new}"
> -
> -            # >&2 echo "kconf_name: $kconf_name kconf_name_new:
> $kconf_name_new"
> -            # >&2 echo "relative_kconf: $relative_kconf prefix:
> $containing_dir"
>              return
>              ;;
>          *defconfig)
> --
> 2.34.1
>
>
> 
>
>

-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11742): 
https://lists.yoctoproject.org/g/linux-yocto/message/11742
Mute This Topic: https://lists.yoctoproject.org/mt/93998449/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to