[47871] trunk/base/src/macports1.0/macports.tcl

Rainer Müller raimue at macports.org
Mon Mar 9 01:27:44 PDT 2009


blb at macports.org wrote:
> Revision: 47871
>           http://trac.macports.org/changeset/47871
> Author:   blb at macports.org
> Date:     2009-03-09 00:38:20 -0700 (Mon, 09 Mar 2009)
> Log Message:
> -----------
> macports1.0/macports.tcl - don't bother with .quick work when the PortIndex
> isn't available; without this running portindex dies since it tries to
> run the 'file mtime' against PortIndex and that crashes when that file isn't
> there
> 
> Modified Paths:
> --------------
>     trunk/base/src/macports1.0/macports.tcl
> 
> Modified: trunk/base/src/macports1.0/macports.tcl
> ===================================================================
> --- trunk/base/src/macports1.0/macports.tcl	2009-03-09 06:16:34 UTC (rev 47870)
> +++ trunk/base/src/macports1.0/macports.tcl	2009-03-09 07:38:20 UTC (rev 47871)
> @@ -1854,6 +1854,9 @@
>          # chop off any tags
>          set source [lindex $source 0]
>          set index [macports::getindex $source]
> +        if {![file exists ${index}]} {
> +            continue
> +        }
>          if {![file exists ${index}.quick] || [file mtime ${index}] > [file mtime ${index}.quick]} {
>              # stale or nonexistent quick index file, so generate a new one
>              if {[catch {set quicklist [mports_generate_quickindex ${index}]}]} {

Do we need to call mports_generate_quickindex here at all? portindex now
already generates PortIndex.quick, so I can't think of a situation where
a PortIndex would exist without a corresponding PortIndex.quick. Users
are encouraged to re-index using the new version, of course.

Rainer


More information about the macports-dev mailing list