west: `west init` gives wrong config `path` for a manifest file in nested directories

when initializing my workspace, i want the manifest file to be located two level below the west top dir, in orb/private

.
├── .west
├── bootloader
│   └── mcuboot
├── modules
│   ├── ...
├── orb
│   ├── private
│   └── public
└── zephyr

When initializing with cd orb && west init -l --mf private/west.yml ., the west config created is:

[manifest]
path = orb
file = private/west.yml

but then zephyr_module.py from Zephyr 4.0 fails because the manifest isn’t in orb but orb/private.

If I modify .west/config manually, to have path = orb/private, then it works.

Would it be possible to have the path points to the manifest directory, and file only take the name of the west file?

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

I don’t think the behavior -mf should change. Right now its value goes unmodified into manifest.file; that’s simple and easy to understand.

That seems reasonable to me, as does the addition of a -t flag

the problem is that is creates the .west directory inside orb/

I want it to be at the top directory above

root@73b74a36d5cc:/home/ubuntu/firmware# west init -l orb/private --mf west.yml
=== Initializing from existing manifest repository private
--- Creating /home/ubuntu/firmware/orb/.west and local configuration file