<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14723</bug_id>
          
          <creation_ts>2022-02-17 01:02:52 +0000</creation_ts>
          <short_desc>patches not applied by devtool when using overrides in SRC_URI</short_desc>
          <delta_ts>2025-05-18 12:53:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>IN PROGRESS DESIGN</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathan Richardson">jon.richardson</reporter>
          <assigned_to name="Chris Laplante">chris.laplante</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>chris.laplante</cc>
    
    <cc>ernstp</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sam.birch</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92568</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2022-02-17 01:02:52 +0000</bug_when>
    <thetext>I have a recipe that specifies patches with SRC_URI overrides. Any override causes the patches to not be applied. Eg-

FILESEXTRAPATHS_prepend_${MACHINE_ARCH} := &quot;${THISDIR}/${PN}:${THISDIR}/${PN}/${MACHINE_ARCH}:&quot;
SRC_URI += &quot; \
            file://base-ces.cfg \
           &quot;
SRC_URI_append_penguin = &quot; \
            file://0001-add-penguin-specific-dts.patch \
            file://0002-Add-M41T80-RTC.patch \
           &quot;

Directory: linux-variscite/penguin/:
0001-add-penguin-specific-dts.patch
0002-Add-M41T80-RTC.patch

If I move the patches into SRC_URI it works. This is similar to #14060 but the fix didn&apos;t resolve the issue for me. I moved to master and still see the issue:

Build Configuration:
BB_VERSION           = &quot;1.46.0&quot;
BUILD_SYS            = &quot;x86_64-linux&quot;
NATIVELSBSTRING      = &quot;ubuntu-18.04&quot;
TARGET_SYS           = &quot;aarch64-poky-linux&quot;
MACHINE              = &quot;penguin&quot;
DISTRO               = &quot;ces-linux&quot;
DISTRO_VERSION       = &quot;CES-1.1.1.B59-20220217003750&quot;
TUNE_FEATURES        = &quot;aarch64 cortexa53 crc crypto&quot;
TARGET_FPU           = &quot;&quot;
meta                 
meta-poky            = &quot;master:fca7b22674a2e23fb1cfcc46550531154c90fee6&quot;

Additionally, the SRC_URI has a second git repo and it doesn&apos;t get copied over to WORKDIR, even though it&apos;s in the temporary workdir if I use devtool modify linux-variscite --keep-temp. See cst-certs below.

jonr@jonr:~/work/yocto/latest2/build_penguin/tmp/work/penguin-poky-linux/linux-variscite/5.4.142+gitAUTOINC+meta_machine-r0/devtooltmp-61aflsh1$ ll
total 148
drwx------ 5 jonr jonr   4096 Feb 16 16:37 ./
drwxrwxr-x 7 jonr jonr   4096 Feb 16 16:25 ../
-rw-rw-r-- 1 jonr jonr 122545 Feb 16 16:37 .config
-rw-rw-r-- 1 jonr jonr     40 Feb 16 16:33 initial_rev
-rw-rw-r-- 1 jonr jonr    154 Feb 16 16:33 srcsubdir
drwxrwxr-x 3 jonr jonr   4096 Feb 16 16:25 stamps/
drwxrwxr-x 2 jonr jonr   4096 Feb 16 16:37 temp/
drwxrwxr-x 7 jonr jonr   4096 Feb 16 16:37 workdir/

jonr@jonr:~/work/yocto/latest2/build_penguin/tmp/work/penguin-poky-linux/linux-variscite/5.4.142+gitAUTOINC+meta_machine-r0/devtooltmp-61aflsh1$ ll workdir/
total 64
drwxrwxr-x 7 jonr jonr  4096 Feb 16 16:37 ./
drwx------ 5 jonr jonr  4096 Feb 16 16:37 ../
-rw-rw-r-- 1 jonr jonr  6242 Jan 31 17:25 0001-add-penguin-specific-dts.patch
-rw-rw-r-- 1 jonr jonr   795 Feb 14 14:51 0002-Add-M41T80-RTC.patch
drwxr-xr-x 4 jonr jonr  4096 Feb 16 16:37 build/
drwxr-xr-x 3 jonr jonr  4096 Feb 16 16:26 cst/
drwxr-xr-x 5 jonr jonr  4096 Feb 16 16:26 cst-certs/
-rw-r--r-- 1 jonr jonr 22917 Feb 16 16:33 defconfig
drwxrwxr-x 4 jonr jonr  4096 Feb 16 16:36 recipe-sysroot/
drwxrwxr-x 8 jonr jonr  4096 Feb 16 16:36 recipe-sysroot-native/
jonr@jonr:~/work/yocto/latest2/build_penguin/tmp/work/penguin-poky-linux/linux-variscite/5.4.142+gitAUTOINC+meta_machine-r0/devtooltmp-61aflsh1$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92573</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-02-17 15:41:24 +0000</bug_when>
    <thetext>Did this work before the over-rides change?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92583</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2022-02-17 18:04:53 +0000</bug_when>
    <thetext>Yes, if I remove all overrides then it works fine. As soon as there is any override, even if it doesn&apos;t apply to the currently configured machine it fails.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92584</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">saul.wold</who>
    <bug_when>2022-02-17 18:18:33 +0000</bug_when>
    <thetext>If you change

SRC_URI_append_penguin = &quot; \

to 

SRC_URI:append:penguin = &quot; \

does it work?  This is the new override mechanism, if this works then it means the devtool needs to be fixed (which is likely the case).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92585</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2022-02-17 18:51:28 +0000</bug_when>
    <thetext>I&apos;m getting an error with that new syntax. Do you have a commit # that implemented it?

ERROR: ParseError at /home/jonr/work/yocto/latest2/sources/meta-ces-linux/dynamic-layers/variscite-fslc/recipes-kernel/linux/linux-variscite_%.bbappend:9: unparsed line: &apos;SRC_URI:append:penguin = &quot;&apos;:01:05</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92586</commentid>
    <comment_count>5</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2022-02-17 19:39:56 +0000</bug_when>
    <thetext>Please disregard my previous comment. I introduced the syntax error. Using the new override still doesn&apos;t make a difference to devtool though unfortunately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93112</commentid>
    <comment_count>6</comment_count>
    <who name="Saul Wold">saul.wold</who>
    <bug_when>2022-04-16 23:41:05 +0000</bug_when>
    <thetext>Hi Jonathan, 

I want to double check your failure mode. Does devtool modify complete the extraction/patching correctly or does it fail to create the workspace/sources/linux-variscite?

If it completes correctly, when you look at the git repo that&apos;s created by devtool in workspace/sources/linux-variscite/ are there branches for the overrides?  Are you changes in the devtool-override-penguin?

Can you provide a sample layer that fails if the above information does not help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93179</commentid>
    <comment_count>7</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2022-04-25 22:06:37 +0000</bug_when>
    <thetext>Hi Saul,

devtool modify does extract the source code, and it creates the override specific branches, but the patches aren&apos;t applied. The patches are in the .kernel-meta directory:

jon@jon:~/work/yocto/latest/build_penguin/linux-variscite/.kernel-meta$ tree
.
├── bsp_definition
├── cfg
│   ├── merge_config_build.log
│   └── scratch
├── config.queue
├── configs
│   ├── base-ces.cfg
│   └── defconfig
├── meta-series
├── non-hardware_frags.txt
├── patches
│   ├── 0001-add-penguin-specific-dts.patch
│   ├── 0001-kthread-Fix-PF_KTHREAD-vs-to_kthread-race.patch
│   ├── 0002-Add-M41T80-RTC.patch
│   └── 0003-change-usb1-to-otg.patch
├── patch.queue
└── series -&gt; patch.queue

4 directories, 13 files


$ git branch
commit fe01a41af899ae24944993b5293223430f7a6bbe (HEAD -&gt; devtool, tag: devtool-patched, tag: devtool-base, origin/5.4-2.1.x-imx_var01, devtool-override-penguin, devtool-no-overrides)
Author: Alexander Herfurtner &lt;alexander.h@variscite.com&gt;
Date:   Thu Apr 7 22:35:38 2022 +0200

    imx7d-var-som: Override FEC property phy-mode for ADIN PHY


I&apos;ll try to get you an example using the linux-yocto recipe soon so you can reproduce easily. I&apos;m using a different kernel recipe (so you avoid having to pull in meta-variscite-fslc. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93188</commentid>
    <comment_count>8</comment_count>
      <attachid>4864</attachid>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2022-04-27 23:05:31 +0000</bug_when>
    <thetext>Created attachment 4864
test layer for linux-yocto</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93189</commentid>
    <comment_count>9</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2022-04-27 23:07:41 +0000</bug_when>
    <thetext>I&apos;ve attached a test layer. Just set MACHINE = penguin. It&apos;s a copy of a qemu machine conf. Then devtool modify linux-yocto</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93205</commentid>
    <comment_count>10</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-04-28 15:02:06 +0000</bug_when>
    <thetext>Leaving as M2. Jonathan, let us know if that&apos;s a problem for you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93899</commentid>
    <comment_count>11</comment_count>
    <who name="Ernst Persson">ernstp</who>
    <bug_when>2022-08-25 12:15:43 +0000</bug_when>
    <thetext>Ah this happens on Dunfell 3.1.19 also.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96703</commentid>
    <comment_count>12</comment_count>
    <who name="Chris Laplante">chris.laplante</who>
    <bug_when>2023-10-13 14:47:29 +0000</bug_when>
    <thetext>I&apos;ve submitted a patch series (with selftests) that fixes this issue here: https://lists.openembedded.org/g/openembedded-core/message/189023.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96719</commentid>
    <comment_count>13</comment_count>
    <who name="Chris Laplante">chris.laplante</who>
    <bug_when>2023-10-18 17:51:20 +0000</bug_when>
    <thetext>There are issues with my approach, so this isn&apos;t ready unfortunately. See my follows up on the mailing list: https://lists.openembedded.org/g/openembedded-core/topic/patch_1_3_kernel_yocto/101926734?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,101926734,previd%3D1697651377341095300,nextid%3D1697630480059494786&amp;previd=1697651377341095300&amp;nextid=1697630480059494786</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4864</attachid>
            <date>2022-04-27 23:05:31 +0000</date>
            <delta_ts>2022-04-27 23:05:31 +0000</delta_ts>
            <desc>test layer for linux-yocto</desc>
            <filename>meta-testkernel.tar.gz</filename>
            <type>application/gzip</type>
            <size>2015</size>
            <attacher name="Jonathan Richardson">jon.richardson</attacher>
            
              <data encoding="base64">H4sICArLaWIAA21ldGEtdGVzdGtlcm5lbC50YXIA7Vp5d9pIEvff+hT1bO/LZLCEJIRw2MvYyBM2
HB6BJ8mbndXT0UBPdDBqycbryXffagkwJj4nCfP2pX/2Q0dXVR91dJWkiGSunBGWfSBpTMLqzleA
img06vyoNerq+nGJHc3Qa/hnmnptR9XwrL4D9a8xmE3kLHNTgJ1fk/hBusfa/08Rbeg/JT6dESZ/
SXN4hv4NrnhVq+Op0P828Ij+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