Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sheldon for openSUSE:Factory checked 
in at 2025-07-09 17:27:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sheldon (Old)
 and      /work/SRC/openSUSE:Factory/.sheldon.new.7373 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sheldon"

Wed Jul  9 17:27:51 2025 rev:8 rq:1291303 version:0.8.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/sheldon/sheldon.changes  2025-07-02 
18:17:33.955555302 +0200
+++ /work/SRC/openSUSE:Factory/.sheldon.new.7373/sheldon.changes        
2025-07-09 17:28:24.267539481 +0200
@@ -1,0 +2,6 @@
+Tue Jul  8 14:35:11 UTC 2025 - Ondřej Súkup <mimi...@gmail.com>
+
+- update to 0.8.4
+ * Ignore not found errors from fmutex for config init and edits
+
+-------------------------------------------------------------------

Old:
----
  sheldon-0.8.3.tar.gz

New:
----
  sheldon-0.8.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sheldon.spec ++++++
--- /var/tmp/diff_new_pack.yDrTh4/_old  2025-07-09 17:28:25.555593224 +0200
+++ /var/tmp/diff_new_pack.yDrTh4/_new  2025-07-09 17:28:25.559593391 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           sheldon
-Version:        0.8.3
+Version:        0.8.4
 Release:        0
 Summary:        Fast, configurable, shell plugin manager
 License:        MIT OR Apache-2.0 AND MIT AND Zlib AND LGPL-2.1-or-later AND 
CC-BY-SA-4.0 AND Apache-2.0 WITH LLVM-exception AND BSD-4-clause AND OpenSSL 
AND Unicode AND SUSE-GPL-2.0-with-linking-exception

++++++ sheldon-0.8.3.tar.gz -> sheldon-0.8.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sheldon-0.8.3/Cargo.lock new/sheldon-0.8.4/Cargo.lock
--- old/sheldon-0.8.3/Cargo.lock        2025-06-30 21:41:43.000000000 +0200
+++ new/sheldon-0.8.4/Cargo.lock        2025-07-08 11:17:53.000000000 +0200
@@ -791,7 +791,7 @@
 
 [[package]]
 name = "sheldon"
-version = "0.8.3"
+version = "0.8.4"
 dependencies = [
  "anyhow",
  "casual",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sheldon-0.8.3/Cargo.toml new/sheldon-0.8.4/Cargo.toml
--- old/sheldon-0.8.3/Cargo.toml        2025-06-30 21:41:43.000000000 +0200
+++ new/sheldon-0.8.4/Cargo.toml        2025-07-08 11:17:53.000000000 +0200
@@ -1,6 +1,6 @@
 [package]
 name = "sheldon"
-version = "0.8.3"
+version = "0.8.4"
 authors = ["Ross MacArthur <r...@macarthur.io>"]
 edition = "2021"
 description = "Fast, configurable, shell plugin manager."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sheldon-0.8.3/RELEASES.md 
new/sheldon-0.8.4/RELEASES.md
--- old/sheldon-0.8.3/RELEASES.md       2025-06-30 21:41:43.000000000 +0200
+++ new/sheldon-0.8.4/RELEASES.md       2025-07-08 11:17:53.000000000 +0200
@@ -1,5 +1,16 @@
 # 📝 Release notes
 
+## 0.8.4
+
+*July 8th, 2025*
+
+- [Fix `init` not working][#197]. This fixes the `sheldon init` command not
+  working when the config directory does not exist which was introduced
+  [0cec413d]. This also ignores not found errors when using `add`, `edit`, or
+  `remove` commands.
+
+[#197]: https://github.com/rossmacarthur/sheldon/issues/197
+
 ## 0.8.3
 
 *June 30th, 2025*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sheldon-0.8.3/src/main.rs 
new/sheldon-0.8.4/src/main.rs
--- old/sheldon-0.8.3/src/main.rs       2025-06-30 21:41:43.000000000 +0200
+++ new/sheldon-0.8.4/src/main.rs       2025-07-08 11:17:53.000000000 +0200
@@ -59,7 +59,7 @@
 ///
 /// Initialize a new config file.
 fn init(ctx: &Context, shell: Option<Shell>) -> Result<()> {
-    let _guard = access(ctx, Access::W)?;
+    let _guard = access_ignore_not_found(ctx, Access::W)?;
     let path = ctx.config_file();
     match path
         .metadata()
@@ -80,7 +80,7 @@
 ///
 /// Add a new plugin to the config file.
 fn add(ctx: &Context, name: String, plugin: &EditPlugin) -> Result<()> {
-    let _guard = access(ctx, Access::W)?;
+    let _guard = access_ignore_not_found(ctx, Access::W)?;
     let path = ctx.config_file();
     let mut config = match EditConfig::from_path(path) {
         Ok(config) => {
@@ -100,7 +100,7 @@
 ///
 /// Open up the config file in the default editor.
 fn edit(ctx: &Context) -> Result<()> {
-    let _guard = access(ctx, Access::W)?;
+    let _guard = access_ignore_not_found(ctx, Access::W)?;
     let path = ctx.config_file();
     let original_contents = match fs::read_to_string(path)
         .with_context(|| format!("failed to read from `{}`", path.display()))
@@ -129,7 +129,7 @@
 ///
 /// Remove a plugin from the config file.
 fn remove(ctx: &Context, name: String) -> Result<()> {
-    let _guard = access(ctx, Access::W)?;
+    let _guard = access_ignore_not_found(ctx, Access::W)?;
     let path = ctx.config_file();
     let mut config = EditConfig::from_path(path)?;
     ctx.log_header("Loaded", path);
@@ -269,10 +269,18 @@
     W,
 }
 
+fn access_ignore_not_found(ctx: &Context, mode: Access) -> 
Result<Option<fmutex::Guard<'static>>> {
+    match access(ctx, mode) {
+        Ok(guard) => Ok(Some(guard)),
+        Err(err) if underlying_io_error_kind(&err) == 
Some(io::ErrorKind::NotFound) => Ok(None),
+        Err(err) => Err(err),
+    }
+}
+
 fn access(ctx: &Context, mode: Access) -> Result<fmutex::Guard<'static>> {
     match mode {
-        Access::R => lock_read(ctx).context("failed to acquire exclusive lock 
on config directory"),
-        Access::W => lock_write(ctx).context("failed to acquire shared lock on 
config directory"),
+        Access::R => lock_read(ctx).context("failed to acquire shared lock on 
config directory"),
+        Access::W => lock_write(ctx).context("failed to acquire lock on config 
directory"),
     }
 }
 

++++++ vendor.tar.zst ++++++
/work/SRC/openSUSE:Factory/sheldon/vendor.tar.zst 
/work/SRC/openSUSE:Factory/.sheldon.new.7373/vendor.tar.zst differ: char 7, 
line 1

Reply via email to