[Bug 1232725] New: mc: aren’t we missing `mkdir -p` in /usr/share/mc/mc-wrapper.sh
https://bugzilla.suse.com/show_bug.cgi?id=1232725 Bug ID: 1232725 Summary: mc: aren’t we missing `mkdir -p` in /usr/share/mc/mc-wrapper.sh Classification: openSUSE Product: openSUSE Tumbleweed Version: Slowroll Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: mcepl@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- In the world of /tmp on tmpfs, it seems mc somewhere forgot to create the directory required for /usr/share/mc-wrapper.sh. I had to make this change to it: --- /usr/share/mc/mc-wrapper.sh 2024-09-17 17:04:40.000000000 +0200 +++ /home/matej/.config/dotfiles/mc-wrapper.sh 2024-11-02 10:30:01.996174166 +0100 @@ -1,9 +1,11 @@ -MC_USER=`whoami` -MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$" +MC_USER=$(whoami) +MC_PWD_DIR="${TMPDIR-/tmp}/mc-$MC_USER" +MC_PWD_FILE="$MC_PWD_DIR/mc.pwd.$$" +mkdir -p "$MC_PWD_DIR" /usr/bin/mc -P "$MC_PWD_FILE" "$@" if test -r "$MC_PWD_FILE"; then - MC_PWD="`cat "$MC_PWD_FILE"`" + MC_PWD="$(cat "$MC_PWD_FILE")" if test -n "$MC_PWD" && test "$MC_PWD" != "$PWD" && test -d "$MC_PWD"; then cd "$MC_PWD" fi @@ -12,4 +14,5 @@ rm -f "$MC_PWD_FILE" unset MC_PWD_FILE +unset MC_PWD_DIR unset MC_USER (change from backticks to $() is because my old eyes are not able to handle backticks that well) -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1232725 Matej Cepl <mcepl@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|Slowroll |Current -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1232725 https://bugzilla.suse.com/show_bug.cgi?id=1232725#c1 --- Comment #1 from Matej Cepl <mcepl@suse.com> --- Actually, the current version of the wrapper https://github.com/MidnightCommander/mc/blob/master/contrib/mc-wrapper.sh.in would work as well. -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1232725 https://bugzilla.suse.com/show_bug.cgi?id=1232725#c3 --- Comment #3 from Matej Cepl <mcepl@suse.com> --- (In reply to Dirk Weber from comment #2)
This is also discussed in bug 1203617. bug 1203617, comment 87 mentions the successful test of sr#1202757 for solving this. The upstream bug is https://midnight-commander.org/ticket/4575
Therefore I would consider this bug a duplicate (only bug 1203617 was opened for the same problem caused by completely different reasons long time ago).
I don’t think it is about `O_EXCL` (which is what bug 1203617 discusses, if I understand correctly), but still new version of mc-wrapper.sh script in https://midnight-commander.org/changeset/7a3a763f0ea07a825ca2af4642e31f9e358... seems like much better solution and works for me as well. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com