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

Add flag to enforce subdirectory == subdirectory in index.json #105

Open
2 tasks done
dholth opened this issue Jun 12, 2023 · 7 comments
Open
2 tasks done

Add flag to enforce subdirectory == subdirectory in index.json #105

dholth opened this issue Jun 12, 2023 · 7 comments
Labels
type::feature request for a new feature or capability

Comments

@dholth
Copy link
Contributor

dholth commented Jun 12, 2023

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

It can cause problems when a package is built for a subdirectory but is placed into a different subdirectory (e.g. a linux-64 package copied into noarch/)

Add a strict flag to either error or ignore those packages when index.json's subdir does not match. Then a mismatched package would not show up in repodata.json.

Remember that old packages might have a platform= in index.json or nothing at all? instead of subdir.

@dholth dholth added the type::feature request for a new feature or capability label Jun 12, 2023
@kenodegard
Copy link
Contributor

See recent incident on conda-forge: conda-forge/status#144

@kenodegard
Copy link
Contributor

I'm thinking this check should be enabled by default with the option to disable

@wolfv
Copy link

wolfv commented Jun 12, 2023

Sounds reasonable to me. I think it should also emit a warning (or maybe even error?).

@dholth
Copy link
Contributor Author

dholth commented Jun 12, 2023

Is it correct that within the last year libmamba promoted "subdir mismatch" as something to crash on, which was not previously the case?

@kenodegard
Copy link
Contributor

Not libmamba, libsolv

@wolfv
Copy link

wolfv commented Jun 13, 2023

Yeah, libsolv added this check at some point. I didn't ever think that it would be possible to have mixed-arch packages in the subdirs though.

@dholth
Copy link
Contributor Author

dholth commented Jun 14, 2023

When developing conda-index it was really useful to use ~/miniconda3/pkgs/cache as something to index (these are not split out by subdir). Maybe not a common case, I wonder if we could handle these intelligently by automatically splitting them into their proper subdirectories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature request for a new feature or capability
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants