[MacPorts] #1570: port install fails with message: "Unable to execute port: Directory not found"

MacPorts noreply at macports.org
Thu Mar 24 06:48:39 PDT 2016


#1570: port install fails with message: "Unable to execute port: Directory not
found"
------------------------------+--------------------------------
  Reporter:  rod_gilchrist@…  |      Owner:  macports-tickets@…
      Type:  defect           |     Status:  closed
  Priority:  Normal           |  Milestone:
 Component:  base             |    Version:  1.0
Resolution:  fixed            |   Keywords:
      Port:                   |
------------------------------+--------------------------------
Description changed by ryandesign@…:

Old description:

> After upgrading to Panther I was no longer able to install ports.
>
> The problem was that the directories in /usr/X11R6 including lib had
> gotten set to mode 700
> somehow.
>
> The effect was that readdir called by _dportsearchpath aborted its search
> for libraries when it was
> unable to read the directory /usr/X11R6/lib, and an unhelpful error
> message was returned.
>
> The fix is to catch the error and handle it better in _dportsearchpath
> (the fix below prints a message
> and doesn't abort) and to improve the error message in readdir (which is
> likely a cut and paste error).
>

> --- base/src/darwinports1.0/darwinports.tcl      Sat Feb 28 13:50:08 2004
> +++ base/src/darwinports1.0/fixed_darwinports.tcl        Sat Feb 28
> 13:49:49 2004
> @@ -332,7 +332,11 @@
>         if {![file isdirectory $path]} {
>             continue
>         }
> -       foreach filename [readdir $path] {
> +       if {[catch {set filelist [readdir $path]} result]} {
> +           puts "_dportsearchpath: $result : $path"
> +           set filelist ""
> +       }
> +       foreach filename $filelist {
>             if {[regexp $depregex $filename] == 1} {
>                 ui_debug "Found Dependency: path: $path filename:
> $filename regex: $depregex"
>                 set found 1
>

>
> --- base/src/pextlib1.0/Pextlib.c   Sat Feb 28 14:00:35 2004
> +++ base/src/pextlib1.0/fixed_Pextlib.c     Sat Feb 28 13:13:29 2004
> @@ -496,7 +496,7 @@
>         path = Tcl_GetString(objv[1]);
>         dirp = opendir(path);
>         if (!dirp) {
> -               Tcl_SetResult(interp, "Directory not found", TCL_STATIC);
> +               Tcl_SetResult(interp, "Can't read directory",
> TCL_STATIC);
>                 return TCL_ERROR;
>         }
>         tcl_result = Tcl_NewListObj(0, NULL);

New description:

 After upgrading to Panther I was no longer able to install ports.

 The problem was that the directories in /usr/X11R6 including lib had
 gotten set to mode 700
 somehow.

 The effect was that readdir called by _dportsearchpath aborted its search
 for libraries when it was
 unable to read the directory /usr/X11R6/lib, and an unhelpful error
 message was returned.

 The fix is to catch the error and handle it better in _dportsearchpath
 (the fix below prints a message
 and doesn't abort) and to improve the error message in readdir (which is
 likely a cut and paste error).

 {{{
 --- base/src/darwinports1.0/darwinports.tcl      Sat Feb 28 13:50:08 2004
 +++ base/src/darwinports1.0/fixed_darwinports.tcl        Sat Feb 28
 13:49:49 2004
 @@ -332,7 +332,11 @@
         if {![file isdirectory $path]} {
             continue
         }
 -       foreach filename [readdir $path] {
 +       if {[catch {set filelist [readdir $path]} result]} {
 +           puts "_dportsearchpath: $result : $path"
 +           set filelist ""
 +       }
 +       foreach filename $filelist {
             if {[regexp $depregex $filename] == 1} {
                 ui_debug "Found Dependency: path: $path filename:
 $filename regex: $depregex"
                 set found 1
 }}}

 {{{
 --- base/src/pextlib1.0/Pextlib.c   Sat Feb 28 14:00:35 2004
 +++ base/src/pextlib1.0/fixed_Pextlib.c     Sat Feb 28 13:13:29 2004
 @@ -496,7 +496,7 @@
         path = Tcl_GetString(objv[1]);
         dirp = opendir(path);
         if (!dirp) {
 -               Tcl_SetResult(interp, "Directory not found", TCL_STATIC);
 +               Tcl_SetResult(interp, "Can't read directory", TCL_STATIC);
                 return TCL_ERROR;
         }
         tcl_result = Tcl_NewListObj(0, NULL);
 }}}

--

-- 
Ticket URL: <https://trac.macports.org/ticket/1570#comment:2>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list