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

build_id does take into account manual build strings for subpackages #3248

Closed
SylvainCorlay opened this issue Nov 6, 2018 · 6 comments · Fixed by #3250
Closed

build_id does take into account manual build strings for subpackages #3248

SylvainCorlay opened this issue Nov 6, 2018 · 6 comments · Fixed by #3250
Labels
locked [bot] locked due to inactivity

Comments

@SylvainCorlay
Copy link

Namely, it does not seem to detect that a build string is set manually for a subpackage.

manual_build_string = re.search("\s*string:", self.extract_package_and_build_text())

@SylvainCorlay
Copy link
Author

This seems to be the cause of the clangdev 5.x rebuild issue here: conda-forge/clangdev-feedstock#41

@msarahan
Copy link
Contributor

msarahan commented Nov 6, 2018

yes, it is a bug. I haven't figured out why it works for openblas and mkl, but not for you (similar concept, so it must be something strange.). I can reproduce it, but conda-build is being very finicky and often refusing to even render the recipe, saying that clangdev depends on itself somehow. Sorry, this one may take a while to get to fixing. If you figure it out, a PR would be very welcome.

@SylvainCorlay
Copy link
Author

Pasting @isuruf 's patch from conda-forge gitter, which appears to fix the issue locally.

--- conda_build/metadata.py
+++ conda_build/metadata.py
@@ -1645,9 +1645,10 @@
         #    We have to do this on rendered data, because templates can be used in output names
         recipe_text = self.extract_outputs_text(apply_selectors=apply_selectors)
         output_matches = output_re.findall(recipe_text)
+        parent_recipe = self.meta.get('extra', {}).get('parent_recipe', {})
         try:
             output_index = [out.get('name') for out in
-                            self.meta.get('outputs', [])].index(output_name)
+                            parent_recipe.get('outputs', [])].index(output_name)
             output = output_matches[output_index] if output_matches else ''
         except ValueError:
             output = ''

@SylvainCorlay
Copy link
Author

Thanks @msarahan for reproducing locally.

@SylvainCorlay
Copy link
Author

@msarahan does @isuruf's patch look good to you?

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Mar 11, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants