Skip to content

Problems with relative dir paths in bundle.yml #11

@uwefladrich

Description

@uwefladrich

What happened?

When a project defines the dir keyword (as opposed to git), relative paths do not seem to work properly. The document states that

dir  : <path-to-package>  # 13. [required] Instead of "git", specify path to existing project. \
                                Absolute path or relative path to 'source' dir expected.
                          #     'version' is not required

However, in my tests neither a path relative to source, nor relative to bundle.yml seem to work.

What are the steps to reproduce the bug?

The following minimal test structure is used:

.
├── arch
├── bundle.yml
├── external
│   └── ecbuild/  # contains ecbuild clone
└── source

In a first test, the dir path to ecbuild is relative to source:

name: relative_dir_test
version: 0.1

projects:
  - ecbuild:
      dir: ../external/ecbuild
      bundle: false

This results in the error:

> ecbundle-create 

Downloading bundle with 1 threads for 
    [...]/bundle.yml
A directory [../external/ecbuild] is provided for project [ecbuild] but it does not exist.

Time elapsed for downloading: 00:00:00


Creating bundle for 
    [...]/bundle.yml

Bundle created at src-dir
    [...]/source

projects:
    - ecbuild (None)

!!! Errors occured !!!

In a second test, I tried to provide the path relative to the bundle.yml file:

name: relative_dir_test
version: 0.1

projects:
  - ecbuild:
      dir: external/ecbuild
      bundle: false

This lets ecbundle-create run without error, but the resulting source/ directory does not work:

ll source/
total 4
lrwxrwxrwx. [...] Apr 17 11:27 arch -> [...]/arch
lrwxrwxrwx. [...] Apr 17 11:27 bundle.yml -> [...]/bundle.yml
-rw-rw-r--. [...] Apr 17 11:27 CMakeLists.txt
lrwxrwxrwx. [...] Apr 17 11:27 ecbuild -> external/ecbuild  # <-- dead link

Version

2.1.1

Platform (OS and architecture)

Rocky Linux 9.3 (Blue Onyx)

Relevant log output

No response

Accompanying data

No response

Organisation

SMHI/EC-Earth

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions