Ticket #1553: portfetch.tcl.diff

File portfetch.tcl.diff, 968 bytes (added by opendarwin.org@…, 21 years ago)

move the "writable directory" check to after checking for distfile existence

  • /opt/local/share/darwinports/Tcl/port1.0/portfetch.tcl

    old new  
    296296            return -code error [format [msgcat::mc "Unable to create distribution files path: %s"] $result]
    297297        }
    298298    }
    299     if {![file writable $distpath]} {
    300         return -code error [format [msgcat::mc "%s must be writable"] $distpath]
    301     }
    302299    foreach {url_var distfile} $fetch_urls {
    303300        if {![file isfile $distpath/$distfile]} {
    304301            ui_info "$UI_PREFIX [format [msgcat::mc "%s doesn't seem to exist in %s"] $distfile $distpath]"
     302            if {![file writable $distpath]} {
     303                return -code error [format [msgcat::mc "%s must be writable"] $distpath]
     304            }
    305305            global portfetch::$url_var
    306306            if {![info exists $url_var]} {
    307307                ui_error [format [msgcat::mc "No defined site for tag: %s, using master_sites"] $url_var]