runshell: Fix a edge case where rm errors were sent to stdout, which could confuse...
authorJoey Hess <joeyh@joeyh.name>
Mon, 5 Oct 2020 16:44:40 +0000 (12:44 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 5 Oct 2020 16:44:40 +0000 (12:44 -0400)
CHANGELOG
doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs/comment_2_c43bb7ffa7b900f5824b4495a6a82d0e._comment [new file with mode: 0644]
standalone/linux/skel/runshell

index 6b1a6cd8e0b176a21f65aff7fb7124f369f1f8a0..0854abaa0b3fd537c4ffff2e12184f3156c40328 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -40,6 +40,8 @@ git-annex (8.20200909) UNRELEASED; urgency=medium
   * Fix build with Benchmark build flag.
   * Enable building with git-annex benchmark by default, only turning it
     off when the criterion library is not installed.
+  * runshell: Fix a edge case where rm errors were sent to stdout, which
+    could confuse things parsing git-annex output.
 
  -- Joey Hess <id@joeyh.name>  Mon, 14 Sep 2020 18:34:37 -0400
 
diff --git a/doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs/comment_2_c43bb7ffa7b900f5824b4495a6a82d0e._comment b/doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs/comment_2_c43bb7ffa7b900f5824b4495a6a82d0e._comment
new file mode 100644 (file)
index 0000000..3cca5ec
--- /dev/null
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2020-10-05T16:43:02Z"
+ content="""
+Fixed the rm to not redirect errors to stdout. Traced back to a8a0f7fc58
+which involved a case where the rm was failing due to perms, so the intent
+must have been to also send stdout to /dev/null, but that was omitted then.
+"""]]
index e18769cea874ec6af8dd48393f9404c2c767aba8..b3683dd46d01f90e0b3bb84cfb89e56c6d9891bf 100755 (executable)
@@ -143,7 +143,7 @@ if [ -z "${LOCPATH+set}" ] && [ -z "$GIT_ANNEX_PACKAGE_INSTALL" ]; then
        for localecache in $HOME/.cache/git-annex/locales/*; do
                cachebase=$(cat "$localecache/base" 2>/dev/null || true)
                if [ ! -d "$cachebase" ] || ! cmp "$localecache/buildid" "$cachebase/buildid" >/dev/null 2>&1 ; then
-                       rm -rf "$localecache" 2>&1 || true
+                       rm -rf "$localecache" >/dev/null 2>&1 || true
                fi
        done