On 16 Nov 2023, at 06:26, MOHAMMED HASSAN via lists.yoctoproject.org 
<hassanchattarki=gmail....@lists.yoctoproject.org> wrote:
> SRC_URI = "file://Edge/* \

The easiest way to package a directory is to put it in a tarball, or ideally 
because recipes should just be orchestrating the install, refer to a separate 
git repository or tarball.  Putting large amounts of actual source code into a 
meta-layer is discouraged.

> #INSANE_SKIP:${PN} += "arch:/Edge/node_modules/"

This isn’t how INSANE_SKIP works, remove.

> INHERIT_remove = "pseudo"

This doesn’t do anything, remove.

> do_install() {
>     install -d ${WORKDIR}/Edge/* ${D}${bindir}/Edge/*

install -d is “create directories” and you’re passing it the list of 
directories in your workdir.  They exist, so install will error.

Here’s a working example of what you’re trying to do.  My recipe directory is 
structured like this:

.
├── files
│   ├── app
│   │   └── app.py
│   └── user
│       └── user.config
└── filetest.bb

The app is in a subdirectory called app, and the user configuration is in a 
directory called user.  This splits the two aspects for easier management but 
you can ignore that if you want and just have a single directory under files/. 
The recipe is trivial:

SRC_URI = "file://app/ file://user/“

do_install() {
    install -d ${D}${bindir}
    install ${WORKDIR}/app/* ${D}${bindir}

    install -d ${D}/home/user
    install ${WORKDIR}/user/* ${D}/home/user
}

FILES:${PN} += "/home/user”

As per 
https://docs.yoctoproject.org/bitbake/2.4/bitbake-user-manual/bitbake-user-manual-fetching.html#local-file-fetcher-file,
 if you specify a local directory in SRC_URI then the entire directory is 
copied.  do_install can them simply install -d the target directories, and then 
use install with globs to put the files in the right place.

Finally, bindir is in the default FILES but /home is not, so we add /home too.  
Ideally you’ll be creating a user and chowning the files, but that is out of 
scope for this.

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61710): https://lists.yoctoproject.org/g/yocto/message/61710
Mute This Topic: https://lists.yoctoproject.org/mt/102622725/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/yocto/leave/6691583/21656/737036229/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to