New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 34977

Show
Ignore:
Timestamp:
03/13/2008 07:13:51 (4 years ago)
Author:
eridius@…
Message:

Add new --recursive option to port uninstall to uninstall dependents (#14637)

Location:
trunk/base
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/base/ChangeLog

    r34887 r34977  
    66 
    77Unreleased: 
     8    - port uninstall now takes --recursive to uninstall all dependents (#14637, eridius in r34977) 
     9 
    810    - New fetch.type git (#14232, eridius in r34875) 
    911 
  • trunk/base/doc/port.1

    r34134 r34977  
    290290To uninstall all installed but inactive ports, use 
    291291.Fl u . 
     292To recursively uninstall all dependents of this port, use 
     293.Fl -recursive . 
     294.Pp 
    292295For example: 
    293296.Pp 
    294297.Dl "port uninstall vim" 
    295298.Dl "port -u uninstall" 
     299.Dl "port uninstall --recursive python24" 
    296300.Ss activate 
    297301Activate the installed 
  • trunk/base/src/registry1.0/portuninstall.tcl

    r19376 r34977  
    9999                # Now see if we need to error 
    100100                if { [llength $dl] > 0 } { 
    101                         ui_msg "$UI_PREFIX [format [msgcat::mc "Unable to uninstall %s %s_%s%s, the following ports depend on it:"] $portname $version $revision $variants]" 
    102                         foreach depport $dl { 
    103                                 ui_msg "$UI_PREFIX [format [msgcat::mc "        %s"] $depport]" 
    104                         } 
    105                         if { [info exists uninstall.force] && [string equal ${uninstall.force} "yes"] } { 
    106                                 ui_warn "Uninstall forced.  Proceeding despite dependencies." 
     101                        if {[info exists options(ports_uninstall_recursive)] && $options(ports_uninstall_recursive) eq "yes"} { 
     102                                foreach depport $dl { 
     103                                        portuninstall::uninstall $depport "" [array get options] 
     104                                } 
    107105                        } else { 
    108                                 return -code error "Please uninstall the ports that depend on $portname first." 
     106                                ui_msg "$UI_PREFIX [format [msgcat::mc "Unable to uninstall %s %s_%s%s, the following ports depend on it:"] $portname $version $revision $variants]" 
     107                                foreach depport $dl { 
     108                                        ui_msg "$UI_PREFIX [format [msgcat::mc "        %s"] $depport]" 
     109                                } 
     110                                if { [info exists uninstall.force] && [string equal ${uninstall.force} "yes"] } { 
     111                                        ui_warn "Uninstall forced.  Proceeding despite dependencies." 
     112                                } else { 
     113                                        return -code error "Please uninstall the ports that depend on $portname first." 
     114                                } 
    109115                        } 
    110116                }