[MacPorts] #66028: coreutils fails to build due to apparent path recursion

MacPorts noreply at macports.org
Sun Nov 20 22:29:33 UTC 2022


#66028: coreutils fails to build due to apparent path recursion
------------------------+----------------------
  Reporter:  rmottola   |      Owner:  mascguy
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:
      Port:  coreutils  |
------------------------+----------------------

Comment (by rmottola):

 I hacked a little and found that applying
 https://trac.macports.org/ticket/62994 does not work.

 However, I was able to fix by still patching configure this way:


 {{{
   /* Leaving behind such a deep directory is not polite.
      So clean up here, right away, even though the driving
      shell script would also clean up.  */
   {
     size_t i;

     /* Try rmdir first, in case the chdir failed.  */
     rmdir -rf (DIR_NAME);
     for (i = 0; i <= n_chdirs; i++)
       {
         if (chdir ("..") < 0)
           break;
         if (rmdir (DIR_NAME) != 0)
           break;
       }
   }
 }}}

 Please note the "-rf" i added in the first rmdir.


 it helps the cleanup.

-- 
Ticket URL: <https://trac.macports.org/ticket/66028#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list