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

shallow rez-cp can corrupt package if there are overlapping variants #563

Closed
nerdvegas opened this issue Jan 16, 2019 · 3 comments
Closed
Labels

Comments

@nerdvegas
Copy link
Contributor

nerdvegas commented Jan 16, 2019

Consider a package with 2 variants, with subpaths 'A' and 'A/B'. A shallow copy can corrupt the source package because of the following:

  • Variant <newpkg>/A is created as symlink to <oldpkg>/A;
  • Variant <newpkg>/A/B is created as symlink to <oldpkg>/A/B;
  • Whoops, this actually has created a self-referencing symlink at <oldpkg>/A/B.

Overlapping variants (where one variant subpath is a parent dir of another subpath) is inherently problematic for shallow package copies.

Solution: Don't symlink at the variant dir level; instead, symlink everything inside the variant dir (excepting dirs that may be parent of overlapped variant).

Note that when dict-based variants exist, this problem will go away (as will various other problems related to current limitation of variants). For dict-based variants, I think we'll stick to the variant dir symlinking, since it's simpler.

@bpabel
Copy link
Contributor

bpabel commented Feb 3, 2019

Do you think that symlinking between versions, and creating dependencies between versions might be a bad idea? It means you can't simply clear out old versions because now there's interaction between the versions.

@nerdvegas
Copy link
Contributor Author

nerdvegas commented Feb 4, 2019 via email

@bpabel
Copy link
Contributor

bpabel commented Feb 4, 2019

Ah, thanks for the explanation. Hadn't thought of a package repo setup like that.

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

No branches or pull requests

2 participants