-
Notifications
You must be signed in to change notification settings - Fork 12
add p5p archive publisher command #1
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -2519,6 +2519,27 @@ fn run_steps(ib: &mut ImageBuilder) -> Result<()> { | |
| &a.publisher, | ||
| ])?; | ||
| } | ||
| "pkg_set_p5p_publisher" => { | ||
| #[derive(Deserialize)] | ||
| struct PkgSetP5PPublisherArgs { | ||
| archive: String, | ||
| publisher: String, | ||
| } | ||
|
|
||
| let a: PkgSetP5PPublisherArgs = step.args()?; | ||
| let mp = ib.root()?; | ||
|
|
||
| pkg(log, &["-R", &mp.to_str().unwrap(), | ||
| "set-publisher", "-p", &a.archive, "--search-first", | ||
| ])?; | ||
| pkg(log, &["-R", &mp.to_str().unwrap(), "set-publisher", | ||
| "--no-refresh", | ||
| "--non-sticky", | ||
| &a.publisher, | ||
| ])?; | ||
|
||
| pkg(log, &["-R", &mp.to_str().unwrap(), "refresh", "--full"])?; | ||
| pkg(log, &["-R", &mp.to_str().unwrap(), "update"])?; | ||
|
||
| } | ||
| "pkg_approve_ca_cert" => { | ||
| #[derive(Deserialize)] | ||
| struct PkgApproveCaCertArgs { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This form of
set-publisherdoes a bit of magic when you don't specify a publisher argument, as far as I can tell. Depending on what publishers are in the archive it might end up adding more than one, or updating existing publishers. Is that what you intend?Also, it seems like the image will contain publisher information that might not make sense once it's installed, unless you ship the archive at the exact same location inside the final image.
Did you try a version of this that used the temporary archive functionality; i.e., something like
pkg update -g $ARCHIVE_PATH? You would still need to have set the existing publisher(s) non-sticky I believe.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention is to add the packages from the archive as the packages with the highest priority.
In the builds that I have that use this machinery, yes, I am shipping the p5p archive at the exact location it's used from here. The intent is to ship the archive to its expected/installed location.
I did try the
pkg install -g $ARCHIVE_PATH *route. The packages I'm using this for are ONU builds, and this avenue did not go well.