Changeset 84763


Ignore:
Timestamp:
Sep 30, 2011, 10:54:17 PM (9 years ago)
Author:
derek@…
Message:

Merge from trunk

Location:
branches/gsoc11-statistics/base
Files:
1 deleted
33 edited
3 copied

Legend:

Unmodified
Added
Removed
  • branches/gsoc11-statistics/base

  • branches/gsoc11-statistics/base/ChangeLog

    r82923 r84763  
    44###
    55
     6Unreleased changes:
     7
    68    - Implement new option-replace using lsearch/lreplace. The old behavior is
    79      deprecated for option-replace with only one argument, but can still be
    810      found in option-strsed.
    911      (raimue in r82760, r82761)
     12
     13Release 2.0.3 (2011-09-05 by raimue)
     14    - Fix a regression introduced in 2.0.2 when fetching with a VCS
     15      (#31073, jmr in r83471)
     16
     17Release 2.0.2 (2011-09-01 by jmr):
     18    - Messages recommending running selfupdate will no longer be printed when
     19      selfupdate is being run. (#23094, jmr in r83270, r83391)
     20
     21    - The PortIndex will not be regenerated during selfupdate when base is
     22      outdated. This avoids failure to index ports that use features only
     23      available in the current version. (#30739, jmr in r83271)
     24
     25    - Fixed build failures when the TMPDIR environment variable is set to a
     26      directory that is not writable by the macports user.
     27      (#30749, jmr in r83267)
     28
     29    - Fixed error when checksumming distfiles with names containing spaces.
     30      (#28568, jmr in r83149)
     31
     32    - The uninstall and deactivate actions now sort the port list so that
     33      dependents are processed before the ports they depend on.
     34      (#8431, jmr in r82947)
     35
     36    - Fixed an issue where a non-universal version of a port could be
     37      installed as a dependency as well as the universal version, with
     38      unpredictable results, when some ports in the dependency graph needed
     39      the universal version but others didn't. (jmr in r82924)
     40
     41    - Now using a temp dir inside ${prefix} when activating, as /tmp or
     42      /var/folders may be on a different volume. (jmr in r82767)
     43
     44    - Fixed extracting portfile-only archives. (#31033, jmr in r81830)
     45
     46    - Fixed adduser and addgroup procedures not re-dropping privileges when
     47      done. (jmr in r81630)
     48
     49    - Fixed error activating ports with names containing the string "cpio".
     50      (#30532, jmr in r81577)
    1051
    1152Release 2.0.1 (2011-08-02 by jmr):
  • branches/gsoc11-statistics/base/Makefile.in

    r82923 r84763  
    9191        $(TCLSH) src/images_to_archives.tcl "${macports_tcl_dir}"
    9292endif
     93ifndef SELFUPDATING
    9394        @echo ""; echo "Congratulations, you have successfully installed the MacPorts system. To get the Portfiles and update the system, add ${prefix}/bin to your PATH and run:"; echo ""
    9495        @echo "sudo port -v selfupdate"; echo ""
    9596        @echo "Please read \"man port\", the MacPorts guide at http://guide.macports.org/ and Wiki at https://trac.macports.org/ for full documentation."; echo ""
     97else
     98        @echo ""; echo "Congratulations, you have successfully upgraded the MacPorts system."; echo ""
     99endif
    96100
    97101group::
  • branches/gsoc11-statistics/base/config/RELEASE_URL

    r82923 r84763  
    1 https://svn.macports.org/repository/macports/tags/release_2_0_1/base
     1https://svn.macports.org/repository/macports/tags/release_2_0_3/base
  • branches/gsoc11-statistics/base/portmgr/ReleaseProcess

    r82923 r84763  
    130130be done with the help of the MacOSForge sysadmin.
    131131
    132 Additionally, a file is created, and posted to the same location, that contains md5, sha1, and rmd160 checksums
     132Additionally, a file is created, and posted to the same location, that contains md5, sha1, rmd160, and sha256 checksums
    133133for each of the files:
    134134
  • branches/gsoc11-statistics/base/portmgr/dmg/postflight

    r82923 r84763  
    8888# which hints that we've already tweaked it and therefore already backed it up.
    8989function write_setting () {
    90     if [[ -f ${HOME}/.${CONF_FILE} ]] && ! grep "${OUR_STRING}" ${HOME}/.${CONF_FILE} > /dev/null; then
     90    if [[ -f "${HOME}/.${CONF_FILE}" ]] && ! grep "${OUR_STRING}" "${HOME}/.${CONF_FILE}" > /dev/null; then
    9191        echo "Backing up your ${HOME}/.${CONF_FILE} shell confguration file as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX} before adapting it for MacPorts."
    92         /bin/cp -fp ${HOME}/.${CONF_FILE} "${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}" || {
     92        /bin/cp -fp "${HOME}/.${CONF_FILE}" "${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}" || {
    9393            echo "An attempt to backup your original configuration file failed! Please set your MacPorts compatible environment manually."
    9494            update_macports
    9595            exit 1
    9696        }
    97         echo -e "\n##\n# Your previous ${HOME}/.${CONF_FILE} file was backed up as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}\n##" >> ${HOME}/.${CONF_FILE}
    98     fi
    99     echo -e "\n# ${OUR_STRING}: adding an appropriate ${1} variable for use with MacPorts." >> ${HOME}/.${CONF_FILE}
    100     echo "${ENV_COMMAND} ${1}${ASSIGN}${2}" >> ${HOME}/.${CONF_FILE}
    101     echo -e "# Finished adapting your ${1} environment variable for use with MacPorts.\n" >> ${HOME}/.${CONF_FILE}
    102     chown ${USER} ${HOME}/.${CONF_FILE} || echo "Warning: unable to adapt permissions on your ${HOME}/.${CONF_FILE} shell configuration file!"
     97        echo -e "\n##\n# Your previous ${HOME}/.${CONF_FILE} file was backed up as ${HOME}/.${CONF_FILE}.${BACKUP_SUFFIX}\n##" >> "${HOME}/.${CONF_FILE}"
     98    fi
     99    echo -e "\n# ${OUR_STRING}: adding an appropriate ${1} variable for use with MacPorts." >> "${HOME}/.${CONF_FILE}"
     100    echo "${ENV_COMMAND} ${1}${ASSIGN}${2}" >> "${HOME}/.${CONF_FILE}"
     101    echo -e "# Finished adapting your ${1} environment variable for use with MacPorts.\n" >> "${HOME}/.${CONF_FILE}"
     102    chown ${USER} "${HOME}/.${CONF_FILE}" || echo "Warning: unable to adapt permissions on your ${HOME}/.${CONF_FILE} shell configuration file!"
    103103    echo "An appropriate ${1} variable has been added to your shell environment by the MacPorts installer."
    104104}
     
    205205        ENV_COMMAND="setenv"
    206206        ASSIGN=" "
    207         if [[ -f ${HOME}/.tcshrc ]]; then
     207        if [[ -f "${HOME}/.tcshrc" ]]; then
    208208            CONF_FILE=tcshrc
    209         elif [[ -f ${HOME}/.cshrc ]]; then
     209        elif [[ -f "${HOME}/.cshrc" ]]; then
    210210            CONF_FILE=cshrc
    211211        else
     
    218218        ENV_COMMAND="export"
    219219        ASSIGN="="
    220         if [[ -f ${HOME}/.bash_profile ]]; then
     220        if [[ -f "${HOME}/.bash_profile" ]]; then
    221221            CONF_FILE=bash_profile
    222         elif [[ -f ${HOME}/.bash_login ]]; then
     222        elif [[ -f "${HOME}/.bash_login" ]]; then
    223223            CONF_FILE=bash_login
    224224        else
     
    270270# Postflight script is done with its job, update MacPorts and exit gracefully!
    271271update_macports
    272 echo "You have succesfully installed the MacPorts system, launch a terminal and try it out!"
    273 echo "Read the port(1) manual page and http://guide.macports.org for help, http://www.macports.org/contact.php if you need to get in touch with The MacPorts Project."
     272echo "You have successfully installed the MacPorts system. Launch a terminal and try it out!"
     273echo "Read the port(1) manual page and http://guide.macports.org/ for help."
     274echo "See http://www.macports.org/contact.php if you need to get in touch with The MacPorts Project."
    274275exit 0
  • branches/gsoc11-statistics/base/portmgr/fedora/macports.spec

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/gsoc11-statistics/base/portmgr/jobs/mirror_macports.sh

    r66457 r84763  
    88
    99# regexp of ports that we do not mirror
    10 EXCLUSIONS='^(molden)$'
     10EXCLUSIONS='^(molden|metis)$'
    1111
    1212# macports really wants this, so lets appease it
  • branches/gsoc11-statistics/base/portmgr/jobs/org.macports.PortIndex2MySQL.plist

    r31671 r84763  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    33<plist version="1.0">
    44    <dict>
     
    1212        <array>
    1313            <dict>
    14                 <key>Hour</key>
    15                 <integer>4</integer>
    16                 <key>Minute</key>
    17                 <integer>15</integer>
    18             </dict>
    19             <dict>
    20                 <key>Hour</key>
    21                 <integer>16</integer>
    22                 <key>Minute</key>
    23                 <integer>15</integer>
    24             </dict>
     14                <key>Hour</key>
     15                <integer>4</integer>
     16                <key>Minute</key>
     17                <integer>15</integer>
     18            </dict>
     19            <dict>
     20                <key>Hour</key>
     21                <integer>16</integer>
     22                <key>Minute</key>
     23                <integer>15</integer>
     24            </dict>
    2525        </array>
    2626        <key>UserName</key>
  • branches/gsoc11-statistics/base/portmgr/jobs/org.macports.mprsyncup.plist

    r53280 r84763  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    33<plist version="1.0">
    44    <dict>
     
    1212        <array>
    1313            <dict>
    14                 <key>Minute</key>
    15                 <integer>00</integer>
    16             </dict>
    17             <dict>
    18                 <key>Minute</key>
    19                 <integer>30</integer>
    20             </dict>
     14                <key>Minute</key>
     15                <integer>00</integer>
     16            </dict>
     17            <dict>
     18                <key>Minute</key>
     19                <integer>30</integer>
     20            </dict>
    2121        </array>
    2222    </dict>
  • branches/gsoc11-statistics/base/portmgr/jobs/port_binary_distributable.tcl

    r82923 r84763  
    3535# to do so below.
    3636# 'Noncommercial' means a license that prohibits commercial use.
    37 set good_licenses {agpl apache apsl artistic autoconf boost bsd cecill copyleft cpl
    38                    curl fontconfig freebsd freetype gfdl gpl gplconflict ibmpl ijg
    39                    jasper lgpl libpng libtool mit mpl noncommercial openssl permissive
    40                    php psf qpl public-domain restrictive/distributable ruby sleepycat
    41                    ssleay tcl/tk x11 zlib zpl}
     37set good_licenses {afl agpl apache apsl artistic autoconf boost bsd cecill \
     38                   copyleft cpl curl epl fontconfig freebsd freetype gd gfdl \
     39                   gpl gplconflict ibmpl ijg isc jasper lgpl libpng libtool \
     40                   lppl mit mpl ncsa noncommercial openssl permissive php \
     41                   psf public-domain qpl restrictive/distributable ruby \
     42                   sleepycat ssleay tcl/tk w3c wtfpl x11 zlib zpl}
    4243foreach lic $good_licenses {
    4344    set license_good($lic) 1
    4445}
     46
     47proc all_licenses_except { args } {
     48    global good_licenses
     49    set remaining $good_licenses
     50    foreach arg $args {
     51        set remaining [lsearch -inline -all -not -exact $remaining $arg]
     52    }
     53    return [list $remaining]
     54}
     55
    4556# keep these values sorted
    4657array set license_conflicts \
    47     {agpl {apache-1 apache-1.1 cecill gpl-1 gpl-2 gplconflict noncommercial restrictive/distributable}
     58    "afl {cecill gpl}
     59    agpl {apache-1 apache-1.1 cecill gpl-1 gpl-2 gplconflict noncommercial restrictive/distributable}
    4860    apache {cecill gpl-1 gpl-2}
    4961    apache-1 {agpl gpl}
     
    5163    apsl {cecill gpl}
    5264    cpl {cecill gpl}
    53     cecill {agpl apache apsl cpl gplconflict ibmpl mpl noncommercial openssl php qpl restrictive/distributable ssleay zpl-1}
     65    cecill {afl agpl apache apsl cpl epl gd gplconflict ibmpl lppl mpl noncommercial openssl php qpl restrictive/distributable ruby ssleay zpl-1}
     66    epl {cecill gpl}
    5467    freetype {gpl-2}
    55     gpl {agpl apache-1 apache-1.1 apsl cpl gplconflict ibmpl mpl noncommercial openssl php qpl restrictive/distributable ssleay zpl-1}
     68    gd {cecill gpl}
     69    gpl {afl agpl apache-1 apache-1.1 apsl cpl epl gd gplconflict ibmpl lppl mpl noncommercial openssl php qpl restrictive/distributable ruby ssleay zpl-1}
    5670    gpl-1 {apache gpl-3 gpl-3+ lgpl-3 lgpl-3+}
    5771    gpl-2 {apache freetype gpl-3 gpl-3+ lgpl-3 lgpl-3+}
     
    6175    lgpl-3 {gpl-1 gpl-2}
    6276    lgpl-3+ {gpl-1 gpl-2}
     77    lppl {cecill gpl}
    6378    mpl {cecill gpl}
    6479    openssl {cecill gpl}
     80    opensslexception [all_licenses_except openssl ssleay]
    6581    php {cecill gpl}
    6682    qpl {cecill gpl}
    6783    restrictive/distributable {agpl cecill gpl}
     84    ruby {cecill gpl}
    6885    ssleay {cecill gpl}
    69     zpl-1 {cecill gpl}}
     86    zpl-1 {cecill gpl}"
    7087
    7188proc printUsage {} {
  • branches/gsoc11-statistics/base/portmgr/packaging/mpkgall.tcl

    r79672 r84763  
    103103        set infofd [open ${infofile} w+]
    104104        puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
    105 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     105<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    106106<plist version="1.0">
    107107}
     
    175175        set infofd [open ${infofile} w+]
    176176        puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
    177 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     177<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    178178<plist version="1.0">
    179179}
  • branches/gsoc11-statistics/base/src/cregistry/entry.c

    r79672 r84763  
    263263    sqlite3_stmt* stmt = NULL;
    264264    reg_entry* entry = NULL;
    265     char* query = "SELECT id FROM registry.ports WHERE name=? AND version=? "
     265    char* query;
     266    if (strlen(epoch) > 0) {
     267        query = "SELECT id FROM registry.ports WHERE name=? AND version=? "
    266268        "AND revision=? AND variants=? AND epoch=?";
     269    } else {
     270        query = "SELECT id FROM registry.ports WHERE name=? AND version=? "
     271        "AND revision=? AND variants=? AND epoch!=?";
     272    }
    267273    if ((sqlite3_prepare(reg->db, query, -1, &stmt, NULL) == SQLITE_OK)
    268274            && (sqlite3_bind_text(stmt, 1, name, -1, SQLITE_STATIC)
  • branches/gsoc11-statistics/base/src/cregistry/registry.c

    r70608 r84763  
    110110    }
    111111    if (sqlite3_open(NULL, &reg->db) == SQLITE_OK) {
     112        /* Enable extended result codes, requires SQLite >= 3.3.8
     113         * Check added for compatibility with Tiger. */
     114#if SQLITE_VERSION_NUMBER >= 3003008
     115        sqlite3_extended_result_codes(reg->db, 1);
     116#endif
     117
    112118        if (init_db(reg->db, errPtr)) {
    113119            reg->status = reg_none;
     
    188194                can_write = 0;
    189195            }
    190         } else {
    191             if (!(sb.st_mode & S_IWOTH)) {
    192                 can_write = 0;
    193             }
     196        } else if (!(sb.st_mode & S_IWOTH) && getuid() != 0) {
     197            can_write = 0;
    194198        }
    195199    }
  • branches/gsoc11-statistics/base/src/macports1.0/macports.tcl

    r82923 r84763  
    875875    }
    876876
     877    # make tools we run operate in UTF-8 mode
     878    set env(LANG) en_US.UTF-8
     879
    877880    # ENV cleanup.
    878881    set keepenvkeys {
     
    881884        DYLD_LIBRARY_PATH DYLD_INSERT_LIBRARIES
    882885        HOME JAVA_HOME MASTER_SITE_LOCAL ARCHIVE_SITE_LOCAL
    883         PATCH_SITE_LOCAL PATH PORTSRC RSYNC_PROXY TMP TMPDIR
    884         USER GROUP
     886        PATCH_SITE_LOCAL PATH PORTSRC RSYNC_PROXY
     887        USER GROUP LANG
    885888        http_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY NO_PROXY
    886889        COLUMNS LINES
     
    888891    if {[info exists extra_env]} {
    889892        set keepenvkeys [concat ${keepenvkeys} ${extra_env}]
    890     }
    891 
    892     set env_names [array names env]
    893     foreach envkey $env_names {
    894         if {[lsearch -exact $keepenvkeys $envkey] == -1} {
    895             unset env($envkey)
    896         }
    897     }
    898 
    899     # make tools we run operate in UTF-8 mode
    900     set env(LANG) en_US.UTF-8
    901 
    902     if {![info exists xcodeversion] || ![info exists xcodebuildcmd]} {
    903         # We'll resolve these later (if needed)
    904         trace add variable macports::xcodeversion read macports::setxcodeinfo
    905         trace add variable macports::xcodebuildcmd read macports::setxcodeinfo
    906     }
    907    
    908     # Add trace for gcc version check
    909     if {![info exists gccversion]} {
    910         # We'll resolve these later (if needed)
    911         trace add variable macports::gccversion read macports::setgccinfo
    912     }
    913 
    914     # Set the default umask
    915     if {![info exists destroot_umask]} {
    916         set destroot_umask 022
    917     }
    918 
    919     if {[info exists master_site_local] && ![info exists env(MASTER_SITE_LOCAL)]} {
    920         set env(MASTER_SITE_LOCAL) "$master_site_local"
    921     }
    922     if {[info exists patch_site_local] && ![info exists env(PATCH_SITE_LOCAL)]} {
    923         set env(PATCH_SITE_LOCAL) "$patch_site_local"
    924     }
    925     if {[info exists archive_site_local] && ![info exists env(ARCHIVE_SITE_LOCAL)]} {
    926         set env(ARCHIVE_SITE_LOCAL) "$archive_site_local"
    927893    }
    928894
     
    941907    }
    942908
     909    # don't keep unusable TMPDIR/TMP values
     910    foreach var {TMP TMPDIR} {
     911        if {[info exists env($var)] && [file writable $env($var)] &&
     912            ([getuid] != 0 || $macportsuser == "root" ||
     913             [file attributes $env($var) -owner] == $macportsuser)} {
     914            lappend keepenvkeys $var
     915        }
     916    }
     917
     918    set env_names [array names env]
     919    foreach envkey $env_names {
     920        if {[lsearch -exact $keepenvkeys $envkey] == -1} {
     921            unset env($envkey)
     922        }
     923    }
     924
    943925    # unset environment an extra time, to work around bugs in Leopard Tcl
    944926    if {$macosx_version == "10.5"} {
     
    950932    }
    951933
     934    if {![info exists xcodeversion] || ![info exists xcodebuildcmd]} {
     935        # We'll resolve these later (if needed)
     936        trace add variable macports::xcodeversion read macports::setxcodeinfo
     937        trace add variable macports::xcodebuildcmd read macports::setxcodeinfo
     938    }
     939   
     940    # Add trace for gcc version check
     941    if {![info exists gccversion]} {
     942        # We'll resolve these later (if needed)
     943        trace add variable macports::gccversion read macports::setgccinfo
     944    }
     945
     946    # Set the default umask
     947    if {![info exists destroot_umask]} {
     948        set destroot_umask 022
     949    }
     950
     951    if {[info exists master_site_local] && ![info exists env(MASTER_SITE_LOCAL)]} {
     952        set env(MASTER_SITE_LOCAL) "$master_site_local"
     953    }
     954    if {[info exists patch_site_local] && ![info exists env(PATCH_SITE_LOCAL)]} {
     955        set env(PATCH_SITE_LOCAL) "$patch_site_local"
     956    }
     957    if {[info exists archive_site_local] && ![info exists env(ARCHIVE_SITE_LOCAL)]} {
     958        set env(ARCHIVE_SITE_LOCAL) "$archive_site_local"
     959    }
     960
    952961    # Proxy handling (done this late since Pextlib is needed)
    953962    if {![info exists proxy_override_env] } {
     
    9971006    _mports_load_quickindex
    9981007
    999     set default_source_url [lindex ${sources_default} 0]
    1000     if {[macports::getprotocol $default_source_url] == "file" || [macports::getprotocol $default_source_url] == "rsync"} {
    1001         set default_portindex [macports::getindex $default_source_url]
    1002         if {[file exists $default_portindex] && [expr [clock seconds] - [file mtime $default_portindex]] > 1209600} {
    1003             ui_warn "port definitions are more than two weeks old, consider using selfupdate"
    1004         }
    1005     }
    1006    
     1008    if {![info exists macports::ui_options(ports_no_old_index_warning)]} {
     1009        set default_source_url [lindex ${sources_default} 0]
     1010        if {[macports::getprotocol $default_source_url] == "file" || [macports::getprotocol $default_source_url] == "rsync"} {
     1011            set default_portindex [macports::getindex $default_source_url]
     1012            if {[file exists $default_portindex] && [expr [clock seconds] - [file mtime $default_portindex]] > 1209600} {
     1013                ui_warn "port definitions are more than two weeks old, consider using selfupdate"
     1014            }
     1015        }
     1016    }
     1017
    10071018    # init registry
    10081019    set db_path [file join ${registry.path} registry registry.db]
     
    16761687        global ::logenabled ::debuglogname
    16771688        ui_error "Failed to install $portname"
     1689        ui_debug "$::errorInfo"
    16781690        if {[info exists ::logenabled] && $::logenabled && [info exists ::debuglogname]} {
    16791691            ui_notice "Log for $portname is at: $::debuglogname"
     
    19691981    global macports::autoconf::rsync_path macports::autoconf::tar_path macports::autoconf::openssl_path
    19701982    array set options $optionslist
     1983    if {[info exists options(no_reindex)]} {
     1984        upvar $options(needed_portindex_var) any_needed_portindex
     1985    }
    19711986
    19721987    set numfailed 0
     
    20962111                }
    20972112
     2113                set needs_portindex 1
    20982114                # now sync the index if the local file is missing or older than a day
    2099                 if {![file isfile $indexfile] || [expr [clock seconds] - [file mtime $indexfile]] > 86400} {
     2115                if {![file isfile $indexfile] || [expr [clock seconds] - [file mtime $indexfile]] > 86400
     2116                      || [info exists options(no_reindex)]} {
    21002117                    if {$is_tarball} {
    21012118                        # chop ports.tar off the end
     
    21112128                    } else {
    21122129                        set ok 1
     2130                        set needs_portindex 0
    21132131                        if {$is_tarball} {
    21142132                            set ok 0
     2133                            set needs_portindex 1
    21152134                            # verify signature for PortIndex
    21162135                            set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} ${remote_indexfile}.rmd160 ${destdir}"
     
    21202139                                    if {![catch {exec $openssl dgst -ripemd160 -verify $pubkey -signature ${destdir}/PortIndex.rmd160 ${destdir}/PortIndex} result]} {
    21212140                                        set ok 1
     2141                                        set needs_portindex 0
    21222142                                        ui_debug "successful verification with key $pubkey"
    21232143                                        break
     
    21412161                    ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
    21422162                }
    2143                 set needs_portindex 1
    21442163            }
    21452164            {^https?$|^ftp$} {
     
    22032222
    22042223                    file delete $tarpath
    2205                    
    2206                     set needs_portindex 1
    22072224                } else {
    22082225                    # sync just a PortIndex file
     
    22192236       
    22202237        if {$needs_portindex} {
    2221             global macports::prefix
    2222             set indexdir [file dirname [macports::getindex $source]]
    2223             if {[catch {system "${macports::prefix}/bin/portindex $indexdir"}]} {
    2224                 ui_error "updating PortIndex for $source failed"
     2238            set any_needed_portindex 1
     2239            if {![info exists options(no_reindex)]} {
     2240                global macports::prefix
     2241                set indexdir [file dirname [macports::getindex $source]]
     2242                if {[catch {system "${macports::prefix}/bin/portindex $indexdir"}]} {
     2243                    ui_error "updating PortIndex for $source failed"
     2244                }
    22252245            }
    22262246        }
     
    26732693        }
    26742694        foreach depspec $portinfo($deptype) {
    2675             # skip depspec/archs combos we've already seen
     2695            # skip depspec/archs combos we've already seen, and ones with less archs than ones we've seen
    26762696            set seenkey "${depspec},[join $required_archs ,]"
     2697            set seen 0
    26772698            if {[info exists depspec_seen($seenkey)]} {
     2699                set seen 1
     2700            } else {
     2701                set prev_seenkeys [array names depspec_seen ${depspec},*]
     2702                set nrequired [llength $required_archs]
     2703                foreach key $prev_seenkeys {
     2704                    set key_archs [lrange [split $key ,] 1 end]
     2705                    if {[llength $key_archs] > $nrequired} {
     2706                        set seen 1
     2707                        set seenkey $key
     2708                        break
     2709                    }
     2710                }
     2711            }
     2712            if {$seen} {
    26782713                if {$depspec_seen($seenkey) != 0} {
    26792714                    # nonzero means the dep is not satisfied, so we have to record it
     
    29512986    }
    29522987
    2953     # syncing ports tree.
    2954     if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
    2955         ui_msg "--->  Updating the ports tree"
    2956         if {[catch {mportsync $optionslist} result]} {
    2957             return -code error "Couldn't sync the ports tree: $result"
    2958         }
    2959     }
    2960 
    29612988    # are we syncing a tarball? (implies detached signature)
    29622989    set is_tarball 0
     
    30473074    # check if we we need to rebuild base
    30483075    set comp [vercmp $macports_version_new $macports::autoconf::macports_version]
     3076
     3077    # syncing ports tree.
     3078    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
     3079        ui_msg "--->  Updating the ports tree"
     3080        if {$comp > 0} {
     3081            # updated portfiles potentially need new base to parse - tell sync to try to
     3082            # use prefabricated PortIndex files and signal if it couldn't
     3083            lappend optionslist no_reindex 1 needed_portindex_var needed_portindex
     3084        }
     3085        if {[catch {mportsync $optionslist} result]} {
     3086            return -code error "Couldn't sync the ports tree: $result"
     3087        }
     3088    }
     3089
    30493090    if {$use_the_force_luke == "yes" || $comp > 0} {
    30503091        if {[info exists options(ports_dryrun)] && $options(ports_dryrun) == "yes"} {
     
    30933134            # do the actual configure, build and installation of new base
    30943135            ui_msg "Installing new MacPorts release in $prefix as $owner:$group; permissions $perms; Tcl-Package in $tclpackage\n"
    3095             if { [catch { system "cd $mp_source_path && ${cc_arg}./configure $configure_args && make && make install" } result] } {
     3136            if { [catch { system "cd $mp_source_path && ${cc_arg}./configure $configure_args && make && make install SELFUPDATING=1" } result] } {
    30963137                return -code error "Error installing new MacPorts base: $result"
    30973138            }
     
    31143155
    31153156    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) != "yes"} {
    3116         ui_msg "\nThe ports tree has been updated. To upgrade your installed ports, you should run"
    3117         ui_msg "  port upgrade outdated"
     3157        if {[info exists needed_portindex]} {
     3158            ui_msg "Not all sources could be fully synced using the old version of MacPorts."
     3159            ui_msg "Please run selfupdate again now that MacPorts base has been updated."
     3160        } else {
     3161            ui_msg "\nThe ports tree has been updated. To upgrade your installed ports, you should run"
     3162            ui_msg "  port upgrade outdated"
     3163        }
    31183164    }
    31193165
  • branches/gsoc11-statistics/base/src/package1.0/portmpkg.tcl

    r79672 r84763  
    193193        set infofd [open ${infofile} w+]
    194194        puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
    195 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     195<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    196196<plist version="1.0">
    197197}
  • branches/gsoc11-statistics/base/src/package1.0/portpkg.tcl

    r82923 r84763  
    182182    set infofd [open ${infofile} w+]
    183183    puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
    184 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     184<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    185185<plist version="1.0">
    186186    }
     
    230230    set infofd [open ${infofile} w+]
    231231    puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
    232 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
     232<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    233233<plist version="1.0">
    234234    }
  • branches/gsoc11-statistics/base/src/pextlib1.0/curl.c

    r79666 r84763  
    239239                }
    240240
     241#if LIBCURL_VERSION_NUM == 0x071307
     242        /* FTP_PROXY workaround for Snow Leopard */
     243        if (strncmp(theURL, "ftp:", 4) == 0) {
     244            char *ftp_proxy = getenv("FTP_PROXY");
     245            if (ftp_proxy) {
     246                theCurlCode = curl_easy_setopt(theHandle, CURLOPT_PROXY, ftp_proxy);
     247                if (theCurlCode != CURLE_OK) {
     248                    theResult = SetResultFromCurlErrorCode(interp, theCurlCode);
     249                    break;
     250                }
     251            }
     252        }
     253#endif
     254
    241255                /* -L option */
    242256                theCurlCode = curl_easy_setopt(theHandle, CURLOPT_FOLLOWLOCATION, 1);
  • branches/gsoc11-statistics/base/src/pextlib1.0/fs-traverse.c

    r82923 r84763  
    250250    }
    251251    /* check errno before calling fts_close in case it sets errno to 0 on success */
    252     if (errno != 0 || (fts_close(root_fts) != 0 && !(flags & F_IGNORE_ERRORS))) {
     252    if (errno != 0) {
     253        Tcl_SetErrno(errno);
     254        Tcl_ResetResult(interp);
     255        Tcl_AppendResult(interp, root_fts->fts_path, ": ", (char *)Tcl_PosixError(interp), NULL);
     256        fts_close(root_fts);
     257        return TCL_ERROR;
     258    } else if (fts_close(root_fts) != 0 && !(flags & F_IGNORE_ERRORS)) {
    253259        Tcl_SetErrno(errno);
    254260        Tcl_SetResult(interp, (char *)Tcl_PosixError(interp), TCL_STATIC);
  • branches/gsoc11-statistics/base/src/pextlib1.0/sha2.c

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

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

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

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/gsoc11-statistics/base/src/port/port.tcl

    r82923 r84763  
    514514}
    515515
     516# sort portlist so dependents come before their dependencies
     517proc portlist_sortdependents { portlist } {
     518    foreach p $portlist {
     519        array set pvals $p
     520        lappend entries($pvals(name)) $p
     521        if {![info exists dependents($pvals(name))]} {
     522            set dependents($pvals(name)) {}
     523            foreach result [registry::list_dependents $pvals(name)] {
     524                lappend dependents($pvals(name)) [lindex $result 2]
     525            }
     526        }
     527        array unset pvals
     528    }
     529    set ret {}
     530    foreach p $portlist {
     531        portlist_sortdependents_helper $p entries dependents seen ret
     532    }
     533    return $ret
     534}
     535
     536proc portlist_sortdependents_helper {p up_entries up_dependents up_seen up_retlist} {
     537    upvar $up_seen seen
     538    if {![info exists seen($p)]} {
     539        set seen($p) 1
     540        upvar $up_entries entries $up_dependents dependents $up_retlist retlist
     541        array set pvals $p
     542        foreach dependent $dependents($pvals(name)) {
     543            if {[info exists entries($dependent)]} {
     544                foreach entry $entries($dependent) {
     545                    portlist_sortdependents_helper $entry entries dependents seen retlist
     546                }
     547            }
     548        }
     549        lappend retlist $p
     550    }
     551}
     552
    516553proc regex_pat_sanitize { s } {
    517554    set sanitized [regsub -all {[\\(){}+$.^]} $s {\\&}]
     
    23372374        return 1
    23382375    }
     2376    set portlist [portlist_sortdependents $portlist]
    23392377    foreachport $portlist {
    23402378        set composite_version [composite_version $portversion [array get variations]]
     
    30923130        return 1
    30933131    }
     3132
     3133    set portlist [portlist_sortdependents $portlist]
    30943134
    30953135    foreachport $portlist {
     
    48354875if { [llength $remaining_args] == 0 && ![info exists ui_options(ports_commandfiles)] } {
    48364876    lappend ui_options(ports_commandfiles) -
     4877} elseif {[lookahead] == "selfupdate" || [lookahead] == "sync"} {
     4878    # tell mportinit not to tell the user they should selfupdate
     4879    set ui_options(ports_no_old_index_warning) 1
    48374880}
    48384881
  • branches/gsoc11-statistics/base/src/port1.0/portchecksum.tcl

    r79672 r84763  
    8787        && [lsearch -exact $checksum_types [lindex $checksums_str 0]] >= 0} {
    8888        # Convert to format #2
    89         set checksums_str [linsert $checksums_str 0 $all_dist_files]
     89        set checksums_str [linsert $checksums_str 0 [lindex $all_dist_files 0]]
    9090        # We increased the size.
    9191        incr nb_checksum
  • branches/gsoc11-statistics/base/src/port1.0/portdistfiles.tcl

    r79672 r84763  
    5454
    5555proc portdistfiles::distfiles_main {args} {
    56     global UI_PREFIX master_sites checksums_array portdbpath dist_subdir all_dist_files
     56    global UI_PREFIX master_sites patch_sites patchfiles checksums_array \
     57           portdbpath dist_subdir all_dist_files
    5758   
    5859    # give up on ports that do not provide URLs
    59     if {![info exists master_sites] || $master_sites == "{}"} {
     60    if {(![info exists master_sites] || $master_sites == "{}")
     61        && (![info exists patchfiles] || ![info exists patch_sites] || $patch_sites == "{}")} {
    6062        return 0
    6163    }
  • branches/gsoc11-statistics/base/src/port1.0/portfetch.tcl

    r82923 r84763  
    105105
    106106# Set distfiles
    107 default distfiles {[portfetch::suffix $distname]}
     107default distfiles {[list [portfetch::suffix $distname]]}
    108108default dist_subdir {${name}}
    109109
     
    166166    global os.platform os.major
    167167    if {[string equal ${action} "set"]} {
     168        if {$args != "standard"} {
     169            distfiles
     170        }
    168171        switch $args {
    169172            bzr {
     
    205208# Given a distname, return the distname with extract.suffix appended
    206209proc portfetch::suffix {distname} {
    207     global extract.suffix fetch.type
    208     switch -- "${fetch.type}" {
    209         bzr         -
    210         cvs         -
    211         svn         -
    212         git         -
    213         hg          { return "" }
    214         standard    -
    215         default     { return "${distname}${extract.suffix}" }
    216     }
     210    global extract.suffix
     211    return "${distname}${extract.suffix}"
    217212}
    218213# XXX import suffix into the global namespace as it is currently used from
     
    227222    if {[info exists patchfiles]} {
    228223        foreach file $patchfiles {
    229             if {![file exists $filespath/$file]} {
     224            if {![file exists "${filespath}/${file}"]} {
    230225                set distsite [getdisttag $file]
    231226                set file [getdistname $file]
     
    250245    if {[info exists distfiles]} {
    251246        foreach file $distfiles {
    252             if {![file exists $filespath/$file]} {
     247            if {![file exists "${filespath}/${file}"]} {
    253248                set distsite [getdisttag $file]
    254249                set file [getdistname $file]
     
    285280# Perform a bzr fetch
    286281proc portfetch::bzrfetch {args} {
     282    global patchfiles
    287283    if {[catch {command_exec bzr "" "2>&1"} result]} {
    288284        return -code error [msgcat::mc "Bazaar checkout failed"]
     
    344340# Perform an svn fetch
    345341proc portfetch::svnfetch {args} {
    346     global svn.args svn.method svn.revision svn.url
     342    global svn.args svn.method svn.revision svn.url patchfiles
    347343
    348344    if {[regexp {\s} ${svn.url}]} {
     
    368364# Perform a git fetch
    369365proc portfetch::gitfetch {args} {
    370     global worksrcpath
     366    global worksrcpath patchfiles
    371367    global git.url git.branch git.sha1 git.cmd
    372368
     
    400396# Perform a mercurial fetch.
    401397proc portfetch::hgfetch {args} {
    402     global worksrcpath prefix_frozen
     398    global worksrcpath prefix_frozen patchfiles
    403399    global hg.url hg.tag hg.cmd
    404400
  • branches/gsoc11-statistics/base/src/port1.0/portlint.tcl

    r78249 r84763  
    4444    "master_sites" \
    4545    "checksums" \
     46    "license"
    4647    ]
    4748
     
    290291    set portarch [get_canonical_archs]
    291292    global description long_description platforms categories all_variants
    292     global maintainers homepage master_sites checksums patchfiles
     293    global maintainers license homepage master_sites checksums patchfiles
    293294    global depends_fetch depends_extract depends_lib depends_build depends_run distfiles fetch.type
    294295   
     
    501502    }
    502503
     504    if {[string match "unknown" $license]} {
     505        ui_error "$license license"
     506        incr errors
     507    }
     508
    503509    # these checks are only valid for ports stored in the regular tree directories
    504510    if {[info exists category] && $portcatdir != $category} {
  • branches/gsoc11-statistics/base/src/port1.0/portstartupitem.tcl

    r79672 r84763  
    574574   
    575575    puts ${plist} "<?xml version='1.0' encoding='UTF-8'?>"
    576     puts ${plist} "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\""
     576    puts ${plist} "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\""
    577577    puts ${plist} "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\" >"
    578578    puts ${plist} "<plist version='1.0'>"
  • branches/gsoc11-statistics/base/src/port1.0/portutil.tcl

    r82923 r84763  
    15121512            return 0
    15131513        } elseif {$target == "activate"} {
    1514             set regref [registry_open $subport $version $revision $portvariants $epoch]
     1514            set regref [registry_open $subport $version $revision $portvariants ""]
    15151515            if {[registry_prop_retr $regref active] != 0} {
    15161516                # Something to close the registry entry may be called here, if it existed.
  • branches/gsoc11-statistics/base/src/registry2.0/portimage.tcl

    r82923 r84763  
    577577
    578578proc _deactivate_file {dstfile} {
    579     if { [file type $dstfile] == "link" } {
     579    if {[catch {file type $dstfile} filetype]} {
     580        ui_debug "$dstfile does not exist"
     581        return
     582    }
     583    if { $filetype == "link" } {
    580584        ui_debug "deactivating link: $dstfile"
    581585        file delete -- $dstfile
    582     } elseif { [file isdirectory $dstfile] } {
     586    } elseif { $filetype == "directory" } {
    583587        # 0 item means empty.
    584588        if { [llength [readdir $dstfile]] == 0 } {
  • branches/gsoc11-statistics/base/src/registry2.0/receipt_sqlite.tcl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/gsoc11-statistics/base/tests/Makefile

    r79672 r84763  
    11include ../Mk/macports.autoconf.mk
    22
    3 TESTS?=checksums-1 cvs-and-patchsites envvariables site-tags trace universal universal-2 xcodeversion dependencies-c dependencies-d dependencies-e case-insensitive-deactivate variants
     3TESTS?=checksums-1 svn-and-patchsites envvariables site-tags trace universal universal-2 xcodeversion dependencies-c dependencies-d dependencies-e case-insensitive-deactivate variants
    44
    55PWD=$(shell pwd)
Note: See TracChangeset for help on using the changeset viewer.