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

Allow config.guess code from configuremake.py to be used in rpackage.py #1938

Closed
wants to merge 6 commits into from

Conversation

edmondac
Copy link
Contributor

easybuild/easyblocks/generic/rpackage.py Outdated Show resolved Hide resolved
easybuild/easyblocks/generic/rpackage.py Outdated Show resolved Hide resolved
easybuild/easyblocks/generic/_config_guess.py Outdated Show resolved Hide resolved
easybuild/easyblocks/generic/_config_guess.py Outdated Show resolved Hide resolved
easybuild/easyblocks/generic/_config_guess.py Outdated Show resolved Hide resolved
edmondac added a commit to bear-rsg/easybuild-easyconfigs that referenced this pull request Jan 23, 2020
edmondac added a commit to bear-rsg/easybuild-easyblocks that referenced this pull request Jan 23, 2020
@edmondac edmondac changed the title Extraced config.guess code from configuremake.py and used in rpackage.py Allow config.guess code from configuremake.py to be used in rpackage.py Jan 23, 2020
edmondac added a commit to bear-rsg/easybuild-easyconfigs that referenced this pull request Jan 23, 2020
edmondac added a commit to bear-rsg/easybuild-easyconfigs that referenced this pull request Jan 23, 2020
edmondac added a commit to bear-rsg/easybuild-easyconfigs that referenced this pull request Jan 23, 2020
edmondac added a commit to bear-rsg/easybuild-easyconfigs that referenced this pull request Jan 23, 2020
@easybuilders easybuilders deleted a comment from boegelbot Feb 3, 2020
@easybuilders easybuilders deleted a comment from boegelbot Feb 3, 2020
Copy link
Contributor

@Flamefire Flamefire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good but I'd suggest to consider doing that always: Always unpack the sources and check for a config.guess and update that if necessary (or simply always). This avoids waiting for a bug report rolling in and matches what ConfigureMake does

An example implementation is here: https://github.com/Flamefire/easybuild-easyblocks/tree/update_r_config_guess

super(RPackage, self).run(unpack_src=True)
else:
super(RPackage, self).run()

if self.cfg['update_config_guess']:
confmake = ConfigureMake(self.cfg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the better option would be to make obtain_config_guess a static or better free function. It mostly is already anyway.

for name in files:
if name == 'config.guess':
confmake.config_guess = os.path.join(root, name)
if not confmake.check_config_guess():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ConfigureMake EB does this unconditionally (probably based on the assumption that it is highly unlikely that the config.guess matches). So I'd do the same here.

As an alternative: Add a quiet option to the check_config_guess to avoid the warnings. IMO there is nothing to warn about here. For the ConfigureMake EB the updating of the config.guess is the natural thing to do. So the output generated by obtain_config_guess is enough

@Flamefire
Copy link
Contributor

Question about the rpackage EasyBlock:
Was there any reason for the non-standard installation steps there?

  • Why don't extract always in extract_step?
  • Why does the run step potentially extract and patch?

My approach would be to:

  • Don't overwrite extract step -> extract always (potentially guarded by self.src being set)
  • Never run the super run (that does potentially extract and always patch)
  • Check for any config.guess and replace it

@Flamefire
Copy link
Contributor

@edmondac I created an alternate PR which does the patching everytime to avoid us running after ECs that fail in the future due to newer archs: #1949

@edmondac
Copy link
Contributor Author

Deferring this to #1949 - so I'll close this PR.

@edmondac edmondac closed this Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants