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

[bldr-build] Resolve and solve package dependencies once. #116

Merged
merged 1 commit into from
Dec 16, 2015

Conversation

fnichol
Copy link
Collaborator

@fnichol fnichol commented Dec 16, 2015

This change changes the behavior when referring to other package
dependencies in a Plan.

Packages will be "resolved" early in the building of a Plan, occurring
after bldr_begin() and before donwnload(). Here being "resolved"
simply means that a precise version of a package will be selected (and
possibly installed if not present on disk) as the only version to be
used by a Plan. Previously, bldr-build used the latest_package()
function to get the approximate behavior, but there are potential races
that could occur as new packages are installed by other processes.

This modified strategy is to use the new pkg_path_for() Plan authors
whenever previously using latest_package(). This has an added benefit
of guaranteeing that the Plan will get a valid result everytime. If a
Plan attempts to reference another package's path (via pkg_path_for())
which is not in the $pkg_deps or $pkg_build_deps arrays, this will
abort the package build with an error message on standard error.

This change changes the behavior when referring to other package
dependencies in a Plan.

Packages will be "resolved" early in the building of a Plan, occurring
after `bldr_begin()` and before `donwnload()`. Here being "resolved"
simply means that a precise version of a package will be selected (and
possibly installed if not present on disk) as the only version to be
used by a Plan. Previously, `bldr-build` used the `latest_package()`
function to get the approximate behavior, but there are potential races
that could occur as new packages are installed by other processes.

This modified strategy is to use the new `pkg_path_for()` Plan authors
whenever previously using `latest_package()`. This has an added benefit
of guarenteeing that the Plan will get a valid result everytime. If a
Plan attempts to reference another package's path (via `pkg_path_for()`)
which is not in the `$pkg_deps` or `$pkg_build_deps` arrays, this will
abort the package build with an error message on standard error.
@fnichol fnichol changed the title [bldr-build] Resolve and solve package depdencies once. [bldr-build] Resolve and solve package dependencies once. Dec 16, 2015
@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

REPO := http://159.203.235.47

bldr: gpg
@for pkg in glibc libgcc zlib cacerts busybox patchelf libgpg-error libassuan gnupg gpgme openssl runit bldr; do \
@for pkg in $(BLDR_PKGS); do \
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice cleanup.

@fnichol
Copy link
Collaborator Author

fnichol commented Dec 16, 2015

I vetted these changes by running master's make && make test from a clean Docker Machine, which should give us green functionals, hence why there were some plan.sh file updates.

@adamhjk
Copy link
Contributor

adamhjk commented Dec 16, 2015

gif-keyboard-8031230553440808814

Another amazing Bash PR. You're the man.

@adamhjk
Copy link
Contributor

adamhjk commented Dec 16, 2015

@delivery verify

@chef-delivery
Copy link
Contributor

Failed to unknown change: cd77f944-1de2-456b-aa62-437657392daa
Delivery does not understand this command. @adamhjk

@adamhjk
Copy link
Contributor

adamhjk commented Dec 16, 2015

@delivery approve

chef-delivery added a commit that referenced this pull request Dec 16, 2015
Merged change cd77f944-1de2-456b-aa62-437657392daa

From review branch bldr-build-resolve-deps-once into master

Signed-off-by: adam <[email protected]>
@chef-delivery chef-delivery merged commit d6b5fc5 into master Dec 16, 2015
@chef-delivery
Copy link
Contributor

Change: cd77f944-1de2-456b-aa62-437657392daa approved by: @adamhjk

@chef-delivery chef-delivery deleted the bldr-build-resolve-deps-once branch December 16, 2015 22:01
@fnichol
Copy link
Collaborator Author

fnichol commented Dec 16, 2015

Oh noes, forgot the ritualistic GIF!

gif-keyboard-2775952845098627724

@chef-delivery
Copy link
Contributor

This PR has passed 'Acceptance' and is ready to be delivered!
Use: '@delivery deliver' when validated in acceptance.

raskchanky pushed a commit that referenced this pull request Apr 16, 2019
Move ServiceBind implementation from Habitat repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants