-
Notifications
You must be signed in to change notification settings - Fork 3
conditionally set WORK_DIR if undefined and execute post-relocate if it exists
#71
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -343,7 +343,7 @@ def better_tarball(spec, old, new): | |
| return old if hashes.index(old_hash) < hashes.index(new_hash) else new | ||
|
|
||
|
|
||
| def generate_initdotsh(package, specs, architecture, post_build=False): | ||
| def generate_initdotsh(package, specs, architecture, workDir="sw", post_build=False): | ||
| """Return the contents of the given package's etc/profile/init.sh as a string. | ||
|
|
||
| If post_build is true, also generate variables pointing to the package | ||
|
|
@@ -354,7 +354,11 @@ def generate_initdotsh(package, specs, architecture, post_build=False): | |
| # init.sh. This is useful for development off CVMFS, since we have a | ||
| # slightly different directory hierarchy there. | ||
| lines = [': "${BITS_ARCH_PREFIX:=%s}"' % architecture] | ||
|
|
||
| lines.extend([ | ||
| 'if [ -z "${WORK_DIR}" ]; then', | ||
| ' WORK_DIR=%s' % abspath(workDir), | ||
| 'fi', | ||
| ]) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @akritkbehera , as the new relocation logic can relocated @ktf , what was the logic of setting
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea is that you do not need aliBuild to do the relocation of packages and loading of the environment, so everything related to that must work with WORK_DIR being set from the outside.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks @ktf , I understand that. But you still need some tool/script to deploy the pre-build packages and that tool will run the relocation .... right? If yes then why not just relocate
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one benefit I see with setting I am fine with change in the PR. This will allow
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The goal was to avoid relocation as much as possible. That way just untarring the tarballs would have given you a working environment. |
||
| # Generate the part which sources the environment for all the dependencies. | ||
| # We guarantee that a dependency is always sourced before the parts | ||
| # depending on it, but we do not guarantee anything for the order in which | ||
|
|
@@ -1310,8 +1314,8 @@ def performPreferCheckWithTempDir(pkg, cmd): | |
| writeAll("{}/{}.sh".format(scriptDir, spec["package"]), spec["recipe"]) | ||
| writeAll("%s/build.sh" % scriptDir, cmd_raw % { | ||
| "provenance": create_provenance_info(spec["package"], specs, args), | ||
| "initdotsh_deps": generate_initdotsh(p, specs, args.architecture, post_build=False), | ||
| "initdotsh_full": generate_initdotsh(p, specs, args.architecture, post_build=True), | ||
| "initdotsh_deps": generate_initdotsh(p, specs, args.architecture, workDir=args.workDir, post_build=False), | ||
| "initdotsh_full": generate_initdotsh(p, specs, args.architecture, workDir=args.workDir, post_build=True), | ||
| "develPrefix": develPrefix, | ||
| "workDir": workDir, | ||
| "configDir": abspath(args.configDir), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.