Skip to content

Commit

Permalink
tmpfiles: Fix error contexts
Browse files Browse the repository at this point in the history
We weren't actually formatting these, so the error looks like:
`error: Deduplicate tmpfiles entries: readdir {RPMOSTREE_TMPFILESD}: No such file or directory (os error 2)`

It's simpler to just not format.
  • Loading branch information
cgwalters committed Dec 13, 2023
1 parent 685978c commit 1fd3cea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rust/src/tmpfiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ pub fn deduplicate_tmpfiles_entries(tmprootfs_dfd: i32) -> CxxResult<()> {
// scan all rpm-ostree auto generated entries and save
let tmpfiles_dir = tmprootfs_dfd
.open_dir(RPMOSTREE_TMPFILESD)
.context("readdir {RPMOSTREE_TMPFILESD}")?;
.context(RPMOSTREE_TMPFILESD)?;
let mut rpmostree_tmpfiles_entries = read_tmpfiles(&tmpfiles_dir)?;

// remove autovar.conf first, then scan all system entries and save
let tmpfiles_dir = tmprootfs_dfd
.open_dir(TMPFILESD)
.context("readdir {TMPFILESD}")?;
let tmpfiles_dir = tmprootfs_dfd.open_dir(TMPFILESD).context(TMPFILESD)?;

if tmpfiles_dir.try_exists(AUTOVAR_PATH)? {
tmpfiles_dir.remove_file(AUTOVAR_PATH)?;
Expand Down

0 comments on commit 1fd3cea

Please sign in to comment.