[ET Trac] [Einstein Toolkit] #2154: Cactus: suppress interaction when using mv in make files

Einstein Toolkit trac-noreply at einsteintoolkit.org
Fri May 18 13:06:53 CDT 2018


#2154: Cactus: suppress interaction when using mv in make files
--------------------------+---------------------------------
  Reporter:  Roland Haas  |      Owner:  (none)
      Type:  defect       |     Status:  review
  Priority:  minor        |  Milestone:
 Component:  Cactus       |    Version:  development version
Resolution:               |   Keywords:
--------------------------+---------------------------------

Comment (by Roland Haas):

 I agree that in general this should not be an issue and also that in
 general this type of thing is done via an alias and does (or at least
 should) not affect the build system. I admit to being confused why this
 happens and had listed four things for the person to check:

 1. there is a non-standard version of mv on your system
 2. there is an alias for mv that (for some reason) bash is using
 3. you changed user accounts or similar so that the file
 /home/xu/Cactus/configs/sim/lib/LINKLIST.tmp has funny permissions /
 ownership
 4. there is a function mv() declared (same as alias)

 to be tested via:

 1. "which mv" and "mv --version" and let me know the result
 2. try "alias mv" and if that actually returns something please do
 "unalias mv" and compile again
 3. do ls -l ~/Cactus/configs/sim/lib/LINKLIST.tmp and ls -l
 ~/Cactus/configs/sim/lib/LINKLIST.tmp to check on the permissions
 4. check what "declare -f mv | grep mv" output and if there is a "mv ()"
 in the output please do "unset -f mv" to get rid of it then recompile

 and it seems as if:

 1.mv (GNU coreutils) 8.28
 Copyright (C) 2017 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later
 <http://gnu.org/licenses/gpl.html>.
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
 2.nothing returned
 3.The permission is -rw-r--r--
 4.The function exits.

 This was reported in private email to me. So there seems to be no alias
 and mv itself is "(GNU coreutils) 8.28". There may be a mv bash function
 though that is not quite clear to me from the email. The question shown by
 mv is:
 {{{
 mv /home/xu/Cactus/configs/sim/lib/LINKLIST.tmp
 /home/xu/Cactus/configs/sim/lib/LINKLIST
 mv: replace '/home/xu/Cactus/configs/sim/lib/LINKLIST', overriding mode
 0644 (rw-r--r--)?
 }}}
 which is not a message that my mv (same coreutils version) would show
 (even with "-i").

 So one would have to ask which center / Linux distribution the person is
 using.

 Do you object to the patch on the basis that it does something wrong (or
 adds complexity and only fixes part of the issue) or are curious why this
 is happening? As far s I can tell, using "mv -f" is supported by POSIX and
 while it should never really be required, it also should never do harm.

 Addendum: I *do* get that message if the target file is owned by a
 different *user* than mine. I will ask to check once more for funny
 ownership (though the error about mv has already gone away so the file no
 longer exists).

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/2154#comment:3>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list