New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 83273


Ignore:
Timestamp:
08/29/11 07:08:11 (4 years ago)
Author:
jmr@…
Message:

merge r83271 from trunk:

don't regenerate PortIndex locally during selfupdate when base is outdated, and tell user to selfupdate again if that means there are sources without a current index (#30739)

Location:
branches/release_2_0
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/release_2_0

  • branches/release_2_0/base

  • branches/release_2_0/base/portmgr/fedora/macports.spec

  • branches/release_2_0/base/src/macports1.0/macports.tcl

    r83268 r83273  
    19251925    global macports::autoconf::rsync_path macports::autoconf::tar_path macports::autoconf::openssl_path 
    19261926    array set options $optionslist 
     1927    if {[info exists options(no_reindex)]} { 
     1928        upvar $options(needed_portindex_var) any_needed_portindex 
     1929    } 
    19271930 
    19281931    set numfailed 0 
     
    20522055                } 
    20532056 
     2057                set needs_portindex 1 
    20542058                # now sync the index if the local file is missing or older than a day 
    2055                 if {![file isfile $indexfile] || [expr [clock seconds] - [file mtime $indexfile]] > 86400} { 
     2059                if {![file isfile $indexfile] || [expr [clock seconds] - [file mtime $indexfile]] > 86400 
     2060                      || [info exists options(no_reindex)]} { 
    20562061                    if {$is_tarball} { 
    20572062                        # chop ports.tar off the end 
     
    20672072                    } else { 
    20682073                        set ok 1 
     2074                        set needs_portindex 0 
    20692075                        if {$is_tarball} { 
    20702076                            set ok 0 
     2077                            set needs_portindex 1 
    20712078                            # verify signature for PortIndex 
    20722079                            set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} ${remote_indexfile}.rmd160 ${destdir}" 
     
    20762083                                    if {![catch {exec $openssl dgst -ripemd160 -verify $pubkey -signature ${destdir}/PortIndex.rmd160 ${destdir}/PortIndex} result]} { 
    20772084                                        set ok 1 
     2085                                        set needs_portindex 0 
    20782086                                        ui_debug "successful verification with key $pubkey" 
    20792087                                        break 
     
    20972105                    ui_warn "Setting world read permissions on parts of the ports tree failed, need root?" 
    20982106                } 
    2099                 set needs_portindex 1 
    21002107            } 
    21012108            {^https?$|^ftp$} { 
     
    21592166 
    21602167                    file delete $tarpath 
    2161                      
    2162                     set needs_portindex 1 
    21632168                } else { 
    21642169                    # sync just a PortIndex file 
     
    21752180         
    21762181        if {$needs_portindex} { 
    2177             global macports::prefix 
    2178             set indexdir [file dirname [macports::getindex $source]] 
    2179             if {[catch {system "${macports::prefix}/bin/portindex $indexdir"}]} { 
    2180                 ui_error "updating PortIndex for $source failed" 
     2182            set any_needed_portindex 1 
     2183            if {![info exists options(no_reindex)]} { 
     2184                global macports::prefix 
     2185                set indexdir [file dirname [macports::getindex $source]] 
     2186                if {[catch {system "${macports::prefix}/bin/portindex $indexdir"}]} { 
     2187                    ui_error "updating PortIndex for $source failed" 
     2188                } 
    21812189            } 
    21822190        } 
     
    29222930    } 
    29232931 
    2924     # syncing ports tree. 
    2925     if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} { 
    2926         ui_msg "--->  Updating the ports tree" 
    2927         if {[catch {mportsync $optionslist} result]} { 
    2928             return -code error "Couldn't sync the ports tree: $result" 
    2929         } 
    2930     } 
    2931  
    29322932    # are we syncing a tarball? (implies detached signature) 
    29332933    set is_tarball 0 
     
    30183018    # check if we we need to rebuild base 
    30193019    set comp [rpm-vercomp $macports_version_new $macports::autoconf::macports_version] 
     3020 
     3021    # syncing ports tree. 
     3022    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} { 
     3023        ui_msg "--->  Updating the ports tree" 
     3024        if {$comp > 0} { 
     3025            # updated portfiles potentially need new base to parse - tell sync to try to  
     3026            # use prefabricated PortIndex files and signal if it couldn't 
     3027            lappend optionslist no_reindex 1 needed_portindex_var needed_portindex 
     3028        } 
     3029        if {[catch {mportsync $optionslist} result]} { 
     3030            return -code error "Couldn't sync the ports tree: $result" 
     3031        } 
     3032    } 
     3033 
    30203034    if {$use_the_force_luke == "yes" || $comp > 0} { 
    30213035        if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} { 
     
    30853099 
    30863100    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} { 
    3087         ui_msg "\nThe ports tree has been updated. To upgrade your installed ports, you should run" 
    3088         ui_msg "  port upgrade outdated" 
     3101        if {[info exists needed_portindex]} { 
     3102            ui_msg "Not all sources could be fully synced using the old version of MacPorts." 
     3103            ui_msg "Please run selfupdate again now that MacPorts base has been updated." 
     3104        } else { 
     3105            ui_msg "\nThe ports tree has been updated. To upgrade your installed ports, you should run" 
     3106            ui_msg "  port upgrade outdated" 
     3107        } 
    30893108    } 
    30903109 
  • branches/release_2_0/base/src/pextlib1.0/sha2.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/release_2_0/base/src/pextlib1.0/sha2.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/release_2_0/base/src/pextlib1.0/sha256cmd.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/release_2_0/base/src/pextlib1.0/sha256cmd.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/release_2_0/base/src/registry2.0/receipt_sqlite.tcl

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.