Blame SOURCES/0001-FACT-3116-Ignore-EROFS-when-deleting-fact-cache.patch

rdobuilder 665961
From 54df2906528ddea38adaf5ee71860bdfb49af492 Mon Sep 17 00:00:00 2001
rdobuilder 665961
From: Joel Capitao <jcapitao@redhat.com>
rdobuilder 665961
Date: Tue, 17 May 2022 10:51:59 +0200
rdobuilder ea962c
Subject: [PATCH] (FACT-3116) Ignore EROFS when deleting fact cache
rdobuilder ea962c
rdobuilder ea962c
When fact cache is placed in read only file system, deleting a file
rdobuilder ea962c
fails with EROFS instead of EACCES .
rdobuilder ea962c
---
rdobuilder 665961
 lib/facter/framework/core/cache_manager.rb | 2 +-
rdobuilder 665961
 1 file changed, 1 insertion(+), 1 deletion(-)
rdobuilder ea962c
rdobuilder ea962c
diff --git a/lib/facter/framework/core/cache_manager.rb b/lib/facter/framework/core/cache_manager.rb
rdobuilder ea962c
index 100a7656a..d93020264 100644
rdobuilder ea962c
--- a/lib/facter/framework/core/cache_manager.rb
rdobuilder ea962c
+++ b/lib/facter/framework/core/cache_manager.rb
rdobuilder ea962c
@@ -227,7 +227,7 @@ cache_format_version is incorrect!")
rdobuilder ea962c
 
rdobuilder ea962c
       begin
rdobuilder ea962c
         File.delete(cache_file_name) if File.readable?(cache_file_name)
rdobuilder ea962c
-      rescue Errno::EACCES => e
rdobuilder ea962c
+      rescue Errno::EACCES, Errno::EROFS => e
rdobuilder ea962c
         @log.warn("Could not delete cache: #{e.message}")
rdobuilder ea962c
       end
rdobuilder ea962c
     end
rdobuilder ea962c
-- 
rdobuilder ea962c
2.35.1
rdobuilder ea962c