<?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>9982</bug_id>
          
          <creation_ts>2016-07-19 19:26:53 +0000</creation_ts>
          <short_desc>Move patches directory to WORKDIR/patches from S/patches</short_desc>
          <delta_ts>2025-12-11 16:26:42 +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>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</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>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Lord">chrislord.net</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>brendan.le.foll</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
    
    <cc>thomas.epperson</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64192</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Lord">chrislord.net</who>
    <bug_when>2016-07-19 19:26:53 +0000</bug_when>
    <thetext>The do_install function defined by npm.bbclass does this:

npm_do_install() {
	mkdir -p ${NPM_INSTALLDIR}/
	cp -a ${S}/* ${NPM_INSTALLDIR}/ --no-preserve=ownership
}

This is roughly equivalent of what node does, I think, except that bitbake will put the patches directory in ${S}, so you end up packaging any patches for the recipe being built.

It might be nice to have an exclusion list for files/directories not to be included in npm_do_install, and certainly recipe files should not be packaged by default.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64193</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-19 19:32:31 +0000</bug_when>
    <thetext>Aside from the function not having any pruning: I&apos;d suggest that backup files and so on should also be filtered out, we *really* need to stop putting patches/ under ${S}.  Why can&apos;t we move that to ${WORKDIR}?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78590</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-12-07 16:01:21 +0000</bug_when>
    <thetext>*** Bug 12397 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96922</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:44 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103535</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-12-11 16:26:26 +0000</bug_when>
    <thetext>We have changed the location of sources from unpackdir however patches are still created in S by quilt (along with .pc). Moving that would cause problems for those manually calling quilt from the directory and create a different usability issue for those using quilt to manage patches directly.

There probably is some improvement we can make here but it isn&apos;t trivial.

Ross does have branches that change the default patches directory for quilt but builds then don&apos; work with a lot of breakage.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>