Changeset 18952 for trunk/base


Ignore:
Timestamp:
Jul 31, 2006, 4:30:44 AM (14 years ago)
Author:
pguyot (Paul Guyot)
Message:

Instead of issuing a stupid warning when the directory is empty, we now prune
it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portclean.tcl

    r13738 r18952  
    11# et:ts=4
    22# portclean.tcl
    3 # $Id: portclean.tcl,v 1.19 2005/08/27 00:07:30 pguyot Exp $
     3# $Id: portclean.tcl,v 1.20 2006/07/31 04:30:44 pguyot Exp $
    44#
    55# Copyright (c) 2004 Robert Shaw <rshaw@opendarwin.org>
     
    3636package provide portclean 1.0
    3737package require portutil 1.0
     38package require Pextlib 1.0
    3839
    3940set com.apple.clean [target_new com.apple.clean clean_main]
     
    113114        if {($dist_subdir != $portname)} {
    114115                if {[info exists dist_subdir]} {
    115                         if {!([info exists ports_force] && $ports_force == "yes")} {
     116                        set distfullpath [file join ${distpath} ${dist_subdir}]
     117                        if {!([info exists ports_force] && $ports_force == "yes")
     118                                && [file isdirectory ${distfullpath}]
     119                                && [llength [readdir ${distfullpath}]] > 0} {
    116120                                ui_warn [format [msgcat::mc "Distfiles directory '%s' may contain distfiles needed for other ports, use the -f flag to force removal" ] [file join ${distpath} ${dist_subdir}]]
    117121                        } else {
Note: See TracChangeset for help on using the changeset viewer.