Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git relative source path ignores --recipe-dir and --recipe arguments to rattler-build build #1139

Closed
gabuzi opened this issue Oct 26, 2024 · 3 comments · Fixed by #1140
Closed

Comments

@gabuzi
Copy link
Contributor

gabuzi commented Oct 26, 2024

In my brief tests trying to migrate from conda build to rattler-build (v 0.28.0 on OS X), I discovered that this path seems to be relative to the dir of where the rattler-build build cmd is issued. I.e., it seems to ignore any --recipe-dir argument. This makes any relative git URLs not relative to the recipe dir, contrary to what the docs state. The same is true fore the --recipe argument.

I have a recipe.yaml two levels deep from the git root and use

source:
  git: ../../

This works fine if I run rattler-build build in the directory of the recipe.

If I run this in the git root with rattler-build build --recipe-dir level1/level2/ or rattler-build build --recipe level1/level2/recipe.yaml, the clone fails. I can clearly see from the computed source directory that it is computed relative to the current directory of the command, so it's no surprise that if I adjust the git source path accoringly, it works.

According to the docs, the path should always be interpreted relative to the recipe dir, regardless of where rattler-build is run from.

@wolfv
Copy link
Member

wolfv commented Oct 26, 2024

Thanks. I think the path should be relative to the recipe, indeed. Will have a look asap.

@wolfv
Copy link
Member

wolfv commented Oct 26, 2024

If you want to and a PR in the meantime, that's always appreciated :)

@gabuzi
Copy link
Contributor Author

gabuzi commented Oct 26, 2024

If you want to and a PR in the meantime, that's always appreciated :)

You got it. Was a tinier change than I had expected, looks like just a single forgotten recipe_dir.join(). PR is coming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants