Changeset 17031 for trunk/base


Ignore:
Timestamp:
Mar 17, 2006, 12:22:23 AM (14 years ago)
Author:
jberry
Message:

Apply patches from dluke, correcting upgrade and outdated for direct mode.
Resolves bugs #7719, #7721
Thanks Daniel! Please verify fixes

Location:
trunk/base/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/darwinports1.0/darwinports.tcl

    r15874 r17031  
    11# darwinports.tcl
    2 # $Id: darwinports.tcl,v 1.206 2006/01/16 04:39:11 jberry Exp $
     2# $Id: darwinports.tcl,v 1.207 2006/03/17 00:22:22 jberry Exp $
    33#
    44# Copyright (c) 2002 Apple Computer, Inc.
     
    14361436# upgrade procedure
    14371437proc darwinports::upgrade {portname dspec variationslist optionslist {depscachename ""}} {
     1438    global darwinports::registry.installtype
    14381439        array set options $optionslist
    14391440        array set variations $variationslist
     
    15391540                        }
    15401541                }
    1541                 if { [lindex $num 4] == 0} {
     1542        if { [lindex $num 4] == 0 && 0 == [string compare "image" ${darwinports::registry.installtype}] } {
    15421543                        # activate the latest installed version
    15431544                        if {[catch {portimage::activate $portname $version_installed$variant $optionslist} result]} {
     
    16661667
    16671668        # uninstall old ports
    1668         if {[info exists options(port_uninstall_old)] || $epoch_override == 1 || [info exists options(ports_force)] } {
     1669    if {[info exists options(port_uninstall_old)] || $epoch_override == 1 || [info exists options(ports_force)] || 0 != [string compare "image" ${darwinports::registry.installtype}] } {
    16691670                # uninstall old
    16701671                ui_debug "Uninstalling $portname $version_installed$oldvariant"
  • trunk/base/src/port/port.tcl

    r16451 r17031  
    33exec @TCLSH@ "$0" "$@"
    44# port.tcl
    5 # $Id: port.tcl,v 1.156 2006/02/16 20:28:17 jberry Exp $
     5# $Id: port.tcl,v 1.157 2006/03/17 00:22:23 jberry Exp $
    66#
    77# Copyright (c) 2002-2006 DarwinPorts organization
     
    542542
    543543proc get_outdated_ports {} {
     544        global darwinports::registry.installtype
     545        set is_image_mode [expr 0 == [string compare "image" ${darwinports::registry.installtype}]]
     546       
    544547        # Get the list of install ports
    545548        if { [catch {set ilist [registry::installed]} result] } {
     
    562565
    563566                        set is_active                   [lindex $i 4]
    564                         if { $is_active == 0 } continue
     567                        if { $is_active == 0 && $is_image_mode } continue
     568
    565569                        set installed_epoch             [lindex $i 5]
    566570
     
    15381542
    15391543proc action_outdated { action portlist opts } {
     1544        global darwinports::registry.installtype
     1545        set is_image_mode [expr 0 == [string compare "image" ${darwinports::registry.installtype}]]
     1546
    15401547        set status 0
     1548
    15411549        # If port names were supplied, limit ourselves to those port, else check all installed ports
    15421550        if { [llength $portlist] } {
     
    15671575       
    15681576                foreach i $ilist {
    1569 
     1577               
    15701578                        # Get information about the installed port
    15711579                        set portname                    [lindex $i 0]
     
    15751583
    15761584                        set is_active                   [lindex $i 4]
    1577                         if { $is_active == 0 } {
     1585            if { $is_active == 0 && $is_image_mode } {
    15781586                                continue
    15791587                        }
Note: See TracChangeset for help on using the changeset viewer.