Bug 1438149 - mc-wrapper.sh script does not work anymore
Summary: mc-wrapper.sh script does not work anymore
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mc
Version: 26
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1433602
TreeView+ depends on / blocked
 
Reported: 2017-04-01 08:49 UTC by Knud Christiansen
Modified: 2017-12-12 15:37 UTC (History)
6 users (show)

Fixed In Version: mc-4.8.19-2.fc26 mc-4.8.19-2.fc25 mc-4.8.19-2.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-09 21:24:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Knud Christiansen 2017-04-01 08:49:14 UTC
After update from F25 to F26 (by means of dnf upgrade) the mc-wrapper.sh script shows no effect. eg. mc allways return to the folder where it was started from.

Have checked that the script generates the MC_PWD_FILE variable

Have checked that /usr/bin/mc -P filename works


Knud

Comment 1 Knud Christiansen 2017-04-07 19:26:39 UTC
After updating F25 MC from version 1:4.8.17-2.x86_64.fc25 to 1:4.8.19-1 the problem accours.

downgrading to 1:4.8.17-2 makes the problem dissapear

Knud

Comment 2 vvs 2017-04-11 05:13:25 UTC
If nobody noticed yet, this is caused by a changed location for temporary files. It should be changed to /var/tmp in mc-wrapper.sh.

Comment 3 vvs 2017-04-11 05:15:28 UTC
This is actually a duplicate of #1433602

Comment 4 Knud Christiansen 2017-04-11 08:03:52 UTC
Change mc-wrapper.sh pointing to /var/tmp solves the problem

Comment 5 A.J. Bonnema 2017-04-12 07:40:46 UTC
The mc-wrapper uses the environment variable TMPDIR to point to the temporary directory and /tmp if TMPDIR does not exist. Apparantly the mc-wrapper was designed to work no matter which temp directory was defined, as long as the variable TMPDIR was defined properly. So, the solution should be to define the variable TMPDIR to be /var/tmp, in stead of modifying mc-wrapper.sh.

For reference the mc-wrapper code is: 

MC_USER=`id | sed 's/[^(]*(//;s/).*//'`
MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"
/usr/bin/mc -P "$MC_PWD_FILE" "$@"

if test -r "$MC_PWD_FILE"; then
	MC_PWD="`cat "$MC_PWD_FILE"`"
	if test -n "$MC_PWD" && test -d "$MC_PWD"; then
		cd "$MC_PWD"
	fi
	unset MC_PWD
fi

rm -f "$MC_PWD_FILE"
unset MC_PWD_FILE
unset MC_USER

Comment 6 vvs 2017-04-12 11:33:28 UTC
Is it so? Do you want that every other application would store temporary files in /var/tmp instead of /tmp? The reason for changing that location for mc was its' habit to create huge temporary files which doesn't fit into tmpfs.

Comment 7 A.J. Bonnema 2017-04-12 14:08:34 UTC
(In reply to vvs from comment #6)
> Is it so? Do you want that every other application would store temporary
> files in /var/tmp instead of /tmp? The reason for changing that location for
> mc was its' habit to create huge temporary files which doesn't fit into
> tmpfs.

Hi vvs,

I am not sure if you are responding to my comment or someone elses comment. Tbh I don't care which directory is temp, just that modifying mc-wrapper.sh may not be the way to go, because the wrapper uses an environment variable to point to the right directory. That's why I made my comment and included the source for mc-wrapper.

So, if the directory should be /var/tmp, then besides modifying the temp directory, define TMPDIR to be /var/tmp should solve the problem.

Comment 8 Fedora Update System 2017-05-05 13:07:07 UTC
mc-4.8.19-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0b205eabf4

Comment 9 Fedora Update System 2017-05-05 13:07:44 UTC
mc-4.8.19-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-bf0dcd75c6

Comment 10 Fedora Update System 2017-05-05 13:08:29 UTC
mc-4.8.19-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-70c2e0ec52

Comment 11 Fedora Update System 2017-05-05 20:59:20 UTC
mc-4.8.19-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-70c2e0ec52

Comment 12 Fedora Update System 2017-05-05 21:02:11 UTC
mc-4.8.19-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-0b205eabf4

Comment 13 Fedora Update System 2017-05-05 22:39:08 UTC
mc-4.8.19-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-bf0dcd75c6

Comment 14 Fedora Update System 2017-05-09 21:24:58 UTC
mc-4.8.19-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Knud Christiansen 2017-05-10 05:06:32 UTC
Problem still there, need to change mc-wrapper.sh as described in comment #2

Comment 16 Fedora Update System 2017-05-12 12:04:52 UTC
mc-4.8.19-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 vvs 2017-05-13 08:32:39 UTC
Confirm. It's not fixed in mc-4.8.19-2.fc25 and should be reopened.

Comment 18 Knud Christiansen 2017-05-16 19:07:14 UTC
4.8.19-4 has also the failure.....exit not to current folder
Change mc-wrapper to /var/tmp from /tmp makes it work

Comment 19 Fedora Update System 2017-05-17 05:56:19 UTC
mc-4.8.19-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.