(#16752) Add support for pkg.conf on openbsd#1297
Closed
ahpook wants to merge 1 commit intopuppetlabs:masterfrom
Closed
(#16752) Add support for pkg.conf on openbsd#1297ahpook wants to merge 1 commit intopuppetlabs:masterfrom
ahpook wants to merge 1 commit intopuppetlabs:masterfrom
Conversation
Previously only local file sources were supported for openbsd packages. Pkg.conf is a mechanism that openbsd uses to download packages from HTTP sources as well. This patch adds checking for the presence of 'installpath' lines in pkg.conf and, if one are found and if the last character of an installpath line is a ::File::SEPARATOR (aka `/` character on openbsd) then it will become the value of the environment variable PKG_PATH previous to pkgadd invocation, which tells pkgadd to use the URL.
Contributor
Author
|
I know I need help with tests for this behaviour change, I found it difficult to understand just from looking at the existing
Would appreciate any guidance on these and I'd be happy to amend the commit with further info; it's just been sitting in my local repo for a while and I wanted to publish and solicit help. Thank you!! |
Contributor
|
Regarding the first test item, you could create a pkg.conf with a line that points to a non-existing mirror, or a mirror which lacks the packages. For example: installpath = scp://somerandomhostthatdoesntexist.com/pub/OpenBSD/snapshots/packages/amd64/ |
Contributor
|
Superceded by #1379 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously only local file sources were supported for openbsd
packages. Pkg.conf is a mechanism that openbsd uses to download
packages from HTTP sources as well. This patch adds checking for
the presence of 'installpath' lines in pkg.conf and, if one
are found and if the last character of an installpath line is a
::File::SEPARATOR (aka
/character on openbsd) then it willbecome the value of the environment variable PKG_PATH previous to
pkgadd invocation, which tells pkgadd to use the URL.