Ideally I agree it’s best to have per component git repos But traditional SDKs have been monolithic On Mon, Nov 25, 2019 at 10:50 AM Jacob Stiffler wrote: > > On 11/25/2019 1:16 PM, Khem Raj wrote: > > On Mon, Nov 25, 2019 at 10:12 AM Jacob Stiffler wrote: > > On 11/25/2019 12:42 PM, Denys Dmytriyenko wrote: > > On Fri, Nov 15, 2019 at 09:14:15AM -0800, Khem Raj wrote: > > On Fri, 2019-11-15 at 10:14 -0500, Jacob Stiffler wrote: > > Recently individual components and LLD sources have been combined > into a single PDK repo. Use this class to specify the common source. > Also use this class to keep the sources separate from each other when > building. This keeps the build identical to previous recipes while > keeping control on interdependencies. > > Signed-off-by: Jacob Stiffler > --- > > ... > > +# Extract only required sources from PDK > +python do_unpack_append() { > + if len(d.getVar('TI_PDK_COMP') or '') > 0: > + import subprocess > + > + src = > os.path.join(d.getVar('TI_PDK_SRC'),'packages',d.getVar('TI_PDK_COMP_ > PATH')) > + > + # Package up only the required sources > + cmd = 'tar -cf - -C %s -p -S . | tar -xf - -C %s' % (src, > d.getVar('S')) > + subprocess.check_output(cmd, shell=True, > stderr=subprocess.STDOUT) > + > + bb.utils.remove(d.getVar('TI_PDK_SRC'), recurse=True) > +} > > perhaps looking in work-shared idea from kernel or gcc or clang > packages could make it better where, you only untar sources once > > Jake, > > Any updates on this - will you be looking into the above suggestion? > > I had originally considered this approach, but decided against it so > that there would be no way a recipe could access other sources in the > pdk.git. > > It may be a bit paranoid, but the work-shared approach would make the > entire pdk sources available through a ti-pdk-fetch variable. I wanted > it so that the entire pdk.git will never be unpacked in its entirety. > > disk operations are not cheap, so you could save a lot by > having a monorepo. Is it due to access perms ? then its a single > tarballs you cant have ACLs. I am still not convinced if monorepo > approach has downsides, plus its a known approach elsewhere so > will be easy on users. > > We wanted to have this safety net to make sure that this pdk.git does not > end up as spaghetti code. So this method was devised to ensure that only a > single component's sources and its DEPENDS are available during > compilation. > > It may be acceptable to clone to the work-shared path, and then symlink > the specific directory into the WORKDIR. But we will need to remain > vigilant so that work-shared path is never referenced in the recipe. > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > > View/Reply Online (#12528): https://lists.yoctoproject.org/g/meta-ti/message/12528 > Mute This Topic: https://lists.yoctoproject.org/mt/61321552/3619770 > Group Owner: meta-ti+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [j-stiffler@ti.com] > -=-=-=-=-=-=-=-=-=-=-=- > >