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
core/scripts: Support /var/lib/rpm-state #1319
Conversation
I was trying a `--ex-unified-core` compose of FAW, and things fell over on `urw-base35-fonts` which does a dance of setting a stamp file in `%post` and checking it in `%posttrans`. This whole pattern should be considered deprecated by file triggers. But let's support it for now. Note there's a lot of parameter passing as we need a single directory which is held across multiple script invocations.
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.
Looks sane, just some minor nits!
src/libpriv/rpmostree-core.c
Outdated
&n_post_scripts_run, cancellable, error)) | ||
return FALSE; | ||
} | ||
|
||
/* file triggers */ | ||
if (!run_all_transfiletriggers (self, ordering_ts, tmprootfs_dfd, | ||
if (!run_all_transfiletriggers (self, ordering_ts, tmprootfs_dfd, |
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.
Minor: looks like a stray trailing space here.
src/libpriv/rpmostree-scripts.c
Outdated
* | ||
* See above for why we special case glibc. | ||
*/ | ||
const gboolean is_glibc_locales = strcmp (pkg_script, "glibc-all-langpacks.posttrans") == 0; | ||
bwrap = rpmostree_bwrap_new (rootfs_fd, | ||
is_glibc_locales ? RPMOSTREE_BWRAP_MUTATE_FREELY : RPMOSTREE_BWRAP_MUTATE_ROFILES, | ||
error, | ||
/* Scripts can see a /var with compat links like alternatives */ |
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 is still true, right?
@@ -328,25 +330,43 @@ run_script_in_bwrap_container (int rootfs_fd, | |||
else | |||
created_var_tmp = TRUE; | |||
|
|||
/* And similarly for /var/lib/rpm-state */ |
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.
How about making this hunk conditional on var_lib_rpm_statedir
?
Fixup ⬆️ |
⚡ Test exempted: merge already tested. |
I was trying a
--ex-unified-core
compose of FAW, and things fell overon
urw-base35-fonts
which does a dance of setting a stamp file in%post
and checking it in%posttrans
.This whole pattern should be considered deprecated by file triggers. But let's
support it for now.
Note there's a lot of parameter passing as we need a single directory which is
held across multiple script invocations.