aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/tomb-fix-errors-on-open.patch
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-11-21 22:44:15 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-11-21 22:44:15 +0100
commitb60d2bfff95c0859d7814c1fe9d0940c87edc2b4 (patch)
tree49d3339f93c9d9fad5c66609a1dc4964f2856f79 /gnu/packages/patches/tomb-fix-errors-on-open.patch
parent0c6ab52243353e3417e5a9733bb089e4771cc86e (diff)
parenta31b9dac1cbda07225fcdffe03d13d68c4eab981 (diff)
downloadguix-b60d2bfff95c0859d7814c1fe9d0940c87edc2b4.tar
guix-b60d2bfff95c0859d7814c1fe9d0940c87edc2b4.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches/tomb-fix-errors-on-open.patch')
-rw-r--r--gnu/packages/patches/tomb-fix-errors-on-open.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/patches/tomb-fix-errors-on-open.patch b/gnu/packages/patches/tomb-fix-errors-on-open.patch
new file mode 100644
index 0000000000..5f41c9ee8f
--- /dev/null
+++ b/gnu/packages/patches/tomb-fix-errors-on-open.patch
@@ -0,0 +1,25 @@
+Description: Avoid error messages when opening a new tomb
+ Make sure control file exists and has user ownership before user writes to it.
+Author: Sven Geuer <debmaint@g-e-u-e-r.de>
+Bug: https://github.com/dyne/Tomb/issues/369
+Last-Update: 2019-11-04
+--- a/tomb
++++ b/tomb
+@@ -2197,14 +2197,15 @@
+ # {{{ Open
+
+ _update_control_file() {
+- # replaces a control file with new contents and gives it user ownership
++ # make sure a control file exists, gives it user ownership
++ # and replaces it with new contents
+ # stdin = contents
+ # $1 = path to control file
+ # $2 = contents
+ [[ "$2" = "" ]] && return 1
+ _sudo touch "$1"
+- print "$2" > "$1"
+ _sudo chown ${_UID}:${_GID} "$1"
++ print "$2" > "$1"
+ _verbose "updated control file $1 = $2"
+ }
+