On 5/2/2024 5:57 AM, Alexander Kanavin wrote:
From: Alexander Kanavin <[email protected]>

For the rationale and design guidelines please see this message:
https://lists.openembedded.org/g/openembedded-architecture/message/1913

Left out for now but will be done later:
- config fragment support
- tests
- documentation
- official configuration repository



Hello. I'm attempting to play around with this patch and test out bitbake-setup and how it works. My testing it with trying to take one our existing setups and try to get it to work. Here is some initial feedback written as I ran into issues.

I'm running in an ubuntu-22.04 docker container based on crops.


1) In order to use list it assumes you are fetching a git repo and that the git repo has a specific layout. That seems a little problematic. What if the repo we want to point has all kinds of configs for different tools in it and we just want a sub directory under the git repo? How do we specify that?


2) The uri for a sources entry in the json file automatically adds in protocol=git even though I specified protocol=https on the line. We prefer to always use the https for git repos and not the git protocol. I modified the code to not do this so my testing could continue.


3) If we specify a unique key for each of the sources, why do we need to then also specify a path to place the downloaded sources into? Why not just use the same key value to reduce what all is needed to specify. We can still support "path" for those that want it, but if it is left out I would default it to the unique key for the repo.


4) The init step cannot be run multiple times. Initial errors are because the build-dir already exists, but overall it's a good idea to allow for rerunning the setup to allow for fixing issues without needed to nuke the entire build dir. An example of why you might this is if you want to add a new layer to your config, or change a commit, or whatever... Rerunning the init should be able to apply the incremental changes since the last run.

In this case I was running into an error message from a file in oe-core, which I sent a patch for, and was trying to simply fix that file in the layers dir and rerun, but kept tripping over the fact that I cannot rerun init.


5) What is the purpose of creating the top level config git repo?


6) The code loops through the layers looking for scripts/oe-setup-build. What would happen if I shipped a rogue layer with that file in it and included it as the last layer in the sources?


7) I'm getting an error when running the setup-build script:

File "/scratch/builds/bitbake-setup-test/layers/setup-build", line 107, in setup_build_env
    subprocess.run(cmd, shell=True, executable=os.environ['SHELL'])
  File "/usr/lib/python3.10/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'SHELL'


SHELL is set to /bin/sh so I'm at a loss to see why this would be failing. But because of this I never get a build.sh script.


I'm out of time today to keep testing this, but I'll get back to it next week and I'll likely have some more feedback/questions.



--
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#63789): https://lists.yoctoproject.org/g/yocto/message/63789
Mute This Topic: https://lists.yoctoproject.org/mt/108293733/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to