From 1fd3cea6ee1fe245d0aa46188ad430192eb4ae22 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 13 Dec 2023 18:05:22 -0500 Subject: [PATCH] tmpfiles: Fix error contexts 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. --- rust/src/tmpfiles.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rust/src/tmpfiles.rs b/rust/src/tmpfiles.rs index bec240d1a8..9ffe695ea0 100644 --- a/rust/src/tmpfiles.rs +++ b/rust/src/tmpfiles.rs @@ -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)?;