[83273] branches/release_2_0

jmr at macports.org jmr at macports.org
Mon Aug 29 07:08:12 PDT 2011


Revision: 83273
          http://trac.macports.org/changeset/83273
Author:   jmr at macports.org
Date:     2011-08-29 07:08:11 -0700 (Mon, 29 Aug 2011)
Log 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)

Revision Links:
--------------
    http://trac.macports.org/changeset/83271

Modified Paths:
--------------
    branches/release_2_0/base/src/macports1.0/macports.tcl

Property Changed:
----------------
    branches/release_2_0/
    branches/release_2_0/base/
    branches/release_2_0/base/portmgr/fedora/macports.spec
    branches/release_2_0/base/src/pextlib1.0/sha2.c
    branches/release_2_0/base/src/pextlib1.0/sha2.h
    branches/release_2_0/base/src/pextlib1.0/sha256cmd.c
    branches/release_2_0/base/src/pextlib1.0/sha256cmd.h
    branches/release_2_0/base/src/registry2.0/receipt_sqlite.tcl


Property changes on: branches/release_2_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267
   + /trunk:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267,83271


Property changes on: branches/release_2_0/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79771-79774,79782,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81005,81119,81146,81171,81234,81269,81361,81371,81414-81415,81454,81464,81467,81475,81522,81556-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82135,82767,82921,82924,82947,83136,83149,83267
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79771-79774,79782,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81005,81119,81146,81171,81234,81269,81361,81371,81414-81415,81454,81464,81467,81475,81522,81556-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82135,82767,82921,82924,82947,83136,83149,83267,83271
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692


Property changes on: branches/release_2_0/base/portmgr/fedora/macports.spec
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/portmgr/fedora/macports.spec:37343-46937
/branches/universal-sanity/base/portmgr/fedora/macports.spec:51872-52323
/branches/variant-descs-14482/base/portmgr/fedora/macports.spec:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/portmgr/fedora/macports.spec:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267
/trunk/base/portmgr/fedora/macports.spec.in:30388-57826
/users/perry/base-bugs_and_notes/portmgr/fedora/macports.spec:45682-46060
/users/perry/base-select/portmgr/fedora/macports.spec:44044-44692
   + /branches/gsoc08-privileges/base/portmgr/fedora/macports.spec:37343-46937
/branches/universal-sanity/base/portmgr/fedora/macports.spec:51872-52323
/branches/variant-descs-14482/base/portmgr/fedora/macports.spec:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/portmgr/fedora/macports.spec:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267,83271
/trunk/base/portmgr/fedora/macports.spec.in:30388-57826
/users/perry/base-bugs_and_notes/portmgr/fedora/macports.spec:45682-46060
/users/perry/base-select/portmgr/fedora/macports.spec:44044-44692

Modified: branches/release_2_0/base/src/macports1.0/macports.tcl
===================================================================
--- branches/release_2_0/base/src/macports1.0/macports.tcl	2011-08-29 14:01:58 UTC (rev 83272)
+++ branches/release_2_0/base/src/macports1.0/macports.tcl	2011-08-29 14:08:11 UTC (rev 83273)
@@ -1924,6 +1924,9 @@
     global macports::portverbose
     global macports::autoconf::rsync_path macports::autoconf::tar_path macports::autoconf::openssl_path
     array set options $optionslist
+    if {[info exists options(no_reindex)]} {
+        upvar $options(needed_portindex_var) any_needed_portindex
+    }
 
     set numfailed 0
 
@@ -2051,8 +2054,10 @@
                     file delete -force ${destdir}/tmp
                 }
 
+                set needs_portindex 1
                 # now sync the index if the local file is missing or older than a day
-                if {![file isfile $indexfile] || [expr [clock seconds] - [file mtime $indexfile]] > 86400} {
+                if {![file isfile $indexfile] || [expr [clock seconds] - [file mtime $indexfile]] > 86400
+                      || [info exists options(no_reindex)]} {
                     if {$is_tarball} {
                         # chop ports.tar off the end
                         set index_source [string range $source 0 end-[string length [file tail $source]]]
@@ -2066,8 +2071,10 @@
                         ui_debug "Synchronization of the PortIndex failed doing rsync"
                     } else {
                         set ok 1
+                        set needs_portindex 0
                         if {$is_tarball} {
                             set ok 0
+                            set needs_portindex 1
                             # verify signature for PortIndex
                             set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} ${remote_indexfile}.rmd160 ${destdir}"
                             ui_debug $rsync_commandline
@@ -2075,6 +2082,7 @@
                                 foreach pubkey ${macports::archivefetch_pubkeys} {
                                     if {![catch {exec $openssl dgst -ripemd160 -verify $pubkey -signature ${destdir}/PortIndex.rmd160 ${destdir}/PortIndex} result]} {
                                         set ok 1
+                                        set needs_portindex 0
                                         ui_debug "successful verification with key $pubkey"
                                         break
                                     } else {
@@ -2096,7 +2104,6 @@
                 if {[catch {system "chmod -R a+r \"$destdir\""}]} {
                     ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
                 }
-                set needs_portindex 1
             }
             {^https?$|^ftp$} {
                 if {[_source_is_snapshot $source filename extension]} {
@@ -2158,8 +2165,6 @@
                     }
 
                     file delete $tarpath
-                    
-                    set needs_portindex 1
                 } else {
                     # sync just a PortIndex file
                     set indexfile [macports::getindex $source]
@@ -2174,10 +2179,13 @@
         }
         
         if {$needs_portindex} {
-            global macports::prefix
-            set indexdir [file dirname [macports::getindex $source]]
-            if {[catch {system "${macports::prefix}/bin/portindex $indexdir"}]} {
-                ui_error "updating PortIndex for $source failed"
+            set any_needed_portindex 1
+            if {![info exists options(no_reindex)]} {
+                global macports::prefix
+                set indexdir [file dirname [macports::getindex $source]]
+                if {[catch {system "${macports::prefix}/bin/portindex $indexdir"}]} {
+                    ui_error "updating PortIndex for $source failed"
+                }
             }
         }
     }
@@ -2921,14 +2929,6 @@
         set updatestatus no
     }
 
-    # syncing ports tree.
-    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
-        ui_msg "--->  Updating the ports tree"
-        if {[catch {mportsync $optionslist} result]} {
-            return -code error "Couldn't sync the ports tree: $result"
-        }
-    }
-
     # are we syncing a tarball? (implies detached signature)
     set is_tarball 0
     if {[string range ${rsync_dir} end-3 end] == ".tar"} {
@@ -3017,6 +3017,20 @@
 
     # check if we we need to rebuild base
     set comp [rpm-vercomp $macports_version_new $macports::autoconf::macports_version]
+
+    # syncing ports tree.
+    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
+        ui_msg "--->  Updating the ports tree"
+        if {$comp > 0} {
+            # updated portfiles potentially need new base to parse - tell sync to try to 
+            # use prefabricated PortIndex files and signal if it couldn't
+            lappend optionslist no_reindex 1 needed_portindex_var needed_portindex
+        }
+        if {[catch {mportsync $optionslist} result]} {
+            return -code error "Couldn't sync the ports tree: $result"
+        }
+    }
+
     if {$use_the_force_luke == "yes" || $comp > 0} {
         if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
             ui_msg "--->  MacPorts base is outdated, selfupdate would install $macports_version_new (dry run)"
@@ -3084,8 +3098,13 @@
     }
 
     if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
-        ui_msg "\nThe ports tree has been updated. To upgrade your installed ports, you should run"
-        ui_msg "  port upgrade outdated"
+        if {[info exists needed_portindex]} {
+            ui_msg "Not all sources could be fully synced using the old version of MacPorts."
+            ui_msg "Please run selfupdate again now that MacPorts base has been updated."
+        } else {
+            ui_msg "\nThe ports tree has been updated. To upgrade your installed ports, you should run"
+            ui_msg "  port upgrade outdated"
+        }
     }
 
     return 0


Property changes on: branches/release_2_0/base/src/pextlib1.0/sha2.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.c:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.c:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.c:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.c:44044-44692
   + /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.c:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.c:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267,83271
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.c:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.c:44044-44692


Property changes on: branches/release_2_0/base/src/pextlib1.0/sha2.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.h:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.h:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.h:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.h:44044-44692
   + /branches/gsoc08-privileges/base/src/pextlib1.0/sha2.h:37343-46937
/branches/universal-sanity/base/src/pextlib1.0/sha2.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/sha2.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha2.h:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267,83271
/users/perry/base-bugs_and_notes/src/pextlib1.0/sha2.h:45682-46060
/users/perry/base-select/src/pextlib1.0/sha2.h:44044-44692


Property changes on: branches/release_2_0/base/src/pextlib1.0/sha256cmd.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.c:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.c:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.c:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.c:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.c:44044-44692
   + /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.c:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.c:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.c:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.c:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.c:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267,83271
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.c:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.c:44044-44692


Property changes on: branches/release_2_0/base/src/pextlib1.0/sha256cmd.h
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.h:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.h:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.h:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.h:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.h:44044-44692
   + /branches/gsoc08-privileges/base/src/pextlib1.0/rmd160cmd.h:37343-46937
/branches/gsoc09-logging/base/src/pextlib1.0/sha256cmd.h:51231-60371
/branches/universal-sanity/base/src/pextlib1.0/rmd160cmd.h:51872-52323
/branches/variant-descs-14482/base/src/pextlib1.0/rmd160cmd.h:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/pextlib1.0/sha256cmd.h:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267,83271
/users/perry/base-bugs_and_notes/src/pextlib1.0/rmd160cmd.h:45682-46060
/users/perry/base-select/src/pextlib1.0/rmd160cmd.h:44044-44692


Property changes on: branches/release_2_0/base/src/registry2.0/receipt_sqlite.tcl
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base/src/registry1.0/receipt_sqlite.tcl:37343-46937
/branches/gsoc09-logging/base/src/registry1.0/receipt_sqlite.tcl:51231-60371
/branches/universal-sanity/base/src/registry1.0/receipt_sqlite.tcl:51872-52323
/branches/variant-descs-14482/base/src/registry1.0/receipt_sqlite.tcl:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/registry2.0/receipt_sqlite.tcl:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267
/users/perry/base-bugs_and_notes/src/registry1.0/receipt_sqlite.tcl:45682-46060
/users/perry/base-select/src/registry1.0/receipt_sqlite.tcl:44044-44692
   + /branches/gsoc08-privileges/base/src/registry1.0/receipt_sqlite.tcl:37343-46937
/branches/gsoc09-logging/base/src/registry1.0/receipt_sqlite.tcl:51231-60371
/branches/universal-sanity/base/src/registry1.0/receipt_sqlite.tcl:51872-52323
/branches/variant-descs-14482/base/src/registry1.0/receipt_sqlite.tcl:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base/src/registry2.0/receipt_sqlite.tcl:79584,79586,79590-79594,79599-79600,79649,79686,79689,79692,79750,79762,79787,79864,79943,80069,80088,80178,80220,80222,80224,80226,80229,80287,80335,80443,80581,80583,80586,80779,80797-80798,80894,80928,80932,80934,80969,80971,81119,81146,81234,81361,81371,81414-81415,81454,81464,81467,81522,81557-81558,81562,81565,81567,81577,81630,81657,81830-81832,82111,82767,82921,82924,82947,83136,83149,83267,83271
/users/perry/base-bugs_and_notes/src/registry1.0/receipt_sqlite.tcl:45682-46060
/users/perry/base-select/src/registry1.0/receipt_sqlite.tcl:44044-44692
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110829/dff1f01e/attachment-0001.html>


More information about the macports-changes mailing list